@gofynd/fdk-client-javascript 1.4.16-beta.1 → 1.4.16-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +6 -6
- package/sdk/application/Cart/CartApplicationClient.js +30 -269
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +16 -16
- package/sdk/application/Catalog/CatalogApplicationClient.js +90 -339
- package/sdk/application/Common/CommonApplicationClient.js +1 -16
- package/sdk/application/Communication/CommunicationApplicationClient.js +1 -24
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +2 -2
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +11 -134
- package/sdk/application/Content/ContentApplicationClient.d.ts +40 -8
- package/sdk/application/Content/ContentApplicationClient.js +174 -211
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +11 -30
- package/sdk/application/Finance/FinanceApplicationClient.js +1 -16
- package/sdk/application/Lead/LeadApplicationClient.d.ts +4 -4
- package/sdk/application/Lead/LeadApplicationClient.js +21 -52
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +6 -6
- package/sdk/application/Logistic/LogisticApplicationClient.js +40 -153
- package/sdk/application/Order/OrderApplicationClient.d.ts +11 -11
- package/sdk/application/Order/OrderApplicationClient.js +68 -153
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +1 -1
- package/sdk/application/Payment/PaymentApplicationClient.js +6 -437
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +1 -1
- package/sdk/application/Rewards/RewardsApplicationClient.js +6 -59
- package/sdk/application/Share/ShareApplicationClient.d.ts +4 -4
- package/sdk/application/Share/ShareApplicationClient.js +21 -75
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +3 -3
- package/sdk/application/Theme/ThemeApplicationClient.js +19 -47
- package/sdk/application/User/UserApplicationClient.js +1 -407
- package/sdk/application/Webhook/WebhookApplicationClient.js +1 -8
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +4 -4
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +35 -0
- package/sdk/platform/Cart/CartPlatformModel.js +16 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +4 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +80 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +571 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +75 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +88 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +131 -5
- package/sdk/platform/Content/ContentPlatformModel.js +110 -4
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +0 -10
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +0 -92
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
- package/sdk/platform/Order/OrderPlatformClient.d.ts +10 -0
- package/sdk/platform/Order/OrderPlatformClient.js +99 -0
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +33 -1
- package/sdk/platform/Order/OrderPlatformValidator.js +20 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +0 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +0 -118
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +1 -53
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +0 -29
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +10 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +119 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +58 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +30 -0
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/Share/SharePlatformApplicationClient.js +7 -7
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +3 -6
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +2 -2
- package/sdk/platform/Share/SharePlatformModel.d.ts +10 -2
- package/sdk/platform/Share/SharePlatformModel.js +4 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.js +1 -16
- package/sdk/public/Content/ContentPublicClient.d.ts +3 -3
- package/sdk/public/Content/ContentPublicClient.js +16 -104
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +6 -11
- package/sdk/public/Webhook/WebhookPublicClient.js +1 -40
|
@@ -1224,6 +1224,86 @@ class Content {
|
|
|
1224
1224
|
return response;
|
|
1225
1225
|
}
|
|
1226
1226
|
|
|
1227
|
+
/**
|
|
1228
|
+
* @param {ContentPlatformApplicationValidator.CreateSitemapParam} arg - Arg object
|
|
1229
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1230
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1231
|
+
* @returns {Promise<ContentPlatformModel.SitemapConfig>} - Success response
|
|
1232
|
+
* @name createSitemap
|
|
1233
|
+
* @summary: Create a new sitemap configuration
|
|
1234
|
+
* @description: Create a new sitemap configuration for a specific company and application. The name must be unique within the scope of the application. The sitemap XML data must be valid XML following the sitemap protocol specification. Once created, the configuration can be activated or deactivated using the is_active flag.
|
|
1235
|
+
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createSitemap/).
|
|
1236
|
+
*/
|
|
1237
|
+
async createSitemap(
|
|
1238
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1239
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1240
|
+
) {
|
|
1241
|
+
const {
|
|
1242
|
+
error,
|
|
1243
|
+
} = ContentPlatformApplicationValidator.createSitemap().validate(
|
|
1244
|
+
{
|
|
1245
|
+
body,
|
|
1246
|
+
},
|
|
1247
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1248
|
+
);
|
|
1249
|
+
if (error) {
|
|
1250
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1254
|
+
const {
|
|
1255
|
+
error: warrning,
|
|
1256
|
+
} = ContentPlatformApplicationValidator.createSitemap().validate(
|
|
1257
|
+
{
|
|
1258
|
+
body,
|
|
1259
|
+
},
|
|
1260
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1261
|
+
);
|
|
1262
|
+
if (warrning) {
|
|
1263
|
+
Logger({
|
|
1264
|
+
level: "WARN",
|
|
1265
|
+
message: `Parameter Validation warrnings for platform > Content > createSitemap \n ${warrning}`,
|
|
1266
|
+
});
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
const query_params = {};
|
|
1270
|
+
|
|
1271
|
+
const response = await PlatformAPIClient.execute(
|
|
1272
|
+
this.config,
|
|
1273
|
+
"post",
|
|
1274
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo/sitemaps`,
|
|
1275
|
+
query_params,
|
|
1276
|
+
body,
|
|
1277
|
+
requestHeaders,
|
|
1278
|
+
{ responseHeaders }
|
|
1279
|
+
);
|
|
1280
|
+
|
|
1281
|
+
let responseData = response;
|
|
1282
|
+
if (responseHeaders) {
|
|
1283
|
+
responseData = response[0];
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
const {
|
|
1287
|
+
error: res_error,
|
|
1288
|
+
} = ContentPlatformModel.SitemapConfig().validate(responseData, {
|
|
1289
|
+
abortEarly: false,
|
|
1290
|
+
allowUnknown: true,
|
|
1291
|
+
});
|
|
1292
|
+
|
|
1293
|
+
if (res_error) {
|
|
1294
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1295
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1296
|
+
} else {
|
|
1297
|
+
Logger({
|
|
1298
|
+
level: "WARN",
|
|
1299
|
+
message: `Response Validation Warnings for platform > Content > createSitemap \n ${res_error}`,
|
|
1300
|
+
});
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
return response;
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1227
1307
|
/**
|
|
1228
1308
|
* @param {ContentPlatformApplicationValidator.CreateSlideshowParam} arg - Arg object
|
|
1229
1309
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -2350,6 +2430,86 @@ class Content {
|
|
|
2350
2430
|
return response;
|
|
2351
2431
|
}
|
|
2352
2432
|
|
|
2433
|
+
/**
|
|
2434
|
+
* @param {ContentPlatformApplicationValidator.DeleteSitemapParam} arg - Arg object
|
|
2435
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2436
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2437
|
+
* @returns {Promise<ContentPlatformModel.SitemapConfig>} - Success response
|
|
2438
|
+
* @name deleteSitemap
|
|
2439
|
+
* @summary: Delete a specific sitemap configuration
|
|
2440
|
+
* @description: Permanently delete a sitemap configuration identified by its name. This action cannot be undone. All associated data including the sitemap XML data will be removed.
|
|
2441
|
+
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteSitemap/).
|
|
2442
|
+
*/
|
|
2443
|
+
async deleteSitemap(
|
|
2444
|
+
{ name, requestHeaders } = { requestHeaders: {} },
|
|
2445
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2446
|
+
) {
|
|
2447
|
+
const {
|
|
2448
|
+
error,
|
|
2449
|
+
} = ContentPlatformApplicationValidator.deleteSitemap().validate(
|
|
2450
|
+
{
|
|
2451
|
+
name,
|
|
2452
|
+
},
|
|
2453
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2454
|
+
);
|
|
2455
|
+
if (error) {
|
|
2456
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2457
|
+
}
|
|
2458
|
+
|
|
2459
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2460
|
+
const {
|
|
2461
|
+
error: warrning,
|
|
2462
|
+
} = ContentPlatformApplicationValidator.deleteSitemap().validate(
|
|
2463
|
+
{
|
|
2464
|
+
name,
|
|
2465
|
+
},
|
|
2466
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2467
|
+
);
|
|
2468
|
+
if (warrning) {
|
|
2469
|
+
Logger({
|
|
2470
|
+
level: "WARN",
|
|
2471
|
+
message: `Parameter Validation warrnings for platform > Content > deleteSitemap \n ${warrning}`,
|
|
2472
|
+
});
|
|
2473
|
+
}
|
|
2474
|
+
|
|
2475
|
+
const query_params = {};
|
|
2476
|
+
|
|
2477
|
+
const response = await PlatformAPIClient.execute(
|
|
2478
|
+
this.config,
|
|
2479
|
+
"delete",
|
|
2480
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo/sitemaps/${name}`,
|
|
2481
|
+
query_params,
|
|
2482
|
+
undefined,
|
|
2483
|
+
requestHeaders,
|
|
2484
|
+
{ responseHeaders }
|
|
2485
|
+
);
|
|
2486
|
+
|
|
2487
|
+
let responseData = response;
|
|
2488
|
+
if (responseHeaders) {
|
|
2489
|
+
responseData = response[0];
|
|
2490
|
+
}
|
|
2491
|
+
|
|
2492
|
+
const {
|
|
2493
|
+
error: res_error,
|
|
2494
|
+
} = ContentPlatformModel.SitemapConfig().validate(responseData, {
|
|
2495
|
+
abortEarly: false,
|
|
2496
|
+
allowUnknown: true,
|
|
2497
|
+
});
|
|
2498
|
+
|
|
2499
|
+
if (res_error) {
|
|
2500
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
2501
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2502
|
+
} else {
|
|
2503
|
+
Logger({
|
|
2504
|
+
level: "WARN",
|
|
2505
|
+
message: `Response Validation Warnings for platform > Content > deleteSitemap \n ${res_error}`,
|
|
2506
|
+
});
|
|
2507
|
+
}
|
|
2508
|
+
}
|
|
2509
|
+
|
|
2510
|
+
return response;
|
|
2511
|
+
}
|
|
2512
|
+
|
|
2353
2513
|
/**
|
|
2354
2514
|
* @param {ContentPlatformApplicationValidator.DeleteSlideshowParam} arg - Arg object
|
|
2355
2515
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -4474,6 +4634,83 @@ class Content {
|
|
|
4474
4634
|
return response;
|
|
4475
4635
|
}
|
|
4476
4636
|
|
|
4637
|
+
/**
|
|
4638
|
+
* @param {ContentPlatformApplicationValidator.GetDefaultSitemapConfigParam} arg
|
|
4639
|
+
* - Arg object
|
|
4640
|
+
*
|
|
4641
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4642
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4643
|
+
* @returns {Promise<ContentPlatformModel.DefaultSitemapConfig>} - Success response
|
|
4644
|
+
* @name getDefaultSitemapConfig
|
|
4645
|
+
* @summary: Get default sitemap configuration
|
|
4646
|
+
* @description: Retrieves the current default sitemap configuration settings - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getDefaultSitemapConfig/).
|
|
4647
|
+
*/
|
|
4648
|
+
async getDefaultSitemapConfig(
|
|
4649
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
4650
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
4651
|
+
) {
|
|
4652
|
+
const {
|
|
4653
|
+
error,
|
|
4654
|
+
} = ContentPlatformApplicationValidator.getDefaultSitemapConfig().validate(
|
|
4655
|
+
{},
|
|
4656
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4657
|
+
);
|
|
4658
|
+
if (error) {
|
|
4659
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
4660
|
+
}
|
|
4661
|
+
|
|
4662
|
+
// Showing warrnings if extra unknown parameters are found
|
|
4663
|
+
const {
|
|
4664
|
+
error: warrning,
|
|
4665
|
+
} = ContentPlatformApplicationValidator.getDefaultSitemapConfig().validate(
|
|
4666
|
+
{},
|
|
4667
|
+
{ abortEarly: false, allowUnknown: false }
|
|
4668
|
+
);
|
|
4669
|
+
if (warrning) {
|
|
4670
|
+
Logger({
|
|
4671
|
+
level: "WARN",
|
|
4672
|
+
message: `Parameter Validation warrnings for platform > Content > getDefaultSitemapConfig \n ${warrning}`,
|
|
4673
|
+
});
|
|
4674
|
+
}
|
|
4675
|
+
|
|
4676
|
+
const query_params = {};
|
|
4677
|
+
|
|
4678
|
+
const response = await PlatformAPIClient.execute(
|
|
4679
|
+
this.config,
|
|
4680
|
+
"get",
|
|
4681
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo/sitemap/default`,
|
|
4682
|
+
query_params,
|
|
4683
|
+
undefined,
|
|
4684
|
+
requestHeaders,
|
|
4685
|
+
{ responseHeaders }
|
|
4686
|
+
);
|
|
4687
|
+
|
|
4688
|
+
let responseData = response;
|
|
4689
|
+
if (responseHeaders) {
|
|
4690
|
+
responseData = response[0];
|
|
4691
|
+
}
|
|
4692
|
+
|
|
4693
|
+
const {
|
|
4694
|
+
error: res_error,
|
|
4695
|
+
} = ContentPlatformModel.DefaultSitemapConfig().validate(responseData, {
|
|
4696
|
+
abortEarly: false,
|
|
4697
|
+
allowUnknown: true,
|
|
4698
|
+
});
|
|
4699
|
+
|
|
4700
|
+
if (res_error) {
|
|
4701
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
4702
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
4703
|
+
} else {
|
|
4704
|
+
Logger({
|
|
4705
|
+
level: "WARN",
|
|
4706
|
+
message: `Response Validation Warnings for platform > Content > getDefaultSitemapConfig \n ${res_error}`,
|
|
4707
|
+
});
|
|
4708
|
+
}
|
|
4709
|
+
}
|
|
4710
|
+
|
|
4711
|
+
return response;
|
|
4712
|
+
}
|
|
4713
|
+
|
|
4477
4714
|
/**
|
|
4478
4715
|
* @param {ContentPlatformApplicationValidator.GetFaqByIdOrSlugParam} arg - Arg object
|
|
4479
4716
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -5932,6 +6169,177 @@ class Content {
|
|
|
5932
6169
|
return response;
|
|
5933
6170
|
}
|
|
5934
6171
|
|
|
6172
|
+
/**
|
|
6173
|
+
* @param {ContentPlatformApplicationValidator.GetSitemapParam} arg - Arg object
|
|
6174
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6175
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6176
|
+
* @returns {Promise<ContentPlatformModel.SitemapConfig>} - Success response
|
|
6177
|
+
* @name getSitemap
|
|
6178
|
+
* @summary: Get a specific sitemap configuration
|
|
6179
|
+
* @description: Retrieve a specific sitemap configuration by its name. Returns the complete configuration including the sitemap XML data, activation status, and timestamps.
|
|
6180
|
+
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSitemap/).
|
|
6181
|
+
*/
|
|
6182
|
+
async getSitemap(
|
|
6183
|
+
{ name, requestHeaders } = { requestHeaders: {} },
|
|
6184
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
6185
|
+
) {
|
|
6186
|
+
const { error } = ContentPlatformApplicationValidator.getSitemap().validate(
|
|
6187
|
+
{
|
|
6188
|
+
name,
|
|
6189
|
+
},
|
|
6190
|
+
{ abortEarly: false, allowUnknown: true }
|
|
6191
|
+
);
|
|
6192
|
+
if (error) {
|
|
6193
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
6194
|
+
}
|
|
6195
|
+
|
|
6196
|
+
// Showing warrnings if extra unknown parameters are found
|
|
6197
|
+
const {
|
|
6198
|
+
error: warrning,
|
|
6199
|
+
} = ContentPlatformApplicationValidator.getSitemap().validate(
|
|
6200
|
+
{
|
|
6201
|
+
name,
|
|
6202
|
+
},
|
|
6203
|
+
{ abortEarly: false, allowUnknown: false }
|
|
6204
|
+
);
|
|
6205
|
+
if (warrning) {
|
|
6206
|
+
Logger({
|
|
6207
|
+
level: "WARN",
|
|
6208
|
+
message: `Parameter Validation warrnings for platform > Content > getSitemap \n ${warrning}`,
|
|
6209
|
+
});
|
|
6210
|
+
}
|
|
6211
|
+
|
|
6212
|
+
const query_params = {};
|
|
6213
|
+
|
|
6214
|
+
const response = await PlatformAPIClient.execute(
|
|
6215
|
+
this.config,
|
|
6216
|
+
"get",
|
|
6217
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo/sitemaps/${name}`,
|
|
6218
|
+
query_params,
|
|
6219
|
+
undefined,
|
|
6220
|
+
requestHeaders,
|
|
6221
|
+
{ responseHeaders }
|
|
6222
|
+
);
|
|
6223
|
+
|
|
6224
|
+
let responseData = response;
|
|
6225
|
+
if (responseHeaders) {
|
|
6226
|
+
responseData = response[0];
|
|
6227
|
+
}
|
|
6228
|
+
|
|
6229
|
+
const {
|
|
6230
|
+
error: res_error,
|
|
6231
|
+
} = ContentPlatformModel.SitemapConfig().validate(responseData, {
|
|
6232
|
+
abortEarly: false,
|
|
6233
|
+
allowUnknown: true,
|
|
6234
|
+
});
|
|
6235
|
+
|
|
6236
|
+
if (res_error) {
|
|
6237
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
6238
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
6239
|
+
} else {
|
|
6240
|
+
Logger({
|
|
6241
|
+
level: "WARN",
|
|
6242
|
+
message: `Response Validation Warnings for platform > Content > getSitemap \n ${res_error}`,
|
|
6243
|
+
});
|
|
6244
|
+
}
|
|
6245
|
+
}
|
|
6246
|
+
|
|
6247
|
+
return response;
|
|
6248
|
+
}
|
|
6249
|
+
|
|
6250
|
+
/**
|
|
6251
|
+
* @param {ContentPlatformApplicationValidator.GetSitemapsParam} arg - Arg object
|
|
6252
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6253
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6254
|
+
* @returns {Promise<ContentPlatformModel.SitemapConfigurationList>} -
|
|
6255
|
+
* Success response
|
|
6256
|
+
* @name getSitemaps
|
|
6257
|
+
* @summary: List sitemap configurations
|
|
6258
|
+
* @description: Retrieve a list of sitemap configurations for a specific company and application. Each configuration contains the sitemap XML data and its activation status.
|
|
6259
|
+
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSitemaps/).
|
|
6260
|
+
*/
|
|
6261
|
+
async getSitemaps(
|
|
6262
|
+
{ pageNo, pageSize, isActive, name, requestHeaders } = {
|
|
6263
|
+
requestHeaders: {},
|
|
6264
|
+
},
|
|
6265
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
6266
|
+
) {
|
|
6267
|
+
const {
|
|
6268
|
+
error,
|
|
6269
|
+
} = ContentPlatformApplicationValidator.getSitemaps().validate(
|
|
6270
|
+
{
|
|
6271
|
+
pageNo,
|
|
6272
|
+
pageSize,
|
|
6273
|
+
isActive,
|
|
6274
|
+
name,
|
|
6275
|
+
},
|
|
6276
|
+
{ abortEarly: false, allowUnknown: true }
|
|
6277
|
+
);
|
|
6278
|
+
if (error) {
|
|
6279
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
6280
|
+
}
|
|
6281
|
+
|
|
6282
|
+
// Showing warrnings if extra unknown parameters are found
|
|
6283
|
+
const {
|
|
6284
|
+
error: warrning,
|
|
6285
|
+
} = ContentPlatformApplicationValidator.getSitemaps().validate(
|
|
6286
|
+
{
|
|
6287
|
+
pageNo,
|
|
6288
|
+
pageSize,
|
|
6289
|
+
isActive,
|
|
6290
|
+
name,
|
|
6291
|
+
},
|
|
6292
|
+
{ abortEarly: false, allowUnknown: false }
|
|
6293
|
+
);
|
|
6294
|
+
if (warrning) {
|
|
6295
|
+
Logger({
|
|
6296
|
+
level: "WARN",
|
|
6297
|
+
message: `Parameter Validation warrnings for platform > Content > getSitemaps \n ${warrning}`,
|
|
6298
|
+
});
|
|
6299
|
+
}
|
|
6300
|
+
|
|
6301
|
+
const query_params = {};
|
|
6302
|
+
query_params["page_no"] = pageNo;
|
|
6303
|
+
query_params["page_size"] = pageSize;
|
|
6304
|
+
query_params["is_active"] = isActive;
|
|
6305
|
+
query_params["name"] = name;
|
|
6306
|
+
|
|
6307
|
+
const response = await PlatformAPIClient.execute(
|
|
6308
|
+
this.config,
|
|
6309
|
+
"get",
|
|
6310
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo/sitemaps`,
|
|
6311
|
+
query_params,
|
|
6312
|
+
undefined,
|
|
6313
|
+
requestHeaders,
|
|
6314
|
+
{ responseHeaders }
|
|
6315
|
+
);
|
|
6316
|
+
|
|
6317
|
+
let responseData = response;
|
|
6318
|
+
if (responseHeaders) {
|
|
6319
|
+
responseData = response[0];
|
|
6320
|
+
}
|
|
6321
|
+
|
|
6322
|
+
const {
|
|
6323
|
+
error: res_error,
|
|
6324
|
+
} = ContentPlatformModel.SitemapConfigurationList().validate(responseData, {
|
|
6325
|
+
abortEarly: false,
|
|
6326
|
+
allowUnknown: true,
|
|
6327
|
+
});
|
|
6328
|
+
|
|
6329
|
+
if (res_error) {
|
|
6330
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
6331
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
6332
|
+
} else {
|
|
6333
|
+
Logger({
|
|
6334
|
+
level: "WARN",
|
|
6335
|
+
message: `Response Validation Warnings for platform > Content > getSitemaps \n ${res_error}`,
|
|
6336
|
+
});
|
|
6337
|
+
}
|
|
6338
|
+
}
|
|
6339
|
+
|
|
6340
|
+
return response;
|
|
6341
|
+
}
|
|
6342
|
+
|
|
5935
6343
|
/**
|
|
5936
6344
|
* @param {ContentPlatformApplicationValidator.GetSlideshowBySlugParam} arg
|
|
5937
6345
|
* - Arg object
|
|
@@ -7183,6 +7591,87 @@ class Content {
|
|
|
7183
7591
|
return response;
|
|
7184
7592
|
}
|
|
7185
7593
|
|
|
7594
|
+
/**
|
|
7595
|
+
* @param {ContentPlatformApplicationValidator.UpdateDefaultSitemapConfigParam} arg
|
|
7596
|
+
* - Arg object
|
|
7597
|
+
*
|
|
7598
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
7599
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
7600
|
+
* @returns {Promise<ContentPlatformModel.DefaultSitemapConfig>} - Success response
|
|
7601
|
+
* @name updateDefaultSitemapConfig
|
|
7602
|
+
* @summary: Update default sitemap configuration
|
|
7603
|
+
* @description: Updates the default sitemap configuration settings - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateDefaultSitemapConfig/).
|
|
7604
|
+
*/
|
|
7605
|
+
async updateDefaultSitemapConfig(
|
|
7606
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
7607
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
7608
|
+
) {
|
|
7609
|
+
const {
|
|
7610
|
+
error,
|
|
7611
|
+
} = ContentPlatformApplicationValidator.updateDefaultSitemapConfig().validate(
|
|
7612
|
+
{
|
|
7613
|
+
body,
|
|
7614
|
+
},
|
|
7615
|
+
{ abortEarly: false, allowUnknown: true }
|
|
7616
|
+
);
|
|
7617
|
+
if (error) {
|
|
7618
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
7619
|
+
}
|
|
7620
|
+
|
|
7621
|
+
// Showing warrnings if extra unknown parameters are found
|
|
7622
|
+
const {
|
|
7623
|
+
error: warrning,
|
|
7624
|
+
} = ContentPlatformApplicationValidator.updateDefaultSitemapConfig().validate(
|
|
7625
|
+
{
|
|
7626
|
+
body,
|
|
7627
|
+
},
|
|
7628
|
+
{ abortEarly: false, allowUnknown: false }
|
|
7629
|
+
);
|
|
7630
|
+
if (warrning) {
|
|
7631
|
+
Logger({
|
|
7632
|
+
level: "WARN",
|
|
7633
|
+
message: `Parameter Validation warrnings for platform > Content > updateDefaultSitemapConfig \n ${warrning}`,
|
|
7634
|
+
});
|
|
7635
|
+
}
|
|
7636
|
+
|
|
7637
|
+
const query_params = {};
|
|
7638
|
+
|
|
7639
|
+
const response = await PlatformAPIClient.execute(
|
|
7640
|
+
this.config,
|
|
7641
|
+
"put",
|
|
7642
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo/sitemap/default`,
|
|
7643
|
+
query_params,
|
|
7644
|
+
body,
|
|
7645
|
+
requestHeaders,
|
|
7646
|
+
{ responseHeaders }
|
|
7647
|
+
);
|
|
7648
|
+
|
|
7649
|
+
let responseData = response;
|
|
7650
|
+
if (responseHeaders) {
|
|
7651
|
+
responseData = response[0];
|
|
7652
|
+
}
|
|
7653
|
+
|
|
7654
|
+
const {
|
|
7655
|
+
error: res_error,
|
|
7656
|
+
} = ContentPlatformModel.DefaultSitemapConfig().validate(responseData, {
|
|
7657
|
+
abortEarly: false,
|
|
7658
|
+
allowUnknown: true,
|
|
7659
|
+
});
|
|
7660
|
+
|
|
7661
|
+
if (res_error) {
|
|
7662
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
7663
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
7664
|
+
} else {
|
|
7665
|
+
Logger({
|
|
7666
|
+
level: "WARN",
|
|
7667
|
+
message: `Response Validation Warnings for platform > Content > updateDefaultSitemapConfig \n ${res_error}`,
|
|
7668
|
+
});
|
|
7669
|
+
}
|
|
7670
|
+
}
|
|
7671
|
+
|
|
7672
|
+
return response;
|
|
7673
|
+
}
|
|
7674
|
+
|
|
7186
7675
|
/**
|
|
7187
7676
|
* @param {ContentPlatformApplicationValidator.UpdateFaqParam} arg - Arg object
|
|
7188
7677
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -7999,6 +8488,88 @@ class Content {
|
|
|
7999
8488
|
return response;
|
|
8000
8489
|
}
|
|
8001
8490
|
|
|
8491
|
+
/**
|
|
8492
|
+
* @param {ContentPlatformApplicationValidator.UpdateSitemapParam} arg - Arg object
|
|
8493
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
8494
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
8495
|
+
* @returns {Promise<ContentPlatformModel.SitemapConfig>} - Success response
|
|
8496
|
+
* @name updateSitemap
|
|
8497
|
+
* @summary: Update a specific sitemap configuration
|
|
8498
|
+
* @description: Update an existing sitemap configuration identified by its name. You can update the activation status and/or the sitemap XML data. The name cannot be modified once the configuration is created. The updated sitemap XML data must be valid XML following the sitemap protocol specification.
|
|
8499
|
+
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateSitemap/).
|
|
8500
|
+
*/
|
|
8501
|
+
async updateSitemap(
|
|
8502
|
+
{ name, body, requestHeaders } = { requestHeaders: {} },
|
|
8503
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
8504
|
+
) {
|
|
8505
|
+
const {
|
|
8506
|
+
error,
|
|
8507
|
+
} = ContentPlatformApplicationValidator.updateSitemap().validate(
|
|
8508
|
+
{
|
|
8509
|
+
name,
|
|
8510
|
+
body,
|
|
8511
|
+
},
|
|
8512
|
+
{ abortEarly: false, allowUnknown: true }
|
|
8513
|
+
);
|
|
8514
|
+
if (error) {
|
|
8515
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
8516
|
+
}
|
|
8517
|
+
|
|
8518
|
+
// Showing warrnings if extra unknown parameters are found
|
|
8519
|
+
const {
|
|
8520
|
+
error: warrning,
|
|
8521
|
+
} = ContentPlatformApplicationValidator.updateSitemap().validate(
|
|
8522
|
+
{
|
|
8523
|
+
name,
|
|
8524
|
+
body,
|
|
8525
|
+
},
|
|
8526
|
+
{ abortEarly: false, allowUnknown: false }
|
|
8527
|
+
);
|
|
8528
|
+
if (warrning) {
|
|
8529
|
+
Logger({
|
|
8530
|
+
level: "WARN",
|
|
8531
|
+
message: `Parameter Validation warrnings for platform > Content > updateSitemap \n ${warrning}`,
|
|
8532
|
+
});
|
|
8533
|
+
}
|
|
8534
|
+
|
|
8535
|
+
const query_params = {};
|
|
8536
|
+
|
|
8537
|
+
const response = await PlatformAPIClient.execute(
|
|
8538
|
+
this.config,
|
|
8539
|
+
"put",
|
|
8540
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo/sitemaps/${name}`,
|
|
8541
|
+
query_params,
|
|
8542
|
+
body,
|
|
8543
|
+
requestHeaders,
|
|
8544
|
+
{ responseHeaders }
|
|
8545
|
+
);
|
|
8546
|
+
|
|
8547
|
+
let responseData = response;
|
|
8548
|
+
if (responseHeaders) {
|
|
8549
|
+
responseData = response[0];
|
|
8550
|
+
}
|
|
8551
|
+
|
|
8552
|
+
const {
|
|
8553
|
+
error: res_error,
|
|
8554
|
+
} = ContentPlatformModel.SitemapConfig().validate(responseData, {
|
|
8555
|
+
abortEarly: false,
|
|
8556
|
+
allowUnknown: true,
|
|
8557
|
+
});
|
|
8558
|
+
|
|
8559
|
+
if (res_error) {
|
|
8560
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
8561
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
8562
|
+
} else {
|
|
8563
|
+
Logger({
|
|
8564
|
+
level: "WARN",
|
|
8565
|
+
message: `Response Validation Warnings for platform > Content > updateSitemap \n ${res_error}`,
|
|
8566
|
+
});
|
|
8567
|
+
}
|
|
8568
|
+
}
|
|
8569
|
+
|
|
8570
|
+
return response;
|
|
8571
|
+
}
|
|
8572
|
+
|
|
8002
8573
|
/**
|
|
8003
8574
|
* @param {ContentPlatformApplicationValidator.UpdateSlideshowParam} arg - Arg object
|
|
8004
8575
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|