@gofynd/fdk-client-javascript 1.4.15-beta.14 → 1.4.15-beta.15
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 +23 -26
- package/package.json +5 -1
- package/sdk/application/ApplicationClient.d.ts +5 -6
- package/sdk/application/ApplicationClient.js +24 -20
- package/sdk/application/Cart/CartApplicationClient.d.ts +133 -83
- package/sdk/application/Cart/CartApplicationClient.js +444 -76
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +132 -114
- package/sdk/application/Catalog/CatalogApplicationClient.js +209 -126
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +4 -4
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +3 -3
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +58 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +73 -29
- package/sdk/application/Content/ContentApplicationClient.d.ts +95 -66
- package/sdk/application/Content/ContentApplicationClient.js +274 -111
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +11 -11
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +10 -10
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +7 -7
- package/sdk/application/Lead/LeadApplicationClient.js +6 -6
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +37 -57
- package/sdk/application/Logistic/LogisticApplicationClient.js +117 -180
- package/sdk/application/Order/OrderApplicationClient.d.ts +63 -21
- package/sdk/application/Order/OrderApplicationClient.js +217 -17
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +179 -149
- package/sdk/application/Payment/PaymentApplicationClient.js +301 -167
- package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
- package/sdk/application/Share/ShareApplicationClient.js +7 -7
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +7 -7
- package/sdk/application/Theme/ThemeApplicationClient.js +10 -6
- package/sdk/application/User/UserApplicationClient.d.ts +103 -53
- package/sdk/application/User/UserApplicationClient.js +308 -49
- package/sdk/common/AxiosHelper.js +11 -4
- package/sdk/common/Constant.d.ts +27 -4
- package/sdk/common/Constant.js +33 -6
- package/sdk/common/utils.d.ts +10 -0
- package/sdk/common/utils.js +24 -3
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +46 -16
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +266 -40
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +163 -19
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +158 -14
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +5 -2
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +23 -7
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +9 -9
- package/sdk/partner/Lead/LeadPartnerClient.js +9 -9
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +14 -9
- package/sdk/partner/Lead/LeadPartnerModel.js +19 -17
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +264 -49
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +2116 -252
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +2256 -258
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +1187 -230
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +21 -1
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +218 -13
- package/sdk/partner/PartnerClient.d.ts +5 -2
- package/sdk/partner/PartnerClient.js +21 -7
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +32 -34
- package/sdk/partner/Theme/ThemePartnerClient.js +42 -44
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +142 -43
- package/sdk/partner/Theme/ThemePartnerModel.js +129 -44
- package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +83 -27
- package/sdk/partner/Webhook/WebhookPartnerClient.js +446 -27
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +920 -185
- package/sdk/partner/Webhook/WebhookPartnerModel.js +462 -154
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +5 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +41 -3
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +8 -7
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +17 -11
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +68 -13
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +44 -6
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +3 -33
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +4 -244
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +15 -15
- package/sdk/platform/Billing/BillingPlatformClient.js +18 -18
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
- package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
- package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +266 -203
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1446 -500
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +729 -100
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +446 -82
- package/sdk/platform/Cart/CartPlatformModel.d.ts +6927 -1396
- package/sdk/platform/Cart/CartPlatformModel.js +3065 -1316
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +433 -248
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1662 -559
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +464 -159
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +304 -87
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +383 -234
- package/sdk/platform/Catalog/CatalogPlatformClient.js +2475 -1557
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9573 -2678
- package/sdk/platform/Catalog/CatalogPlatformModel.js +5033 -1973
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +364 -117
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +281 -104
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -4
- package/sdk/platform/Common/CommonPlatformClient.js +6 -5
- package/sdk/platform/Common/CommonPlatformModel.d.ts +36 -25
- package/sdk/platform/Common/CommonPlatformModel.js +25 -14
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +80 -153
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +102 -541
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +36 -49
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +20 -60
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +1 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +1 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +189 -43
- package/sdk/platform/Communication/CommunicationPlatformModel.js +165 -42
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +58 -81
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +68 -116
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +291 -249
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +243 -234
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +78 -65
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +101 -88
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +20 -20
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +19 -19
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +68 -34
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +174 -41
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +667 -244
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +474 -155
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +366 -280
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1435 -753
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +323 -223
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +335 -205
- package/sdk/platform/Content/ContentPlatformClient.d.ts +304 -106
- package/sdk/platform/Content/ContentPlatformClient.js +1842 -450
- package/sdk/platform/Content/ContentPlatformModel.d.ts +2582 -566
- package/sdk/platform/Content/ContentPlatformModel.js +1426 -558
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +293 -114
- package/sdk/platform/Content/ContentPlatformValidator.js +328 -101
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +59 -23
- package/sdk/platform/Discount/DiscountPlatformClient.js +84 -23
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +403 -110
- package/sdk/platform/Discount/DiscountPlatformModel.js +121 -107
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +12 -110
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +14 -684
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -94
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -115
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +20 -20
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +22 -22
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +90 -920
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +53 -949
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +10 -10
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +11 -11
- package/sdk/platform/Lead/LeadPlatformClient.js +11 -11
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +14 -9
- package/sdk/platform/Lead/LeadPlatformModel.js +20 -18
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +56 -9
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +340 -10
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +128 -24
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +81 -19
- package/sdk/platform/Order/OrderPlatformClient.d.ts +517 -160
- package/sdk/platform/Order/OrderPlatformClient.js +1623 -384
- package/sdk/platform/Order/OrderPlatformModel.d.ts +10372 -1587
- package/sdk/platform/Order/OrderPlatformModel.js +5726 -1512
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +539 -123
- package/sdk/platform/Order/OrderPlatformValidator.js +323 -92
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +8 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +11 -9
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +3 -2
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +77 -25
- package/sdk/platform/Partner/PartnerPlatformModel.js +32 -21
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +144 -219
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +307 -796
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +86 -121
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +80 -138
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +30 -30
- package/sdk/platform/Payment/PaymentPlatformClient.js +30 -30
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +901 -761
- package/sdk/platform/Payment/PaymentPlatformModel.js +663 -583
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
- package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
- package/sdk/platform/PlatformApplicationClient.d.ts +0 -2
- package/sdk/platform/PlatformApplicationClient.js +0 -4
- package/sdk/platform/PlatformClient.d.ts +5 -4
- package/sdk/platform/PlatformClient.js +32 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +526 -69
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +3337 -337
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +603 -38
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +529 -32
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +184 -133
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +780 -491
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +9408 -1666
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +5720 -1765
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +257 -180
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +185 -127
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +7 -7
- package/sdk/platform/Share/SharePlatformApplicationClient.js +7 -7
- package/sdk/platform/Share/SharePlatformModel.d.ts +45 -9
- package/sdk/platform/Share/SharePlatformModel.js +31 -6
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +26 -26
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +38 -29
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +18 -3
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +10 -2
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +4 -4
- package/sdk/platform/Theme/ThemePlatformClient.js +4 -4
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +103 -17
- package/sdk/platform/Theme/ThemePlatformModel.js +92 -23
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +167 -45
- package/sdk/platform/User/UserPlatformApplicationClient.js +950 -67
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +189 -3
- package/sdk/platform/User/UserPlatformApplicationValidator.js +157 -3
- package/sdk/platform/User/UserPlatformModel.d.ts +880 -47
- package/sdk/platform/User/UserPlatformModel.js +607 -46
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +33 -86
- package/sdk/platform/Webhook/WebhookPlatformClient.js +79 -474
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +861 -422
- package/sdk/platform/Webhook/WebhookPlatformModel.js +469 -391
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
- package/sdk/platform/index.d.ts +0 -2
- package/sdk/platform/index.js +0 -4
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
- package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
- package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
- package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -4
- package/sdk/public/Configuration/ConfigurationPublicClient.js +9 -8
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +41 -21
- package/sdk/public/Configuration/ConfigurationPublicModel.js +28 -12
- package/sdk/public/Content/ContentPublicClient.d.ts +145 -2
- package/sdk/public/Content/ContentPublicClient.js +1067 -17
- package/sdk/public/Content/ContentPublicModel.d.ts +704 -3
- package/sdk/public/Content/ContentPublicModel.js +751 -3
- package/sdk/public/Content/ContentPublicValidator.d.ts +94 -3
- package/sdk/public/Content/ContentPublicValidator.js +119 -2
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +1 -1
- package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
- package/sdk/public/Partner/PartnerPublicModel.js +81 -71
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
- package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
- package/sdk/public/PublicClient.d.ts +5 -2
- package/sdk/public/PublicClient.js +16 -6
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -13
- package/sdk/public/Webhook/WebhookPublicClient.js +13 -13
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +249 -67
- package/sdk/public/Webhook/WebhookPublicModel.js +81 -61
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/utility.d.ts +3 -0
- package/utility.js +7 -0
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +0 -79
- package/sdk/application/Rewards/RewardsApplicationClient.js +0 -315
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +0 -19
- package/sdk/application/Webhook/WebhookApplicationClient.js +0 -72
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +0 -136
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +0 -976
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -152
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -157
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +0 -382
- package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -408
|
@@ -15,6 +15,85 @@ class Content {
|
|
|
15
15
|
this.applicationId = applicationId;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* @param {ContentPlatformApplicationValidator.AddApplicationLanguageParam} arg
|
|
20
|
+
* - Arg object
|
|
21
|
+
*
|
|
22
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
23
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
24
|
+
* @returns {Promise<Object>} - Success response
|
|
25
|
+
* @name addApplicationLanguage
|
|
26
|
+
* @summary: Add app language
|
|
27
|
+
* @description: Add new languages to application's supported language list. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/addApplicationLanguage/).
|
|
28
|
+
*/
|
|
29
|
+
async addApplicationLanguage(
|
|
30
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
31
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
32
|
+
) {
|
|
33
|
+
const {
|
|
34
|
+
error,
|
|
35
|
+
} = ContentPlatformApplicationValidator.addApplicationLanguage().validate(
|
|
36
|
+
{
|
|
37
|
+
body,
|
|
38
|
+
},
|
|
39
|
+
{ abortEarly: false, allowUnknown: true }
|
|
40
|
+
);
|
|
41
|
+
if (error) {
|
|
42
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Showing warrnings if extra unknown parameters are found
|
|
46
|
+
const {
|
|
47
|
+
error: warrning,
|
|
48
|
+
} = ContentPlatformApplicationValidator.addApplicationLanguage().validate(
|
|
49
|
+
{
|
|
50
|
+
body,
|
|
51
|
+
},
|
|
52
|
+
{ abortEarly: false, allowUnknown: false }
|
|
53
|
+
);
|
|
54
|
+
if (warrning) {
|
|
55
|
+
Logger({
|
|
56
|
+
level: "WARN",
|
|
57
|
+
message: `Parameter Validation warrnings for platform > Content > addApplicationLanguage \n ${warrning}`,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const query_params = {};
|
|
62
|
+
|
|
63
|
+
const response = await PlatformAPIClient.execute(
|
|
64
|
+
this.config,
|
|
65
|
+
"post",
|
|
66
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/languages`,
|
|
67
|
+
query_params,
|
|
68
|
+
body,
|
|
69
|
+
requestHeaders,
|
|
70
|
+
{ responseHeaders }
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
let responseData = response;
|
|
74
|
+
if (responseHeaders) {
|
|
75
|
+
responseData = response[0];
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const { error: res_error } = Joi.any().validate(responseData, {
|
|
79
|
+
abortEarly: false,
|
|
80
|
+
allowUnknown: true,
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
if (res_error) {
|
|
84
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
85
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
86
|
+
} else {
|
|
87
|
+
Logger({
|
|
88
|
+
level: "WARN",
|
|
89
|
+
message: `Response Validation Warnings for platform > Content > addApplicationLanguage \n ${res_error}`,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return response;
|
|
95
|
+
}
|
|
96
|
+
|
|
18
97
|
/**
|
|
19
98
|
* @param {ContentPlatformApplicationValidator.AddDataLoaderParam} arg - Arg object
|
|
20
99
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -23,7 +102,7 @@ class Content {
|
|
|
23
102
|
* Success response
|
|
24
103
|
* @name addDataLoader
|
|
25
104
|
* @summary: Create data loader
|
|
26
|
-
* @description: Create and add a new data loader. - Check out [method documentation](https://
|
|
105
|
+
* @description: Create and add a new data loader. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/addDataLoader/).
|
|
27
106
|
*/
|
|
28
107
|
async addDataLoader(
|
|
29
108
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -102,7 +181,7 @@ class Content {
|
|
|
102
181
|
* @returns {Promise<ContentPlatformModel.CreateFaqResponseSchema>} - Success response
|
|
103
182
|
* @name addFaq
|
|
104
183
|
* @summary: Create FAQ
|
|
105
|
-
* @description: Create and add a new FAQ. - Check out [method documentation](https://
|
|
184
|
+
* @description: Create and add a new FAQ. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/addFaq/).
|
|
106
185
|
*/
|
|
107
186
|
async addFaq(
|
|
108
187
|
{ categoryId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -181,7 +260,7 @@ class Content {
|
|
|
181
260
|
* @returns {Promise<ContentPlatformModel.TagsSchema>} - Success response
|
|
182
261
|
* @name addInjectableTag
|
|
183
262
|
* @summary: Create HTML tag
|
|
184
|
-
* @description: Create and add a new injectable tag. - Check out [method documentation](https://
|
|
263
|
+
* @description: Create and add a new injectable tag. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/addInjectableTag/).
|
|
185
264
|
*/
|
|
186
265
|
async addInjectableTag(
|
|
187
266
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -262,7 +341,7 @@ class Content {
|
|
|
262
341
|
* @returns {Promise<ContentPlatformModel.PathMappingSchema>} - Success response
|
|
263
342
|
* @name addPathRedirectionRules
|
|
264
343
|
* @summary: Create path redirection rules
|
|
265
|
-
* @description: Create and add rules for path redirection. - Check out [method documentation](https://
|
|
344
|
+
* @description: Create and add rules for path redirection. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/addPathRedirectionRules/).
|
|
266
345
|
*/
|
|
267
346
|
async addPathRedirectionRules(
|
|
268
347
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -335,24 +414,23 @@ class Content {
|
|
|
335
414
|
}
|
|
336
415
|
|
|
337
416
|
/**
|
|
338
|
-
* @param {ContentPlatformApplicationValidator.
|
|
417
|
+
* @param {ContentPlatformApplicationValidator.BulkUnPublishApplicationLanguageParam} arg
|
|
339
418
|
* - Arg object
|
|
340
419
|
*
|
|
341
420
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
342
421
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
343
|
-
* @returns {Promise<
|
|
344
|
-
*
|
|
345
|
-
* @
|
|
346
|
-
* @
|
|
347
|
-
* @description: Generate and add a new announcement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createAnnouncement/).
|
|
422
|
+
* @returns {Promise<Object>} - Success response
|
|
423
|
+
* @name bulkUnPublishApplicationLanguage
|
|
424
|
+
* @summary: Unpublish all languages of sales channel.
|
|
425
|
+
* @description: Unpublish all application's published languages of specific sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/bulkUnPublishApplicationLanguage/).
|
|
348
426
|
*/
|
|
349
|
-
async
|
|
427
|
+
async bulkUnPublishApplicationLanguage(
|
|
350
428
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
351
429
|
{ responseHeaders } = { responseHeaders: false }
|
|
352
430
|
) {
|
|
353
431
|
const {
|
|
354
432
|
error,
|
|
355
|
-
} = ContentPlatformApplicationValidator.
|
|
433
|
+
} = ContentPlatformApplicationValidator.bulkUnPublishApplicationLanguage().validate(
|
|
356
434
|
{
|
|
357
435
|
body,
|
|
358
436
|
},
|
|
@@ -365,7 +443,7 @@ class Content {
|
|
|
365
443
|
// Showing warrnings if extra unknown parameters are found
|
|
366
444
|
const {
|
|
367
445
|
error: warrning,
|
|
368
|
-
} = ContentPlatformApplicationValidator.
|
|
446
|
+
} = ContentPlatformApplicationValidator.bulkUnPublishApplicationLanguage().validate(
|
|
369
447
|
{
|
|
370
448
|
body,
|
|
371
449
|
},
|
|
@@ -374,7 +452,7 @@ class Content {
|
|
|
374
452
|
if (warrning) {
|
|
375
453
|
Logger({
|
|
376
454
|
level: "WARN",
|
|
377
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
455
|
+
message: `Parameter Validation warrnings for platform > Content > bulkUnPublishApplicationLanguage \n ${warrning}`,
|
|
378
456
|
});
|
|
379
457
|
}
|
|
380
458
|
|
|
@@ -382,8 +460,8 @@ class Content {
|
|
|
382
460
|
|
|
383
461
|
const response = await PlatformAPIClient.execute(
|
|
384
462
|
this.config,
|
|
385
|
-
"
|
|
386
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
463
|
+
"patch",
|
|
464
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/languages`,
|
|
387
465
|
query_params,
|
|
388
466
|
body,
|
|
389
467
|
requestHeaders,
|
|
@@ -395,9 +473,7 @@ class Content {
|
|
|
395
473
|
responseData = response[0];
|
|
396
474
|
}
|
|
397
475
|
|
|
398
|
-
const {
|
|
399
|
-
error: res_error,
|
|
400
|
-
} = ContentPlatformModel.CreateAnnouncementSchema().validate(responseData, {
|
|
476
|
+
const { error: res_error } = Joi.any().validate(responseData, {
|
|
401
477
|
abortEarly: false,
|
|
402
478
|
allowUnknown: true,
|
|
403
479
|
});
|
|
@@ -408,7 +484,7 @@ class Content {
|
|
|
408
484
|
} else {
|
|
409
485
|
Logger({
|
|
410
486
|
level: "WARN",
|
|
411
|
-
message: `Response Validation Warnings for platform > Content >
|
|
487
|
+
message: `Response Validation Warnings for platform > Content > bulkUnPublishApplicationLanguage \n ${res_error}`,
|
|
412
488
|
});
|
|
413
489
|
}
|
|
414
490
|
}
|
|
@@ -417,28 +493,25 @@ class Content {
|
|
|
417
493
|
}
|
|
418
494
|
|
|
419
495
|
/**
|
|
420
|
-
* @param {ContentPlatformApplicationValidator.
|
|
496
|
+
* @param {ContentPlatformApplicationValidator.CreateAnnouncementParam} arg
|
|
421
497
|
* - Arg object
|
|
422
498
|
*
|
|
423
499
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
424
500
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
425
|
-
* @returns {Promise<ContentPlatformModel.
|
|
426
|
-
*
|
|
427
|
-
*
|
|
428
|
-
* @
|
|
429
|
-
* @
|
|
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/).
|
|
501
|
+
* @returns {Promise<ContentPlatformModel.CreateAnnouncementSchema>} -
|
|
502
|
+
* Success response
|
|
503
|
+
* @name createAnnouncement
|
|
504
|
+
* @summary: Create announcement
|
|
505
|
+
* @description: Generate and add a new announcement. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/createAnnouncement/).
|
|
431
506
|
*/
|
|
432
|
-
async
|
|
433
|
-
{
|
|
507
|
+
async createAnnouncement(
|
|
508
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
434
509
|
{ responseHeaders } = { responseHeaders: false }
|
|
435
510
|
) {
|
|
436
511
|
const {
|
|
437
512
|
error,
|
|
438
|
-
} = ContentPlatformApplicationValidator.
|
|
513
|
+
} = ContentPlatformApplicationValidator.createAnnouncement().validate(
|
|
439
514
|
{
|
|
440
|
-
resource,
|
|
441
|
-
resourceId,
|
|
442
515
|
body,
|
|
443
516
|
},
|
|
444
517
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -450,10 +523,8 @@ class Content {
|
|
|
450
523
|
// Showing warrnings if extra unknown parameters are found
|
|
451
524
|
const {
|
|
452
525
|
error: warrning,
|
|
453
|
-
} = ContentPlatformApplicationValidator.
|
|
526
|
+
} = ContentPlatformApplicationValidator.createAnnouncement().validate(
|
|
454
527
|
{
|
|
455
|
-
resource,
|
|
456
|
-
resourceId,
|
|
457
528
|
body,
|
|
458
529
|
},
|
|
459
530
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -461,7 +532,7 @@ class Content {
|
|
|
461
532
|
if (warrning) {
|
|
462
533
|
Logger({
|
|
463
534
|
level: "WARN",
|
|
464
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
535
|
+
message: `Parameter Validation warrnings for platform > Content > createAnnouncement \n ${warrning}`,
|
|
465
536
|
});
|
|
466
537
|
}
|
|
467
538
|
|
|
@@ -469,8 +540,8 @@ class Content {
|
|
|
469
540
|
|
|
470
541
|
const response = await PlatformAPIClient.execute(
|
|
471
542
|
this.config,
|
|
472
|
-
"
|
|
473
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
543
|
+
"post",
|
|
544
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/announcements`,
|
|
474
545
|
query_params,
|
|
475
546
|
body,
|
|
476
547
|
requestHeaders,
|
|
@@ -484,10 +555,10 @@ class Content {
|
|
|
484
555
|
|
|
485
556
|
const {
|
|
486
557
|
error: res_error,
|
|
487
|
-
} = ContentPlatformModel.
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
);
|
|
558
|
+
} = ContentPlatformModel.CreateAnnouncementSchema().validate(responseData, {
|
|
559
|
+
abortEarly: false,
|
|
560
|
+
allowUnknown: true,
|
|
561
|
+
});
|
|
491
562
|
|
|
492
563
|
if (res_error) {
|
|
493
564
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -495,7 +566,7 @@ class Content {
|
|
|
495
566
|
} else {
|
|
496
567
|
Logger({
|
|
497
568
|
level: "WARN",
|
|
498
|
-
message: `Response Validation Warnings for platform > Content >
|
|
569
|
+
message: `Response Validation Warnings for platform > Content > createAnnouncement \n ${res_error}`,
|
|
499
570
|
});
|
|
500
571
|
}
|
|
501
572
|
}
|
|
@@ -513,17 +584,18 @@ class Content {
|
|
|
513
584
|
* - Success response
|
|
514
585
|
*
|
|
515
586
|
* @name createAppCustomFieldDefinition
|
|
516
|
-
* @summary: Create custom field definition
|
|
517
|
-
* @description: You can create custom fields definition to any resource so you can extend property of resource. - Check out [method documentation](https://
|
|
587
|
+
* @summary: Create custom field definition for a given resource type
|
|
588
|
+
* @description: You can create custom fields definition to any resource so you can extend property of resource. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/createAppCustomFieldDefinition/).
|
|
518
589
|
*/
|
|
519
590
|
async createAppCustomFieldDefinition(
|
|
520
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
591
|
+
{ resource, body, requestHeaders } = { requestHeaders: {} },
|
|
521
592
|
{ responseHeaders } = { responseHeaders: false }
|
|
522
593
|
) {
|
|
523
594
|
const {
|
|
524
595
|
error,
|
|
525
596
|
} = ContentPlatformApplicationValidator.createAppCustomFieldDefinition().validate(
|
|
526
597
|
{
|
|
598
|
+
resource,
|
|
527
599
|
body,
|
|
528
600
|
},
|
|
529
601
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -537,6 +609,7 @@ class Content {
|
|
|
537
609
|
error: warrning,
|
|
538
610
|
} = ContentPlatformApplicationValidator.createAppCustomFieldDefinition().validate(
|
|
539
611
|
{
|
|
612
|
+
resource,
|
|
540
613
|
body,
|
|
541
614
|
},
|
|
542
615
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -553,7 +626,7 @@ class Content {
|
|
|
553
626
|
const response = await PlatformAPIClient.execute(
|
|
554
627
|
this.config,
|
|
555
628
|
"post",
|
|
556
|
-
`/service/platform/content/
|
|
629
|
+
`/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/resource/${resource}/definition`,
|
|
557
630
|
query_params,
|
|
558
631
|
body,
|
|
559
632
|
requestHeaders,
|
|
@@ -587,24 +660,25 @@ class Content {
|
|
|
587
660
|
}
|
|
588
661
|
|
|
589
662
|
/**
|
|
590
|
-
* @param {ContentPlatformApplicationValidator.
|
|
663
|
+
* @param {ContentPlatformApplicationValidator.CreateAppCustomObjectBySlugParam} arg
|
|
591
664
|
* - Arg object
|
|
592
665
|
*
|
|
593
666
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
594
667
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
595
668
|
* @returns {Promise<ContentPlatformModel.CustomObjectSchema>} - Success response
|
|
596
|
-
* @name
|
|
669
|
+
* @name createAppCustomObjectBySlug
|
|
597
670
|
* @summary: Create custom object entries
|
|
598
|
-
* @description: Custom object entries against the custom object definition can be added using this API. - Check out [method documentation](https://
|
|
671
|
+
* @description: Custom object entries against the custom object definition can be added using this API. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/createAppCustomObjectBySlug/).
|
|
599
672
|
*/
|
|
600
|
-
async
|
|
601
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
673
|
+
async createAppCustomObjectBySlug(
|
|
674
|
+
{ definitionSlug, body, requestHeaders } = { requestHeaders: {} },
|
|
602
675
|
{ responseHeaders } = { responseHeaders: false }
|
|
603
676
|
) {
|
|
604
677
|
const {
|
|
605
678
|
error,
|
|
606
|
-
} = ContentPlatformApplicationValidator.
|
|
679
|
+
} = ContentPlatformApplicationValidator.createAppCustomObjectBySlug().validate(
|
|
607
680
|
{
|
|
681
|
+
definitionSlug,
|
|
608
682
|
body,
|
|
609
683
|
},
|
|
610
684
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -616,8 +690,9 @@ class Content {
|
|
|
616
690
|
// Showing warrnings if extra unknown parameters are found
|
|
617
691
|
const {
|
|
618
692
|
error: warrning,
|
|
619
|
-
} = ContentPlatformApplicationValidator.
|
|
693
|
+
} = ContentPlatformApplicationValidator.createAppCustomObjectBySlug().validate(
|
|
620
694
|
{
|
|
695
|
+
definitionSlug,
|
|
621
696
|
body,
|
|
622
697
|
},
|
|
623
698
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -625,7 +700,7 @@ class Content {
|
|
|
625
700
|
if (warrning) {
|
|
626
701
|
Logger({
|
|
627
702
|
level: "WARN",
|
|
628
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
703
|
+
message: `Parameter Validation warrnings for platform > Content > createAppCustomObjectBySlug \n ${warrning}`,
|
|
629
704
|
});
|
|
630
705
|
}
|
|
631
706
|
|
|
@@ -634,7 +709,7 @@ class Content {
|
|
|
634
709
|
const response = await PlatformAPIClient.execute(
|
|
635
710
|
this.config,
|
|
636
711
|
"post",
|
|
637
|
-
`/service/platform/content/
|
|
712
|
+
`/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${definitionSlug}/entries`,
|
|
638
713
|
query_params,
|
|
639
714
|
body,
|
|
640
715
|
requestHeaders,
|
|
@@ -659,7 +734,7 @@ class Content {
|
|
|
659
734
|
} else {
|
|
660
735
|
Logger({
|
|
661
736
|
level: "WARN",
|
|
662
|
-
message: `Response Validation Warnings for platform > Content >
|
|
737
|
+
message: `Response Validation Warnings for platform > Content > createAppCustomObjectBySlug \n ${res_error}`,
|
|
663
738
|
});
|
|
664
739
|
}
|
|
665
740
|
}
|
|
@@ -673,11 +748,12 @@ class Content {
|
|
|
673
748
|
*
|
|
674
749
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
675
750
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
676
|
-
* @returns {Promise<ContentPlatformModel.
|
|
677
|
-
* Success response
|
|
751
|
+
* @returns {Promise<ContentPlatformModel.CustomObjectDefinitionSlugSchema>}
|
|
752
|
+
* - Success response
|
|
753
|
+
*
|
|
678
754
|
* @name createAppCustomObjectDefinition
|
|
679
755
|
* @summary: Create custom object definition
|
|
680
|
-
* @description: Create a custom object that will have a collection of custom fields and can be used anywhere in the custom field for any resource. - Check out [method documentation](https://
|
|
756
|
+
* @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://docs.fynd.com/partners/commerce/sdk/platform/content/createAppCustomObjectDefinition/).
|
|
681
757
|
*/
|
|
682
758
|
async createAppCustomObjectDefinition(
|
|
683
759
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -716,7 +792,7 @@ class Content {
|
|
|
716
792
|
const response = await PlatformAPIClient.execute(
|
|
717
793
|
this.config,
|
|
718
794
|
"post",
|
|
719
|
-
`/service/platform/content/
|
|
795
|
+
`/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition`,
|
|
720
796
|
query_params,
|
|
721
797
|
body,
|
|
722
798
|
requestHeaders,
|
|
@@ -730,7 +806,7 @@ class Content {
|
|
|
730
806
|
|
|
731
807
|
const {
|
|
732
808
|
error: res_error,
|
|
733
|
-
} = ContentPlatformModel.
|
|
809
|
+
} = ContentPlatformModel.CustomObjectDefinitionSlugSchema().validate(
|
|
734
810
|
responseData,
|
|
735
811
|
{ abortEarly: false, allowUnknown: true }
|
|
736
812
|
);
|
|
@@ -750,19 +826,23 @@ class Content {
|
|
|
750
826
|
}
|
|
751
827
|
|
|
752
828
|
/**
|
|
753
|
-
* @param {ContentPlatformApplicationValidator.
|
|
829
|
+
* @param {ContentPlatformApplicationValidator.CreateApplicationResourceTranslationParam} arg
|
|
830
|
+
* - Arg object
|
|
831
|
+
*
|
|
754
832
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
755
833
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
756
|
-
* @returns {Promise<ContentPlatformModel.
|
|
757
|
-
* @name
|
|
758
|
-
* @summary:
|
|
759
|
-
* @description:
|
|
834
|
+
* @returns {Promise<ContentPlatformModel.ResourceTranslation>} - Success response
|
|
835
|
+
* @name createApplicationResourceTranslation
|
|
836
|
+
* @summary: Add app translation
|
|
837
|
+
* @description: Create new translations for application resources. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/createApplicationResourceTranslation/).
|
|
760
838
|
*/
|
|
761
|
-
async
|
|
839
|
+
async createApplicationResourceTranslation(
|
|
762
840
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
763
841
|
{ responseHeaders } = { responseHeaders: false }
|
|
764
842
|
) {
|
|
765
|
-
const {
|
|
843
|
+
const {
|
|
844
|
+
error,
|
|
845
|
+
} = ContentPlatformApplicationValidator.createApplicationResourceTranslation().validate(
|
|
766
846
|
{
|
|
767
847
|
body,
|
|
768
848
|
},
|
|
@@ -775,7 +855,7 @@ class Content {
|
|
|
775
855
|
// Showing warrnings if extra unknown parameters are found
|
|
776
856
|
const {
|
|
777
857
|
error: warrning,
|
|
778
|
-
} = ContentPlatformApplicationValidator.
|
|
858
|
+
} = ContentPlatformApplicationValidator.createApplicationResourceTranslation().validate(
|
|
779
859
|
{
|
|
780
860
|
body,
|
|
781
861
|
},
|
|
@@ -784,7 +864,7 @@ class Content {
|
|
|
784
864
|
if (warrning) {
|
|
785
865
|
Logger({
|
|
786
866
|
level: "WARN",
|
|
787
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
867
|
+
message: `Parameter Validation warrnings for platform > Content > createApplicationResourceTranslation \n ${warrning}`,
|
|
788
868
|
});
|
|
789
869
|
}
|
|
790
870
|
|
|
@@ -793,7 +873,7 @@ class Content {
|
|
|
793
873
|
const response = await PlatformAPIClient.execute(
|
|
794
874
|
this.config,
|
|
795
875
|
"post",
|
|
796
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
876
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/resource/translations`,
|
|
797
877
|
query_params,
|
|
798
878
|
body,
|
|
799
879
|
requestHeaders,
|
|
@@ -807,7 +887,7 @@ class Content {
|
|
|
807
887
|
|
|
808
888
|
const {
|
|
809
889
|
error: res_error,
|
|
810
|
-
} = ContentPlatformModel.
|
|
890
|
+
} = ContentPlatformModel.ResourceTranslation().validate(responseData, {
|
|
811
891
|
abortEarly: false,
|
|
812
892
|
allowUnknown: true,
|
|
813
893
|
});
|
|
@@ -818,7 +898,7 @@ class Content {
|
|
|
818
898
|
} else {
|
|
819
899
|
Logger({
|
|
820
900
|
level: "WARN",
|
|
821
|
-
message: `Response Validation Warnings for platform > Content >
|
|
901
|
+
message: `Response Validation Warnings for platform > Content > createApplicationResourceTranslation \n ${res_error}`,
|
|
822
902
|
});
|
|
823
903
|
}
|
|
824
904
|
}
|
|
@@ -827,23 +907,19 @@ class Content {
|
|
|
827
907
|
}
|
|
828
908
|
|
|
829
909
|
/**
|
|
830
|
-
* @param {ContentPlatformApplicationValidator.
|
|
831
|
-
* - Arg object
|
|
832
|
-
*
|
|
910
|
+
* @param {ContentPlatformApplicationValidator.CreateBlogParam} arg - Arg object
|
|
833
911
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
834
912
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
835
|
-
* @returns {Promise<ContentPlatformModel.
|
|
836
|
-
* @name
|
|
837
|
-
* @summary: Create
|
|
838
|
-
* @description: Generate and add a new
|
|
913
|
+
* @returns {Promise<ContentPlatformModel.BlogSchema>} - Success response
|
|
914
|
+
* @name createBlog
|
|
915
|
+
* @summary: Create blog
|
|
916
|
+
* @description: Generate and add a new blog. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/createBlog/).
|
|
839
917
|
*/
|
|
840
|
-
async
|
|
918
|
+
async createBlog(
|
|
841
919
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
842
920
|
{ responseHeaders } = { responseHeaders: false }
|
|
843
921
|
) {
|
|
844
|
-
const {
|
|
845
|
-
error,
|
|
846
|
-
} = ContentPlatformApplicationValidator.createFaqCategory().validate(
|
|
922
|
+
const { error } = ContentPlatformApplicationValidator.createBlog().validate(
|
|
847
923
|
{
|
|
848
924
|
body,
|
|
849
925
|
},
|
|
@@ -856,7 +932,7 @@ class Content {
|
|
|
856
932
|
// Showing warrnings if extra unknown parameters are found
|
|
857
933
|
const {
|
|
858
934
|
error: warrning,
|
|
859
|
-
} = ContentPlatformApplicationValidator.
|
|
935
|
+
} = ContentPlatformApplicationValidator.createBlog().validate(
|
|
860
936
|
{
|
|
861
937
|
body,
|
|
862
938
|
},
|
|
@@ -865,7 +941,7 @@ class Content {
|
|
|
865
941
|
if (warrning) {
|
|
866
942
|
Logger({
|
|
867
943
|
level: "WARN",
|
|
868
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
944
|
+
message: `Parameter Validation warrnings for platform > Content > createBlog \n ${warrning}`,
|
|
869
945
|
});
|
|
870
946
|
}
|
|
871
947
|
|
|
@@ -874,7 +950,7 @@ class Content {
|
|
|
874
950
|
const response = await PlatformAPIClient.execute(
|
|
875
951
|
this.config,
|
|
876
952
|
"post",
|
|
877
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
953
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/blogs/`,
|
|
878
954
|
query_params,
|
|
879
955
|
body,
|
|
880
956
|
requestHeaders,
|
|
@@ -888,7 +964,7 @@ class Content {
|
|
|
888
964
|
|
|
889
965
|
const {
|
|
890
966
|
error: res_error,
|
|
891
|
-
} = ContentPlatformModel.
|
|
967
|
+
} = ContentPlatformModel.BlogSchema().validate(responseData, {
|
|
892
968
|
abortEarly: false,
|
|
893
969
|
allowUnknown: true,
|
|
894
970
|
});
|
|
@@ -899,7 +975,7 @@ class Content {
|
|
|
899
975
|
} else {
|
|
900
976
|
Logger({
|
|
901
977
|
level: "WARN",
|
|
902
|
-
message: `Response Validation Warnings for platform > Content >
|
|
978
|
+
message: `Response Validation Warnings for platform > Content > createBlog \n ${res_error}`,
|
|
903
979
|
});
|
|
904
980
|
}
|
|
905
981
|
}
|
|
@@ -908,23 +984,23 @@ class Content {
|
|
|
908
984
|
}
|
|
909
985
|
|
|
910
986
|
/**
|
|
911
|
-
* @param {ContentPlatformApplicationValidator.
|
|
987
|
+
* @param {ContentPlatformApplicationValidator.CreateFaqCategoryParam} arg
|
|
912
988
|
* - Arg object
|
|
913
989
|
*
|
|
914
990
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
915
991
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
916
|
-
* @returns {Promise<ContentPlatformModel.
|
|
917
|
-
* @name
|
|
918
|
-
* @summary: Create
|
|
919
|
-
* @description: Generate and add a new
|
|
992
|
+
* @returns {Promise<ContentPlatformModel.CreateFaqCategorySchema>} - Success response
|
|
993
|
+
* @name createFaqCategory
|
|
994
|
+
* @summary: Create FAQ Category
|
|
995
|
+
* @description: Generate and add a new FAQ category. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/createFaqCategory/).
|
|
920
996
|
*/
|
|
921
|
-
async
|
|
997
|
+
async createFaqCategory(
|
|
922
998
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
923
999
|
{ responseHeaders } = { responseHeaders: false }
|
|
924
1000
|
) {
|
|
925
1001
|
const {
|
|
926
1002
|
error,
|
|
927
|
-
} = ContentPlatformApplicationValidator.
|
|
1003
|
+
} = ContentPlatformApplicationValidator.createFaqCategory().validate(
|
|
928
1004
|
{
|
|
929
1005
|
body,
|
|
930
1006
|
},
|
|
@@ -937,7 +1013,7 @@ class Content {
|
|
|
937
1013
|
// Showing warrnings if extra unknown parameters are found
|
|
938
1014
|
const {
|
|
939
1015
|
error: warrning,
|
|
940
|
-
} = ContentPlatformApplicationValidator.
|
|
1016
|
+
} = ContentPlatformApplicationValidator.createFaqCategory().validate(
|
|
941
1017
|
{
|
|
942
1018
|
body,
|
|
943
1019
|
},
|
|
@@ -946,7 +1022,7 @@ class Content {
|
|
|
946
1022
|
if (warrning) {
|
|
947
1023
|
Logger({
|
|
948
1024
|
level: "WARN",
|
|
949
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
1025
|
+
message: `Parameter Validation warrnings for platform > Content > createFaqCategory \n ${warrning}`,
|
|
950
1026
|
});
|
|
951
1027
|
}
|
|
952
1028
|
|
|
@@ -955,7 +1031,7 @@ class Content {
|
|
|
955
1031
|
const response = await PlatformAPIClient.execute(
|
|
956
1032
|
this.config,
|
|
957
1033
|
"post",
|
|
958
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1034
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/faq/category`,
|
|
959
1035
|
query_params,
|
|
960
1036
|
body,
|
|
961
1037
|
requestHeaders,
|
|
@@ -969,7 +1045,7 @@ class Content {
|
|
|
969
1045
|
|
|
970
1046
|
const {
|
|
971
1047
|
error: res_error,
|
|
972
|
-
} = ContentPlatformModel.
|
|
1048
|
+
} = ContentPlatformModel.CreateFaqCategorySchema().validate(responseData, {
|
|
973
1049
|
abortEarly: false,
|
|
974
1050
|
allowUnknown: true,
|
|
975
1051
|
});
|
|
@@ -980,7 +1056,7 @@ class Content {
|
|
|
980
1056
|
} else {
|
|
981
1057
|
Logger({
|
|
982
1058
|
level: "WARN",
|
|
983
|
-
message: `Response Validation Warnings for platform > Content >
|
|
1059
|
+
message: `Response Validation Warnings for platform > Content > createFaqCategory \n ${res_error}`,
|
|
984
1060
|
});
|
|
985
1061
|
}
|
|
986
1062
|
}
|
|
@@ -989,21 +1065,23 @@ class Content {
|
|
|
989
1065
|
}
|
|
990
1066
|
|
|
991
1067
|
/**
|
|
992
|
-
* @param {ContentPlatformApplicationValidator.
|
|
1068
|
+
* @param {ContentPlatformApplicationValidator.CreateLandingPageParam} arg
|
|
1069
|
+
* - Arg object
|
|
1070
|
+
*
|
|
993
1071
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
994
1072
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
995
|
-
* @returns {Promise<ContentPlatformModel.
|
|
996
|
-
* @name
|
|
997
|
-
* @summary: Create
|
|
998
|
-
* @description: Generate and add a new
|
|
1073
|
+
* @returns {Promise<ContentPlatformModel.LandingPageSchema>} - Success response
|
|
1074
|
+
* @name createLandingPage
|
|
1075
|
+
* @summary: Create landing page
|
|
1076
|
+
* @description: Generate and add a new landing page. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/createLandingPage/).
|
|
999
1077
|
*/
|
|
1000
|
-
async
|
|
1078
|
+
async createLandingPage(
|
|
1001
1079
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1002
1080
|
{ responseHeaders } = { responseHeaders: false }
|
|
1003
1081
|
) {
|
|
1004
1082
|
const {
|
|
1005
1083
|
error,
|
|
1006
|
-
} = ContentPlatformApplicationValidator.
|
|
1084
|
+
} = ContentPlatformApplicationValidator.createLandingPage().validate(
|
|
1007
1085
|
{
|
|
1008
1086
|
body,
|
|
1009
1087
|
},
|
|
@@ -1016,7 +1094,7 @@ class Content {
|
|
|
1016
1094
|
// Showing warrnings if extra unknown parameters are found
|
|
1017
1095
|
const {
|
|
1018
1096
|
error: warrning,
|
|
1019
|
-
} = ContentPlatformApplicationValidator.
|
|
1097
|
+
} = ContentPlatformApplicationValidator.createLandingPage().validate(
|
|
1020
1098
|
{
|
|
1021
1099
|
body,
|
|
1022
1100
|
},
|
|
@@ -1025,7 +1103,7 @@ class Content {
|
|
|
1025
1103
|
if (warrning) {
|
|
1026
1104
|
Logger({
|
|
1027
1105
|
level: "WARN",
|
|
1028
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
1106
|
+
message: `Parameter Validation warrnings for platform > Content > createLandingPage \n ${warrning}`,
|
|
1029
1107
|
});
|
|
1030
1108
|
}
|
|
1031
1109
|
|
|
@@ -1034,7 +1112,7 @@ class Content {
|
|
|
1034
1112
|
const response = await PlatformAPIClient.execute(
|
|
1035
1113
|
this.config,
|
|
1036
1114
|
"post",
|
|
1037
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1115
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/landing-page/`,
|
|
1038
1116
|
query_params,
|
|
1039
1117
|
body,
|
|
1040
1118
|
requestHeaders,
|
|
@@ -1048,7 +1126,7 @@ class Content {
|
|
|
1048
1126
|
|
|
1049
1127
|
const {
|
|
1050
1128
|
error: res_error,
|
|
1051
|
-
} = ContentPlatformModel.
|
|
1129
|
+
} = ContentPlatformModel.LandingPageSchema().validate(responseData, {
|
|
1052
1130
|
abortEarly: false,
|
|
1053
1131
|
allowUnknown: true,
|
|
1054
1132
|
});
|
|
@@ -1059,7 +1137,7 @@ class Content {
|
|
|
1059
1137
|
} else {
|
|
1060
1138
|
Logger({
|
|
1061
1139
|
level: "WARN",
|
|
1062
|
-
message: `Response Validation Warnings for platform > Content >
|
|
1140
|
+
message: `Response Validation Warnings for platform > Content > createLandingPage \n ${res_error}`,
|
|
1063
1141
|
});
|
|
1064
1142
|
}
|
|
1065
1143
|
}
|
|
@@ -1068,19 +1146,21 @@ class Content {
|
|
|
1068
1146
|
}
|
|
1069
1147
|
|
|
1070
1148
|
/**
|
|
1071
|
-
* @param {ContentPlatformApplicationValidator.
|
|
1149
|
+
* @param {ContentPlatformApplicationValidator.CreateNavigationParam} arg - Arg object
|
|
1072
1150
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1073
1151
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1074
|
-
* @returns {Promise<ContentPlatformModel.
|
|
1075
|
-
* @name
|
|
1076
|
-
* @summary: Create
|
|
1077
|
-
* @description: Generate and add a new
|
|
1152
|
+
* @returns {Promise<ContentPlatformModel.NavigationSchema>} - Success response
|
|
1153
|
+
* @name createNavigation
|
|
1154
|
+
* @summary: Create navigation items
|
|
1155
|
+
* @description: Generate and add a new navigation element. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/createNavigation/).
|
|
1078
1156
|
*/
|
|
1079
|
-
async
|
|
1157
|
+
async createNavigation(
|
|
1080
1158
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1081
1159
|
{ responseHeaders } = { responseHeaders: false }
|
|
1082
1160
|
) {
|
|
1083
|
-
const {
|
|
1161
|
+
const {
|
|
1162
|
+
error,
|
|
1163
|
+
} = ContentPlatformApplicationValidator.createNavigation().validate(
|
|
1084
1164
|
{
|
|
1085
1165
|
body,
|
|
1086
1166
|
},
|
|
@@ -1093,7 +1173,7 @@ class Content {
|
|
|
1093
1173
|
// Showing warrnings if extra unknown parameters are found
|
|
1094
1174
|
const {
|
|
1095
1175
|
error: warrning,
|
|
1096
|
-
} = ContentPlatformApplicationValidator.
|
|
1176
|
+
} = ContentPlatformApplicationValidator.createNavigation().validate(
|
|
1097
1177
|
{
|
|
1098
1178
|
body,
|
|
1099
1179
|
},
|
|
@@ -1102,7 +1182,7 @@ class Content {
|
|
|
1102
1182
|
if (warrning) {
|
|
1103
1183
|
Logger({
|
|
1104
1184
|
level: "WARN",
|
|
1105
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
1185
|
+
message: `Parameter Validation warrnings for platform > Content > createNavigation \n ${warrning}`,
|
|
1106
1186
|
});
|
|
1107
1187
|
}
|
|
1108
1188
|
|
|
@@ -1111,7 +1191,7 @@ class Content {
|
|
|
1111
1191
|
const response = await PlatformAPIClient.execute(
|
|
1112
1192
|
this.config,
|
|
1113
1193
|
"post",
|
|
1114
|
-
`/service/platform/content/
|
|
1194
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/navigations/`,
|
|
1115
1195
|
query_params,
|
|
1116
1196
|
body,
|
|
1117
1197
|
requestHeaders,
|
|
@@ -1125,7 +1205,7 @@ class Content {
|
|
|
1125
1205
|
|
|
1126
1206
|
const {
|
|
1127
1207
|
error: res_error,
|
|
1128
|
-
} = ContentPlatformModel.
|
|
1208
|
+
} = ContentPlatformModel.NavigationSchema().validate(responseData, {
|
|
1129
1209
|
abortEarly: false,
|
|
1130
1210
|
allowUnknown: true,
|
|
1131
1211
|
});
|
|
@@ -1136,7 +1216,7 @@ class Content {
|
|
|
1136
1216
|
} else {
|
|
1137
1217
|
Logger({
|
|
1138
1218
|
level: "WARN",
|
|
1139
|
-
message: `Response Validation Warnings for platform > Content >
|
|
1219
|
+
message: `Response Validation Warnings for platform > Content > createNavigation \n ${res_error}`,
|
|
1140
1220
|
});
|
|
1141
1221
|
}
|
|
1142
1222
|
}
|
|
@@ -1145,23 +1225,19 @@ class Content {
|
|
|
1145
1225
|
}
|
|
1146
1226
|
|
|
1147
1227
|
/**
|
|
1148
|
-
* @param {ContentPlatformApplicationValidator.
|
|
1149
|
-
* - Arg object
|
|
1150
|
-
*
|
|
1228
|
+
* @param {ContentPlatformApplicationValidator.CreatePageParam} arg - Arg object
|
|
1151
1229
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1152
1230
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1153
1231
|
* @returns {Promise<ContentPlatformModel.PageSchema>} - Success response
|
|
1154
|
-
* @name
|
|
1155
|
-
* @summary: Create page
|
|
1156
|
-
* @description: Generate and add a new page
|
|
1232
|
+
* @name createPage
|
|
1233
|
+
* @summary: Create page
|
|
1234
|
+
* @description: Generate and add a new page to the platform. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/createPage/).
|
|
1157
1235
|
*/
|
|
1158
|
-
async
|
|
1236
|
+
async createPage(
|
|
1159
1237
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1160
1238
|
{ responseHeaders } = { responseHeaders: false }
|
|
1161
1239
|
) {
|
|
1162
|
-
const {
|
|
1163
|
-
error,
|
|
1164
|
-
} = ContentPlatformApplicationValidator.createPagePreview().validate(
|
|
1240
|
+
const { error } = ContentPlatformApplicationValidator.createPage().validate(
|
|
1165
1241
|
{
|
|
1166
1242
|
body,
|
|
1167
1243
|
},
|
|
@@ -1174,7 +1250,7 @@ class Content {
|
|
|
1174
1250
|
// Showing warrnings if extra unknown parameters are found
|
|
1175
1251
|
const {
|
|
1176
1252
|
error: warrning,
|
|
1177
|
-
} = ContentPlatformApplicationValidator.
|
|
1253
|
+
} = ContentPlatformApplicationValidator.createPage().validate(
|
|
1178
1254
|
{
|
|
1179
1255
|
body,
|
|
1180
1256
|
},
|
|
@@ -1183,7 +1259,7 @@ class Content {
|
|
|
1183
1259
|
if (warrning) {
|
|
1184
1260
|
Logger({
|
|
1185
1261
|
level: "WARN",
|
|
1186
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
1262
|
+
message: `Parameter Validation warrnings for platform > Content > createPage \n ${warrning}`,
|
|
1187
1263
|
});
|
|
1188
1264
|
}
|
|
1189
1265
|
|
|
@@ -1192,7 +1268,7 @@ class Content {
|
|
|
1192
1268
|
const response = await PlatformAPIClient.execute(
|
|
1193
1269
|
this.config,
|
|
1194
1270
|
"post",
|
|
1195
|
-
`/service/platform/content/
|
|
1271
|
+
`/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/pages/`,
|
|
1196
1272
|
query_params,
|
|
1197
1273
|
body,
|
|
1198
1274
|
requestHeaders,
|
|
@@ -1217,7 +1293,7 @@ class Content {
|
|
|
1217
1293
|
} else {
|
|
1218
1294
|
Logger({
|
|
1219
1295
|
level: "WARN",
|
|
1220
|
-
message: `Response Validation Warnings for platform > Content >
|
|
1296
|
+
message: `Response Validation Warnings for platform > Content > createPage \n ${res_error}`,
|
|
1221
1297
|
});
|
|
1222
1298
|
}
|
|
1223
1299
|
}
|
|
@@ -1234,7 +1310,7 @@ class Content {
|
|
|
1234
1310
|
* @returns {Promise<ContentPlatformModel.SEOSchemaMarkupTemplate>} - Success response
|
|
1235
1311
|
* @name createSEOMarkupSchema
|
|
1236
1312
|
* @summary: Create SEO Markup Schema
|
|
1237
|
-
* @description: Use this API to Create SEO Markup Schema - Check out [method documentation](https://
|
|
1313
|
+
* @description: Use this API to Create SEO Markup Schema - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/createSEOMarkupSchema/).
|
|
1238
1314
|
*/
|
|
1239
1315
|
async createSEOMarkupSchema(
|
|
1240
1316
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1307,21 +1383,23 @@ class Content {
|
|
|
1307
1383
|
}
|
|
1308
1384
|
|
|
1309
1385
|
/**
|
|
1310
|
-
* @param {ContentPlatformApplicationValidator.
|
|
1386
|
+
* @param {ContentPlatformApplicationValidator.CreateTranslateUILabelsParam} arg
|
|
1387
|
+
* - Arg object
|
|
1388
|
+
*
|
|
1311
1389
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1312
1390
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1313
|
-
* @returns {Promise<ContentPlatformModel.
|
|
1314
|
-
* @name
|
|
1315
|
-
* @summary:
|
|
1316
|
-
* @description:
|
|
1391
|
+
* @returns {Promise<ContentPlatformModel.TranslateUiLabels>} - Success response
|
|
1392
|
+
* @name createTranslateUILabels
|
|
1393
|
+
* @summary: Add Translate Ui Labels
|
|
1394
|
+
* @description: Creates a new Translate Ui Labels entry with specified configuration and locale settings. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/createTranslateUILabels/).
|
|
1317
1395
|
*/
|
|
1318
|
-
async
|
|
1396
|
+
async createTranslateUILabels(
|
|
1319
1397
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1320
1398
|
{ responseHeaders } = { responseHeaders: false }
|
|
1321
1399
|
) {
|
|
1322
1400
|
const {
|
|
1323
1401
|
error,
|
|
1324
|
-
} = ContentPlatformApplicationValidator.
|
|
1402
|
+
} = ContentPlatformApplicationValidator.createTranslateUILabels().validate(
|
|
1325
1403
|
{
|
|
1326
1404
|
body,
|
|
1327
1405
|
},
|
|
@@ -1334,7 +1412,7 @@ class Content {
|
|
|
1334
1412
|
// Showing warrnings if extra unknown parameters are found
|
|
1335
1413
|
const {
|
|
1336
1414
|
error: warrning,
|
|
1337
|
-
} = ContentPlatformApplicationValidator.
|
|
1415
|
+
} = ContentPlatformApplicationValidator.createTranslateUILabels().validate(
|
|
1338
1416
|
{
|
|
1339
1417
|
body,
|
|
1340
1418
|
},
|
|
@@ -1343,7 +1421,7 @@ class Content {
|
|
|
1343
1421
|
if (warrning) {
|
|
1344
1422
|
Logger({
|
|
1345
1423
|
level: "WARN",
|
|
1346
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
1424
|
+
message: `Parameter Validation warrnings for platform > Content > createTranslateUILabels \n ${warrning}`,
|
|
1347
1425
|
});
|
|
1348
1426
|
}
|
|
1349
1427
|
|
|
@@ -1352,7 +1430,7 @@ class Content {
|
|
|
1352
1430
|
const response = await PlatformAPIClient.execute(
|
|
1353
1431
|
this.config,
|
|
1354
1432
|
"post",
|
|
1355
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1433
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/translate-ui-labels`,
|
|
1356
1434
|
query_params,
|
|
1357
1435
|
body,
|
|
1358
1436
|
requestHeaders,
|
|
@@ -1366,7 +1444,7 @@ class Content {
|
|
|
1366
1444
|
|
|
1367
1445
|
const {
|
|
1368
1446
|
error: res_error,
|
|
1369
|
-
} = ContentPlatformModel.
|
|
1447
|
+
} = ContentPlatformModel.TranslateUiLabels().validate(responseData, {
|
|
1370
1448
|
abortEarly: false,
|
|
1371
1449
|
allowUnknown: true,
|
|
1372
1450
|
});
|
|
@@ -1377,7 +1455,7 @@ class Content {
|
|
|
1377
1455
|
} else {
|
|
1378
1456
|
Logger({
|
|
1379
1457
|
level: "WARN",
|
|
1380
|
-
message: `Response Validation Warnings for platform > Content >
|
|
1458
|
+
message: `Response Validation Warnings for platform > Content > createTranslateUILabels \n ${res_error}`,
|
|
1381
1459
|
});
|
|
1382
1460
|
}
|
|
1383
1461
|
}
|
|
@@ -1395,7 +1473,7 @@ class Content {
|
|
|
1395
1473
|
* Success response
|
|
1396
1474
|
* @name deleteAnnouncement
|
|
1397
1475
|
* @summary: Delete an announcement
|
|
1398
|
-
* @description: Remove a specific announcement. - Check out [method documentation](https://
|
|
1476
|
+
* @description: Remove a specific announcement. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/deleteAnnouncement/).
|
|
1399
1477
|
*/
|
|
1400
1478
|
async deleteAnnouncement(
|
|
1401
1479
|
{ announcementId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1468,25 +1546,27 @@ class Content {
|
|
|
1468
1546
|
}
|
|
1469
1547
|
|
|
1470
1548
|
/**
|
|
1471
|
-
* @param {ContentPlatformApplicationValidator.
|
|
1549
|
+
* @param {ContentPlatformApplicationValidator.DeleteAppCustomFieldDefinitionBySlugParam} arg
|
|
1472
1550
|
* - Arg object
|
|
1473
1551
|
*
|
|
1474
1552
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1475
1553
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1476
1554
|
* @returns {Promise<ContentPlatformModel.CustomDataDeleteSchema>} - Success response
|
|
1477
|
-
* @name
|
|
1555
|
+
* @name deleteAppCustomFieldDefinitionBySlug
|
|
1478
1556
|
* @summary: Delete custom fields definition
|
|
1479
|
-
* @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://
|
|
1557
|
+
* @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://docs.fynd.com/partners/commerce/sdk/platform/content/deleteAppCustomFieldDefinitionBySlug/).
|
|
1480
1558
|
*/
|
|
1481
|
-
async
|
|
1482
|
-
{
|
|
1559
|
+
async deleteAppCustomFieldDefinitionBySlug(
|
|
1560
|
+
{ slug, resource, namespace, requestHeaders } = { requestHeaders: {} },
|
|
1483
1561
|
{ responseHeaders } = { responseHeaders: false }
|
|
1484
1562
|
) {
|
|
1485
1563
|
const {
|
|
1486
1564
|
error,
|
|
1487
|
-
} = ContentPlatformApplicationValidator.
|
|
1565
|
+
} = ContentPlatformApplicationValidator.deleteAppCustomFieldDefinitionBySlug().validate(
|
|
1488
1566
|
{
|
|
1489
|
-
|
|
1567
|
+
slug,
|
|
1568
|
+
resource,
|
|
1569
|
+
namespace,
|
|
1490
1570
|
},
|
|
1491
1571
|
{ abortEarly: false, allowUnknown: true }
|
|
1492
1572
|
);
|
|
@@ -1497,16 +1577,18 @@ class Content {
|
|
|
1497
1577
|
// Showing warrnings if extra unknown parameters are found
|
|
1498
1578
|
const {
|
|
1499
1579
|
error: warrning,
|
|
1500
|
-
} = ContentPlatformApplicationValidator.
|
|
1580
|
+
} = ContentPlatformApplicationValidator.deleteAppCustomFieldDefinitionBySlug().validate(
|
|
1501
1581
|
{
|
|
1502
|
-
|
|
1582
|
+
slug,
|
|
1583
|
+
resource,
|
|
1584
|
+
namespace,
|
|
1503
1585
|
},
|
|
1504
1586
|
{ abortEarly: false, allowUnknown: false }
|
|
1505
1587
|
);
|
|
1506
1588
|
if (warrning) {
|
|
1507
1589
|
Logger({
|
|
1508
1590
|
level: "WARN",
|
|
1509
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
1591
|
+
message: `Parameter Validation warrnings for platform > Content > deleteAppCustomFieldDefinitionBySlug \n ${warrning}`,
|
|
1510
1592
|
});
|
|
1511
1593
|
}
|
|
1512
1594
|
|
|
@@ -1515,7 +1597,7 @@ class Content {
|
|
|
1515
1597
|
const response = await PlatformAPIClient.execute(
|
|
1516
1598
|
this.config,
|
|
1517
1599
|
"delete",
|
|
1518
|
-
`/service/platform/content/
|
|
1600
|
+
`/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/resource/${resource}/namespace/${namespace}/definition/${slug}`,
|
|
1519
1601
|
query_params,
|
|
1520
1602
|
undefined,
|
|
1521
1603
|
requestHeaders,
|
|
@@ -1540,7 +1622,7 @@ class Content {
|
|
|
1540
1622
|
} else {
|
|
1541
1623
|
Logger({
|
|
1542
1624
|
level: "WARN",
|
|
1543
|
-
message: `Response Validation Warnings for platform > Content >
|
|
1625
|
+
message: `Response Validation Warnings for platform > Content > deleteAppCustomFieldDefinitionBySlug \n ${res_error}`,
|
|
1544
1626
|
});
|
|
1545
1627
|
}
|
|
1546
1628
|
}
|
|
@@ -1549,25 +1631,26 @@ class Content {
|
|
|
1549
1631
|
}
|
|
1550
1632
|
|
|
1551
1633
|
/**
|
|
1552
|
-
* @param {ContentPlatformApplicationValidator.
|
|
1634
|
+
* @param {ContentPlatformApplicationValidator.DeleteAppCustomObjectBySlugParam} arg
|
|
1553
1635
|
* - Arg object
|
|
1554
1636
|
*
|
|
1555
1637
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1556
1638
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1557
1639
|
* @returns {Promise<ContentPlatformModel.CustomDataDeleteSchema>} - Success response
|
|
1558
|
-
* @name
|
|
1640
|
+
* @name deleteAppCustomObjectBySlug
|
|
1559
1641
|
* @summary: Delete custom object
|
|
1560
|
-
* @description: Custom object
|
|
1642
|
+
* @description: A Custom object entry can be deleted by providing the custom object definition slug and custom object entry slug using this endpoint. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/deleteAppCustomObjectBySlug/).
|
|
1561
1643
|
*/
|
|
1562
|
-
async
|
|
1563
|
-
{
|
|
1644
|
+
async deleteAppCustomObjectBySlug(
|
|
1645
|
+
{ definitionSlug, slug, requestHeaders } = { requestHeaders: {} },
|
|
1564
1646
|
{ responseHeaders } = { responseHeaders: false }
|
|
1565
1647
|
) {
|
|
1566
1648
|
const {
|
|
1567
1649
|
error,
|
|
1568
|
-
} = ContentPlatformApplicationValidator.
|
|
1650
|
+
} = ContentPlatformApplicationValidator.deleteAppCustomObjectBySlug().validate(
|
|
1569
1651
|
{
|
|
1570
|
-
|
|
1652
|
+
definitionSlug,
|
|
1653
|
+
slug,
|
|
1571
1654
|
},
|
|
1572
1655
|
{ abortEarly: false, allowUnknown: true }
|
|
1573
1656
|
);
|
|
@@ -1578,16 +1661,17 @@ class Content {
|
|
|
1578
1661
|
// Showing warrnings if extra unknown parameters are found
|
|
1579
1662
|
const {
|
|
1580
1663
|
error: warrning,
|
|
1581
|
-
} = ContentPlatformApplicationValidator.
|
|
1664
|
+
} = ContentPlatformApplicationValidator.deleteAppCustomObjectBySlug().validate(
|
|
1582
1665
|
{
|
|
1583
|
-
|
|
1666
|
+
definitionSlug,
|
|
1667
|
+
slug,
|
|
1584
1668
|
},
|
|
1585
1669
|
{ abortEarly: false, allowUnknown: false }
|
|
1586
1670
|
);
|
|
1587
1671
|
if (warrning) {
|
|
1588
1672
|
Logger({
|
|
1589
1673
|
level: "WARN",
|
|
1590
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
1674
|
+
message: `Parameter Validation warrnings for platform > Content > deleteAppCustomObjectBySlug \n ${warrning}`,
|
|
1591
1675
|
});
|
|
1592
1676
|
}
|
|
1593
1677
|
|
|
@@ -1596,7 +1680,7 @@ class Content {
|
|
|
1596
1680
|
const response = await PlatformAPIClient.execute(
|
|
1597
1681
|
this.config,
|
|
1598
1682
|
"delete",
|
|
1599
|
-
`/service/platform/content/
|
|
1683
|
+
`/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${definitionSlug}/entries/${slug}`,
|
|
1600
1684
|
query_params,
|
|
1601
1685
|
undefined,
|
|
1602
1686
|
requestHeaders,
|
|
@@ -1621,7 +1705,7 @@ class Content {
|
|
|
1621
1705
|
} else {
|
|
1622
1706
|
Logger({
|
|
1623
1707
|
level: "WARN",
|
|
1624
|
-
message: `Response Validation Warnings for platform > Content >
|
|
1708
|
+
message: `Response Validation Warnings for platform > Content > deleteAppCustomObjectBySlug \n ${res_error}`,
|
|
1625
1709
|
});
|
|
1626
1710
|
}
|
|
1627
1711
|
}
|
|
@@ -1630,7 +1714,7 @@ class Content {
|
|
|
1630
1714
|
}
|
|
1631
1715
|
|
|
1632
1716
|
/**
|
|
1633
|
-
* @param {ContentPlatformApplicationValidator.
|
|
1717
|
+
* @param {ContentPlatformApplicationValidator.DeleteAppCustomObjectDefinitionBySlugParam} arg
|
|
1634
1718
|
* - Arg object
|
|
1635
1719
|
*
|
|
1636
1720
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -1638,19 +1722,19 @@ class Content {
|
|
|
1638
1722
|
* @returns {Promise<ContentPlatformModel.CustomObjectDefinitionDeleteResponseSchema>}
|
|
1639
1723
|
* - Success response
|
|
1640
1724
|
*
|
|
1641
|
-
* @name
|
|
1725
|
+
* @name deleteAppCustomObjectDefinitionBySlug
|
|
1642
1726
|
* @summary: Delete custom object definition
|
|
1643
|
-
* @description: Custom object definitions can be deleted using this endpoint by providing the definition ID. - Check out [method documentation](https://
|
|
1727
|
+
* @description: Custom object definitions can be deleted using this endpoint by providing the definition ID. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/deleteAppCustomObjectDefinitionBySlug/).
|
|
1644
1728
|
*/
|
|
1645
|
-
async
|
|
1646
|
-
{
|
|
1729
|
+
async deleteAppCustomObjectDefinitionBySlug(
|
|
1730
|
+
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
1647
1731
|
{ responseHeaders } = { responseHeaders: false }
|
|
1648
1732
|
) {
|
|
1649
1733
|
const {
|
|
1650
1734
|
error,
|
|
1651
|
-
} = ContentPlatformApplicationValidator.
|
|
1735
|
+
} = ContentPlatformApplicationValidator.deleteAppCustomObjectDefinitionBySlug().validate(
|
|
1652
1736
|
{
|
|
1653
|
-
|
|
1737
|
+
slug,
|
|
1654
1738
|
},
|
|
1655
1739
|
{ abortEarly: false, allowUnknown: true }
|
|
1656
1740
|
);
|
|
@@ -1661,16 +1745,16 @@ class Content {
|
|
|
1661
1745
|
// Showing warrnings if extra unknown parameters are found
|
|
1662
1746
|
const {
|
|
1663
1747
|
error: warrning,
|
|
1664
|
-
} = ContentPlatformApplicationValidator.
|
|
1748
|
+
} = ContentPlatformApplicationValidator.deleteAppCustomObjectDefinitionBySlug().validate(
|
|
1665
1749
|
{
|
|
1666
|
-
|
|
1750
|
+
slug,
|
|
1667
1751
|
},
|
|
1668
1752
|
{ abortEarly: false, allowUnknown: false }
|
|
1669
1753
|
);
|
|
1670
1754
|
if (warrning) {
|
|
1671
1755
|
Logger({
|
|
1672
1756
|
level: "WARN",
|
|
1673
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
1757
|
+
message: `Parameter Validation warrnings for platform > Content > deleteAppCustomObjectDefinitionBySlug \n ${warrning}`,
|
|
1674
1758
|
});
|
|
1675
1759
|
}
|
|
1676
1760
|
|
|
@@ -1679,7 +1763,7 @@ class Content {
|
|
|
1679
1763
|
const response = await PlatformAPIClient.execute(
|
|
1680
1764
|
this.config,
|
|
1681
1765
|
"delete",
|
|
1682
|
-
`/service/platform/content/
|
|
1766
|
+
`/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${slug}`,
|
|
1683
1767
|
query_params,
|
|
1684
1768
|
undefined,
|
|
1685
1769
|
requestHeaders,
|
|
@@ -1704,7 +1788,169 @@ class Content {
|
|
|
1704
1788
|
} else {
|
|
1705
1789
|
Logger({
|
|
1706
1790
|
level: "WARN",
|
|
1707
|
-
message: `Response Validation Warnings for platform > Content >
|
|
1791
|
+
message: `Response Validation Warnings for platform > Content > deleteAppCustomObjectDefinitionBySlug \n ${res_error}`,
|
|
1792
|
+
});
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
return response;
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
/**
|
|
1800
|
+
* @param {ContentPlatformApplicationValidator.DeleteApplicationLanguageParam} arg
|
|
1801
|
+
* - Arg object
|
|
1802
|
+
*
|
|
1803
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1804
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1805
|
+
* @returns {Promise<ContentPlatformModel.OperationResponseSchema>} - Success response
|
|
1806
|
+
* @name deleteApplicationLanguage
|
|
1807
|
+
* @summary: Remove app language
|
|
1808
|
+
* @description: Remove a language from application's supported languages. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/deleteApplicationLanguage/).
|
|
1809
|
+
*/
|
|
1810
|
+
async deleteApplicationLanguage(
|
|
1811
|
+
{ locale, requestHeaders } = { requestHeaders: {} },
|
|
1812
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1813
|
+
) {
|
|
1814
|
+
const {
|
|
1815
|
+
error,
|
|
1816
|
+
} = ContentPlatformApplicationValidator.deleteApplicationLanguage().validate(
|
|
1817
|
+
{
|
|
1818
|
+
locale,
|
|
1819
|
+
},
|
|
1820
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1821
|
+
);
|
|
1822
|
+
if (error) {
|
|
1823
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1827
|
+
const {
|
|
1828
|
+
error: warrning,
|
|
1829
|
+
} = ContentPlatformApplicationValidator.deleteApplicationLanguage().validate(
|
|
1830
|
+
{
|
|
1831
|
+
locale,
|
|
1832
|
+
},
|
|
1833
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1834
|
+
);
|
|
1835
|
+
if (warrning) {
|
|
1836
|
+
Logger({
|
|
1837
|
+
level: "WARN",
|
|
1838
|
+
message: `Parameter Validation warrnings for platform > Content > deleteApplicationLanguage \n ${warrning}`,
|
|
1839
|
+
});
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
const query_params = {};
|
|
1843
|
+
|
|
1844
|
+
const response = await PlatformAPIClient.execute(
|
|
1845
|
+
this.config,
|
|
1846
|
+
"delete",
|
|
1847
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/languages/${locale}`,
|
|
1848
|
+
query_params,
|
|
1849
|
+
undefined,
|
|
1850
|
+
requestHeaders,
|
|
1851
|
+
{ responseHeaders }
|
|
1852
|
+
);
|
|
1853
|
+
|
|
1854
|
+
let responseData = response;
|
|
1855
|
+
if (responseHeaders) {
|
|
1856
|
+
responseData = response[0];
|
|
1857
|
+
}
|
|
1858
|
+
|
|
1859
|
+
const {
|
|
1860
|
+
error: res_error,
|
|
1861
|
+
} = ContentPlatformModel.OperationResponseSchema().validate(responseData, {
|
|
1862
|
+
abortEarly: false,
|
|
1863
|
+
allowUnknown: true,
|
|
1864
|
+
});
|
|
1865
|
+
|
|
1866
|
+
if (res_error) {
|
|
1867
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1868
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1869
|
+
} else {
|
|
1870
|
+
Logger({
|
|
1871
|
+
level: "WARN",
|
|
1872
|
+
message: `Response Validation Warnings for platform > Content > deleteApplicationLanguage \n ${res_error}`,
|
|
1873
|
+
});
|
|
1874
|
+
}
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
return response;
|
|
1878
|
+
}
|
|
1879
|
+
|
|
1880
|
+
/**
|
|
1881
|
+
* @param {ContentPlatformApplicationValidator.DeleteApplicationResourceTranslationParam} arg
|
|
1882
|
+
* - Arg object
|
|
1883
|
+
*
|
|
1884
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1885
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1886
|
+
* @returns {Promise<ContentPlatformModel.OperationResponseSchema>} - Success response
|
|
1887
|
+
* @name deleteApplicationResourceTranslation
|
|
1888
|
+
* @summary: Remove app translation
|
|
1889
|
+
* @description: Remove translations for application resources. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/deleteApplicationResourceTranslation/).
|
|
1890
|
+
*/
|
|
1891
|
+
async deleteApplicationResourceTranslation(
|
|
1892
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
1893
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1894
|
+
) {
|
|
1895
|
+
const {
|
|
1896
|
+
error,
|
|
1897
|
+
} = ContentPlatformApplicationValidator.deleteApplicationResourceTranslation().validate(
|
|
1898
|
+
{
|
|
1899
|
+
id,
|
|
1900
|
+
},
|
|
1901
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1902
|
+
);
|
|
1903
|
+
if (error) {
|
|
1904
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1907
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1908
|
+
const {
|
|
1909
|
+
error: warrning,
|
|
1910
|
+
} = ContentPlatformApplicationValidator.deleteApplicationResourceTranslation().validate(
|
|
1911
|
+
{
|
|
1912
|
+
id,
|
|
1913
|
+
},
|
|
1914
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1915
|
+
);
|
|
1916
|
+
if (warrning) {
|
|
1917
|
+
Logger({
|
|
1918
|
+
level: "WARN",
|
|
1919
|
+
message: `Parameter Validation warrnings for platform > Content > deleteApplicationResourceTranslation \n ${warrning}`,
|
|
1920
|
+
});
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1923
|
+
const query_params = {};
|
|
1924
|
+
|
|
1925
|
+
const response = await PlatformAPIClient.execute(
|
|
1926
|
+
this.config,
|
|
1927
|
+
"delete",
|
|
1928
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/resource/translations/${id}`,
|
|
1929
|
+
query_params,
|
|
1930
|
+
undefined,
|
|
1931
|
+
requestHeaders,
|
|
1932
|
+
{ responseHeaders }
|
|
1933
|
+
);
|
|
1934
|
+
|
|
1935
|
+
let responseData = response;
|
|
1936
|
+
if (responseHeaders) {
|
|
1937
|
+
responseData = response[0];
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
const {
|
|
1941
|
+
error: res_error,
|
|
1942
|
+
} = ContentPlatformModel.OperationResponseSchema().validate(responseData, {
|
|
1943
|
+
abortEarly: false,
|
|
1944
|
+
allowUnknown: true,
|
|
1945
|
+
});
|
|
1946
|
+
|
|
1947
|
+
if (res_error) {
|
|
1948
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1949
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1950
|
+
} else {
|
|
1951
|
+
Logger({
|
|
1952
|
+
level: "WARN",
|
|
1953
|
+
message: `Response Validation Warnings for platform > Content > deleteApplicationResourceTranslation \n ${res_error}`,
|
|
1708
1954
|
});
|
|
1709
1955
|
}
|
|
1710
1956
|
}
|
|
@@ -1719,7 +1965,7 @@ class Content {
|
|
|
1719
1965
|
* @returns {Promise<ContentPlatformModel.BlogSchema>} - Success response
|
|
1720
1966
|
* @name deleteBlog
|
|
1721
1967
|
* @summary: Delete a blog
|
|
1722
|
-
* @description: Remove a specific blog. - Check out [method documentation](https://
|
|
1968
|
+
* @description: Remove a specific blog. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/deleteBlog/).
|
|
1723
1969
|
*/
|
|
1724
1970
|
async deleteBlog(
|
|
1725
1971
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1797,7 +2043,7 @@ class Content {
|
|
|
1797
2043
|
* Success response
|
|
1798
2044
|
* @name deleteDataLoader
|
|
1799
2045
|
* @summary: Delete a data loader
|
|
1800
|
-
* @description: Remove a specific data loader. - Check out [method documentation](https://
|
|
2046
|
+
* @description: Remove a specific data loader. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/deleteDataLoader/).
|
|
1801
2047
|
*/
|
|
1802
2048
|
async deleteDataLoader(
|
|
1803
2049
|
{ dataLoaderId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1876,7 +2122,7 @@ class Content {
|
|
|
1876
2122
|
* @returns {Promise<ContentPlatformModel.CreateFaqResponseSchema>} - Success response
|
|
1877
2123
|
* @name deleteFaq
|
|
1878
2124
|
* @summary: Delete FAQ
|
|
1879
|
-
* @description: Remove a specific FAQ. - Check out [method documentation](https://
|
|
2125
|
+
* @description: Remove a specific FAQ. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/deleteFaq/).
|
|
1880
2126
|
*/
|
|
1881
2127
|
async deleteFaq(
|
|
1882
2128
|
{ categoryId, faqId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1957,7 +2203,7 @@ class Content {
|
|
|
1957
2203
|
* @returns {Promise<ContentPlatformModel.FaqSchema>} - Success response
|
|
1958
2204
|
* @name deleteFaqCategory
|
|
1959
2205
|
* @summary: Delete FAQ category
|
|
1960
|
-
* @description: Remove a specific FAQ category. - Check out [method documentation](https://
|
|
2206
|
+
* @description: Remove a specific FAQ category. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/deleteFaqCategory/).
|
|
1961
2207
|
*/
|
|
1962
2208
|
async deleteFaqCategory(
|
|
1963
2209
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2038,7 +2284,7 @@ class Content {
|
|
|
2038
2284
|
* @returns {Promise<ContentPlatformModel.LandingPageSchema>} - Success response
|
|
2039
2285
|
* @name deleteLandingPage
|
|
2040
2286
|
* @summary: Delete landing page
|
|
2041
|
-
* @description: Remove a specific landing page. - Check out [method documentation](https://
|
|
2287
|
+
* @description: Remove a specific landing page. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/deleteLandingPage/).
|
|
2042
2288
|
*/
|
|
2043
2289
|
async deleteLandingPage(
|
|
2044
2290
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2117,7 +2363,7 @@ class Content {
|
|
|
2117
2363
|
* @returns {Promise<ContentPlatformModel.NavigationSchema>} - Success response
|
|
2118
2364
|
* @name deleteNavigation
|
|
2119
2365
|
* @summary: Delete navigation
|
|
2120
|
-
* @description: Remove a specific navigation element. - Check out [method documentation](https://
|
|
2366
|
+
* @description: Remove a specific navigation element. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/deleteNavigation/).
|
|
2121
2367
|
*/
|
|
2122
2368
|
async deleteNavigation(
|
|
2123
2369
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2196,7 +2442,7 @@ class Content {
|
|
|
2196
2442
|
* @returns {Promise<ContentPlatformModel.PageSchema>} - Success response
|
|
2197
2443
|
* @name deletePage
|
|
2198
2444
|
* @summary: Delete page
|
|
2199
|
-
* @description: Remove a page from the platform. - Check out [method documentation](https://
|
|
2445
|
+
* @description: Remove a page from the platform. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/deletePage/).
|
|
2200
2446
|
*/
|
|
2201
2447
|
async deletePage(
|
|
2202
2448
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2275,7 +2521,7 @@ class Content {
|
|
|
2275
2521
|
* @returns {Promise<Object>} - Success response
|
|
2276
2522
|
* @name deletePathRedirectionRules
|
|
2277
2523
|
* @summary: Delete path redirection rule
|
|
2278
|
-
* @description: Remove specific path redirection rules. - Check out [method documentation](https://
|
|
2524
|
+
* @description: Remove specific path redirection rules. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/deletePathRedirectionRules/).
|
|
2279
2525
|
*/
|
|
2280
2526
|
async deletePathRedirectionRules(
|
|
2281
2527
|
{ pathId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2354,7 +2600,7 @@ class Content {
|
|
|
2354
2600
|
* @returns {Promise<ContentPlatformModel.SEOSchemaMarkupTemplate>} - Success response
|
|
2355
2601
|
* @name deleteSEOMarkupSchema
|
|
2356
2602
|
* @summary: Delete SEO Markup Schema
|
|
2357
|
-
* @description: Use this API to Delete SEO Markup Schema - Check out [method documentation](https://
|
|
2603
|
+
* @description: Use this API to Delete SEO Markup Schema - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/deleteSEOMarkupSchema/).
|
|
2358
2604
|
*/
|
|
2359
2605
|
async deleteSEOMarkupSchema(
|
|
2360
2606
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2426,85 +2672,6 @@ class Content {
|
|
|
2426
2672
|
return response;
|
|
2427
2673
|
}
|
|
2428
2674
|
|
|
2429
|
-
/**
|
|
2430
|
-
* @param {ContentPlatformApplicationValidator.DeleteSlideshowParam} arg - Arg object
|
|
2431
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2432
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2433
|
-
* @returns {Promise<ContentPlatformModel.SlideshowSchema>} - Success response
|
|
2434
|
-
* @name deleteSlideshow
|
|
2435
|
-
* @summary: Delete a slideshow
|
|
2436
|
-
* @description: Use this API to delete an existing slideshow. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteSlideshow/).
|
|
2437
|
-
*/
|
|
2438
|
-
async deleteSlideshow(
|
|
2439
|
-
{ id, requestHeaders } = { requestHeaders: {} },
|
|
2440
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
2441
|
-
) {
|
|
2442
|
-
const {
|
|
2443
|
-
error,
|
|
2444
|
-
} = ContentPlatformApplicationValidator.deleteSlideshow().validate(
|
|
2445
|
-
{
|
|
2446
|
-
id,
|
|
2447
|
-
},
|
|
2448
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2449
|
-
);
|
|
2450
|
-
if (error) {
|
|
2451
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2452
|
-
}
|
|
2453
|
-
|
|
2454
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2455
|
-
const {
|
|
2456
|
-
error: warrning,
|
|
2457
|
-
} = ContentPlatformApplicationValidator.deleteSlideshow().validate(
|
|
2458
|
-
{
|
|
2459
|
-
id,
|
|
2460
|
-
},
|
|
2461
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2462
|
-
);
|
|
2463
|
-
if (warrning) {
|
|
2464
|
-
Logger({
|
|
2465
|
-
level: "WARN",
|
|
2466
|
-
message: `Parameter Validation warrnings for platform > Content > deleteSlideshow \n ${warrning}`,
|
|
2467
|
-
});
|
|
2468
|
-
}
|
|
2469
|
-
|
|
2470
|
-
const query_params = {};
|
|
2471
|
-
|
|
2472
|
-
const response = await PlatformAPIClient.execute(
|
|
2473
|
-
this.config,
|
|
2474
|
-
"delete",
|
|
2475
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/slideshows/${id}`,
|
|
2476
|
-
query_params,
|
|
2477
|
-
undefined,
|
|
2478
|
-
requestHeaders,
|
|
2479
|
-
{ responseHeaders }
|
|
2480
|
-
);
|
|
2481
|
-
|
|
2482
|
-
let responseData = response;
|
|
2483
|
-
if (responseHeaders) {
|
|
2484
|
-
responseData = response[0];
|
|
2485
|
-
}
|
|
2486
|
-
|
|
2487
|
-
const {
|
|
2488
|
-
error: res_error,
|
|
2489
|
-
} = ContentPlatformModel.SlideshowSchema().validate(responseData, {
|
|
2490
|
-
abortEarly: false,
|
|
2491
|
-
allowUnknown: true,
|
|
2492
|
-
});
|
|
2493
|
-
|
|
2494
|
-
if (res_error) {
|
|
2495
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
2496
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2497
|
-
} else {
|
|
2498
|
-
Logger({
|
|
2499
|
-
level: "WARN",
|
|
2500
|
-
message: `Response Validation Warnings for platform > Content > deleteSlideshow \n ${res_error}`,
|
|
2501
|
-
});
|
|
2502
|
-
}
|
|
2503
|
-
}
|
|
2504
|
-
|
|
2505
|
-
return response;
|
|
2506
|
-
}
|
|
2507
|
-
|
|
2508
2675
|
/**
|
|
2509
2676
|
* @param {ContentPlatformApplicationValidator.EditDataLoaderParam} arg - Arg object
|
|
2510
2677
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -2513,7 +2680,7 @@ class Content {
|
|
|
2513
2680
|
* Success response
|
|
2514
2681
|
* @name editDataLoader
|
|
2515
2682
|
* @summary: Update a data loader
|
|
2516
|
-
* @description: Modify the settings of a specific data loader. - Check out [method documentation](https://
|
|
2683
|
+
* @description: Modify the settings of a specific data loader. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/editDataLoader/).
|
|
2517
2684
|
*/
|
|
2518
2685
|
async editDataLoader(
|
|
2519
2686
|
{ dataLoaderId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2596,7 +2763,7 @@ class Content {
|
|
|
2596
2763
|
* @returns {Promise<ContentPlatformModel.TagsSchema>} - Success response
|
|
2597
2764
|
* @name editInjectableTag
|
|
2598
2765
|
* @summary: Update HTML tag
|
|
2599
|
-
* @description: Modify settings for an injectable tag. - Check out [method documentation](https://
|
|
2766
|
+
* @description: Modify settings for an injectable tag. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/editInjectableTag/).
|
|
2600
2767
|
*/
|
|
2601
2768
|
async editInjectableTag(
|
|
2602
2769
|
{ tagId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2679,7 +2846,7 @@ class Content {
|
|
|
2679
2846
|
* @returns {Promise<ContentPlatformModel.SEOSchemaMarkupTemplate>} - Success response
|
|
2680
2847
|
* @name editSEOMarkupSchema
|
|
2681
2848
|
* @summary: Get SEO Markup Schema
|
|
2682
|
-
* @description: Use this API to Get SEO Markup Schema - Check out [method documentation](https://
|
|
2849
|
+
* @description: Use this API to Get SEO Markup Schema - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/editSEOMarkupSchema/).
|
|
2683
2850
|
*/
|
|
2684
2851
|
async editSEOMarkupSchema(
|
|
2685
2852
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2754,7 +2921,7 @@ class Content {
|
|
|
2754
2921
|
}
|
|
2755
2922
|
|
|
2756
2923
|
/**
|
|
2757
|
-
* @param {ContentPlatformApplicationValidator.
|
|
2924
|
+
* @param {ContentPlatformApplicationValidator.ExportAppCustomObjectEntriesBySlugParam} arg
|
|
2758
2925
|
* - Arg object
|
|
2759
2926
|
*
|
|
2760
2927
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -2762,19 +2929,19 @@ class Content {
|
|
|
2762
2929
|
* @returns {Promise<ContentPlatformModel.CustomObjectBulkEntryInitiateDownload>}
|
|
2763
2930
|
* - Success response
|
|
2764
2931
|
*
|
|
2765
|
-
* @name
|
|
2932
|
+
* @name exportAppCustomObjectEntriesBySlug
|
|
2766
2933
|
* @summary: Initiate download for bulk custom object entries
|
|
2767
|
-
* @description: Custom object bulk export of bulk entries can be perform using this endpoint. - Check out [method documentation](https://
|
|
2934
|
+
* @description: Custom object bulk export of bulk entries can be perform using this endpoint. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/exportAppCustomObjectEntriesBySlug/).
|
|
2768
2935
|
*/
|
|
2769
|
-
async
|
|
2770
|
-
{
|
|
2936
|
+
async exportAppCustomObjectEntriesBySlug(
|
|
2937
|
+
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
2771
2938
|
{ responseHeaders } = { responseHeaders: false }
|
|
2772
2939
|
) {
|
|
2773
2940
|
const {
|
|
2774
2941
|
error,
|
|
2775
|
-
} = ContentPlatformApplicationValidator.
|
|
2942
|
+
} = ContentPlatformApplicationValidator.exportAppCustomObjectEntriesBySlug().validate(
|
|
2776
2943
|
{
|
|
2777
|
-
|
|
2944
|
+
slug,
|
|
2778
2945
|
},
|
|
2779
2946
|
{ abortEarly: false, allowUnknown: true }
|
|
2780
2947
|
);
|
|
@@ -2785,16 +2952,16 @@ class Content {
|
|
|
2785
2952
|
// Showing warrnings if extra unknown parameters are found
|
|
2786
2953
|
const {
|
|
2787
2954
|
error: warrning,
|
|
2788
|
-
} = ContentPlatformApplicationValidator.
|
|
2955
|
+
} = ContentPlatformApplicationValidator.exportAppCustomObjectEntriesBySlug().validate(
|
|
2789
2956
|
{
|
|
2790
|
-
|
|
2957
|
+
slug,
|
|
2791
2958
|
},
|
|
2792
2959
|
{ abortEarly: false, allowUnknown: false }
|
|
2793
2960
|
);
|
|
2794
2961
|
if (warrning) {
|
|
2795
2962
|
Logger({
|
|
2796
2963
|
level: "WARN",
|
|
2797
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
2964
|
+
message: `Parameter Validation warrnings for platform > Content > exportAppCustomObjectEntriesBySlug \n ${warrning}`,
|
|
2798
2965
|
});
|
|
2799
2966
|
}
|
|
2800
2967
|
|
|
@@ -2803,7 +2970,7 @@ class Content {
|
|
|
2803
2970
|
const response = await PlatformAPIClient.execute(
|
|
2804
2971
|
this.config,
|
|
2805
2972
|
"get",
|
|
2806
|
-
`/service/platform/content/
|
|
2973
|
+
`/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${slug}/bulk/download`,
|
|
2807
2974
|
query_params,
|
|
2808
2975
|
undefined,
|
|
2809
2976
|
requestHeaders,
|
|
@@ -2828,7 +2995,7 @@ class Content {
|
|
|
2828
2995
|
} else {
|
|
2829
2996
|
Logger({
|
|
2830
2997
|
level: "WARN",
|
|
2831
|
-
message: `Response Validation Warnings for platform > Content >
|
|
2998
|
+
message: `Response Validation Warnings for platform > Content > exportAppCustomObjectEntriesBySlug \n ${res_error}`,
|
|
2832
2999
|
});
|
|
2833
3000
|
}
|
|
2834
3001
|
}
|
|
@@ -2843,7 +3010,7 @@ class Content {
|
|
|
2843
3010
|
* @returns {Promise<ContentPlatformModel.GeneratedSEOContent>} - Success response
|
|
2844
3011
|
* @name generateSEOTitle
|
|
2845
3012
|
* @summary: Generate SEO title
|
|
2846
|
-
* @description: Create an SEO-friendly title for content. - Check out [method documentation](https://
|
|
3013
|
+
* @description: Create an SEO-friendly title for content. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/generateSEOTitle/).
|
|
2847
3014
|
*/
|
|
2848
3015
|
async generateSEOTitle(
|
|
2849
3016
|
{ type, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2926,7 +3093,7 @@ class Content {
|
|
|
2926
3093
|
* @returns {Promise<ContentPlatformModel.AdminAnnouncementSchema>} - Success response
|
|
2927
3094
|
* @name getAnnouncementById
|
|
2928
3095
|
* @summary: Get announcement
|
|
2929
|
-
* @description: Get detailed information about a specific announcement - Check out [method documentation](https://
|
|
3096
|
+
* @description: Get detailed information about a specific announcement - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getAnnouncementById/).
|
|
2930
3097
|
*/
|
|
2931
3098
|
async getAnnouncementById(
|
|
2932
3099
|
{ announcementId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -3008,7 +3175,7 @@ class Content {
|
|
|
3008
3175
|
* Success response
|
|
3009
3176
|
* @name getAnnouncementsList
|
|
3010
3177
|
* @summary: List announcements
|
|
3011
|
-
* @description: Lists all announcements - Check out [method documentation](https://
|
|
3178
|
+
* @description: Lists all announcements - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getAnnouncementsList/).
|
|
3012
3179
|
*/
|
|
3013
3180
|
async getAnnouncementsList(
|
|
3014
3181
|
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
@@ -3085,27 +3252,41 @@ class Content {
|
|
|
3085
3252
|
}
|
|
3086
3253
|
|
|
3087
3254
|
/**
|
|
3088
|
-
* @param {ContentPlatformApplicationValidator.
|
|
3255
|
+
* @param {ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionByResourceParam} arg
|
|
3089
3256
|
* - Arg object
|
|
3090
3257
|
*
|
|
3091
3258
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3092
3259
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3093
|
-
* @returns {Promise<ContentPlatformModel.
|
|
3094
|
-
*
|
|
3095
|
-
*
|
|
3096
|
-
* @
|
|
3097
|
-
* @
|
|
3098
|
-
* @description: Custom field definitions can be fetch using definition id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldDefinition/).
|
|
3260
|
+
* @returns {Promise<ContentPlatformModel.CustomFieldDefinitionsSchema>} -
|
|
3261
|
+
* Success response
|
|
3262
|
+
* @name getAppCustomFieldDefinitionByResource
|
|
3263
|
+
* @summary: Get custom fields definitions for a given resource type
|
|
3264
|
+
* @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://docs.fynd.com/partners/commerce/sdk/platform/content/getAppCustomFieldDefinitionByResource/).
|
|
3099
3265
|
*/
|
|
3100
|
-
async
|
|
3101
|
-
{
|
|
3266
|
+
async getAppCustomFieldDefinitionByResource(
|
|
3267
|
+
{
|
|
3268
|
+
pageNo,
|
|
3269
|
+
pageSize,
|
|
3270
|
+
resource,
|
|
3271
|
+
types,
|
|
3272
|
+
search,
|
|
3273
|
+
slugs,
|
|
3274
|
+
namespaces,
|
|
3275
|
+
requestHeaders,
|
|
3276
|
+
} = { requestHeaders: {} },
|
|
3102
3277
|
{ responseHeaders } = { responseHeaders: false }
|
|
3103
3278
|
) {
|
|
3104
3279
|
const {
|
|
3105
3280
|
error,
|
|
3106
|
-
} = ContentPlatformApplicationValidator.
|
|
3281
|
+
} = ContentPlatformApplicationValidator.getAppCustomFieldDefinitionByResource().validate(
|
|
3107
3282
|
{
|
|
3108
|
-
|
|
3283
|
+
pageNo,
|
|
3284
|
+
pageSize,
|
|
3285
|
+
resource,
|
|
3286
|
+
types,
|
|
3287
|
+
search,
|
|
3288
|
+
slugs,
|
|
3289
|
+
namespaces,
|
|
3109
3290
|
},
|
|
3110
3291
|
{ abortEarly: false, allowUnknown: true }
|
|
3111
3292
|
);
|
|
@@ -3116,25 +3297,37 @@ class Content {
|
|
|
3116
3297
|
// Showing warrnings if extra unknown parameters are found
|
|
3117
3298
|
const {
|
|
3118
3299
|
error: warrning,
|
|
3119
|
-
} = ContentPlatformApplicationValidator.
|
|
3300
|
+
} = ContentPlatformApplicationValidator.getAppCustomFieldDefinitionByResource().validate(
|
|
3120
3301
|
{
|
|
3121
|
-
|
|
3302
|
+
pageNo,
|
|
3303
|
+
pageSize,
|
|
3304
|
+
resource,
|
|
3305
|
+
types,
|
|
3306
|
+
search,
|
|
3307
|
+
slugs,
|
|
3308
|
+
namespaces,
|
|
3122
3309
|
},
|
|
3123
3310
|
{ abortEarly: false, allowUnknown: false }
|
|
3124
3311
|
);
|
|
3125
3312
|
if (warrning) {
|
|
3126
3313
|
Logger({
|
|
3127
3314
|
level: "WARN",
|
|
3128
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
3315
|
+
message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldDefinitionByResource \n ${warrning}`,
|
|
3129
3316
|
});
|
|
3130
3317
|
}
|
|
3131
3318
|
|
|
3132
3319
|
const query_params = {};
|
|
3320
|
+
query_params["page_no"] = pageNo;
|
|
3321
|
+
query_params["page_size"] = pageSize;
|
|
3322
|
+
query_params["types"] = types;
|
|
3323
|
+
query_params["search"] = search;
|
|
3324
|
+
query_params["slugs"] = slugs;
|
|
3325
|
+
query_params["namespaces"] = namespaces;
|
|
3133
3326
|
|
|
3134
3327
|
const response = await PlatformAPIClient.execute(
|
|
3135
3328
|
this.config,
|
|
3136
3329
|
"get",
|
|
3137
|
-
`/service/platform/content/
|
|
3330
|
+
`/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/resource/${resource}/definition`,
|
|
3138
3331
|
query_params,
|
|
3139
3332
|
undefined,
|
|
3140
3333
|
requestHeaders,
|
|
@@ -3148,7 +3341,7 @@ class Content {
|
|
|
3148
3341
|
|
|
3149
3342
|
const {
|
|
3150
3343
|
error: res_error,
|
|
3151
|
-
} = ContentPlatformModel.
|
|
3344
|
+
} = ContentPlatformModel.CustomFieldDefinitionsSchema().validate(
|
|
3152
3345
|
responseData,
|
|
3153
3346
|
{ abortEarly: false, allowUnknown: true }
|
|
3154
3347
|
);
|
|
@@ -3159,7 +3352,7 @@ class Content {
|
|
|
3159
3352
|
} else {
|
|
3160
3353
|
Logger({
|
|
3161
3354
|
level: "WARN",
|
|
3162
|
-
message: `Response Validation Warnings for platform > Content >
|
|
3355
|
+
message: `Response Validation Warnings for platform > Content > getAppCustomFieldDefinitionByResource \n ${res_error}`,
|
|
3163
3356
|
});
|
|
3164
3357
|
}
|
|
3165
3358
|
}
|
|
@@ -3168,32 +3361,29 @@ class Content {
|
|
|
3168
3361
|
}
|
|
3169
3362
|
|
|
3170
3363
|
/**
|
|
3171
|
-
* @param {ContentPlatformApplicationValidator.
|
|
3364
|
+
* @param {ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionBySlugParam} arg
|
|
3172
3365
|
* - Arg object
|
|
3173
3366
|
*
|
|
3174
3367
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3175
3368
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3176
|
-
* @returns {Promise<ContentPlatformModel.
|
|
3177
|
-
* Success response
|
|
3178
|
-
*
|
|
3179
|
-
* @
|
|
3180
|
-
* @
|
|
3369
|
+
* @returns {Promise<ContentPlatformModel.MetaFieldDefinitionDetailResSchema>}
|
|
3370
|
+
* - Success response
|
|
3371
|
+
*
|
|
3372
|
+
* @name getAppCustomFieldDefinitionBySlug
|
|
3373
|
+
* @summary: Get custom fields definition by resource, slug and namespace
|
|
3374
|
+
* @description: Custom field definitions can be retrived from this using its slug, namespace and resource - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getAppCustomFieldDefinitionBySlug/).
|
|
3181
3375
|
*/
|
|
3182
|
-
async
|
|
3183
|
-
{
|
|
3184
|
-
requestHeaders: {},
|
|
3185
|
-
},
|
|
3376
|
+
async getAppCustomFieldDefinitionBySlug(
|
|
3377
|
+
{ slug, resource, namespace, requestHeaders } = { requestHeaders: {} },
|
|
3186
3378
|
{ responseHeaders } = { responseHeaders: false }
|
|
3187
3379
|
) {
|
|
3188
3380
|
const {
|
|
3189
3381
|
error,
|
|
3190
|
-
} = ContentPlatformApplicationValidator.
|
|
3382
|
+
} = ContentPlatformApplicationValidator.getAppCustomFieldDefinitionBySlug().validate(
|
|
3191
3383
|
{
|
|
3192
|
-
|
|
3193
|
-
pageSize,
|
|
3384
|
+
slug,
|
|
3194
3385
|
resource,
|
|
3195
|
-
|
|
3196
|
-
search,
|
|
3386
|
+
namespace,
|
|
3197
3387
|
},
|
|
3198
3388
|
{ abortEarly: false, allowUnknown: true }
|
|
3199
3389
|
);
|
|
@@ -3204,34 +3394,27 @@ class Content {
|
|
|
3204
3394
|
// Showing warrnings if extra unknown parameters are found
|
|
3205
3395
|
const {
|
|
3206
3396
|
error: warrning,
|
|
3207
|
-
} = ContentPlatformApplicationValidator.
|
|
3397
|
+
} = ContentPlatformApplicationValidator.getAppCustomFieldDefinitionBySlug().validate(
|
|
3208
3398
|
{
|
|
3209
|
-
|
|
3210
|
-
pageSize,
|
|
3399
|
+
slug,
|
|
3211
3400
|
resource,
|
|
3212
|
-
|
|
3213
|
-
search,
|
|
3401
|
+
namespace,
|
|
3214
3402
|
},
|
|
3215
3403
|
{ abortEarly: false, allowUnknown: false }
|
|
3216
3404
|
);
|
|
3217
3405
|
if (warrning) {
|
|
3218
3406
|
Logger({
|
|
3219
3407
|
level: "WARN",
|
|
3220
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
3408
|
+
message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldDefinitionBySlug \n ${warrning}`,
|
|
3221
3409
|
});
|
|
3222
3410
|
}
|
|
3223
3411
|
|
|
3224
3412
|
const query_params = {};
|
|
3225
|
-
query_params["page_no"] = pageNo;
|
|
3226
|
-
query_params["page_size"] = pageSize;
|
|
3227
|
-
query_params["resource"] = resource;
|
|
3228
|
-
query_params["type"] = type;
|
|
3229
|
-
query_params["search"] = search;
|
|
3230
3413
|
|
|
3231
3414
|
const response = await PlatformAPIClient.execute(
|
|
3232
3415
|
this.config,
|
|
3233
3416
|
"get",
|
|
3234
|
-
`/service/platform/content/
|
|
3417
|
+
`/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/resource/${resource}/namespace/${namespace}/definition/${slug}`,
|
|
3235
3418
|
query_params,
|
|
3236
3419
|
undefined,
|
|
3237
3420
|
requestHeaders,
|
|
@@ -3245,7 +3428,7 @@ class Content {
|
|
|
3245
3428
|
|
|
3246
3429
|
const {
|
|
3247
3430
|
error: res_error,
|
|
3248
|
-
} = ContentPlatformModel.
|
|
3431
|
+
} = ContentPlatformModel.MetaFieldDefinitionDetailResSchema().validate(
|
|
3249
3432
|
responseData,
|
|
3250
3433
|
{ abortEarly: false, allowUnknown: true }
|
|
3251
3434
|
);
|
|
@@ -3256,7 +3439,7 @@ class Content {
|
|
|
3256
3439
|
} else {
|
|
3257
3440
|
Logger({
|
|
3258
3441
|
level: "WARN",
|
|
3259
|
-
message: `Response Validation Warnings for platform > Content >
|
|
3442
|
+
message: `Response Validation Warnings for platform > Content > getAppCustomFieldDefinitionBySlug \n ${res_error}`,
|
|
3260
3443
|
});
|
|
3261
3444
|
}
|
|
3262
3445
|
}
|
|
@@ -3265,24 +3448,42 @@ class Content {
|
|
|
3265
3448
|
}
|
|
3266
3449
|
|
|
3267
3450
|
/**
|
|
3268
|
-
* @param {ContentPlatformApplicationValidator.
|
|
3451
|
+
* @param {ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionsParam} arg
|
|
3269
3452
|
* - Arg object
|
|
3270
3453
|
*
|
|
3271
3454
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3272
3455
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3273
|
-
* @returns {Promise<ContentPlatformModel.
|
|
3274
|
-
*
|
|
3275
|
-
* @
|
|
3276
|
-
* @
|
|
3456
|
+
* @returns {Promise<ContentPlatformModel.CustomFieldDefinitionsSchema>} -
|
|
3457
|
+
* Success response
|
|
3458
|
+
* @name getAppCustomFieldDefinitions
|
|
3459
|
+
* @summary: Get custom fields definitions
|
|
3460
|
+
* @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://docs.fynd.com/partners/commerce/sdk/platform/content/getAppCustomFieldDefinitions/).
|
|
3277
3461
|
*/
|
|
3278
|
-
async
|
|
3279
|
-
{
|
|
3462
|
+
async getAppCustomFieldDefinitions(
|
|
3463
|
+
{
|
|
3464
|
+
pageNo,
|
|
3465
|
+
pageSize,
|
|
3466
|
+
resources,
|
|
3467
|
+
types,
|
|
3468
|
+
search,
|
|
3469
|
+
slugs,
|
|
3470
|
+
namespaces,
|
|
3471
|
+
requestHeaders,
|
|
3472
|
+
} = { requestHeaders: {} },
|
|
3280
3473
|
{ responseHeaders } = { responseHeaders: false }
|
|
3281
3474
|
) {
|
|
3282
3475
|
const {
|
|
3283
3476
|
error,
|
|
3284
|
-
} = ContentPlatformApplicationValidator.
|
|
3285
|
-
{
|
|
3477
|
+
} = ContentPlatformApplicationValidator.getAppCustomFieldDefinitions().validate(
|
|
3478
|
+
{
|
|
3479
|
+
pageNo,
|
|
3480
|
+
pageSize,
|
|
3481
|
+
resources,
|
|
3482
|
+
types,
|
|
3483
|
+
search,
|
|
3484
|
+
slugs,
|
|
3485
|
+
namespaces,
|
|
3486
|
+
},
|
|
3286
3487
|
{ abortEarly: false, allowUnknown: true }
|
|
3287
3488
|
);
|
|
3288
3489
|
if (error) {
|
|
@@ -3292,23 +3493,38 @@ class Content {
|
|
|
3292
3493
|
// Showing warrnings if extra unknown parameters are found
|
|
3293
3494
|
const {
|
|
3294
3495
|
error: warrning,
|
|
3295
|
-
} = ContentPlatformApplicationValidator.
|
|
3296
|
-
{
|
|
3496
|
+
} = ContentPlatformApplicationValidator.getAppCustomFieldDefinitions().validate(
|
|
3497
|
+
{
|
|
3498
|
+
pageNo,
|
|
3499
|
+
pageSize,
|
|
3500
|
+
resources,
|
|
3501
|
+
types,
|
|
3502
|
+
search,
|
|
3503
|
+
slugs,
|
|
3504
|
+
namespaces,
|
|
3505
|
+
},
|
|
3297
3506
|
{ abortEarly: false, allowUnknown: false }
|
|
3298
3507
|
);
|
|
3299
3508
|
if (warrning) {
|
|
3300
3509
|
Logger({
|
|
3301
3510
|
level: "WARN",
|
|
3302
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
3511
|
+
message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldDefinitions \n ${warrning}`,
|
|
3303
3512
|
});
|
|
3304
3513
|
}
|
|
3305
3514
|
|
|
3306
3515
|
const query_params = {};
|
|
3516
|
+
query_params["page_no"] = pageNo;
|
|
3517
|
+
query_params["page_size"] = pageSize;
|
|
3518
|
+
query_params["resources"] = resources;
|
|
3519
|
+
query_params["types"] = types;
|
|
3520
|
+
query_params["search"] = search;
|
|
3521
|
+
query_params["slugs"] = slugs;
|
|
3522
|
+
query_params["namespaces"] = namespaces;
|
|
3307
3523
|
|
|
3308
3524
|
const response = await PlatformAPIClient.execute(
|
|
3309
3525
|
this.config,
|
|
3310
3526
|
"get",
|
|
3311
|
-
`/service/platform/content/
|
|
3527
|
+
`/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/definition`,
|
|
3312
3528
|
query_params,
|
|
3313
3529
|
undefined,
|
|
3314
3530
|
requestHeaders,
|
|
@@ -3322,10 +3538,10 @@ class Content {
|
|
|
3322
3538
|
|
|
3323
3539
|
const {
|
|
3324
3540
|
error: res_error,
|
|
3325
|
-
} = ContentPlatformModel.
|
|
3326
|
-
|
|
3327
|
-
allowUnknown: true
|
|
3328
|
-
|
|
3541
|
+
} = ContentPlatformModel.CustomFieldDefinitionsSchema().validate(
|
|
3542
|
+
responseData,
|
|
3543
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3544
|
+
);
|
|
3329
3545
|
|
|
3330
3546
|
if (res_error) {
|
|
3331
3547
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3333,7 +3549,7 @@ class Content {
|
|
|
3333
3549
|
} else {
|
|
3334
3550
|
Logger({
|
|
3335
3551
|
level: "WARN",
|
|
3336
|
-
message: `Response Validation Warnings for platform > Content >
|
|
3552
|
+
message: `Response Validation Warnings for platform > Content > getAppCustomFieldDefinitions \n ${res_error}`,
|
|
3337
3553
|
});
|
|
3338
3554
|
}
|
|
3339
3555
|
}
|
|
@@ -3342,27 +3558,24 @@ class Content {
|
|
|
3342
3558
|
}
|
|
3343
3559
|
|
|
3344
3560
|
/**
|
|
3345
|
-
* @param {ContentPlatformApplicationValidator.
|
|
3561
|
+
* @param {ContentPlatformApplicationValidator.GetAppCustomFieldTypesParam} arg
|
|
3346
3562
|
* - Arg object
|
|
3347
3563
|
*
|
|
3348
3564
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3349
3565
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3350
|
-
* @returns {Promise<ContentPlatformModel.
|
|
3351
|
-
*
|
|
3352
|
-
* @
|
|
3353
|
-
* @
|
|
3354
|
-
* @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/).
|
|
3566
|
+
* @returns {Promise<ContentPlatformModel.MetafieldTypesSchema>} - Success response
|
|
3567
|
+
* @name getAppCustomFieldTypes
|
|
3568
|
+
* @summary: Get custom field types
|
|
3569
|
+
* @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://docs.fynd.com/partners/commerce/sdk/platform/content/getAppCustomFieldTypes/).
|
|
3355
3570
|
*/
|
|
3356
|
-
async
|
|
3357
|
-
{
|
|
3571
|
+
async getAppCustomFieldTypes(
|
|
3572
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
3358
3573
|
{ responseHeaders } = { responseHeaders: false }
|
|
3359
3574
|
) {
|
|
3360
3575
|
const {
|
|
3361
3576
|
error,
|
|
3362
|
-
} = ContentPlatformApplicationValidator.
|
|
3363
|
-
{
|
|
3364
|
-
resource,
|
|
3365
|
-
},
|
|
3577
|
+
} = ContentPlatformApplicationValidator.getAppCustomFieldTypes().validate(
|
|
3578
|
+
{},
|
|
3366
3579
|
{ abortEarly: false, allowUnknown: true }
|
|
3367
3580
|
);
|
|
3368
3581
|
if (error) {
|
|
@@ -3372,16 +3585,14 @@ class Content {
|
|
|
3372
3585
|
// Showing warrnings if extra unknown parameters are found
|
|
3373
3586
|
const {
|
|
3374
3587
|
error: warrning,
|
|
3375
|
-
} = ContentPlatformApplicationValidator.
|
|
3376
|
-
{
|
|
3377
|
-
resource,
|
|
3378
|
-
},
|
|
3588
|
+
} = ContentPlatformApplicationValidator.getAppCustomFieldTypes().validate(
|
|
3589
|
+
{},
|
|
3379
3590
|
{ abortEarly: false, allowUnknown: false }
|
|
3380
3591
|
);
|
|
3381
3592
|
if (warrning) {
|
|
3382
3593
|
Logger({
|
|
3383
3594
|
level: "WARN",
|
|
3384
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
3595
|
+
message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldTypes \n ${warrning}`,
|
|
3385
3596
|
});
|
|
3386
3597
|
}
|
|
3387
3598
|
|
|
@@ -3390,7 +3601,7 @@ class Content {
|
|
|
3390
3601
|
const response = await PlatformAPIClient.execute(
|
|
3391
3602
|
this.config,
|
|
3392
3603
|
"get",
|
|
3393
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields
|
|
3604
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/types`,
|
|
3394
3605
|
query_params,
|
|
3395
3606
|
undefined,
|
|
3396
3607
|
requestHeaders,
|
|
@@ -3404,10 +3615,10 @@ class Content {
|
|
|
3404
3615
|
|
|
3405
3616
|
const {
|
|
3406
3617
|
error: res_error,
|
|
3407
|
-
} = ContentPlatformModel.
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
);
|
|
3618
|
+
} = ContentPlatformModel.MetafieldTypesSchema().validate(responseData, {
|
|
3619
|
+
abortEarly: false,
|
|
3620
|
+
allowUnknown: true,
|
|
3621
|
+
});
|
|
3411
3622
|
|
|
3412
3623
|
if (res_error) {
|
|
3413
3624
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3415,7 +3626,7 @@ class Content {
|
|
|
3415
3626
|
} else {
|
|
3416
3627
|
Logger({
|
|
3417
3628
|
level: "WARN",
|
|
3418
|
-
message: `Response Validation Warnings for platform > Content >
|
|
3629
|
+
message: `Response Validation Warnings for platform > Content > getAppCustomFieldTypes \n ${res_error}`,
|
|
3419
3630
|
});
|
|
3420
3631
|
}
|
|
3421
3632
|
}
|
|
@@ -3424,7 +3635,7 @@ class Content {
|
|
|
3424
3635
|
}
|
|
3425
3636
|
|
|
3426
3637
|
/**
|
|
3427
|
-
* @param {ContentPlatformApplicationValidator.
|
|
3638
|
+
* @param {ContentPlatformApplicationValidator.GetAppCustomFieldsByResourceSlugParam} arg
|
|
3428
3639
|
* - Arg object
|
|
3429
3640
|
*
|
|
3430
3641
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -3432,20 +3643,20 @@ class Content {
|
|
|
3432
3643
|
* @returns {Promise<ContentPlatformModel.CustomFieldsResponseByResourceIdSchema>}
|
|
3433
3644
|
* - Success response
|
|
3434
3645
|
*
|
|
3435
|
-
* @name
|
|
3436
|
-
* @summary: Get list of custom fields of given resource and resource
|
|
3437
|
-
* @description: Retrieves a list of custom fields attached to a particular resource by using the resource and resource
|
|
3646
|
+
* @name getAppCustomFieldsByResourceSlug
|
|
3647
|
+
* @summary: Get list of custom fields of given resource and resource slug
|
|
3648
|
+
* @description: Retrieves a list of custom fields attached to a particular resource by using the resource and resource slug. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getAppCustomFieldsByResourceSlug/).
|
|
3438
3649
|
*/
|
|
3439
|
-
async
|
|
3440
|
-
{ resource,
|
|
3650
|
+
async getAppCustomFieldsByResourceSlug(
|
|
3651
|
+
{ resource, resourceSlug, requestHeaders } = { requestHeaders: {} },
|
|
3441
3652
|
{ responseHeaders } = { responseHeaders: false }
|
|
3442
3653
|
) {
|
|
3443
3654
|
const {
|
|
3444
3655
|
error,
|
|
3445
|
-
} = ContentPlatformApplicationValidator.
|
|
3656
|
+
} = ContentPlatformApplicationValidator.getAppCustomFieldsByResourceSlug().validate(
|
|
3446
3657
|
{
|
|
3447
3658
|
resource,
|
|
3448
|
-
|
|
3659
|
+
resourceSlug,
|
|
3449
3660
|
},
|
|
3450
3661
|
{ abortEarly: false, allowUnknown: true }
|
|
3451
3662
|
);
|
|
@@ -3456,17 +3667,17 @@ class Content {
|
|
|
3456
3667
|
// Showing warrnings if extra unknown parameters are found
|
|
3457
3668
|
const {
|
|
3458
3669
|
error: warrning,
|
|
3459
|
-
} = ContentPlatformApplicationValidator.
|
|
3670
|
+
} = ContentPlatformApplicationValidator.getAppCustomFieldsByResourceSlug().validate(
|
|
3460
3671
|
{
|
|
3461
3672
|
resource,
|
|
3462
|
-
|
|
3673
|
+
resourceSlug,
|
|
3463
3674
|
},
|
|
3464
3675
|
{ abortEarly: false, allowUnknown: false }
|
|
3465
3676
|
);
|
|
3466
3677
|
if (warrning) {
|
|
3467
3678
|
Logger({
|
|
3468
3679
|
level: "WARN",
|
|
3469
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
3680
|
+
message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldsByResourceSlug \n ${warrning}`,
|
|
3470
3681
|
});
|
|
3471
3682
|
}
|
|
3472
3683
|
|
|
@@ -3475,7 +3686,7 @@ class Content {
|
|
|
3475
3686
|
const response = await PlatformAPIClient.execute(
|
|
3476
3687
|
this.config,
|
|
3477
3688
|
"get",
|
|
3478
|
-
`/service/platform/content/
|
|
3689
|
+
`/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/resource/${resource}/${resourceSlug}`,
|
|
3479
3690
|
query_params,
|
|
3480
3691
|
undefined,
|
|
3481
3692
|
requestHeaders,
|
|
@@ -3500,7 +3711,7 @@ class Content {
|
|
|
3500
3711
|
} else {
|
|
3501
3712
|
Logger({
|
|
3502
3713
|
level: "WARN",
|
|
3503
|
-
message: `Response Validation Warnings for platform > Content >
|
|
3714
|
+
message: `Response Validation Warnings for platform > Content > getAppCustomFieldsByResourceSlug \n ${res_error}`,
|
|
3504
3715
|
});
|
|
3505
3716
|
}
|
|
3506
3717
|
}
|
|
@@ -3509,25 +3720,27 @@ class Content {
|
|
|
3509
3720
|
}
|
|
3510
3721
|
|
|
3511
3722
|
/**
|
|
3512
|
-
* @param {ContentPlatformApplicationValidator.
|
|
3723
|
+
* @param {ContentPlatformApplicationValidator.GetAppCustomObjectBySlugParam} arg
|
|
3513
3724
|
* - Arg object
|
|
3514
3725
|
*
|
|
3515
3726
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3516
3727
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3517
|
-
* @returns {Promise<ContentPlatformModel.
|
|
3518
|
-
*
|
|
3728
|
+
* @returns {Promise<ContentPlatformModel.CustomObjectBySlugSchema>} -
|
|
3729
|
+
* Success response
|
|
3730
|
+
* @name getAppCustomObjectBySlug
|
|
3519
3731
|
* @summary: Get custom object details
|
|
3520
|
-
* @description: Details of custom
|
|
3732
|
+
* @description: Details of a custom object entry can be obtained using this endpoint. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getAppCustomObjectBySlug/).
|
|
3521
3733
|
*/
|
|
3522
|
-
async
|
|
3523
|
-
{
|
|
3734
|
+
async getAppCustomObjectBySlug(
|
|
3735
|
+
{ definitionSlug, slug, requestHeaders } = { requestHeaders: {} },
|
|
3524
3736
|
{ responseHeaders } = { responseHeaders: false }
|
|
3525
3737
|
) {
|
|
3526
3738
|
const {
|
|
3527
3739
|
error,
|
|
3528
|
-
} = ContentPlatformApplicationValidator.
|
|
3740
|
+
} = ContentPlatformApplicationValidator.getAppCustomObjectBySlug().validate(
|
|
3529
3741
|
{
|
|
3530
|
-
|
|
3742
|
+
definitionSlug,
|
|
3743
|
+
slug,
|
|
3531
3744
|
},
|
|
3532
3745
|
{ abortEarly: false, allowUnknown: true }
|
|
3533
3746
|
);
|
|
@@ -3538,16 +3751,17 @@ class Content {
|
|
|
3538
3751
|
// Showing warrnings if extra unknown parameters are found
|
|
3539
3752
|
const {
|
|
3540
3753
|
error: warrning,
|
|
3541
|
-
} = ContentPlatformApplicationValidator.
|
|
3754
|
+
} = ContentPlatformApplicationValidator.getAppCustomObjectBySlug().validate(
|
|
3542
3755
|
{
|
|
3543
|
-
|
|
3756
|
+
definitionSlug,
|
|
3757
|
+
slug,
|
|
3544
3758
|
},
|
|
3545
3759
|
{ abortEarly: false, allowUnknown: false }
|
|
3546
3760
|
);
|
|
3547
3761
|
if (warrning) {
|
|
3548
3762
|
Logger({
|
|
3549
3763
|
level: "WARN",
|
|
3550
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
3764
|
+
message: `Parameter Validation warrnings for platform > Content > getAppCustomObjectBySlug \n ${warrning}`,
|
|
3551
3765
|
});
|
|
3552
3766
|
}
|
|
3553
3767
|
|
|
@@ -3556,7 +3770,7 @@ class Content {
|
|
|
3556
3770
|
const response = await PlatformAPIClient.execute(
|
|
3557
3771
|
this.config,
|
|
3558
3772
|
"get",
|
|
3559
|
-
`/service/platform/content/
|
|
3773
|
+
`/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${definitionSlug}/entries/${slug}`,
|
|
3560
3774
|
query_params,
|
|
3561
3775
|
undefined,
|
|
3562
3776
|
requestHeaders,
|
|
@@ -3570,7 +3784,7 @@ class Content {
|
|
|
3570
3784
|
|
|
3571
3785
|
const {
|
|
3572
3786
|
error: res_error,
|
|
3573
|
-
} = ContentPlatformModel.
|
|
3787
|
+
} = ContentPlatformModel.CustomObjectBySlugSchema().validate(responseData, {
|
|
3574
3788
|
abortEarly: false,
|
|
3575
3789
|
allowUnknown: true,
|
|
3576
3790
|
});
|
|
@@ -3581,7 +3795,7 @@ class Content {
|
|
|
3581
3795
|
} else {
|
|
3582
3796
|
Logger({
|
|
3583
3797
|
level: "WARN",
|
|
3584
|
-
message: `Response Validation Warnings for platform > Content >
|
|
3798
|
+
message: `Response Validation Warnings for platform > Content > getAppCustomObjectBySlug \n ${res_error}`,
|
|
3585
3799
|
});
|
|
3586
3800
|
}
|
|
3587
3801
|
}
|
|
@@ -3590,26 +3804,27 @@ class Content {
|
|
|
3590
3804
|
}
|
|
3591
3805
|
|
|
3592
3806
|
/**
|
|
3593
|
-
* @param {ContentPlatformApplicationValidator.
|
|
3807
|
+
* @param {ContentPlatformApplicationValidator.GetAppCustomObjectDefinitionBySlugParam} arg
|
|
3594
3808
|
* - Arg object
|
|
3595
3809
|
*
|
|
3596
3810
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3597
3811
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3598
|
-
* @returns {Promise<ContentPlatformModel.
|
|
3599
|
-
* Success response
|
|
3600
|
-
*
|
|
3812
|
+
* @returns {Promise<ContentPlatformModel.CustomObjectDefinitionSlugSchema>}
|
|
3813
|
+
* - Success response
|
|
3814
|
+
*
|
|
3815
|
+
* @name getAppCustomObjectDefinitionBySlug
|
|
3601
3816
|
* @summary: Get custom object definition
|
|
3602
|
-
* @description: Custom object definitions can be fetched using their definition
|
|
3817
|
+
* @description: Custom object definitions can be fetched using their custom object definition slug. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getAppCustomObjectDefinitionBySlug/).
|
|
3603
3818
|
*/
|
|
3604
|
-
async
|
|
3605
|
-
{
|
|
3819
|
+
async getAppCustomObjectDefinitionBySlug(
|
|
3820
|
+
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
3606
3821
|
{ responseHeaders } = { responseHeaders: false }
|
|
3607
3822
|
) {
|
|
3608
3823
|
const {
|
|
3609
3824
|
error,
|
|
3610
|
-
} = ContentPlatformApplicationValidator.
|
|
3825
|
+
} = ContentPlatformApplicationValidator.getAppCustomObjectDefinitionBySlug().validate(
|
|
3611
3826
|
{
|
|
3612
|
-
|
|
3827
|
+
slug,
|
|
3613
3828
|
},
|
|
3614
3829
|
{ abortEarly: false, allowUnknown: true }
|
|
3615
3830
|
);
|
|
@@ -3620,16 +3835,16 @@ class Content {
|
|
|
3620
3835
|
// Showing warrnings if extra unknown parameters are found
|
|
3621
3836
|
const {
|
|
3622
3837
|
error: warrning,
|
|
3623
|
-
} = ContentPlatformApplicationValidator.
|
|
3838
|
+
} = ContentPlatformApplicationValidator.getAppCustomObjectDefinitionBySlug().validate(
|
|
3624
3839
|
{
|
|
3625
|
-
|
|
3840
|
+
slug,
|
|
3626
3841
|
},
|
|
3627
3842
|
{ abortEarly: false, allowUnknown: false }
|
|
3628
3843
|
);
|
|
3629
3844
|
if (warrning) {
|
|
3630
3845
|
Logger({
|
|
3631
3846
|
level: "WARN",
|
|
3632
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
3847
|
+
message: `Parameter Validation warrnings for platform > Content > getAppCustomObjectDefinitionBySlug \n ${warrning}`,
|
|
3633
3848
|
});
|
|
3634
3849
|
}
|
|
3635
3850
|
|
|
@@ -3638,7 +3853,7 @@ class Content {
|
|
|
3638
3853
|
const response = await PlatformAPIClient.execute(
|
|
3639
3854
|
this.config,
|
|
3640
3855
|
"get",
|
|
3641
|
-
`/service/platform/content/
|
|
3856
|
+
`/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${slug}`,
|
|
3642
3857
|
query_params,
|
|
3643
3858
|
undefined,
|
|
3644
3859
|
requestHeaders,
|
|
@@ -3652,7 +3867,7 @@ class Content {
|
|
|
3652
3867
|
|
|
3653
3868
|
const {
|
|
3654
3869
|
error: res_error,
|
|
3655
|
-
} = ContentPlatformModel.
|
|
3870
|
+
} = ContentPlatformModel.CustomObjectDefinitionSlugSchema().validate(
|
|
3656
3871
|
responseData,
|
|
3657
3872
|
{ abortEarly: false, allowUnknown: true }
|
|
3658
3873
|
);
|
|
@@ -3663,7 +3878,7 @@ class Content {
|
|
|
3663
3878
|
} else {
|
|
3664
3879
|
Logger({
|
|
3665
3880
|
level: "WARN",
|
|
3666
|
-
message: `Response Validation Warnings for platform > Content >
|
|
3881
|
+
message: `Response Validation Warnings for platform > Content > getAppCustomObjectDefinitionBySlug \n ${res_error}`,
|
|
3667
3882
|
});
|
|
3668
3883
|
}
|
|
3669
3884
|
}
|
|
@@ -3681,7 +3896,7 @@ class Content {
|
|
|
3681
3896
|
* Success response
|
|
3682
3897
|
* @name getAppCustomObjectDefinitions
|
|
3683
3898
|
* @summary: Get custom object definitions
|
|
3684
|
-
* @description: Custom object definition lists can be obtained using this endpoint. - Check out [method documentation](https://
|
|
3899
|
+
* @description: Custom object definition lists can be obtained using this endpoint. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getAppCustomObjectDefinitions/).
|
|
3685
3900
|
*/
|
|
3686
3901
|
async getAppCustomObjectDefinitions(
|
|
3687
3902
|
{ pageNo, pageSize, search, requestHeaders } = { requestHeaders: {} },
|
|
@@ -3727,7 +3942,7 @@ class Content {
|
|
|
3727
3942
|
const response = await PlatformAPIClient.execute(
|
|
3728
3943
|
this.config,
|
|
3729
3944
|
"get",
|
|
3730
|
-
`/service/platform/content/
|
|
3945
|
+
`/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition`,
|
|
3731
3946
|
query_params,
|
|
3732
3947
|
undefined,
|
|
3733
3948
|
requestHeaders,
|
|
@@ -3761,27 +3976,29 @@ class Content {
|
|
|
3761
3976
|
}
|
|
3762
3977
|
|
|
3763
3978
|
/**
|
|
3764
|
-
* @param {ContentPlatformApplicationValidator.
|
|
3979
|
+
* @param {ContentPlatformApplicationValidator.GetAppCustomObjectsBySlugParam} arg
|
|
3765
3980
|
* - Arg object
|
|
3766
3981
|
*
|
|
3767
3982
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3768
3983
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3769
3984
|
* @returns {Promise<ContentPlatformModel.CustomObjectsSchema>} - Success response
|
|
3770
|
-
* @name
|
|
3985
|
+
* @name getAppCustomObjectsBySlug
|
|
3771
3986
|
* @summary: Get list of custom objects
|
|
3772
|
-
* @description: Custom object entries can fetch using this endpoint. - Check out [method documentation](https://
|
|
3987
|
+
* @description: Custom object entries can fetch using this endpoint. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getAppCustomObjectsBySlug/).
|
|
3773
3988
|
*/
|
|
3774
|
-
async
|
|
3775
|
-
{ pageNo, pageSize,
|
|
3989
|
+
async getAppCustomObjectsBySlug(
|
|
3990
|
+
{ pageNo, pageSize, definitionSlug, requestHeaders } = {
|
|
3991
|
+
requestHeaders: {},
|
|
3992
|
+
},
|
|
3776
3993
|
{ responseHeaders } = { responseHeaders: false }
|
|
3777
3994
|
) {
|
|
3778
3995
|
const {
|
|
3779
3996
|
error,
|
|
3780
|
-
} = ContentPlatformApplicationValidator.
|
|
3997
|
+
} = ContentPlatformApplicationValidator.getAppCustomObjectsBySlug().validate(
|
|
3781
3998
|
{
|
|
3782
3999
|
pageNo,
|
|
3783
4000
|
pageSize,
|
|
3784
|
-
|
|
4001
|
+
definitionSlug,
|
|
3785
4002
|
},
|
|
3786
4003
|
{ abortEarly: false, allowUnknown: true }
|
|
3787
4004
|
);
|
|
@@ -3792,30 +4009,29 @@ class Content {
|
|
|
3792
4009
|
// Showing warrnings if extra unknown parameters are found
|
|
3793
4010
|
const {
|
|
3794
4011
|
error: warrning,
|
|
3795
|
-
} = ContentPlatformApplicationValidator.
|
|
4012
|
+
} = ContentPlatformApplicationValidator.getAppCustomObjectsBySlug().validate(
|
|
3796
4013
|
{
|
|
3797
4014
|
pageNo,
|
|
3798
4015
|
pageSize,
|
|
3799
|
-
|
|
4016
|
+
definitionSlug,
|
|
3800
4017
|
},
|
|
3801
4018
|
{ abortEarly: false, allowUnknown: false }
|
|
3802
4019
|
);
|
|
3803
4020
|
if (warrning) {
|
|
3804
4021
|
Logger({
|
|
3805
4022
|
level: "WARN",
|
|
3806
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
4023
|
+
message: `Parameter Validation warrnings for platform > Content > getAppCustomObjectsBySlug \n ${warrning}`,
|
|
3807
4024
|
});
|
|
3808
4025
|
}
|
|
3809
4026
|
|
|
3810
4027
|
const query_params = {};
|
|
3811
|
-
query_params["definition_id"] = definitionId;
|
|
3812
4028
|
query_params["page_no"] = pageNo;
|
|
3813
4029
|
query_params["page_size"] = pageSize;
|
|
3814
4030
|
|
|
3815
4031
|
const response = await PlatformAPIClient.execute(
|
|
3816
4032
|
this.config,
|
|
3817
4033
|
"get",
|
|
3818
|
-
`/service/platform/content/
|
|
4034
|
+
`/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${definitionSlug}/entries`,
|
|
3819
4035
|
query_params,
|
|
3820
4036
|
undefined,
|
|
3821
4037
|
requestHeaders,
|
|
@@ -3840,7 +4056,7 @@ class Content {
|
|
|
3840
4056
|
} else {
|
|
3841
4057
|
Logger({
|
|
3842
4058
|
level: "WARN",
|
|
3843
|
-
message: `Response Validation Warnings for platform > Content >
|
|
4059
|
+
message: `Response Validation Warnings for platform > Content > getAppCustomObjectsBySlug \n ${res_error}`,
|
|
3844
4060
|
});
|
|
3845
4061
|
}
|
|
3846
4062
|
}
|
|
@@ -3855,7 +4071,7 @@ class Content {
|
|
|
3855
4071
|
* @returns {Promise<ContentPlatformModel.CustomObjectBulkEntry>} - Success response
|
|
3856
4072
|
* @name getAppJobs
|
|
3857
4073
|
* @summary: Get bulk import and export job list
|
|
3858
|
-
* @description: Custom object bulk import and export jobs status and details can be obtained using this endpoint. - Check out [method documentation](https://
|
|
4074
|
+
* @description: Custom object bulk import and export jobs status and details can be obtained using this endpoint. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getAppJobs/).
|
|
3859
4075
|
*/
|
|
3860
4076
|
async getAppJobs(
|
|
3861
4077
|
{ page, pageSize, actionType, requestHeaders } = { requestHeaders: {} },
|
|
@@ -3939,7 +4155,7 @@ class Content {
|
|
|
3939
4155
|
* @returns {Promise<ContentPlatformModel.ResourcesSchema>} - Success response
|
|
3940
4156
|
* @name getAppResources
|
|
3941
4157
|
* @summary: Get resources
|
|
3942
|
-
* @description: Each custom fields is assosiated with a resource such as product, promotion, coupon, selling location etc, This will gives list of supported resource list. - Check out [method documentation](https://
|
|
4158
|
+
* @description: Each custom fields is assosiated with a resource such as product, promotion, coupon, selling location etc, This will gives list of supported resource list. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getAppResources/).
|
|
3943
4159
|
*/
|
|
3944
4160
|
async getAppResources(
|
|
3945
4161
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -4007,6 +4223,167 @@ class Content {
|
|
|
4007
4223
|
return response;
|
|
4008
4224
|
}
|
|
4009
4225
|
|
|
4226
|
+
/**
|
|
4227
|
+
* @param {ContentPlatformApplicationValidator.GetApplicationLanguagesParam} arg
|
|
4228
|
+
* - Arg object
|
|
4229
|
+
*
|
|
4230
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4231
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4232
|
+
* @returns {Promise<Object>} - Success response
|
|
4233
|
+
* @name getApplicationLanguages
|
|
4234
|
+
* @summary: Get app languages
|
|
4235
|
+
* @description: Fetch all languages configured for the specified application. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getApplicationLanguages/).
|
|
4236
|
+
*/
|
|
4237
|
+
async getApplicationLanguages(
|
|
4238
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
4239
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
4240
|
+
) {
|
|
4241
|
+
const {
|
|
4242
|
+
error,
|
|
4243
|
+
} = ContentPlatformApplicationValidator.getApplicationLanguages().validate(
|
|
4244
|
+
{},
|
|
4245
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4246
|
+
);
|
|
4247
|
+
if (error) {
|
|
4248
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
4249
|
+
}
|
|
4250
|
+
|
|
4251
|
+
// Showing warrnings if extra unknown parameters are found
|
|
4252
|
+
const {
|
|
4253
|
+
error: warrning,
|
|
4254
|
+
} = ContentPlatformApplicationValidator.getApplicationLanguages().validate(
|
|
4255
|
+
{},
|
|
4256
|
+
{ abortEarly: false, allowUnknown: false }
|
|
4257
|
+
);
|
|
4258
|
+
if (warrning) {
|
|
4259
|
+
Logger({
|
|
4260
|
+
level: "WARN",
|
|
4261
|
+
message: `Parameter Validation warrnings for platform > Content > getApplicationLanguages \n ${warrning}`,
|
|
4262
|
+
});
|
|
4263
|
+
}
|
|
4264
|
+
|
|
4265
|
+
const query_params = {};
|
|
4266
|
+
|
|
4267
|
+
const response = await PlatformAPIClient.execute(
|
|
4268
|
+
this.config,
|
|
4269
|
+
"get",
|
|
4270
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/languages`,
|
|
4271
|
+
query_params,
|
|
4272
|
+
undefined,
|
|
4273
|
+
requestHeaders,
|
|
4274
|
+
{ responseHeaders }
|
|
4275
|
+
);
|
|
4276
|
+
|
|
4277
|
+
let responseData = response;
|
|
4278
|
+
if (responseHeaders) {
|
|
4279
|
+
responseData = response[0];
|
|
4280
|
+
}
|
|
4281
|
+
|
|
4282
|
+
const { error: res_error } = Joi.any().validate(responseData, {
|
|
4283
|
+
abortEarly: false,
|
|
4284
|
+
allowUnknown: true,
|
|
4285
|
+
});
|
|
4286
|
+
|
|
4287
|
+
if (res_error) {
|
|
4288
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
4289
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
4290
|
+
} else {
|
|
4291
|
+
Logger({
|
|
4292
|
+
level: "WARN",
|
|
4293
|
+
message: `Response Validation Warnings for platform > Content > getApplicationLanguages \n ${res_error}`,
|
|
4294
|
+
});
|
|
4295
|
+
}
|
|
4296
|
+
}
|
|
4297
|
+
|
|
4298
|
+
return response;
|
|
4299
|
+
}
|
|
4300
|
+
|
|
4301
|
+
/**
|
|
4302
|
+
* @param {ContentPlatformApplicationValidator.GetApplicationResourceTranslationsParam} arg
|
|
4303
|
+
* - Arg object
|
|
4304
|
+
*
|
|
4305
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4306
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4307
|
+
* @returns {Promise<Object>} - Success response
|
|
4308
|
+
* @name getApplicationResourceTranslations
|
|
4309
|
+
* @summary: Get app translations
|
|
4310
|
+
* @description: Fetch translations for application-level resources. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getApplicationResourceTranslations/).
|
|
4311
|
+
*/
|
|
4312
|
+
async getApplicationResourceTranslations(
|
|
4313
|
+
{ locale, type, resourceId, requestHeaders } = { requestHeaders: {} },
|
|
4314
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
4315
|
+
) {
|
|
4316
|
+
const {
|
|
4317
|
+
error,
|
|
4318
|
+
} = ContentPlatformApplicationValidator.getApplicationResourceTranslations().validate(
|
|
4319
|
+
{
|
|
4320
|
+
locale,
|
|
4321
|
+
type,
|
|
4322
|
+
resourceId,
|
|
4323
|
+
},
|
|
4324
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4325
|
+
);
|
|
4326
|
+
if (error) {
|
|
4327
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
4328
|
+
}
|
|
4329
|
+
|
|
4330
|
+
// Showing warrnings if extra unknown parameters are found
|
|
4331
|
+
const {
|
|
4332
|
+
error: warrning,
|
|
4333
|
+
} = ContentPlatformApplicationValidator.getApplicationResourceTranslations().validate(
|
|
4334
|
+
{
|
|
4335
|
+
locale,
|
|
4336
|
+
type,
|
|
4337
|
+
resourceId,
|
|
4338
|
+
},
|
|
4339
|
+
{ abortEarly: false, allowUnknown: false }
|
|
4340
|
+
);
|
|
4341
|
+
if (warrning) {
|
|
4342
|
+
Logger({
|
|
4343
|
+
level: "WARN",
|
|
4344
|
+
message: `Parameter Validation warrnings for platform > Content > getApplicationResourceTranslations \n ${warrning}`,
|
|
4345
|
+
});
|
|
4346
|
+
}
|
|
4347
|
+
|
|
4348
|
+
const query_params = {};
|
|
4349
|
+
query_params["locale"] = locale;
|
|
4350
|
+
query_params["type"] = type;
|
|
4351
|
+
query_params["resource_id"] = resourceId;
|
|
4352
|
+
|
|
4353
|
+
const response = await PlatformAPIClient.execute(
|
|
4354
|
+
this.config,
|
|
4355
|
+
"get",
|
|
4356
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/resource/translations`,
|
|
4357
|
+
query_params,
|
|
4358
|
+
undefined,
|
|
4359
|
+
requestHeaders,
|
|
4360
|
+
{ responseHeaders }
|
|
4361
|
+
);
|
|
4362
|
+
|
|
4363
|
+
let responseData = response;
|
|
4364
|
+
if (responseHeaders) {
|
|
4365
|
+
responseData = response[0];
|
|
4366
|
+
}
|
|
4367
|
+
|
|
4368
|
+
const { error: res_error } = Joi.any().validate(responseData, {
|
|
4369
|
+
abortEarly: false,
|
|
4370
|
+
allowUnknown: true,
|
|
4371
|
+
});
|
|
4372
|
+
|
|
4373
|
+
if (res_error) {
|
|
4374
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
4375
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
4376
|
+
} else {
|
|
4377
|
+
Logger({
|
|
4378
|
+
level: "WARN",
|
|
4379
|
+
message: `Response Validation Warnings for platform > Content > getApplicationResourceTranslations \n ${res_error}`,
|
|
4380
|
+
});
|
|
4381
|
+
}
|
|
4382
|
+
}
|
|
4383
|
+
|
|
4384
|
+
return response;
|
|
4385
|
+
}
|
|
4386
|
+
|
|
4010
4387
|
/**
|
|
4011
4388
|
* @param {ContentPlatformApplicationValidator.GetBlogBySlugParam} arg - Arg object
|
|
4012
4389
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -4014,7 +4391,7 @@ class Content {
|
|
|
4014
4391
|
* @returns {Promise<ContentPlatformModel.BlogSchema>} - Success response
|
|
4015
4392
|
* @name getBlogBySlug
|
|
4016
4393
|
* @summary: Get blog by slug
|
|
4017
|
-
* @description: Retrieve detailed information about a specific blog using its slug. - Check out [method documentation](https://
|
|
4394
|
+
* @description: Retrieve detailed information about a specific blog using its slug. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getBlogBySlug/).
|
|
4018
4395
|
*/
|
|
4019
4396
|
async getBlogBySlug(
|
|
4020
4397
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4090,10 +4467,10 @@ class Content {
|
|
|
4090
4467
|
* @param {ContentPlatformApplicationValidator.GetBlogsParam} arg - Arg object
|
|
4091
4468
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4092
4469
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4093
|
-
* @returns {Promise<ContentPlatformModel.
|
|
4470
|
+
* @returns {Promise<ContentPlatformModel.BlogGetDetails>} - Success response
|
|
4094
4471
|
* @name getBlogs
|
|
4095
4472
|
* @summary: List blogs
|
|
4096
|
-
* @description: List all blogs - Check out [method documentation](https://
|
|
4473
|
+
* @description: List all blogs - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getBlogs/).
|
|
4097
4474
|
*/
|
|
4098
4475
|
async getBlogs(
|
|
4099
4476
|
{ pageNo, pageSize, tags, q, slug, title, status, requestHeaders } = {
|
|
@@ -4165,7 +4542,7 @@ class Content {
|
|
|
4165
4542
|
|
|
4166
4543
|
const {
|
|
4167
4544
|
error: res_error,
|
|
4168
|
-
} = ContentPlatformModel.
|
|
4545
|
+
} = ContentPlatformModel.BlogGetDetails().validate(responseData, {
|
|
4169
4546
|
abortEarly: false,
|
|
4170
4547
|
allowUnknown: true,
|
|
4171
4548
|
});
|
|
@@ -4191,7 +4568,7 @@ class Content {
|
|
|
4191
4568
|
* @returns {Promise<ContentPlatformModel.DataLoadersSchema>} - Success response
|
|
4192
4569
|
* @name getDataLoaders
|
|
4193
4570
|
* @summary: List data loaders
|
|
4194
|
-
* @description: List all Dataloaders - Check out [method documentation](https://
|
|
4571
|
+
* @description: List all Dataloaders - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getDataLoaders/).
|
|
4195
4572
|
*/
|
|
4196
4573
|
async getDataLoaders(
|
|
4197
4574
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -4269,7 +4646,7 @@ class Content {
|
|
|
4269
4646
|
* Success response
|
|
4270
4647
|
* @name getDataLoadersByService
|
|
4271
4648
|
* @summary: List all data loaders
|
|
4272
|
-
* @description: Use this to get all data loaders of an application by service name - Check out [method documentation](https://
|
|
4649
|
+
* @description: Use this to get all data loaders of an application by service name - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getDataLoadersByService/).
|
|
4273
4650
|
*/
|
|
4274
4651
|
async getDataLoadersByService(
|
|
4275
4652
|
{ serviceName, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4347,11 +4724,11 @@ class Content {
|
|
|
4347
4724
|
*
|
|
4348
4725
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4349
4726
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4350
|
-
* @returns {Promise<ContentPlatformModel.
|
|
4727
|
+
* @returns {Promise<ContentPlatformModel.DefaultNavigationDetails>} -
|
|
4351
4728
|
* Success response
|
|
4352
4729
|
* @name getDefaultNavigations
|
|
4353
4730
|
* @summary: Get default navigations
|
|
4354
|
-
* @description: Retrieve default navigation elements. - Check out [method documentation](https://
|
|
4731
|
+
* @description: Retrieve default navigation elements. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getDefaultNavigations/).
|
|
4355
4732
|
*/
|
|
4356
4733
|
async getDefaultNavigations(
|
|
4357
4734
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -4400,10 +4777,10 @@ class Content {
|
|
|
4400
4777
|
|
|
4401
4778
|
const {
|
|
4402
4779
|
error: res_error,
|
|
4403
|
-
} = ContentPlatformModel.
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
);
|
|
4780
|
+
} = ContentPlatformModel.DefaultNavigationDetails().validate(responseData, {
|
|
4781
|
+
abortEarly: false,
|
|
4782
|
+
allowUnknown: true,
|
|
4783
|
+
});
|
|
4407
4784
|
|
|
4408
4785
|
if (res_error) {
|
|
4409
4786
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4428,7 +4805,7 @@ class Content {
|
|
|
4428
4805
|
* @returns {Promise<ContentPlatformModel.DefaultSchemaComponent>} - Success response
|
|
4429
4806
|
* @name getDefaultSEOMarkupSchema
|
|
4430
4807
|
* @summary: List default SEO Markup Schemas
|
|
4431
|
-
* @description: Use this API to List default SEO Markup Schemas - Check out [method documentation](https://
|
|
4808
|
+
* @description: Use this API to List default SEO Markup Schemas - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getDefaultSEOMarkupSchema/).
|
|
4432
4809
|
*/
|
|
4433
4810
|
async getDefaultSEOMarkupSchema(
|
|
4434
4811
|
{ pageType, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4508,7 +4885,7 @@ class Content {
|
|
|
4508
4885
|
* @returns {Promise<ContentPlatformModel.CreateFaqResponseSchema>} - Success response
|
|
4509
4886
|
* @name getFaqByIdOrSlug
|
|
4510
4887
|
* @summary: Get FAQ or slug
|
|
4511
|
-
* @description: Get detailed information about a specific FAQ - Check out [method documentation](https://
|
|
4888
|
+
* @description: Get detailed information about a specific FAQ - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getFaqByIdOrSlug/).
|
|
4512
4889
|
*/
|
|
4513
4890
|
async getFaqByIdOrSlug(
|
|
4514
4891
|
{ idOrSlug, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4587,7 +4964,7 @@ class Content {
|
|
|
4587
4964
|
* @returns {Promise<ContentPlatformModel.GetFaqCategoriesSchema>} - Success response
|
|
4588
4965
|
* @name getFaqCategories
|
|
4589
4966
|
* @summary: List FAQ Categories
|
|
4590
|
-
* @description: List all FAQ Categories - Check out [method documentation](https://
|
|
4967
|
+
* @description: List all FAQ Categories - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getFaqCategories/).
|
|
4591
4968
|
*/
|
|
4592
4969
|
async getFaqCategories(
|
|
4593
4970
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -4665,7 +5042,7 @@ class Content {
|
|
|
4665
5042
|
* Success response
|
|
4666
5043
|
* @name getFaqCategoryBySlugOrId
|
|
4667
5044
|
* @summary: Get FAQ category
|
|
4668
|
-
* @description: Get detailed information about a specific FAQ category - Check out [method documentation](https://
|
|
5045
|
+
* @description: Get detailed information about a specific FAQ category - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getFaqCategoryBySlugOrId/).
|
|
4669
5046
|
*/
|
|
4670
5047
|
async getFaqCategoryBySlugOrId(
|
|
4671
5048
|
{ idOrSlug, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4746,7 +5123,7 @@ class Content {
|
|
|
4746
5123
|
* @returns {Promise<ContentPlatformModel.GetFaqSchema>} - Success response
|
|
4747
5124
|
* @name getFaqsByCategoryIdOrSlug
|
|
4748
5125
|
* @summary: List FAQs
|
|
4749
|
-
* @description: Retrieve a list of FAQs within a specific category. - Check out [method documentation](https://
|
|
5126
|
+
* @description: Retrieve a list of FAQs within a specific category. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getFaqsByCategoryIdOrSlug/).
|
|
4750
5127
|
*/
|
|
4751
5128
|
async getFaqsByCategoryIdOrSlug(
|
|
4752
5129
|
{ idOrSlug, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4827,10 +5204,10 @@ class Content {
|
|
|
4827
5204
|
* @returns {Promise<ContentPlatformModel.TagsSchema>} - Success response
|
|
4828
5205
|
* @name getInjectableTags
|
|
4829
5206
|
* @summary: Get all HTML tags
|
|
4830
|
-
* @description: Retrieve a list of injectable tags. - Check out [method documentation](https://
|
|
5207
|
+
* @description: Retrieve a list of injectable tags. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getInjectableTags/).
|
|
4831
5208
|
*/
|
|
4832
5209
|
async getInjectableTags(
|
|
4833
|
-
{ all, requestHeaders } = { requestHeaders: {} },
|
|
5210
|
+
{ all, search, requestHeaders } = { requestHeaders: {} },
|
|
4834
5211
|
{ responseHeaders } = { responseHeaders: false }
|
|
4835
5212
|
) {
|
|
4836
5213
|
const {
|
|
@@ -4838,6 +5215,7 @@ class Content {
|
|
|
4838
5215
|
} = ContentPlatformApplicationValidator.getInjectableTags().validate(
|
|
4839
5216
|
{
|
|
4840
5217
|
all,
|
|
5218
|
+
search,
|
|
4841
5219
|
},
|
|
4842
5220
|
{ abortEarly: false, allowUnknown: true }
|
|
4843
5221
|
);
|
|
@@ -4851,6 +5229,7 @@ class Content {
|
|
|
4851
5229
|
} = ContentPlatformApplicationValidator.getInjectableTags().validate(
|
|
4852
5230
|
{
|
|
4853
5231
|
all,
|
|
5232
|
+
search,
|
|
4854
5233
|
},
|
|
4855
5234
|
{ abortEarly: false, allowUnknown: false }
|
|
4856
5235
|
);
|
|
@@ -4863,6 +5242,7 @@ class Content {
|
|
|
4863
5242
|
|
|
4864
5243
|
const query_params = {};
|
|
4865
5244
|
query_params["all"] = all;
|
|
5245
|
+
query_params["search"] = search;
|
|
4866
5246
|
|
|
4867
5247
|
const response = await PlatformAPIClient.execute(
|
|
4868
5248
|
this.config,
|
|
@@ -4904,10 +5284,10 @@ class Content {
|
|
|
4904
5284
|
* @param {ContentPlatformApplicationValidator.GetLandingPagesParam} arg - Arg object
|
|
4905
5285
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4906
5286
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4907
|
-
* @returns {Promise<ContentPlatformModel.
|
|
5287
|
+
* @returns {Promise<ContentPlatformModel.LandingPageGetDetails>} - Success response
|
|
4908
5288
|
* @name getLandingPages
|
|
4909
5289
|
* @summary: Get landing pages
|
|
4910
|
-
* @description: Lists a list landing pages as per device types - Check out [method documentation](https://
|
|
5290
|
+
* @description: Lists a list landing pages as per device types - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getLandingPages/).
|
|
4911
5291
|
*/
|
|
4912
5292
|
async getLandingPages(
|
|
4913
5293
|
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4964,7 +5344,7 @@ class Content {
|
|
|
4964
5344
|
|
|
4965
5345
|
const {
|
|
4966
5346
|
error: res_error,
|
|
4967
|
-
} = ContentPlatformModel.
|
|
5347
|
+
} = ContentPlatformModel.LandingPageGetDetails().validate(responseData, {
|
|
4968
5348
|
abortEarly: false,
|
|
4969
5349
|
allowUnknown: true,
|
|
4970
5350
|
});
|
|
@@ -4992,7 +5372,7 @@ class Content {
|
|
|
4992
5372
|
* @returns {Promise<ContentPlatformModel.ApplicationLegal>} - Success response
|
|
4993
5373
|
* @name getLegalInformation
|
|
4994
5374
|
* @summary: Get Legal Pages
|
|
4995
|
-
* @description: Get legal information and terms - Check out [method documentation](https://
|
|
5375
|
+
* @description: Get legal information and terms - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getLegalInformation/).
|
|
4996
5376
|
*/
|
|
4997
5377
|
async getLegalInformation(
|
|
4998
5378
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -5069,7 +5449,7 @@ class Content {
|
|
|
5069
5449
|
* @returns {Promise<ContentPlatformModel.NavigationSchema>} - Success response
|
|
5070
5450
|
* @name getNavigationBySlug
|
|
5071
5451
|
* @summary: Get navigation by slug
|
|
5072
|
-
* @description: Retrieve detailed information about a specific navigation element. - Check out [method documentation](https://
|
|
5452
|
+
* @description: Retrieve detailed information about a specific navigation element. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getNavigationBySlug/).
|
|
5073
5453
|
*/
|
|
5074
5454
|
async getNavigationBySlug(
|
|
5075
5455
|
{ slug, devicePlatform, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5148,10 +5528,10 @@ class Content {
|
|
|
5148
5528
|
* @param {ContentPlatformApplicationValidator.GetNavigationsParam} arg - Arg object
|
|
5149
5529
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5150
5530
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5151
|
-
* @returns {Promise<ContentPlatformModel.
|
|
5531
|
+
* @returns {Promise<ContentPlatformModel.NavigationGetDetails>} - Success response
|
|
5152
5532
|
* @name getNavigations
|
|
5153
5533
|
* @summary: Get navigation items
|
|
5154
|
-
* @description: Retrieve a list of navigational elements. - Check out [method documentation](https://
|
|
5534
|
+
* @description: Retrieve a list of navigational elements. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getNavigations/).
|
|
5155
5535
|
*/
|
|
5156
5536
|
async getNavigations(
|
|
5157
5537
|
{ devicePlatform, pageNo, pageSize, requestHeaders } = {
|
|
@@ -5213,7 +5593,7 @@ class Content {
|
|
|
5213
5593
|
|
|
5214
5594
|
const {
|
|
5215
5595
|
error: res_error,
|
|
5216
|
-
} = ContentPlatformModel.
|
|
5596
|
+
} = ContentPlatformModel.NavigationGetDetails().validate(responseData, {
|
|
5217
5597
|
abortEarly: false,
|
|
5218
5598
|
allowUnknown: true,
|
|
5219
5599
|
});
|
|
@@ -5239,7 +5619,7 @@ class Content {
|
|
|
5239
5619
|
* @returns {Promise<ContentPlatformModel.PageSchema>} - Success response
|
|
5240
5620
|
* @name getPageBySlug
|
|
5241
5621
|
* @summary: Get page by slug
|
|
5242
|
-
* @description: Get detailed information about a specific page using its slug. - Check out [method documentation](https://
|
|
5622
|
+
* @description: Get detailed information about a specific page using its slug. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getPageBySlug/).
|
|
5243
5623
|
*/
|
|
5244
5624
|
async getPageBySlug(
|
|
5245
5625
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5318,7 +5698,7 @@ class Content {
|
|
|
5318
5698
|
* @returns {Promise<ContentPlatformModel.PageMetaSchema>} - Success response
|
|
5319
5699
|
* @name getPageMeta
|
|
5320
5700
|
* @summary: Get page meta
|
|
5321
|
-
* @description: Use this API to Get metadata for a specific page. - Check out [method documentation](https://
|
|
5701
|
+
* @description: Use this API to Get metadata for a specific page. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getPageMeta/).
|
|
5322
5702
|
*/
|
|
5323
5703
|
async getPageMeta(
|
|
5324
5704
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -5393,7 +5773,7 @@ class Content {
|
|
|
5393
5773
|
* @returns {Promise<ContentPlatformModel.PageSpec>} - Success response
|
|
5394
5774
|
* @name getPageSpec
|
|
5395
5775
|
* @summary: Get page specification
|
|
5396
|
-
* @description: Use this API to Get specifications and details for a specific page - Check out [method documentation](https://
|
|
5776
|
+
* @description: Use this API to Get specifications and details for a specific page - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getPageSpec/).
|
|
5397
5777
|
*/
|
|
5398
5778
|
async getPageSpec(
|
|
5399
5779
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -5465,10 +5845,10 @@ class Content {
|
|
|
5465
5845
|
* @param {ContentPlatformApplicationValidator.GetPagesParam} arg - Arg object
|
|
5466
5846
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5467
5847
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5468
|
-
* @returns {Promise<ContentPlatformModel.
|
|
5848
|
+
* @returns {Promise<ContentPlatformModel.PageGetDetails>} - Success response
|
|
5469
5849
|
* @name getPages
|
|
5470
5850
|
* @summary: Get pages
|
|
5471
|
-
* @description: Retrieve a list of available pages. - Check out [method documentation](https://
|
|
5851
|
+
* @description: Retrieve a list of available pages. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getPages/).
|
|
5472
5852
|
*/
|
|
5473
5853
|
async getPages(
|
|
5474
5854
|
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5523,7 +5903,7 @@ class Content {
|
|
|
5523
5903
|
|
|
5524
5904
|
const {
|
|
5525
5905
|
error: res_error,
|
|
5526
|
-
} = ContentPlatformModel.
|
|
5906
|
+
} = ContentPlatformModel.PageGetDetails().validate(responseData, {
|
|
5527
5907
|
abortEarly: false,
|
|
5528
5908
|
allowUnknown: true,
|
|
5529
5909
|
});
|
|
@@ -5551,7 +5931,7 @@ class Content {
|
|
|
5551
5931
|
* @returns {Promise<ContentPlatformModel.PathMappingSchema>} - Success response
|
|
5552
5932
|
* @name getPathRedirectionRule
|
|
5553
5933
|
* @summary: Get Path Redirection Rule
|
|
5554
|
-
* @description: Use this API to Get detailed information about a specific path redirection rule - Check out [method documentation](https://
|
|
5934
|
+
* @description: Use this API to Get detailed information about a specific path redirection rule - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getPathRedirectionRule/).
|
|
5555
5935
|
*/
|
|
5556
5936
|
async getPathRedirectionRule(
|
|
5557
5937
|
{ pathId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5632,7 +6012,7 @@ class Content {
|
|
|
5632
6012
|
* @returns {Promise<ContentPlatformModel.PathMappingSchema>} - Success response
|
|
5633
6013
|
* @name getPathRedirectionRules
|
|
5634
6014
|
* @summary: List Path Redirection Rules
|
|
5635
|
-
* @description: Use this API to List Path Redirection Rules - Check out [method documentation](https://
|
|
6015
|
+
* @description: Use this API to List Path Redirection Rules - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getPathRedirectionRules/).
|
|
5636
6016
|
*/
|
|
5637
6017
|
async getPathRedirectionRules(
|
|
5638
6018
|
{ pageSize, pageNo, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5717,7 +6097,7 @@ class Content {
|
|
|
5717
6097
|
* @returns {Promise<ContentPlatformModel.SeoComponent>} - Success response
|
|
5718
6098
|
* @name getSEOConfiguration
|
|
5719
6099
|
* @summary: Get sales channel SEO
|
|
5720
|
-
* @description: Retrieve configuration settings for SEO. - Check out [method documentation](https://
|
|
6100
|
+
* @description: Retrieve configuration settings for SEO. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getSEOConfiguration/).
|
|
5721
6101
|
*/
|
|
5722
6102
|
async getSEOConfiguration(
|
|
5723
6103
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -5794,7 +6174,7 @@ class Content {
|
|
|
5794
6174
|
* @returns {Promise<ContentPlatformModel.SEOSchemaMarkupTemplate>} - Success response
|
|
5795
6175
|
* @name getSEOMarkupSchema
|
|
5796
6176
|
* @summary: Get SEO Markup Schema
|
|
5797
|
-
* @description: Use this API to Get SEO Markup Schema - Check out [method documentation](https://
|
|
6177
|
+
* @description: Use this API to Get SEO Markup Schema - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getSEOMarkupSchema/).
|
|
5798
6178
|
*/
|
|
5799
6179
|
async getSEOMarkupSchema(
|
|
5800
6180
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5875,7 +6255,7 @@ class Content {
|
|
|
5875
6255
|
* @returns {Promise<ContentPlatformModel.SeoSchemaComponent>} - Success response
|
|
5876
6256
|
* @name getSEOMarkupSchemas
|
|
5877
6257
|
* @summary: List default SEO Markup Schemas
|
|
5878
|
-
* @description: Use this API to List default SEO Markup Schemas - Check out [method documentation](https://
|
|
6258
|
+
* @description: Use this API to List default SEO Markup Schemas - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getSEOMarkupSchemas/).
|
|
5879
6259
|
*/
|
|
5880
6260
|
async getSEOMarkupSchemas(
|
|
5881
6261
|
{ title, active, pageNo, pageSize, requestHeaders } = {
|
|
@@ -5960,27 +6340,24 @@ class Content {
|
|
|
5960
6340
|
}
|
|
5961
6341
|
|
|
5962
6342
|
/**
|
|
5963
|
-
* @param {ContentPlatformApplicationValidator.
|
|
6343
|
+
* @param {ContentPlatformApplicationValidator.GetSupportInformationParam} arg
|
|
5964
6344
|
* - Arg object
|
|
5965
6345
|
*
|
|
5966
6346
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5967
6347
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5968
|
-
* @returns {Promise<ContentPlatformModel.
|
|
5969
|
-
* @name
|
|
5970
|
-
* @summary: Get
|
|
5971
|
-
* @description:
|
|
6348
|
+
* @returns {Promise<ContentPlatformModel.Support>} - Success response
|
|
6349
|
+
* @name getSupportInformation
|
|
6350
|
+
* @summary: Get support information
|
|
6351
|
+
* @description: Retrieve information related to customer support. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getSupportInformation/).
|
|
5972
6352
|
*/
|
|
5973
|
-
async
|
|
5974
|
-
{
|
|
6353
|
+
async getSupportInformation(
|
|
6354
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
5975
6355
|
{ responseHeaders } = { responseHeaders: false }
|
|
5976
6356
|
) {
|
|
5977
6357
|
const {
|
|
5978
6358
|
error,
|
|
5979
|
-
} = ContentPlatformApplicationValidator.
|
|
5980
|
-
{
|
|
5981
|
-
slug,
|
|
5982
|
-
devicePlatform,
|
|
5983
|
-
},
|
|
6359
|
+
} = ContentPlatformApplicationValidator.getSupportInformation().validate(
|
|
6360
|
+
{},
|
|
5984
6361
|
{ abortEarly: false, allowUnknown: true }
|
|
5985
6362
|
);
|
|
5986
6363
|
if (error) {
|
|
@@ -5990,27 +6367,23 @@ class Content {
|
|
|
5990
6367
|
// Showing warrnings if extra unknown parameters are found
|
|
5991
6368
|
const {
|
|
5992
6369
|
error: warrning,
|
|
5993
|
-
} = ContentPlatformApplicationValidator.
|
|
5994
|
-
{
|
|
5995
|
-
slug,
|
|
5996
|
-
devicePlatform,
|
|
5997
|
-
},
|
|
6370
|
+
} = ContentPlatformApplicationValidator.getSupportInformation().validate(
|
|
6371
|
+
{},
|
|
5998
6372
|
{ abortEarly: false, allowUnknown: false }
|
|
5999
6373
|
);
|
|
6000
6374
|
if (warrning) {
|
|
6001
6375
|
Logger({
|
|
6002
6376
|
level: "WARN",
|
|
6003
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
6377
|
+
message: `Parameter Validation warrnings for platform > Content > getSupportInformation \n ${warrning}`,
|
|
6004
6378
|
});
|
|
6005
6379
|
}
|
|
6006
6380
|
|
|
6007
6381
|
const query_params = {};
|
|
6008
|
-
query_params["device_platform"] = devicePlatform;
|
|
6009
6382
|
|
|
6010
6383
|
const response = await PlatformAPIClient.execute(
|
|
6011
6384
|
this.config,
|
|
6012
6385
|
"get",
|
|
6013
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
6386
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/support`,
|
|
6014
6387
|
query_params,
|
|
6015
6388
|
undefined,
|
|
6016
6389
|
requestHeaders,
|
|
@@ -6024,7 +6397,7 @@ class Content {
|
|
|
6024
6397
|
|
|
6025
6398
|
const {
|
|
6026
6399
|
error: res_error,
|
|
6027
|
-
} = ContentPlatformModel.
|
|
6400
|
+
} = ContentPlatformModel.Support().validate(responseData, {
|
|
6028
6401
|
abortEarly: false,
|
|
6029
6402
|
allowUnknown: true,
|
|
6030
6403
|
});
|
|
@@ -6035,7 +6408,7 @@ class Content {
|
|
|
6035
6408
|
} else {
|
|
6036
6409
|
Logger({
|
|
6037
6410
|
level: "WARN",
|
|
6038
|
-
message: `Response Validation Warnings for platform > Content >
|
|
6411
|
+
message: `Response Validation Warnings for platform > Content > getSupportInformation \n ${res_error}`,
|
|
6039
6412
|
});
|
|
6040
6413
|
}
|
|
6041
6414
|
}
|
|
@@ -6044,28 +6417,22 @@ class Content {
|
|
|
6044
6417
|
}
|
|
6045
6418
|
|
|
6046
6419
|
/**
|
|
6047
|
-
* @param {ContentPlatformApplicationValidator.
|
|
6420
|
+
* @param {ContentPlatformApplicationValidator.GetTagsTemplateParam} arg - Arg object
|
|
6048
6421
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6049
6422
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6050
|
-
* @returns {Promise<ContentPlatformModel.
|
|
6051
|
-
* @name
|
|
6052
|
-
* @summary:
|
|
6053
|
-
* @description:
|
|
6423
|
+
* @returns {Promise<ContentPlatformModel.TagsTemplateSchema>} - Success response
|
|
6424
|
+
* @name getTagsTemplate
|
|
6425
|
+
* @summary: Get Script Tags Templates
|
|
6426
|
+
* @description: Retrieve the available script tag templates - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getTagsTemplate/).
|
|
6054
6427
|
*/
|
|
6055
|
-
async
|
|
6056
|
-
{
|
|
6057
|
-
requestHeaders: {},
|
|
6058
|
-
},
|
|
6428
|
+
async getTagsTemplate(
|
|
6429
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
6059
6430
|
{ responseHeaders } = { responseHeaders: false }
|
|
6060
6431
|
) {
|
|
6061
6432
|
const {
|
|
6062
6433
|
error,
|
|
6063
|
-
} = ContentPlatformApplicationValidator.
|
|
6064
|
-
{
|
|
6065
|
-
devicePlatform,
|
|
6066
|
-
pageNo,
|
|
6067
|
-
pageSize,
|
|
6068
|
-
},
|
|
6434
|
+
} = ContentPlatformApplicationValidator.getTagsTemplate().validate(
|
|
6435
|
+
{},
|
|
6069
6436
|
{ abortEarly: false, allowUnknown: true }
|
|
6070
6437
|
);
|
|
6071
6438
|
if (error) {
|
|
@@ -6075,30 +6442,23 @@ class Content {
|
|
|
6075
6442
|
// Showing warrnings if extra unknown parameters are found
|
|
6076
6443
|
const {
|
|
6077
6444
|
error: warrning,
|
|
6078
|
-
} = ContentPlatformApplicationValidator.
|
|
6079
|
-
{
|
|
6080
|
-
devicePlatform,
|
|
6081
|
-
pageNo,
|
|
6082
|
-
pageSize,
|
|
6083
|
-
},
|
|
6445
|
+
} = ContentPlatformApplicationValidator.getTagsTemplate().validate(
|
|
6446
|
+
{},
|
|
6084
6447
|
{ abortEarly: false, allowUnknown: false }
|
|
6085
6448
|
);
|
|
6086
6449
|
if (warrning) {
|
|
6087
6450
|
Logger({
|
|
6088
6451
|
level: "WARN",
|
|
6089
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
6452
|
+
message: `Parameter Validation warrnings for platform > Content > getTagsTemplate \n ${warrning}`,
|
|
6090
6453
|
});
|
|
6091
6454
|
}
|
|
6092
6455
|
|
|
6093
6456
|
const query_params = {};
|
|
6094
|
-
query_params["device_platform"] = devicePlatform;
|
|
6095
|
-
query_params["page_no"] = pageNo;
|
|
6096
|
-
query_params["page_size"] = pageSize;
|
|
6097
6457
|
|
|
6098
6458
|
const response = await PlatformAPIClient.execute(
|
|
6099
6459
|
this.config,
|
|
6100
6460
|
"get",
|
|
6101
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
6461
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/tags/templates`,
|
|
6102
6462
|
query_params,
|
|
6103
6463
|
undefined,
|
|
6104
6464
|
requestHeaders,
|
|
@@ -6112,7 +6472,7 @@ class Content {
|
|
|
6112
6472
|
|
|
6113
6473
|
const {
|
|
6114
6474
|
error: res_error,
|
|
6115
|
-
} = ContentPlatformModel.
|
|
6475
|
+
} = ContentPlatformModel.TagsTemplateSchema().validate(responseData, {
|
|
6116
6476
|
abortEarly: false,
|
|
6117
6477
|
allowUnknown: true,
|
|
6118
6478
|
});
|
|
@@ -6123,7 +6483,7 @@ class Content {
|
|
|
6123
6483
|
} else {
|
|
6124
6484
|
Logger({
|
|
6125
6485
|
level: "WARN",
|
|
6126
|
-
message: `Response Validation Warnings for platform > Content >
|
|
6486
|
+
message: `Response Validation Warnings for platform > Content > getTagsTemplate \n ${res_error}`,
|
|
6127
6487
|
});
|
|
6128
6488
|
}
|
|
6129
6489
|
}
|
|
@@ -6132,66 +6492,119 @@ class Content {
|
|
|
6132
6492
|
}
|
|
6133
6493
|
|
|
6134
6494
|
/**
|
|
6135
|
-
* @param {
|
|
6136
|
-
*
|
|
6137
|
-
*
|
|
6138
|
-
* @param {
|
|
6139
|
-
*
|
|
6140
|
-
* @
|
|
6141
|
-
*
|
|
6142
|
-
* @
|
|
6143
|
-
*
|
|
6144
|
-
* @returns {Paginator<ContentPlatformModel.SlideshowGetResponse>}
|
|
6145
|
-
* @summary: List Slideshows
|
|
6146
|
-
* @description: Use this API to list all Slideshows
|
|
6495
|
+
* @param {ContentPlatformApplicationValidator.GetTranslateUILabelsParam} arg
|
|
6496
|
+
* - Arg object
|
|
6497
|
+
*
|
|
6498
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6499
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6500
|
+
* @returns {Promise<ContentPlatformModel.TranslateUiLabelsPage>} - Success response
|
|
6501
|
+
* @name getTranslateUILabels
|
|
6502
|
+
* @summary: Get Translate Ui Labels
|
|
6503
|
+
* @description: Retrieves Translate Ui Labels with optional filtering by type, application, and company identifiers. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getTranslateUILabels/).
|
|
6147
6504
|
*/
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
const
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
|
|
6505
|
+
async getTranslateUILabels(
|
|
6506
|
+
{ templateThemeId, themeId, locale, type, requestHeaders } = {
|
|
6507
|
+
requestHeaders: {},
|
|
6508
|
+
},
|
|
6509
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
6510
|
+
) {
|
|
6511
|
+
const {
|
|
6512
|
+
error,
|
|
6513
|
+
} = ContentPlatformApplicationValidator.getTranslateUILabels().validate(
|
|
6514
|
+
{
|
|
6515
|
+
templateThemeId,
|
|
6516
|
+
themeId,
|
|
6517
|
+
locale,
|
|
6518
|
+
type,
|
|
6519
|
+
},
|
|
6520
|
+
{ abortEarly: false, allowUnknown: true }
|
|
6521
|
+
);
|
|
6522
|
+
if (error) {
|
|
6523
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
6524
|
+
}
|
|
6525
|
+
|
|
6526
|
+
// Showing warrnings if extra unknown parameters are found
|
|
6527
|
+
const {
|
|
6528
|
+
error: warrning,
|
|
6529
|
+
} = ContentPlatformApplicationValidator.getTranslateUILabels().validate(
|
|
6530
|
+
{
|
|
6531
|
+
templateThemeId,
|
|
6532
|
+
themeId,
|
|
6533
|
+
locale,
|
|
6534
|
+
type,
|
|
6535
|
+
},
|
|
6536
|
+
{ abortEarly: false, allowUnknown: false }
|
|
6537
|
+
);
|
|
6538
|
+
if (warrning) {
|
|
6539
|
+
Logger({
|
|
6540
|
+
level: "WARN",
|
|
6541
|
+
message: `Parameter Validation warrnings for platform > Content > getTranslateUILabels \n ${warrning}`,
|
|
6169
6542
|
});
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6543
|
+
}
|
|
6544
|
+
|
|
6545
|
+
const query_params = {};
|
|
6546
|
+
query_params["template_theme_id"] = templateThemeId;
|
|
6547
|
+
query_params["theme_id"] = themeId;
|
|
6548
|
+
query_params["locale"] = locale;
|
|
6549
|
+
query_params["type"] = type;
|
|
6550
|
+
|
|
6551
|
+
const response = await PlatformAPIClient.execute(
|
|
6552
|
+
this.config,
|
|
6553
|
+
"get",
|
|
6554
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/translate-ui-labels`,
|
|
6555
|
+
query_params,
|
|
6556
|
+
undefined,
|
|
6557
|
+
requestHeaders,
|
|
6558
|
+
{ responseHeaders }
|
|
6559
|
+
);
|
|
6560
|
+
|
|
6561
|
+
let responseData = response;
|
|
6562
|
+
if (responseHeaders) {
|
|
6563
|
+
responseData = response[0];
|
|
6564
|
+
}
|
|
6565
|
+
|
|
6566
|
+
const {
|
|
6567
|
+
error: res_error,
|
|
6568
|
+
} = ContentPlatformModel.TranslateUiLabelsPage().validate(responseData, {
|
|
6569
|
+
abortEarly: false,
|
|
6570
|
+
allowUnknown: true,
|
|
6571
|
+
});
|
|
6572
|
+
|
|
6573
|
+
if (res_error) {
|
|
6574
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
6575
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
6576
|
+
} else {
|
|
6577
|
+
Logger({
|
|
6578
|
+
level: "WARN",
|
|
6579
|
+
message: `Response Validation Warnings for platform > Content > getTranslateUILabels \n ${res_error}`,
|
|
6580
|
+
});
|
|
6581
|
+
}
|
|
6582
|
+
}
|
|
6583
|
+
|
|
6584
|
+
return response;
|
|
6174
6585
|
}
|
|
6175
6586
|
|
|
6176
6587
|
/**
|
|
6177
|
-
* @param {ContentPlatformApplicationValidator.
|
|
6588
|
+
* @param {ContentPlatformApplicationValidator.GetTranslateUILabelsByIdParam} arg
|
|
6178
6589
|
* - Arg object
|
|
6179
6590
|
*
|
|
6180
6591
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6181
6592
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6182
|
-
* @returns {Promise<ContentPlatformModel.
|
|
6183
|
-
* @name
|
|
6184
|
-
* @summary: Get
|
|
6185
|
-
* @description:
|
|
6593
|
+
* @returns {Promise<ContentPlatformModel.TranslateUiLabels>} - Success response
|
|
6594
|
+
* @name getTranslateUILabelsById
|
|
6595
|
+
* @summary: Get Resource Detail
|
|
6596
|
+
* @description: Fetches detailed information for a specific Translate Ui Labels using its unique identifier. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/getTranslateUILabelsById/).
|
|
6186
6597
|
*/
|
|
6187
|
-
async
|
|
6188
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
6598
|
+
async getTranslateUILabelsById(
|
|
6599
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
6189
6600
|
{ responseHeaders } = { responseHeaders: false }
|
|
6190
6601
|
) {
|
|
6191
6602
|
const {
|
|
6192
6603
|
error,
|
|
6193
|
-
} = ContentPlatformApplicationValidator.
|
|
6194
|
-
{
|
|
6604
|
+
} = ContentPlatformApplicationValidator.getTranslateUILabelsById().validate(
|
|
6605
|
+
{
|
|
6606
|
+
id,
|
|
6607
|
+
},
|
|
6195
6608
|
{ abortEarly: false, allowUnknown: true }
|
|
6196
6609
|
);
|
|
6197
6610
|
if (error) {
|
|
@@ -6201,14 +6614,16 @@ class Content {
|
|
|
6201
6614
|
// Showing warrnings if extra unknown parameters are found
|
|
6202
6615
|
const {
|
|
6203
6616
|
error: warrning,
|
|
6204
|
-
} = ContentPlatformApplicationValidator.
|
|
6205
|
-
{
|
|
6617
|
+
} = ContentPlatformApplicationValidator.getTranslateUILabelsById().validate(
|
|
6618
|
+
{
|
|
6619
|
+
id,
|
|
6620
|
+
},
|
|
6206
6621
|
{ abortEarly: false, allowUnknown: false }
|
|
6207
6622
|
);
|
|
6208
6623
|
if (warrning) {
|
|
6209
6624
|
Logger({
|
|
6210
6625
|
level: "WARN",
|
|
6211
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
6626
|
+
message: `Parameter Validation warrnings for platform > Content > getTranslateUILabelsById \n ${warrning}`,
|
|
6212
6627
|
});
|
|
6213
6628
|
}
|
|
6214
6629
|
|
|
@@ -6217,7 +6632,7 @@ class Content {
|
|
|
6217
6632
|
const response = await PlatformAPIClient.execute(
|
|
6218
6633
|
this.config,
|
|
6219
6634
|
"get",
|
|
6220
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
6635
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/translate-ui-labels/${id}`,
|
|
6221
6636
|
query_params,
|
|
6222
6637
|
undefined,
|
|
6223
6638
|
requestHeaders,
|
|
@@ -6231,7 +6646,7 @@ class Content {
|
|
|
6231
6646
|
|
|
6232
6647
|
const {
|
|
6233
6648
|
error: res_error,
|
|
6234
|
-
} = ContentPlatformModel.
|
|
6649
|
+
} = ContentPlatformModel.TranslateUiLabels().validate(responseData, {
|
|
6235
6650
|
abortEarly: false,
|
|
6236
6651
|
allowUnknown: true,
|
|
6237
6652
|
});
|
|
@@ -6242,7 +6657,7 @@ class Content {
|
|
|
6242
6657
|
} else {
|
|
6243
6658
|
Logger({
|
|
6244
6659
|
level: "WARN",
|
|
6245
|
-
message: `Response Validation Warnings for platform > Content >
|
|
6660
|
+
message: `Response Validation Warnings for platform > Content > getTranslateUILabelsById \n ${res_error}`,
|
|
6246
6661
|
});
|
|
6247
6662
|
}
|
|
6248
6663
|
}
|
|
@@ -6251,27 +6666,27 @@ class Content {
|
|
|
6251
6666
|
}
|
|
6252
6667
|
|
|
6253
6668
|
/**
|
|
6254
|
-
* @param {ContentPlatformApplicationValidator.
|
|
6669
|
+
* @param {ContentPlatformApplicationValidator.ImportAppCustomObjectEntriesBySlugParam} arg
|
|
6255
6670
|
* - Arg object
|
|
6256
6671
|
*
|
|
6257
6672
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6258
6673
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6259
|
-
* @returns {Promise<ContentPlatformModel.
|
|
6674
|
+
* @returns {Promise<ContentPlatformModel.CustomObjectEntryBulkUploadDetails>}
|
|
6260
6675
|
* - Success response
|
|
6261
6676
|
*
|
|
6262
|
-
* @name
|
|
6677
|
+
* @name importAppCustomObjectEntriesBySlug
|
|
6263
6678
|
* @summary: Bulk custom object entries upload
|
|
6264
|
-
* @description: Custom object bulk import of bulk entries can be performed using this endpoint. - Check out [method documentation](https://
|
|
6679
|
+
* @description: Custom object bulk import of bulk entries can be performed using this endpoint. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/importAppCustomObjectEntriesBySlug/).
|
|
6265
6680
|
*/
|
|
6266
|
-
async
|
|
6267
|
-
{
|
|
6681
|
+
async importAppCustomObjectEntriesBySlug(
|
|
6682
|
+
{ slug, body, requestHeaders } = { requestHeaders: {} },
|
|
6268
6683
|
{ responseHeaders } = { responseHeaders: false }
|
|
6269
6684
|
) {
|
|
6270
6685
|
const {
|
|
6271
6686
|
error,
|
|
6272
|
-
} = ContentPlatformApplicationValidator.
|
|
6687
|
+
} = ContentPlatformApplicationValidator.importAppCustomObjectEntriesBySlug().validate(
|
|
6273
6688
|
{
|
|
6274
|
-
|
|
6689
|
+
slug,
|
|
6275
6690
|
body,
|
|
6276
6691
|
},
|
|
6277
6692
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -6283,9 +6698,9 @@ class Content {
|
|
|
6283
6698
|
// Showing warrnings if extra unknown parameters are found
|
|
6284
6699
|
const {
|
|
6285
6700
|
error: warrning,
|
|
6286
|
-
} = ContentPlatformApplicationValidator.
|
|
6701
|
+
} = ContentPlatformApplicationValidator.importAppCustomObjectEntriesBySlug().validate(
|
|
6287
6702
|
{
|
|
6288
|
-
|
|
6703
|
+
slug,
|
|
6289
6704
|
body,
|
|
6290
6705
|
},
|
|
6291
6706
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -6293,7 +6708,7 @@ class Content {
|
|
|
6293
6708
|
if (warrning) {
|
|
6294
6709
|
Logger({
|
|
6295
6710
|
level: "WARN",
|
|
6296
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
6711
|
+
message: `Parameter Validation warrnings for platform > Content > importAppCustomObjectEntriesBySlug \n ${warrning}`,
|
|
6297
6712
|
});
|
|
6298
6713
|
}
|
|
6299
6714
|
|
|
@@ -6302,7 +6717,7 @@ class Content {
|
|
|
6302
6717
|
const response = await PlatformAPIClient.execute(
|
|
6303
6718
|
this.config,
|
|
6304
6719
|
"post",
|
|
6305
|
-
`/service/platform/content/
|
|
6720
|
+
`/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${slug}/bulk/upload`,
|
|
6306
6721
|
query_params,
|
|
6307
6722
|
body,
|
|
6308
6723
|
requestHeaders,
|
|
@@ -6316,7 +6731,7 @@ class Content {
|
|
|
6316
6731
|
|
|
6317
6732
|
const {
|
|
6318
6733
|
error: res_error,
|
|
6319
|
-
} = ContentPlatformModel.
|
|
6734
|
+
} = ContentPlatformModel.CustomObjectEntryBulkUploadDetails().validate(
|
|
6320
6735
|
responseData,
|
|
6321
6736
|
{ abortEarly: false, allowUnknown: true }
|
|
6322
6737
|
);
|
|
@@ -6327,7 +6742,7 @@ class Content {
|
|
|
6327
6742
|
} else {
|
|
6328
6743
|
Logger({
|
|
6329
6744
|
level: "WARN",
|
|
6330
|
-
message: `Response Validation Warnings for platform > Content >
|
|
6745
|
+
message: `Response Validation Warnings for platform > Content > importAppCustomObjectEntriesBySlug \n ${res_error}`,
|
|
6331
6746
|
});
|
|
6332
6747
|
}
|
|
6333
6748
|
}
|
|
@@ -6341,11 +6756,10 @@ class Content {
|
|
|
6341
6756
|
*
|
|
6342
6757
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6343
6758
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6344
|
-
* @returns {Promise<ContentPlatformModel.
|
|
6345
|
-
* Success response
|
|
6759
|
+
* @returns {Promise<ContentPlatformModel.TagDeleteSuccessDetails>} - Success response
|
|
6346
6760
|
* @name removeInjectableTag
|
|
6347
6761
|
* @summary: Remove HTML tag
|
|
6348
|
-
* @description: Delete a specific injectable tag. - Check out [method documentation](https://
|
|
6762
|
+
* @description: Delete a specific injectable tag. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/removeInjectableTag/).
|
|
6349
6763
|
*/
|
|
6350
6764
|
async removeInjectableTag(
|
|
6351
6765
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -6398,7 +6812,7 @@ class Content {
|
|
|
6398
6812
|
|
|
6399
6813
|
const {
|
|
6400
6814
|
error: res_error,
|
|
6401
|
-
} = ContentPlatformModel.
|
|
6815
|
+
} = ContentPlatformModel.TagDeleteSuccessDetails().validate(responseData, {
|
|
6402
6816
|
abortEarly: false,
|
|
6403
6817
|
allowUnknown: true,
|
|
6404
6818
|
});
|
|
@@ -6425,7 +6839,7 @@ class Content {
|
|
|
6425
6839
|
* Success response
|
|
6426
6840
|
* @name resetDataLoader
|
|
6427
6841
|
* @summary: Reset a data loader
|
|
6428
|
-
* @description: Clear and reset data loader settings. - Check out [method documentation](https://
|
|
6842
|
+
* @description: Clear and reset data loader settings. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/resetDataLoader/).
|
|
6429
6843
|
*/
|
|
6430
6844
|
async resetDataLoader(
|
|
6431
6845
|
{ service, operationId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -6500,25 +6914,25 @@ class Content {
|
|
|
6500
6914
|
}
|
|
6501
6915
|
|
|
6502
6916
|
/**
|
|
6503
|
-
* @param {ContentPlatformApplicationValidator.
|
|
6917
|
+
* @param {ContentPlatformApplicationValidator.SampleAppCustomObjectBulkEntryBySlugParam} arg
|
|
6504
6918
|
* - Arg object
|
|
6505
6919
|
*
|
|
6506
6920
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6507
6921
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6508
6922
|
* @returns {Promise<string>} - Success response
|
|
6509
|
-
* @name
|
|
6923
|
+
* @name sampleAppCustomObjectBulkEntryBySlug
|
|
6510
6924
|
* @summary: Download sample for custom object bulk entry
|
|
6511
|
-
* @description: Sample files for custom object bulk import can be obtained from this endpoint. - Check out [method documentation](https://
|
|
6925
|
+
* @description: Sample files for custom object bulk import can be obtained from this endpoint. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/sampleAppCustomObjectBulkEntryBySlug/).
|
|
6512
6926
|
*/
|
|
6513
|
-
async
|
|
6514
|
-
{
|
|
6927
|
+
async sampleAppCustomObjectBulkEntryBySlug(
|
|
6928
|
+
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
6515
6929
|
{ responseHeaders } = { responseHeaders: false }
|
|
6516
6930
|
) {
|
|
6517
6931
|
const {
|
|
6518
6932
|
error,
|
|
6519
|
-
} = ContentPlatformApplicationValidator.
|
|
6933
|
+
} = ContentPlatformApplicationValidator.sampleAppCustomObjectBulkEntryBySlug().validate(
|
|
6520
6934
|
{
|
|
6521
|
-
|
|
6935
|
+
slug,
|
|
6522
6936
|
},
|
|
6523
6937
|
{ abortEarly: false, allowUnknown: true }
|
|
6524
6938
|
);
|
|
@@ -6529,16 +6943,16 @@ class Content {
|
|
|
6529
6943
|
// Showing warrnings if extra unknown parameters are found
|
|
6530
6944
|
const {
|
|
6531
6945
|
error: warrning,
|
|
6532
|
-
} = ContentPlatformApplicationValidator.
|
|
6946
|
+
} = ContentPlatformApplicationValidator.sampleAppCustomObjectBulkEntryBySlug().validate(
|
|
6533
6947
|
{
|
|
6534
|
-
|
|
6948
|
+
slug,
|
|
6535
6949
|
},
|
|
6536
6950
|
{ abortEarly: false, allowUnknown: false }
|
|
6537
6951
|
);
|
|
6538
6952
|
if (warrning) {
|
|
6539
6953
|
Logger({
|
|
6540
6954
|
level: "WARN",
|
|
6541
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
6955
|
+
message: `Parameter Validation warrnings for platform > Content > sampleAppCustomObjectBulkEntryBySlug \n ${warrning}`,
|
|
6542
6956
|
});
|
|
6543
6957
|
}
|
|
6544
6958
|
|
|
@@ -6547,7 +6961,7 @@ class Content {
|
|
|
6547
6961
|
const response = await PlatformAPIClient.execute(
|
|
6548
6962
|
this.config,
|
|
6549
6963
|
"get",
|
|
6550
|
-
`/service/platform/content/
|
|
6964
|
+
`/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${slug}/bulk/sample`,
|
|
6551
6965
|
query_params,
|
|
6552
6966
|
undefined,
|
|
6553
6967
|
requestHeaders,
|
|
@@ -6569,7 +6983,7 @@ class Content {
|
|
|
6569
6983
|
} else {
|
|
6570
6984
|
Logger({
|
|
6571
6985
|
level: "WARN",
|
|
6572
|
-
message: `Response Validation Warnings for platform > Content >
|
|
6986
|
+
message: `Response Validation Warnings for platform > Content > sampleAppCustomObjectBulkEntryBySlug \n ${res_error}`,
|
|
6573
6987
|
});
|
|
6574
6988
|
}
|
|
6575
6989
|
}
|
|
@@ -6585,7 +6999,7 @@ class Content {
|
|
|
6585
6999
|
* Success response
|
|
6586
7000
|
* @name selectDataLoader
|
|
6587
7001
|
* @summary: Select a data loader
|
|
6588
|
-
* @description: Choose and set a data loader for use. - Check out [method documentation](https://
|
|
7002
|
+
* @description: Choose and set a data loader for use. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/selectDataLoader/).
|
|
6589
7003
|
*/
|
|
6590
7004
|
async selectDataLoader(
|
|
6591
7005
|
{ dataLoaderId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -6667,7 +7081,7 @@ class Content {
|
|
|
6667
7081
|
* Success response
|
|
6668
7082
|
* @name updateAnnouncement
|
|
6669
7083
|
* @summary: Update announcement
|
|
6670
|
-
* @description: Modify the content and settings of a specific announcement. - Check out [method documentation](https://
|
|
7084
|
+
* @description: Modify the content and settings of a specific announcement. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/updateAnnouncement/).
|
|
6671
7085
|
*/
|
|
6672
7086
|
async updateAnnouncement(
|
|
6673
7087
|
{ announcementId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -6751,7 +7165,7 @@ class Content {
|
|
|
6751
7165
|
* Success response
|
|
6752
7166
|
* @name updateAnnouncementSchedule
|
|
6753
7167
|
* @summary: Update announcement schedule
|
|
6754
|
-
* @description: Modify the scheduling of a specific announcement. - Check out [method documentation](https://
|
|
7168
|
+
* @description: Modify the scheduling of a specific announcement. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/updateAnnouncementSchedule/).
|
|
6755
7169
|
*/
|
|
6756
7170
|
async updateAnnouncementSchedule(
|
|
6757
7171
|
{ announcementId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -6826,7 +7240,94 @@ class Content {
|
|
|
6826
7240
|
}
|
|
6827
7241
|
|
|
6828
7242
|
/**
|
|
6829
|
-
* @param {ContentPlatformApplicationValidator.
|
|
7243
|
+
* @param {ContentPlatformApplicationValidator.UpdateAppCustomFieldByResourceSlugParam} arg
|
|
7244
|
+
* - Arg object
|
|
7245
|
+
*
|
|
7246
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
7247
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
7248
|
+
* @returns {Promise<ContentPlatformModel.CustomFieldsResponseByResourceIdSchema>}
|
|
7249
|
+
* - Success response
|
|
7250
|
+
*
|
|
7251
|
+
* @name updateAppCustomFieldByResourceSlug
|
|
7252
|
+
* @summary: Create custom field entries for gives resource and resource slug
|
|
7253
|
+
* @description: You can add a custom field using this endpoint to any resource by providing the resource slug. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/updateAppCustomFieldByResourceSlug/).
|
|
7254
|
+
*/
|
|
7255
|
+
async updateAppCustomFieldByResourceSlug(
|
|
7256
|
+
{ resource, resourceSlug, body, requestHeaders } = { requestHeaders: {} },
|
|
7257
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
7258
|
+
) {
|
|
7259
|
+
const {
|
|
7260
|
+
error,
|
|
7261
|
+
} = ContentPlatformApplicationValidator.updateAppCustomFieldByResourceSlug().validate(
|
|
7262
|
+
{
|
|
7263
|
+
resource,
|
|
7264
|
+
resourceSlug,
|
|
7265
|
+
body,
|
|
7266
|
+
},
|
|
7267
|
+
{ abortEarly: false, allowUnknown: true }
|
|
7268
|
+
);
|
|
7269
|
+
if (error) {
|
|
7270
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
7271
|
+
}
|
|
7272
|
+
|
|
7273
|
+
// Showing warrnings if extra unknown parameters are found
|
|
7274
|
+
const {
|
|
7275
|
+
error: warrning,
|
|
7276
|
+
} = ContentPlatformApplicationValidator.updateAppCustomFieldByResourceSlug().validate(
|
|
7277
|
+
{
|
|
7278
|
+
resource,
|
|
7279
|
+
resourceSlug,
|
|
7280
|
+
body,
|
|
7281
|
+
},
|
|
7282
|
+
{ abortEarly: false, allowUnknown: false }
|
|
7283
|
+
);
|
|
7284
|
+
if (warrning) {
|
|
7285
|
+
Logger({
|
|
7286
|
+
level: "WARN",
|
|
7287
|
+
message: `Parameter Validation warrnings for platform > Content > updateAppCustomFieldByResourceSlug \n ${warrning}`,
|
|
7288
|
+
});
|
|
7289
|
+
}
|
|
7290
|
+
|
|
7291
|
+
const query_params = {};
|
|
7292
|
+
|
|
7293
|
+
const response = await PlatformAPIClient.execute(
|
|
7294
|
+
this.config,
|
|
7295
|
+
"put",
|
|
7296
|
+
`/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/resource/${resource}/${resourceSlug}`,
|
|
7297
|
+
query_params,
|
|
7298
|
+
body,
|
|
7299
|
+
requestHeaders,
|
|
7300
|
+
{ responseHeaders }
|
|
7301
|
+
);
|
|
7302
|
+
|
|
7303
|
+
let responseData = response;
|
|
7304
|
+
if (responseHeaders) {
|
|
7305
|
+
responseData = response[0];
|
|
7306
|
+
}
|
|
7307
|
+
|
|
7308
|
+
const {
|
|
7309
|
+
error: res_error,
|
|
7310
|
+
} = ContentPlatformModel.CustomFieldsResponseByResourceIdSchema().validate(
|
|
7311
|
+
responseData,
|
|
7312
|
+
{ abortEarly: false, allowUnknown: true }
|
|
7313
|
+
);
|
|
7314
|
+
|
|
7315
|
+
if (res_error) {
|
|
7316
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
7317
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
7318
|
+
} else {
|
|
7319
|
+
Logger({
|
|
7320
|
+
level: "WARN",
|
|
7321
|
+
message: `Response Validation Warnings for platform > Content > updateAppCustomFieldByResourceSlug \n ${res_error}`,
|
|
7322
|
+
});
|
|
7323
|
+
}
|
|
7324
|
+
}
|
|
7325
|
+
|
|
7326
|
+
return response;
|
|
7327
|
+
}
|
|
7328
|
+
|
|
7329
|
+
/**
|
|
7330
|
+
* @param {ContentPlatformApplicationValidator.UpdateAppCustomFieldDefinitionBySlugParam} arg
|
|
6830
7331
|
* - Arg object
|
|
6831
7332
|
*
|
|
6832
7333
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -6834,19 +7335,23 @@ class Content {
|
|
|
6834
7335
|
* @returns {Promise<ContentPlatformModel.CustomFieldDefinitionDetailResSchema>}
|
|
6835
7336
|
* - Success response
|
|
6836
7337
|
*
|
|
6837
|
-
* @name
|
|
7338
|
+
* @name updateAppCustomFieldDefinitionBySlug
|
|
6838
7339
|
* @summary: Update custom field definition
|
|
6839
|
-
* @description: Custom fields definition can be update using this api, You can update custom field definition name and description. - Check out [method documentation](https://
|
|
7340
|
+
* @description: Custom fields definition can be update using this api, You can update custom field definition name and description. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/updateAppCustomFieldDefinitionBySlug/).
|
|
6840
7341
|
*/
|
|
6841
|
-
async
|
|
6842
|
-
{
|
|
7342
|
+
async updateAppCustomFieldDefinitionBySlug(
|
|
7343
|
+
{ slug, resource, namespace, body, requestHeaders } = {
|
|
7344
|
+
requestHeaders: {},
|
|
7345
|
+
},
|
|
6843
7346
|
{ responseHeaders } = { responseHeaders: false }
|
|
6844
7347
|
) {
|
|
6845
7348
|
const {
|
|
6846
7349
|
error,
|
|
6847
|
-
} = ContentPlatformApplicationValidator.
|
|
7350
|
+
} = ContentPlatformApplicationValidator.updateAppCustomFieldDefinitionBySlug().validate(
|
|
6848
7351
|
{
|
|
6849
|
-
|
|
7352
|
+
slug,
|
|
7353
|
+
resource,
|
|
7354
|
+
namespace,
|
|
6850
7355
|
body,
|
|
6851
7356
|
},
|
|
6852
7357
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -6858,9 +7363,11 @@ class Content {
|
|
|
6858
7363
|
// Showing warrnings if extra unknown parameters are found
|
|
6859
7364
|
const {
|
|
6860
7365
|
error: warrning,
|
|
6861
|
-
} = ContentPlatformApplicationValidator.
|
|
7366
|
+
} = ContentPlatformApplicationValidator.updateAppCustomFieldDefinitionBySlug().validate(
|
|
6862
7367
|
{
|
|
6863
|
-
|
|
7368
|
+
slug,
|
|
7369
|
+
resource,
|
|
7370
|
+
namespace,
|
|
6864
7371
|
body,
|
|
6865
7372
|
},
|
|
6866
7373
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -6868,7 +7375,7 @@ class Content {
|
|
|
6868
7375
|
if (warrning) {
|
|
6869
7376
|
Logger({
|
|
6870
7377
|
level: "WARN",
|
|
6871
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
7378
|
+
message: `Parameter Validation warrnings for platform > Content > updateAppCustomFieldDefinitionBySlug \n ${warrning}`,
|
|
6872
7379
|
});
|
|
6873
7380
|
}
|
|
6874
7381
|
|
|
@@ -6877,7 +7384,7 @@ class Content {
|
|
|
6877
7384
|
const response = await PlatformAPIClient.execute(
|
|
6878
7385
|
this.config,
|
|
6879
7386
|
"put",
|
|
6880
|
-
`/service/platform/content/
|
|
7387
|
+
`/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/resource/${resource}/namespace/${namespace}/definition/${slug}`,
|
|
6881
7388
|
query_params,
|
|
6882
7389
|
body,
|
|
6883
7390
|
requestHeaders,
|
|
@@ -6902,7 +7409,7 @@ class Content {
|
|
|
6902
7409
|
} else {
|
|
6903
7410
|
Logger({
|
|
6904
7411
|
level: "WARN",
|
|
6905
|
-
message: `Response Validation Warnings for platform > Content >
|
|
7412
|
+
message: `Response Validation Warnings for platform > Content > updateAppCustomFieldDefinitionBySlug \n ${res_error}`,
|
|
6906
7413
|
});
|
|
6907
7414
|
}
|
|
6908
7415
|
}
|
|
@@ -6911,25 +7418,27 @@ class Content {
|
|
|
6911
7418
|
}
|
|
6912
7419
|
|
|
6913
7420
|
/**
|
|
6914
|
-
* @param {ContentPlatformApplicationValidator.
|
|
7421
|
+
* @param {ContentPlatformApplicationValidator.UpdateAppCustomObjectBySlugParam} arg
|
|
6915
7422
|
* - Arg object
|
|
6916
7423
|
*
|
|
6917
7424
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6918
7425
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6919
|
-
* @returns {Promise<ContentPlatformModel.
|
|
6920
|
-
*
|
|
7426
|
+
* @returns {Promise<ContentPlatformModel.CustomObjectBySlugSchema>} -
|
|
7427
|
+
* Success response
|
|
7428
|
+
* @name updateAppCustomObjectBySlug
|
|
6921
7429
|
* @summary: Update custom object details
|
|
6922
|
-
* @description: Custom object entries can be updated using this endpoint. - Check out [method documentation](https://
|
|
7430
|
+
* @description: Custom object entries can be updated using this endpoint. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/updateAppCustomObjectBySlug/).
|
|
6923
7431
|
*/
|
|
6924
|
-
async
|
|
6925
|
-
{
|
|
7432
|
+
async updateAppCustomObjectBySlug(
|
|
7433
|
+
{ definitionSlug, slug, body, requestHeaders } = { requestHeaders: {} },
|
|
6926
7434
|
{ responseHeaders } = { responseHeaders: false }
|
|
6927
7435
|
) {
|
|
6928
7436
|
const {
|
|
6929
7437
|
error,
|
|
6930
|
-
} = ContentPlatformApplicationValidator.
|
|
7438
|
+
} = ContentPlatformApplicationValidator.updateAppCustomObjectBySlug().validate(
|
|
6931
7439
|
{
|
|
6932
|
-
|
|
7440
|
+
definitionSlug,
|
|
7441
|
+
slug,
|
|
6933
7442
|
body,
|
|
6934
7443
|
},
|
|
6935
7444
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -6941,9 +7450,10 @@ class Content {
|
|
|
6941
7450
|
// Showing warrnings if extra unknown parameters are found
|
|
6942
7451
|
const {
|
|
6943
7452
|
error: warrning,
|
|
6944
|
-
} = ContentPlatformApplicationValidator.
|
|
7453
|
+
} = ContentPlatformApplicationValidator.updateAppCustomObjectBySlug().validate(
|
|
6945
7454
|
{
|
|
6946
|
-
|
|
7455
|
+
definitionSlug,
|
|
7456
|
+
slug,
|
|
6947
7457
|
body,
|
|
6948
7458
|
},
|
|
6949
7459
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -6951,7 +7461,7 @@ class Content {
|
|
|
6951
7461
|
if (warrning) {
|
|
6952
7462
|
Logger({
|
|
6953
7463
|
level: "WARN",
|
|
6954
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
7464
|
+
message: `Parameter Validation warrnings for platform > Content > updateAppCustomObjectBySlug \n ${warrning}`,
|
|
6955
7465
|
});
|
|
6956
7466
|
}
|
|
6957
7467
|
|
|
@@ -6960,7 +7470,7 @@ class Content {
|
|
|
6960
7470
|
const response = await PlatformAPIClient.execute(
|
|
6961
7471
|
this.config,
|
|
6962
7472
|
"put",
|
|
6963
|
-
`/service/platform/content/
|
|
7473
|
+
`/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${definitionSlug}/entries/${slug}`,
|
|
6964
7474
|
query_params,
|
|
6965
7475
|
body,
|
|
6966
7476
|
requestHeaders,
|
|
@@ -6974,7 +7484,7 @@ class Content {
|
|
|
6974
7484
|
|
|
6975
7485
|
const {
|
|
6976
7486
|
error: res_error,
|
|
6977
|
-
} = ContentPlatformModel.
|
|
7487
|
+
} = ContentPlatformModel.CustomObjectBySlugSchema().validate(responseData, {
|
|
6978
7488
|
abortEarly: false,
|
|
6979
7489
|
allowUnknown: true,
|
|
6980
7490
|
});
|
|
@@ -6985,7 +7495,7 @@ class Content {
|
|
|
6985
7495
|
} else {
|
|
6986
7496
|
Logger({
|
|
6987
7497
|
level: "WARN",
|
|
6988
|
-
message: `Response Validation Warnings for platform > Content >
|
|
7498
|
+
message: `Response Validation Warnings for platform > Content > updateAppCustomObjectBySlug \n ${res_error}`,
|
|
6989
7499
|
});
|
|
6990
7500
|
}
|
|
6991
7501
|
}
|
|
@@ -6994,26 +7504,27 @@ class Content {
|
|
|
6994
7504
|
}
|
|
6995
7505
|
|
|
6996
7506
|
/**
|
|
6997
|
-
* @param {ContentPlatformApplicationValidator.
|
|
7507
|
+
* @param {ContentPlatformApplicationValidator.UpdateAppCustomObjectDefinitionBySlugParam} arg
|
|
6998
7508
|
* - Arg object
|
|
6999
7509
|
*
|
|
7000
7510
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
7001
7511
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
7002
|
-
* @returns {Promise<ContentPlatformModel.
|
|
7003
|
-
* Success response
|
|
7004
|
-
*
|
|
7512
|
+
* @returns {Promise<ContentPlatformModel.CustomObjectDefinitionSlugSchema>}
|
|
7513
|
+
* - Success response
|
|
7514
|
+
*
|
|
7515
|
+
* @name updateAppCustomObjectDefinitionBySlug
|
|
7005
7516
|
* @summary: Update custom object definition
|
|
7006
|
-
* @description: Custom object definitions can be updated using this endpoint. You can update the name and description of the custom object and add more custom field definitions to the existing custom object. - Check out [method documentation](https://
|
|
7517
|
+
* @description: Custom object definitions can be updated using this endpoint. You can update the name and description of the custom object and add more custom field definitions to the existing custom object. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/updateAppCustomObjectDefinitionBySlug/).
|
|
7007
7518
|
*/
|
|
7008
|
-
async
|
|
7009
|
-
{
|
|
7519
|
+
async updateAppCustomObjectDefinitionBySlug(
|
|
7520
|
+
{ slug, body, requestHeaders } = { requestHeaders: {} },
|
|
7010
7521
|
{ responseHeaders } = { responseHeaders: false }
|
|
7011
7522
|
) {
|
|
7012
7523
|
const {
|
|
7013
7524
|
error,
|
|
7014
|
-
} = ContentPlatformApplicationValidator.
|
|
7525
|
+
} = ContentPlatformApplicationValidator.updateAppCustomObjectDefinitionBySlug().validate(
|
|
7015
7526
|
{
|
|
7016
|
-
|
|
7527
|
+
slug,
|
|
7017
7528
|
body,
|
|
7018
7529
|
},
|
|
7019
7530
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -7025,9 +7536,9 @@ class Content {
|
|
|
7025
7536
|
// Showing warrnings if extra unknown parameters are found
|
|
7026
7537
|
const {
|
|
7027
7538
|
error: warrning,
|
|
7028
|
-
} = ContentPlatformApplicationValidator.
|
|
7539
|
+
} = ContentPlatformApplicationValidator.updateAppCustomObjectDefinitionBySlug().validate(
|
|
7029
7540
|
{
|
|
7030
|
-
|
|
7541
|
+
slug,
|
|
7031
7542
|
body,
|
|
7032
7543
|
},
|
|
7033
7544
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -7035,7 +7546,7 @@ class Content {
|
|
|
7035
7546
|
if (warrning) {
|
|
7036
7547
|
Logger({
|
|
7037
7548
|
level: "WARN",
|
|
7038
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
7549
|
+
message: `Parameter Validation warrnings for platform > Content > updateAppCustomObjectDefinitionBySlug \n ${warrning}`,
|
|
7039
7550
|
});
|
|
7040
7551
|
}
|
|
7041
7552
|
|
|
@@ -7044,7 +7555,7 @@ class Content {
|
|
|
7044
7555
|
const response = await PlatformAPIClient.execute(
|
|
7045
7556
|
this.config,
|
|
7046
7557
|
"put",
|
|
7047
|
-
`/service/platform/content/
|
|
7558
|
+
`/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${slug}`,
|
|
7048
7559
|
query_params,
|
|
7049
7560
|
body,
|
|
7050
7561
|
requestHeaders,
|
|
@@ -7058,7 +7569,7 @@ class Content {
|
|
|
7058
7569
|
|
|
7059
7570
|
const {
|
|
7060
7571
|
error: res_error,
|
|
7061
|
-
} = ContentPlatformModel.
|
|
7572
|
+
} = ContentPlatformModel.CustomObjectDefinitionSlugSchema().validate(
|
|
7062
7573
|
responseData,
|
|
7063
7574
|
{ abortEarly: false, allowUnknown: true }
|
|
7064
7575
|
);
|
|
@@ -7069,7 +7580,7 @@ class Content {
|
|
|
7069
7580
|
} else {
|
|
7070
7581
|
Logger({
|
|
7071
7582
|
level: "WARN",
|
|
7072
|
-
message: `Response Validation Warnings for platform > Content >
|
|
7583
|
+
message: `Response Validation Warnings for platform > Content > updateAppCustomObjectDefinitionBySlug \n ${res_error}`,
|
|
7073
7584
|
});
|
|
7074
7585
|
}
|
|
7075
7586
|
}
|
|
@@ -7078,21 +7589,25 @@ class Content {
|
|
|
7078
7589
|
}
|
|
7079
7590
|
|
|
7080
7591
|
/**
|
|
7081
|
-
* @param {ContentPlatformApplicationValidator.
|
|
7592
|
+
* @param {ContentPlatformApplicationValidator.UpdateApplicationLanguageStatusParam} arg
|
|
7593
|
+
* - Arg object
|
|
7594
|
+
*
|
|
7082
7595
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
7083
7596
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
7084
|
-
* @returns {Promise<ContentPlatformModel.
|
|
7085
|
-
* @name
|
|
7086
|
-
* @summary:
|
|
7087
|
-
* @description:
|
|
7597
|
+
* @returns {Promise<ContentPlatformModel.ApplicationLanguage>} - Success response
|
|
7598
|
+
* @name updateApplicationLanguageStatus
|
|
7599
|
+
* @summary: Set app language
|
|
7600
|
+
* @description: Update language status and settings for the application. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/updateApplicationLanguageStatus/).
|
|
7088
7601
|
*/
|
|
7089
|
-
async
|
|
7090
|
-
{
|
|
7602
|
+
async updateApplicationLanguageStatus(
|
|
7603
|
+
{ locale, body, requestHeaders } = { requestHeaders: {} },
|
|
7091
7604
|
{ responseHeaders } = { responseHeaders: false }
|
|
7092
7605
|
) {
|
|
7093
|
-
const {
|
|
7606
|
+
const {
|
|
7607
|
+
error,
|
|
7608
|
+
} = ContentPlatformApplicationValidator.updateApplicationLanguageStatus().validate(
|
|
7094
7609
|
{
|
|
7095
|
-
|
|
7610
|
+
locale,
|
|
7096
7611
|
body,
|
|
7097
7612
|
},
|
|
7098
7613
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -7104,9 +7619,9 @@ class Content {
|
|
|
7104
7619
|
// Showing warrnings if extra unknown parameters are found
|
|
7105
7620
|
const {
|
|
7106
7621
|
error: warrning,
|
|
7107
|
-
} = ContentPlatformApplicationValidator.
|
|
7622
|
+
} = ContentPlatformApplicationValidator.updateApplicationLanguageStatus().validate(
|
|
7108
7623
|
{
|
|
7109
|
-
|
|
7624
|
+
locale,
|
|
7110
7625
|
body,
|
|
7111
7626
|
},
|
|
7112
7627
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -7114,7 +7629,7 @@ class Content {
|
|
|
7114
7629
|
if (warrning) {
|
|
7115
7630
|
Logger({
|
|
7116
7631
|
level: "WARN",
|
|
7117
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
7632
|
+
message: `Parameter Validation warrnings for platform > Content > updateApplicationLanguageStatus \n ${warrning}`,
|
|
7118
7633
|
});
|
|
7119
7634
|
}
|
|
7120
7635
|
|
|
@@ -7123,7 +7638,7 @@ class Content {
|
|
|
7123
7638
|
const response = await PlatformAPIClient.execute(
|
|
7124
7639
|
this.config,
|
|
7125
7640
|
"put",
|
|
7126
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
7641
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/languages/${locale}`,
|
|
7127
7642
|
query_params,
|
|
7128
7643
|
body,
|
|
7129
7644
|
requestHeaders,
|
|
@@ -7137,7 +7652,7 @@ class Content {
|
|
|
7137
7652
|
|
|
7138
7653
|
const {
|
|
7139
7654
|
error: res_error,
|
|
7140
|
-
} = ContentPlatformModel.
|
|
7655
|
+
} = ContentPlatformModel.ApplicationLanguage().validate(responseData, {
|
|
7141
7656
|
abortEarly: false,
|
|
7142
7657
|
allowUnknown: true,
|
|
7143
7658
|
});
|
|
@@ -7148,7 +7663,7 @@ class Content {
|
|
|
7148
7663
|
} else {
|
|
7149
7664
|
Logger({
|
|
7150
7665
|
level: "WARN",
|
|
7151
|
-
message: `Response Validation Warnings for platform > Content >
|
|
7666
|
+
message: `Response Validation Warnings for platform > Content > updateApplicationLanguageStatus \n ${res_error}`,
|
|
7152
7667
|
});
|
|
7153
7668
|
}
|
|
7154
7669
|
}
|
|
@@ -7157,22 +7672,25 @@ class Content {
|
|
|
7157
7672
|
}
|
|
7158
7673
|
|
|
7159
7674
|
/**
|
|
7160
|
-
* @param {ContentPlatformApplicationValidator.
|
|
7675
|
+
* @param {ContentPlatformApplicationValidator.UpdateApplicationResourceTranslationParam} arg
|
|
7676
|
+
* - Arg object
|
|
7677
|
+
*
|
|
7161
7678
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
7162
7679
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
7163
|
-
* @returns {Promise<ContentPlatformModel.
|
|
7164
|
-
* @name
|
|
7165
|
-
* @summary: Update
|
|
7166
|
-
* @description:
|
|
7680
|
+
* @returns {Promise<ContentPlatformModel.ResourceTranslation>} - Success response
|
|
7681
|
+
* @name updateApplicationResourceTranslation
|
|
7682
|
+
* @summary: Update app translation
|
|
7683
|
+
* @description: Update existing translations for application resources. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/updateApplicationResourceTranslation/).
|
|
7167
7684
|
*/
|
|
7168
|
-
async
|
|
7169
|
-
{
|
|
7685
|
+
async updateApplicationResourceTranslation(
|
|
7686
|
+
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
7170
7687
|
{ responseHeaders } = { responseHeaders: false }
|
|
7171
7688
|
) {
|
|
7172
|
-
const {
|
|
7689
|
+
const {
|
|
7690
|
+
error,
|
|
7691
|
+
} = ContentPlatformApplicationValidator.updateApplicationResourceTranslation().validate(
|
|
7173
7692
|
{
|
|
7174
|
-
|
|
7175
|
-
faqId,
|
|
7693
|
+
id,
|
|
7176
7694
|
body,
|
|
7177
7695
|
},
|
|
7178
7696
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -7184,10 +7702,9 @@ class Content {
|
|
|
7184
7702
|
// Showing warrnings if extra unknown parameters are found
|
|
7185
7703
|
const {
|
|
7186
7704
|
error: warrning,
|
|
7187
|
-
} = ContentPlatformApplicationValidator.
|
|
7705
|
+
} = ContentPlatformApplicationValidator.updateApplicationResourceTranslation().validate(
|
|
7188
7706
|
{
|
|
7189
|
-
|
|
7190
|
-
faqId,
|
|
7707
|
+
id,
|
|
7191
7708
|
body,
|
|
7192
7709
|
},
|
|
7193
7710
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -7195,7 +7712,7 @@ class Content {
|
|
|
7195
7712
|
if (warrning) {
|
|
7196
7713
|
Logger({
|
|
7197
7714
|
level: "WARN",
|
|
7198
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
7715
|
+
message: `Parameter Validation warrnings for platform > Content > updateApplicationResourceTranslation \n ${warrning}`,
|
|
7199
7716
|
});
|
|
7200
7717
|
}
|
|
7201
7718
|
|
|
@@ -7204,7 +7721,7 @@ class Content {
|
|
|
7204
7721
|
const response = await PlatformAPIClient.execute(
|
|
7205
7722
|
this.config,
|
|
7206
7723
|
"put",
|
|
7207
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
7724
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/resource/translations/${id}`,
|
|
7208
7725
|
query_params,
|
|
7209
7726
|
body,
|
|
7210
7727
|
requestHeaders,
|
|
@@ -7218,7 +7735,7 @@ class Content {
|
|
|
7218
7735
|
|
|
7219
7736
|
const {
|
|
7220
7737
|
error: res_error,
|
|
7221
|
-
} = ContentPlatformModel.
|
|
7738
|
+
} = ContentPlatformModel.ResourceTranslation().validate(responseData, {
|
|
7222
7739
|
abortEarly: false,
|
|
7223
7740
|
allowUnknown: true,
|
|
7224
7741
|
});
|
|
@@ -7229,7 +7746,7 @@ class Content {
|
|
|
7229
7746
|
} else {
|
|
7230
7747
|
Logger({
|
|
7231
7748
|
level: "WARN",
|
|
7232
|
-
message: `Response Validation Warnings for platform > Content >
|
|
7749
|
+
message: `Response Validation Warnings for platform > Content > updateApplicationResourceTranslation \n ${res_error}`,
|
|
7233
7750
|
});
|
|
7234
7751
|
}
|
|
7235
7752
|
}
|
|
@@ -7238,23 +7755,19 @@ class Content {
|
|
|
7238
7755
|
}
|
|
7239
7756
|
|
|
7240
7757
|
/**
|
|
7241
|
-
* @param {ContentPlatformApplicationValidator.
|
|
7242
|
-
* - Arg object
|
|
7243
|
-
*
|
|
7758
|
+
* @param {ContentPlatformApplicationValidator.UpdateBlogParam} arg - Arg object
|
|
7244
7759
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
7245
7760
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
7246
|
-
* @returns {Promise<ContentPlatformModel.
|
|
7247
|
-
* @name
|
|
7248
|
-
* @summary: Update
|
|
7249
|
-
* @description: Modify the content and settings of a specific
|
|
7761
|
+
* @returns {Promise<ContentPlatformModel.BlogSchema>} - Success response
|
|
7762
|
+
* @name updateBlog
|
|
7763
|
+
* @summary: Update a blog
|
|
7764
|
+
* @description: Modify the content and settings of a specific blog. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/updateBlog/).
|
|
7250
7765
|
*/
|
|
7251
|
-
async
|
|
7766
|
+
async updateBlog(
|
|
7252
7767
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
7253
7768
|
{ responseHeaders } = { responseHeaders: false }
|
|
7254
7769
|
) {
|
|
7255
|
-
const {
|
|
7256
|
-
error,
|
|
7257
|
-
} = ContentPlatformApplicationValidator.updateFaqCategory().validate(
|
|
7770
|
+
const { error } = ContentPlatformApplicationValidator.updateBlog().validate(
|
|
7258
7771
|
{
|
|
7259
7772
|
id,
|
|
7260
7773
|
body,
|
|
@@ -7268,7 +7781,7 @@ class Content {
|
|
|
7268
7781
|
// Showing warrnings if extra unknown parameters are found
|
|
7269
7782
|
const {
|
|
7270
7783
|
error: warrning,
|
|
7271
|
-
} = ContentPlatformApplicationValidator.
|
|
7784
|
+
} = ContentPlatformApplicationValidator.updateBlog().validate(
|
|
7272
7785
|
{
|
|
7273
7786
|
id,
|
|
7274
7787
|
body,
|
|
@@ -7278,7 +7791,7 @@ class Content {
|
|
|
7278
7791
|
if (warrning) {
|
|
7279
7792
|
Logger({
|
|
7280
7793
|
level: "WARN",
|
|
7281
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
7794
|
+
message: `Parameter Validation warrnings for platform > Content > updateBlog \n ${warrning}`,
|
|
7282
7795
|
});
|
|
7283
7796
|
}
|
|
7284
7797
|
|
|
@@ -7287,7 +7800,7 @@ class Content {
|
|
|
7287
7800
|
const response = await PlatformAPIClient.execute(
|
|
7288
7801
|
this.config,
|
|
7289
7802
|
"put",
|
|
7290
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
7803
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/blogs/${id}`,
|
|
7291
7804
|
query_params,
|
|
7292
7805
|
body,
|
|
7293
7806
|
requestHeaders,
|
|
@@ -7301,7 +7814,7 @@ class Content {
|
|
|
7301
7814
|
|
|
7302
7815
|
const {
|
|
7303
7816
|
error: res_error,
|
|
7304
|
-
} = ContentPlatformModel.
|
|
7817
|
+
} = ContentPlatformModel.BlogSchema().validate(responseData, {
|
|
7305
7818
|
abortEarly: false,
|
|
7306
7819
|
allowUnknown: true,
|
|
7307
7820
|
});
|
|
@@ -7312,7 +7825,7 @@ class Content {
|
|
|
7312
7825
|
} else {
|
|
7313
7826
|
Logger({
|
|
7314
7827
|
level: "WARN",
|
|
7315
|
-
message: `Response Validation Warnings for platform > Content >
|
|
7828
|
+
message: `Response Validation Warnings for platform > Content > updateBlog \n ${res_error}`,
|
|
7316
7829
|
});
|
|
7317
7830
|
}
|
|
7318
7831
|
}
|
|
@@ -7321,24 +7834,106 @@ class Content {
|
|
|
7321
7834
|
}
|
|
7322
7835
|
|
|
7323
7836
|
/**
|
|
7324
|
-
* @param {ContentPlatformApplicationValidator.
|
|
7837
|
+
* @param {ContentPlatformApplicationValidator.UpdateFaqParam} arg - Arg object
|
|
7838
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
7839
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
7840
|
+
* @returns {Promise<ContentPlatformModel.CreateFaqResponseSchema>} - Success response
|
|
7841
|
+
* @name updateFaq
|
|
7842
|
+
* @summary: Update FAQ
|
|
7843
|
+
* @description: Modify the content and settings of a specific FAQ. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/updateFaq/).
|
|
7844
|
+
*/
|
|
7845
|
+
async updateFaq(
|
|
7846
|
+
{ categoryId, faqId, body, requestHeaders } = { requestHeaders: {} },
|
|
7847
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
7848
|
+
) {
|
|
7849
|
+
const { error } = ContentPlatformApplicationValidator.updateFaq().validate(
|
|
7850
|
+
{
|
|
7851
|
+
categoryId,
|
|
7852
|
+
faqId,
|
|
7853
|
+
body,
|
|
7854
|
+
},
|
|
7855
|
+
{ abortEarly: false, allowUnknown: true }
|
|
7856
|
+
);
|
|
7857
|
+
if (error) {
|
|
7858
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
7859
|
+
}
|
|
7860
|
+
|
|
7861
|
+
// Showing warrnings if extra unknown parameters are found
|
|
7862
|
+
const {
|
|
7863
|
+
error: warrning,
|
|
7864
|
+
} = ContentPlatformApplicationValidator.updateFaq().validate(
|
|
7865
|
+
{
|
|
7866
|
+
categoryId,
|
|
7867
|
+
faqId,
|
|
7868
|
+
body,
|
|
7869
|
+
},
|
|
7870
|
+
{ abortEarly: false, allowUnknown: false }
|
|
7871
|
+
);
|
|
7872
|
+
if (warrning) {
|
|
7873
|
+
Logger({
|
|
7874
|
+
level: "WARN",
|
|
7875
|
+
message: `Parameter Validation warrnings for platform > Content > updateFaq \n ${warrning}`,
|
|
7876
|
+
});
|
|
7877
|
+
}
|
|
7878
|
+
|
|
7879
|
+
const query_params = {};
|
|
7880
|
+
|
|
7881
|
+
const response = await PlatformAPIClient.execute(
|
|
7882
|
+
this.config,
|
|
7883
|
+
"put",
|
|
7884
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/faq/category/${categoryId}/faq/${faqId}`,
|
|
7885
|
+
query_params,
|
|
7886
|
+
body,
|
|
7887
|
+
requestHeaders,
|
|
7888
|
+
{ responseHeaders }
|
|
7889
|
+
);
|
|
7890
|
+
|
|
7891
|
+
let responseData = response;
|
|
7892
|
+
if (responseHeaders) {
|
|
7893
|
+
responseData = response[0];
|
|
7894
|
+
}
|
|
7895
|
+
|
|
7896
|
+
const {
|
|
7897
|
+
error: res_error,
|
|
7898
|
+
} = ContentPlatformModel.CreateFaqResponseSchema().validate(responseData, {
|
|
7899
|
+
abortEarly: false,
|
|
7900
|
+
allowUnknown: true,
|
|
7901
|
+
});
|
|
7902
|
+
|
|
7903
|
+
if (res_error) {
|
|
7904
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
7905
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
7906
|
+
} else {
|
|
7907
|
+
Logger({
|
|
7908
|
+
level: "WARN",
|
|
7909
|
+
message: `Response Validation Warnings for platform > Content > updateFaq \n ${res_error}`,
|
|
7910
|
+
});
|
|
7911
|
+
}
|
|
7912
|
+
}
|
|
7913
|
+
|
|
7914
|
+
return response;
|
|
7915
|
+
}
|
|
7916
|
+
|
|
7917
|
+
/**
|
|
7918
|
+
* @param {ContentPlatformApplicationValidator.UpdateFaqCategoryParam} arg
|
|
7325
7919
|
* - Arg object
|
|
7326
7920
|
*
|
|
7327
7921
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
7328
7922
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
7329
|
-
* @returns {Promise<ContentPlatformModel.
|
|
7330
|
-
* @name
|
|
7331
|
-
* @summary: Update
|
|
7332
|
-
* @description: Modify settings
|
|
7923
|
+
* @returns {Promise<ContentPlatformModel.CreateFaqCategorySchema>} - Success response
|
|
7924
|
+
* @name updateFaqCategory
|
|
7925
|
+
* @summary: Update FAQ category
|
|
7926
|
+
* @description: Modify the content and settings of a specific FAQ category. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/updateFaqCategory/).
|
|
7333
7927
|
*/
|
|
7334
|
-
async
|
|
7335
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
7928
|
+
async updateFaqCategory(
|
|
7929
|
+
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
7336
7930
|
{ responseHeaders } = { responseHeaders: false }
|
|
7337
7931
|
) {
|
|
7338
7932
|
const {
|
|
7339
7933
|
error,
|
|
7340
|
-
} = ContentPlatformApplicationValidator.
|
|
7934
|
+
} = ContentPlatformApplicationValidator.updateFaqCategory().validate(
|
|
7341
7935
|
{
|
|
7936
|
+
id,
|
|
7342
7937
|
body,
|
|
7343
7938
|
},
|
|
7344
7939
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -7350,8 +7945,9 @@ class Content {
|
|
|
7350
7945
|
// Showing warrnings if extra unknown parameters are found
|
|
7351
7946
|
const {
|
|
7352
7947
|
error: warrning,
|
|
7353
|
-
} = ContentPlatformApplicationValidator.
|
|
7948
|
+
} = ContentPlatformApplicationValidator.updateFaqCategory().validate(
|
|
7354
7949
|
{
|
|
7950
|
+
id,
|
|
7355
7951
|
body,
|
|
7356
7952
|
},
|
|
7357
7953
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -7359,7 +7955,7 @@ class Content {
|
|
|
7359
7955
|
if (warrning) {
|
|
7360
7956
|
Logger({
|
|
7361
7957
|
level: "WARN",
|
|
7362
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
7958
|
+
message: `Parameter Validation warrnings for platform > Content > updateFaqCategory \n ${warrning}`,
|
|
7363
7959
|
});
|
|
7364
7960
|
}
|
|
7365
7961
|
|
|
@@ -7368,7 +7964,7 @@ class Content {
|
|
|
7368
7964
|
const response = await PlatformAPIClient.execute(
|
|
7369
7965
|
this.config,
|
|
7370
7966
|
"put",
|
|
7371
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
7967
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/faq/category/${id}`,
|
|
7372
7968
|
query_params,
|
|
7373
7969
|
body,
|
|
7374
7970
|
requestHeaders,
|
|
@@ -7382,7 +7978,7 @@ class Content {
|
|
|
7382
7978
|
|
|
7383
7979
|
const {
|
|
7384
7980
|
error: res_error,
|
|
7385
|
-
} = ContentPlatformModel.
|
|
7981
|
+
} = ContentPlatformModel.CreateFaqCategorySchema().validate(responseData, {
|
|
7386
7982
|
abortEarly: false,
|
|
7387
7983
|
allowUnknown: true,
|
|
7388
7984
|
});
|
|
@@ -7393,7 +7989,7 @@ class Content {
|
|
|
7393
7989
|
} else {
|
|
7394
7990
|
Logger({
|
|
7395
7991
|
level: "WARN",
|
|
7396
|
-
message: `Response Validation Warnings for platform > Content >
|
|
7992
|
+
message: `Response Validation Warnings for platform > Content > updateFaqCategory \n ${res_error}`,
|
|
7397
7993
|
});
|
|
7398
7994
|
}
|
|
7399
7995
|
}
|
|
@@ -7410,7 +8006,7 @@ class Content {
|
|
|
7410
8006
|
* @returns {Promise<ContentPlatformModel.LandingPageSchema>} - Success response
|
|
7411
8007
|
* @name updateLandingPage
|
|
7412
8008
|
* @summary: Update landing page
|
|
7413
|
-
* @description: Modify the content and settings of a specific landing page. - Check out [method documentation](https://
|
|
8009
|
+
* @description: Modify the content and settings of a specific landing page. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/updateLandingPage/).
|
|
7414
8010
|
*/
|
|
7415
8011
|
async updateLandingPage(
|
|
7416
8012
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -7493,7 +8089,7 @@ class Content {
|
|
|
7493
8089
|
* @returns {Promise<ContentPlatformModel.ApplicationLegal>} - Success response
|
|
7494
8090
|
* @name updateLegalInformation
|
|
7495
8091
|
* @summary: Update Legal Pages
|
|
7496
|
-
* @description: Modify legal information and terms. - Check out [method documentation](https://
|
|
8092
|
+
* @description: Modify legal information and terms. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/updateLegalInformation/).
|
|
7497
8093
|
*/
|
|
7498
8094
|
async updateLegalInformation(
|
|
7499
8095
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -7572,7 +8168,7 @@ class Content {
|
|
|
7572
8168
|
* @returns {Promise<ContentPlatformModel.NavigationSchema>} - Success response
|
|
7573
8169
|
* @name updateNavigation
|
|
7574
8170
|
* @summary: Update navigation
|
|
7575
|
-
* @description: Modify the content and settings of a specific navigation element. - Check out [method documentation](https://
|
|
8171
|
+
* @description: Modify the content and settings of a specific navigation element. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/updateNavigation/).
|
|
7576
8172
|
*/
|
|
7577
8173
|
async updateNavigation(
|
|
7578
8174
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -7653,7 +8249,7 @@ class Content {
|
|
|
7653
8249
|
* @returns {Promise<ContentPlatformModel.PageSchema>} - Success response
|
|
7654
8250
|
* @name updatePage
|
|
7655
8251
|
* @summary: Update page
|
|
7656
|
-
* @description: Modify and update the content of a page. - Check out [method documentation](https://
|
|
8252
|
+
* @description: Modify and update the content of a page. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/updatePage/).
|
|
7657
8253
|
*/
|
|
7658
8254
|
async updatePage(
|
|
7659
8255
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -7734,7 +8330,7 @@ class Content {
|
|
|
7734
8330
|
* @returns {Promise<ContentPlatformModel.PageSchema>} - Success response
|
|
7735
8331
|
* @name updatePagePreview
|
|
7736
8332
|
* @summary: Update page preview
|
|
7737
|
-
* @description: Modify the content and settings of a specific page preview. - Check out [method documentation](https://
|
|
8333
|
+
* @description: Modify the content and settings of a specific page preview. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/updatePagePreview/).
|
|
7738
8334
|
*/
|
|
7739
8335
|
async updatePagePreview(
|
|
7740
8336
|
{ slug, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -7817,7 +8413,7 @@ class Content {
|
|
|
7817
8413
|
* @returns {Promise<ContentPlatformModel.PathMappingSchema>} - Success response
|
|
7818
8414
|
* @name updatePathRedirectionRules
|
|
7819
8415
|
* @summary: Update path redirection rule
|
|
7820
|
-
* @description: Modify settings for path redirection rules. - Check out [method documentation](https://
|
|
8416
|
+
* @description: Modify settings for path redirection rules. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/updatePathRedirectionRules/).
|
|
7821
8417
|
*/
|
|
7822
8418
|
async updatePathRedirectionRules(
|
|
7823
8419
|
{ pathId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -7900,7 +8496,7 @@ class Content {
|
|
|
7900
8496
|
* @returns {Promise<ContentPlatformModel.SeoSchema>} - Success response
|
|
7901
8497
|
* @name updateSEOConfiguration
|
|
7902
8498
|
* @summary: Update sales channel SEO information
|
|
7903
|
-
* @description: Modify configuration settings for SEO. - Check out [method documentation](https://
|
|
8499
|
+
* @description: Modify configuration settings for SEO. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/updateSEOConfiguration/).
|
|
7904
8500
|
*/
|
|
7905
8501
|
async updateSEOConfiguration(
|
|
7906
8502
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -7973,23 +8569,107 @@ class Content {
|
|
|
7973
8569
|
}
|
|
7974
8570
|
|
|
7975
8571
|
/**
|
|
7976
|
-
* @param {ContentPlatformApplicationValidator.
|
|
8572
|
+
* @param {ContentPlatformApplicationValidator.UpdateSupportInformationParam} arg
|
|
8573
|
+
* - Arg object
|
|
8574
|
+
*
|
|
8575
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
8576
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
8577
|
+
* @returns {Promise<ContentPlatformModel.Support>} - Success response
|
|
8578
|
+
* @name updateSupportInformation
|
|
8579
|
+
* @summary: Update Customer Support Information
|
|
8580
|
+
* @description: Modify information related to customer support. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/updateSupportInformation/).
|
|
8581
|
+
*/
|
|
8582
|
+
async updateSupportInformation(
|
|
8583
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
8584
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
8585
|
+
) {
|
|
8586
|
+
const {
|
|
8587
|
+
error,
|
|
8588
|
+
} = ContentPlatformApplicationValidator.updateSupportInformation().validate(
|
|
8589
|
+
{
|
|
8590
|
+
body,
|
|
8591
|
+
},
|
|
8592
|
+
{ abortEarly: false, allowUnknown: true }
|
|
8593
|
+
);
|
|
8594
|
+
if (error) {
|
|
8595
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
8596
|
+
}
|
|
8597
|
+
|
|
8598
|
+
// Showing warrnings if extra unknown parameters are found
|
|
8599
|
+
const {
|
|
8600
|
+
error: warrning,
|
|
8601
|
+
} = ContentPlatformApplicationValidator.updateSupportInformation().validate(
|
|
8602
|
+
{
|
|
8603
|
+
body,
|
|
8604
|
+
},
|
|
8605
|
+
{ abortEarly: false, allowUnknown: false }
|
|
8606
|
+
);
|
|
8607
|
+
if (warrning) {
|
|
8608
|
+
Logger({
|
|
8609
|
+
level: "WARN",
|
|
8610
|
+
message: `Parameter Validation warrnings for platform > Content > updateSupportInformation \n ${warrning}`,
|
|
8611
|
+
});
|
|
8612
|
+
}
|
|
8613
|
+
|
|
8614
|
+
const query_params = {};
|
|
8615
|
+
|
|
8616
|
+
const response = await PlatformAPIClient.execute(
|
|
8617
|
+
this.config,
|
|
8618
|
+
"post",
|
|
8619
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/support`,
|
|
8620
|
+
query_params,
|
|
8621
|
+
body,
|
|
8622
|
+
requestHeaders,
|
|
8623
|
+
{ responseHeaders }
|
|
8624
|
+
);
|
|
8625
|
+
|
|
8626
|
+
let responseData = response;
|
|
8627
|
+
if (responseHeaders) {
|
|
8628
|
+
responseData = response[0];
|
|
8629
|
+
}
|
|
8630
|
+
|
|
8631
|
+
const {
|
|
8632
|
+
error: res_error,
|
|
8633
|
+
} = ContentPlatformModel.Support().validate(responseData, {
|
|
8634
|
+
abortEarly: false,
|
|
8635
|
+
allowUnknown: true,
|
|
8636
|
+
});
|
|
8637
|
+
|
|
8638
|
+
if (res_error) {
|
|
8639
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
8640
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
8641
|
+
} else {
|
|
8642
|
+
Logger({
|
|
8643
|
+
level: "WARN",
|
|
8644
|
+
message: `Response Validation Warnings for platform > Content > updateSupportInformation \n ${res_error}`,
|
|
8645
|
+
});
|
|
8646
|
+
}
|
|
8647
|
+
}
|
|
8648
|
+
|
|
8649
|
+
return response;
|
|
8650
|
+
}
|
|
8651
|
+
|
|
8652
|
+
/**
|
|
8653
|
+
* @param {ContentPlatformApplicationValidator.UpdateTranslateUILabelsParam} arg
|
|
8654
|
+
* - Arg object
|
|
8655
|
+
*
|
|
7977
8656
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
7978
8657
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
7979
|
-
* @returns {Promise<ContentPlatformModel.
|
|
7980
|
-
* @name
|
|
7981
|
-
* @summary: Update
|
|
7982
|
-
* @description:
|
|
8658
|
+
* @returns {Promise<ContentPlatformModel.TranslateUiLabels>} - Success response
|
|
8659
|
+
* @name updateTranslateUILabels
|
|
8660
|
+
* @summary: Update Resource Detail
|
|
8661
|
+
* @description: Modifies existing Translate Ui Labels properties including locale, type, and associated configurations. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/updateTranslateUILabels/).
|
|
7983
8662
|
*/
|
|
7984
|
-
async
|
|
8663
|
+
async updateTranslateUILabels(
|
|
7985
8664
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
7986
8665
|
{ responseHeaders } = { responseHeaders: false }
|
|
7987
8666
|
) {
|
|
7988
8667
|
const {
|
|
7989
8668
|
error,
|
|
7990
|
-
} = ContentPlatformApplicationValidator.
|
|
8669
|
+
} = ContentPlatformApplicationValidator.updateTranslateUILabels().validate(
|
|
7991
8670
|
{
|
|
7992
8671
|
id,
|
|
8672
|
+
|
|
7993
8673
|
body,
|
|
7994
8674
|
},
|
|
7995
8675
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -8001,9 +8681,10 @@ class Content {
|
|
|
8001
8681
|
// Showing warrnings if extra unknown parameters are found
|
|
8002
8682
|
const {
|
|
8003
8683
|
error: warrning,
|
|
8004
|
-
} = ContentPlatformApplicationValidator.
|
|
8684
|
+
} = ContentPlatformApplicationValidator.updateTranslateUILabels().validate(
|
|
8005
8685
|
{
|
|
8006
8686
|
id,
|
|
8687
|
+
|
|
8007
8688
|
body,
|
|
8008
8689
|
},
|
|
8009
8690
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -8011,7 +8692,7 @@ class Content {
|
|
|
8011
8692
|
if (warrning) {
|
|
8012
8693
|
Logger({
|
|
8013
8694
|
level: "WARN",
|
|
8014
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
8695
|
+
message: `Parameter Validation warrnings for platform > Content > updateTranslateUILabels \n ${warrning}`,
|
|
8015
8696
|
});
|
|
8016
8697
|
}
|
|
8017
8698
|
|
|
@@ -8020,7 +8701,7 @@ class Content {
|
|
|
8020
8701
|
const response = await PlatformAPIClient.execute(
|
|
8021
8702
|
this.config,
|
|
8022
8703
|
"put",
|
|
8023
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
8704
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/translate-ui-labels/${id}`,
|
|
8024
8705
|
query_params,
|
|
8025
8706
|
body,
|
|
8026
8707
|
requestHeaders,
|
|
@@ -8034,7 +8715,7 @@ class Content {
|
|
|
8034
8715
|
|
|
8035
8716
|
const {
|
|
8036
8717
|
error: res_error,
|
|
8037
|
-
} = ContentPlatformModel.
|
|
8718
|
+
} = ContentPlatformModel.TranslateUiLabels().validate(responseData, {
|
|
8038
8719
|
abortEarly: false,
|
|
8039
8720
|
allowUnknown: true,
|
|
8040
8721
|
});
|
|
@@ -8045,7 +8726,7 @@ class Content {
|
|
|
8045
8726
|
} else {
|
|
8046
8727
|
Logger({
|
|
8047
8728
|
level: "WARN",
|
|
8048
|
-
message: `Response Validation Warnings for platform > Content >
|
|
8729
|
+
message: `Response Validation Warnings for platform > Content > updateTranslateUILabels \n ${res_error}`,
|
|
8049
8730
|
});
|
|
8050
8731
|
}
|
|
8051
8732
|
}
|
|
@@ -8054,23 +8735,24 @@ class Content {
|
|
|
8054
8735
|
}
|
|
8055
8736
|
|
|
8056
8737
|
/**
|
|
8057
|
-
* @param {ContentPlatformApplicationValidator.
|
|
8738
|
+
* @param {ContentPlatformApplicationValidator.UpsertApplicationResourceTranslationInBulkParam} arg
|
|
8058
8739
|
* - Arg object
|
|
8059
8740
|
*
|
|
8060
8741
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
8061
8742
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
8062
|
-
* @returns {Promise<ContentPlatformModel.
|
|
8063
|
-
*
|
|
8064
|
-
* @
|
|
8065
|
-
* @
|
|
8743
|
+
* @returns {Promise<ContentPlatformModel.ResourceTranslationBulkUpsert>} -
|
|
8744
|
+
* Success response
|
|
8745
|
+
* @name upsertApplicationResourceTranslationInBulk
|
|
8746
|
+
* @summary: Bulk update translations
|
|
8747
|
+
* @description: Create or update multiple translations in a single request. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/content/upsertApplicationResourceTranslationInBulk/).
|
|
8066
8748
|
*/
|
|
8067
|
-
async
|
|
8749
|
+
async upsertApplicationResourceTranslationInBulk(
|
|
8068
8750
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
8069
8751
|
{ responseHeaders } = { responseHeaders: false }
|
|
8070
8752
|
) {
|
|
8071
8753
|
const {
|
|
8072
8754
|
error,
|
|
8073
|
-
} = ContentPlatformApplicationValidator.
|
|
8755
|
+
} = ContentPlatformApplicationValidator.upsertApplicationResourceTranslationInBulk().validate(
|
|
8074
8756
|
{
|
|
8075
8757
|
body,
|
|
8076
8758
|
},
|
|
@@ -8083,7 +8765,7 @@ class Content {
|
|
|
8083
8765
|
// Showing warrnings if extra unknown parameters are found
|
|
8084
8766
|
const {
|
|
8085
8767
|
error: warrning,
|
|
8086
|
-
} = ContentPlatformApplicationValidator.
|
|
8768
|
+
} = ContentPlatformApplicationValidator.upsertApplicationResourceTranslationInBulk().validate(
|
|
8087
8769
|
{
|
|
8088
8770
|
body,
|
|
8089
8771
|
},
|
|
@@ -8092,7 +8774,7 @@ class Content {
|
|
|
8092
8774
|
if (warrning) {
|
|
8093
8775
|
Logger({
|
|
8094
8776
|
level: "WARN",
|
|
8095
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
8777
|
+
message: `Parameter Validation warrnings for platform > Content > upsertApplicationResourceTranslationInBulk \n ${warrning}`,
|
|
8096
8778
|
});
|
|
8097
8779
|
}
|
|
8098
8780
|
|
|
@@ -8100,8 +8782,8 @@ class Content {
|
|
|
8100
8782
|
|
|
8101
8783
|
const response = await PlatformAPIClient.execute(
|
|
8102
8784
|
this.config,
|
|
8103
|
-
"
|
|
8104
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
8785
|
+
"patch",
|
|
8786
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/resource/translations/bulk`,
|
|
8105
8787
|
query_params,
|
|
8106
8788
|
body,
|
|
8107
8789
|
requestHeaders,
|
|
@@ -8115,10 +8797,10 @@ class Content {
|
|
|
8115
8797
|
|
|
8116
8798
|
const {
|
|
8117
8799
|
error: res_error,
|
|
8118
|
-
} = ContentPlatformModel.
|
|
8119
|
-
|
|
8120
|
-
allowUnknown: true
|
|
8121
|
-
|
|
8800
|
+
} = ContentPlatformModel.ResourceTranslationBulkUpsert().validate(
|
|
8801
|
+
responseData,
|
|
8802
|
+
{ abortEarly: false, allowUnknown: true }
|
|
8803
|
+
);
|
|
8122
8804
|
|
|
8123
8805
|
if (res_error) {
|
|
8124
8806
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -8126,7 +8808,7 @@ class Content {
|
|
|
8126
8808
|
} else {
|
|
8127
8809
|
Logger({
|
|
8128
8810
|
level: "WARN",
|
|
8129
|
-
message: `Response Validation Warnings for platform > Content >
|
|
8811
|
+
message: `Response Validation Warnings for platform > Content > upsertApplicationResourceTranslationInBulk \n ${res_error}`,
|
|
8130
8812
|
});
|
|
8131
8813
|
}
|
|
8132
8814
|
}
|