@gofynd/fdk-client-javascript 1.4.15 → 1.4.16-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +11 -11
- package/sdk/application/Cart/CartApplicationClient.js +343 -48
- package/sdk/application/Catalog/CatalogApplicationClient.js +408 -0
- package/sdk/application/Common/CommonApplicationClient.js +21 -0
- package/sdk/application/Communication/CommunicationApplicationClient.js +29 -0
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +147 -0
- package/sdk/application/Content/ContentApplicationClient.d.ts +20 -0
- package/sdk/application/Content/ContentApplicationClient.js +327 -0
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +43 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +21 -0
- package/sdk/application/Lead/LeadApplicationClient.js +73 -0
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +1 -1
- package/sdk/application/Logistic/LogisticApplicationClient.js +182 -2
- package/sdk/application/Order/OrderApplicationClient.js +202 -0
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +0 -10
- package/sdk/application/Payment/PaymentApplicationClient.js +445 -38
- package/sdk/application/Rewards/RewardsApplicationClient.js +68 -0
- package/sdk/application/Share/ShareApplicationClient.js +96 -0
- package/sdk/application/Theme/ThemeApplicationClient.js +64 -0
- package/sdk/application/User/UserApplicationClient.js +412 -0
- package/sdk/application/Webhook/WebhookApplicationClient.js +13 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +12 -33
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +38 -209
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +19 -399
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +11 -212
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +1 -3
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +7 -22
- package/sdk/partner/OAuthClient.js +1 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +3 -40
- package/sdk/partner/Theme/ThemePartnerModel.js +2 -24
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +1 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +12 -3
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +11 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +4 -1
- package/sdk/platform/Cart/CartPlatformModel.d.ts +14 -28
- package/sdk/platform/Cart/CartPlatformModel.js +7 -13
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +0 -24
- package/sdk/platform/Catalog/CatalogPlatformClient.js +0 -176
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +29 -80
- package/sdk/platform/Catalog/CatalogPlatformModel.js +32 -72
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1 -45
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +0 -35
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +3 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +52 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +411 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +85 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +73 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +90 -1
- package/sdk/platform/Content/ContentPlatformModel.js +104 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +2 -2
- package/sdk/platform/Order/OrderPlatformClient.js +0 -8
- package/sdk/platform/Order/OrderPlatformModel.d.ts +3 -75
- package/sdk/platform/Order/OrderPlatformModel.js +2 -43
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +0 -22
- package/sdk/platform/Order/OrderPlatformValidator.js +0 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +10 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +118 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +53 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +29 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +0 -104
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +74 -816
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +23 -598
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +20 -382
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +1 -191
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +0 -138
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +3 -40
- package/sdk/platform/Theme/ThemePlatformModel.js +2 -24
- package/sdk/public/Configuration/ConfigurationPublicClient.js +16 -0
- package/sdk/public/Content/ContentPublicClient.js +116 -0
- package/sdk/public/Partner/PartnerPublicClient.js +15 -0
- package/sdk/public/Webhook/WebhookPublicClient.js +40 -0
|
@@ -1224,6 +1224,85 @@ class Content {
|
|
|
1224
1224
|
return response;
|
|
1225
1225
|
}
|
|
1226
1226
|
|
|
1227
|
+
/**
|
|
1228
|
+
* @param {ContentPlatformApplicationValidator.CreateSlideshowParam} arg - Arg object
|
|
1229
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1230
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1231
|
+
* @returns {Promise<ContentPlatformModel.SlideshowSchema>} - Success response
|
|
1232
|
+
* @name createSlideshow
|
|
1233
|
+
* @summary: Create a slideshow
|
|
1234
|
+
* @description: Use this API to create a slideshow. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createSlideshow/).
|
|
1235
|
+
*/
|
|
1236
|
+
async createSlideshow(
|
|
1237
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1238
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1239
|
+
) {
|
|
1240
|
+
const {
|
|
1241
|
+
error,
|
|
1242
|
+
} = ContentPlatformApplicationValidator.createSlideshow().validate(
|
|
1243
|
+
{
|
|
1244
|
+
body,
|
|
1245
|
+
},
|
|
1246
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1247
|
+
);
|
|
1248
|
+
if (error) {
|
|
1249
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1253
|
+
const {
|
|
1254
|
+
error: warrning,
|
|
1255
|
+
} = ContentPlatformApplicationValidator.createSlideshow().validate(
|
|
1256
|
+
{
|
|
1257
|
+
body,
|
|
1258
|
+
},
|
|
1259
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1260
|
+
);
|
|
1261
|
+
if (warrning) {
|
|
1262
|
+
Logger({
|
|
1263
|
+
level: "WARN",
|
|
1264
|
+
message: `Parameter Validation warrnings for platform > Content > createSlideshow \n ${warrning}`,
|
|
1265
|
+
});
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
const query_params = {};
|
|
1269
|
+
|
|
1270
|
+
const response = await PlatformAPIClient.execute(
|
|
1271
|
+
this.config,
|
|
1272
|
+
"post",
|
|
1273
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/slideshows`,
|
|
1274
|
+
query_params,
|
|
1275
|
+
body,
|
|
1276
|
+
requestHeaders,
|
|
1277
|
+
{ responseHeaders }
|
|
1278
|
+
);
|
|
1279
|
+
|
|
1280
|
+
let responseData = response;
|
|
1281
|
+
if (responseHeaders) {
|
|
1282
|
+
responseData = response[0];
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
const {
|
|
1286
|
+
error: res_error,
|
|
1287
|
+
} = ContentPlatformModel.SlideshowSchema().validate(responseData, {
|
|
1288
|
+
abortEarly: false,
|
|
1289
|
+
allowUnknown: true,
|
|
1290
|
+
});
|
|
1291
|
+
|
|
1292
|
+
if (res_error) {
|
|
1293
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1294
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1295
|
+
} else {
|
|
1296
|
+
Logger({
|
|
1297
|
+
level: "WARN",
|
|
1298
|
+
message: `Response Validation Warnings for platform > Content > createSlideshow \n ${res_error}`,
|
|
1299
|
+
});
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
return response;
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1227
1306
|
/**
|
|
1228
1307
|
* @param {ContentPlatformApplicationValidator.DeleteAnnouncementParam} arg
|
|
1229
1308
|
* - Arg object
|
|
@@ -2271,6 +2350,85 @@ class Content {
|
|
|
2271
2350
|
return response;
|
|
2272
2351
|
}
|
|
2273
2352
|
|
|
2353
|
+
/**
|
|
2354
|
+
* @param {ContentPlatformApplicationValidator.DeleteSlideshowParam} arg - Arg object
|
|
2355
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2356
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2357
|
+
* @returns {Promise<ContentPlatformModel.SlideshowSchema>} - Success response
|
|
2358
|
+
* @name deleteSlideshow
|
|
2359
|
+
* @summary: Delete a slideshow
|
|
2360
|
+
* @description: Use this API to delete an existing slideshow. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteSlideshow/).
|
|
2361
|
+
*/
|
|
2362
|
+
async deleteSlideshow(
|
|
2363
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
2364
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2365
|
+
) {
|
|
2366
|
+
const {
|
|
2367
|
+
error,
|
|
2368
|
+
} = ContentPlatformApplicationValidator.deleteSlideshow().validate(
|
|
2369
|
+
{
|
|
2370
|
+
id,
|
|
2371
|
+
},
|
|
2372
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2373
|
+
);
|
|
2374
|
+
if (error) {
|
|
2375
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2376
|
+
}
|
|
2377
|
+
|
|
2378
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2379
|
+
const {
|
|
2380
|
+
error: warrning,
|
|
2381
|
+
} = ContentPlatformApplicationValidator.deleteSlideshow().validate(
|
|
2382
|
+
{
|
|
2383
|
+
id,
|
|
2384
|
+
},
|
|
2385
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2386
|
+
);
|
|
2387
|
+
if (warrning) {
|
|
2388
|
+
Logger({
|
|
2389
|
+
level: "WARN",
|
|
2390
|
+
message: `Parameter Validation warrnings for platform > Content > deleteSlideshow \n ${warrning}`,
|
|
2391
|
+
});
|
|
2392
|
+
}
|
|
2393
|
+
|
|
2394
|
+
const query_params = {};
|
|
2395
|
+
|
|
2396
|
+
const response = await PlatformAPIClient.execute(
|
|
2397
|
+
this.config,
|
|
2398
|
+
"delete",
|
|
2399
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/slideshows/${id}`,
|
|
2400
|
+
query_params,
|
|
2401
|
+
undefined,
|
|
2402
|
+
requestHeaders,
|
|
2403
|
+
{ responseHeaders }
|
|
2404
|
+
);
|
|
2405
|
+
|
|
2406
|
+
let responseData = response;
|
|
2407
|
+
if (responseHeaders) {
|
|
2408
|
+
responseData = response[0];
|
|
2409
|
+
}
|
|
2410
|
+
|
|
2411
|
+
const {
|
|
2412
|
+
error: res_error,
|
|
2413
|
+
} = ContentPlatformModel.SlideshowSchema().validate(responseData, {
|
|
2414
|
+
abortEarly: false,
|
|
2415
|
+
allowUnknown: true,
|
|
2416
|
+
});
|
|
2417
|
+
|
|
2418
|
+
if (res_error) {
|
|
2419
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
2420
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2421
|
+
} else {
|
|
2422
|
+
Logger({
|
|
2423
|
+
level: "WARN",
|
|
2424
|
+
message: `Response Validation Warnings for platform > Content > deleteSlideshow \n ${res_error}`,
|
|
2425
|
+
});
|
|
2426
|
+
}
|
|
2427
|
+
}
|
|
2428
|
+
|
|
2429
|
+
return response;
|
|
2430
|
+
}
|
|
2431
|
+
|
|
2274
2432
|
/**
|
|
2275
2433
|
* @param {ContentPlatformApplicationValidator.EditDataLoaderParam} arg - Arg object
|
|
2276
2434
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -5774,6 +5932,178 @@ class Content {
|
|
|
5774
5932
|
return response;
|
|
5775
5933
|
}
|
|
5776
5934
|
|
|
5935
|
+
/**
|
|
5936
|
+
* @param {ContentPlatformApplicationValidator.GetSlideshowBySlugParam} arg
|
|
5937
|
+
* - Arg object
|
|
5938
|
+
*
|
|
5939
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5940
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5941
|
+
* @returns {Promise<ContentPlatformModel.SlideshowSchema>} - Success response
|
|
5942
|
+
* @name getSlideshowBySlug
|
|
5943
|
+
* @summary: Get Slideshow
|
|
5944
|
+
* @description: Use this API to get the details of a slideshow by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSlideshowBySlug/).
|
|
5945
|
+
*/
|
|
5946
|
+
async getSlideshowBySlug(
|
|
5947
|
+
{ slug, devicePlatform, requestHeaders } = { requestHeaders: {} },
|
|
5948
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
5949
|
+
) {
|
|
5950
|
+
const {
|
|
5951
|
+
error,
|
|
5952
|
+
} = ContentPlatformApplicationValidator.getSlideshowBySlug().validate(
|
|
5953
|
+
{
|
|
5954
|
+
slug,
|
|
5955
|
+
devicePlatform,
|
|
5956
|
+
},
|
|
5957
|
+
{ abortEarly: false, allowUnknown: true }
|
|
5958
|
+
);
|
|
5959
|
+
if (error) {
|
|
5960
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
5961
|
+
}
|
|
5962
|
+
|
|
5963
|
+
// Showing warrnings if extra unknown parameters are found
|
|
5964
|
+
const {
|
|
5965
|
+
error: warrning,
|
|
5966
|
+
} = ContentPlatformApplicationValidator.getSlideshowBySlug().validate(
|
|
5967
|
+
{
|
|
5968
|
+
slug,
|
|
5969
|
+
devicePlatform,
|
|
5970
|
+
},
|
|
5971
|
+
{ abortEarly: false, allowUnknown: false }
|
|
5972
|
+
);
|
|
5973
|
+
if (warrning) {
|
|
5974
|
+
Logger({
|
|
5975
|
+
level: "WARN",
|
|
5976
|
+
message: `Parameter Validation warrnings for platform > Content > getSlideshowBySlug \n ${warrning}`,
|
|
5977
|
+
});
|
|
5978
|
+
}
|
|
5979
|
+
|
|
5980
|
+
const query_params = {};
|
|
5981
|
+
query_params["device_platform"] = devicePlatform;
|
|
5982
|
+
|
|
5983
|
+
const response = await PlatformAPIClient.execute(
|
|
5984
|
+
this.config,
|
|
5985
|
+
"get",
|
|
5986
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/slideshows/${slug}`,
|
|
5987
|
+
query_params,
|
|
5988
|
+
undefined,
|
|
5989
|
+
requestHeaders,
|
|
5990
|
+
{ responseHeaders }
|
|
5991
|
+
);
|
|
5992
|
+
|
|
5993
|
+
let responseData = response;
|
|
5994
|
+
if (responseHeaders) {
|
|
5995
|
+
responseData = response[0];
|
|
5996
|
+
}
|
|
5997
|
+
|
|
5998
|
+
const {
|
|
5999
|
+
error: res_error,
|
|
6000
|
+
} = ContentPlatformModel.SlideshowSchema().validate(responseData, {
|
|
6001
|
+
abortEarly: false,
|
|
6002
|
+
allowUnknown: true,
|
|
6003
|
+
});
|
|
6004
|
+
|
|
6005
|
+
if (res_error) {
|
|
6006
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
6007
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
6008
|
+
} else {
|
|
6009
|
+
Logger({
|
|
6010
|
+
level: "WARN",
|
|
6011
|
+
message: `Response Validation Warnings for platform > Content > getSlideshowBySlug \n ${res_error}`,
|
|
6012
|
+
});
|
|
6013
|
+
}
|
|
6014
|
+
}
|
|
6015
|
+
|
|
6016
|
+
return response;
|
|
6017
|
+
}
|
|
6018
|
+
|
|
6019
|
+
/**
|
|
6020
|
+
* @param {ContentPlatformApplicationValidator.GetSlideshowsParam} arg - Arg object
|
|
6021
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6022
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6023
|
+
* @returns {Promise<ContentPlatformModel.SlideshowGetDetails>} - Success response
|
|
6024
|
+
* @name getSlideshows
|
|
6025
|
+
* @summary: List Slideshows
|
|
6026
|
+
* @description: Use this API to list all Slideshows - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSlideshows/).
|
|
6027
|
+
*/
|
|
6028
|
+
async getSlideshows(
|
|
6029
|
+
{ devicePlatform, pageNo, pageSize, requestHeaders } = {
|
|
6030
|
+
requestHeaders: {},
|
|
6031
|
+
},
|
|
6032
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
6033
|
+
) {
|
|
6034
|
+
const {
|
|
6035
|
+
error,
|
|
6036
|
+
} = ContentPlatformApplicationValidator.getSlideshows().validate(
|
|
6037
|
+
{
|
|
6038
|
+
devicePlatform,
|
|
6039
|
+
pageNo,
|
|
6040
|
+
pageSize,
|
|
6041
|
+
},
|
|
6042
|
+
{ abortEarly: false, allowUnknown: true }
|
|
6043
|
+
);
|
|
6044
|
+
if (error) {
|
|
6045
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
6046
|
+
}
|
|
6047
|
+
|
|
6048
|
+
// Showing warrnings if extra unknown parameters are found
|
|
6049
|
+
const {
|
|
6050
|
+
error: warrning,
|
|
6051
|
+
} = ContentPlatformApplicationValidator.getSlideshows().validate(
|
|
6052
|
+
{
|
|
6053
|
+
devicePlatform,
|
|
6054
|
+
pageNo,
|
|
6055
|
+
pageSize,
|
|
6056
|
+
},
|
|
6057
|
+
{ abortEarly: false, allowUnknown: false }
|
|
6058
|
+
);
|
|
6059
|
+
if (warrning) {
|
|
6060
|
+
Logger({
|
|
6061
|
+
level: "WARN",
|
|
6062
|
+
message: `Parameter Validation warrnings for platform > Content > getSlideshows \n ${warrning}`,
|
|
6063
|
+
});
|
|
6064
|
+
}
|
|
6065
|
+
|
|
6066
|
+
const query_params = {};
|
|
6067
|
+
query_params["device_platform"] = devicePlatform;
|
|
6068
|
+
query_params["page_no"] = pageNo;
|
|
6069
|
+
query_params["page_size"] = pageSize;
|
|
6070
|
+
|
|
6071
|
+
const response = await PlatformAPIClient.execute(
|
|
6072
|
+
this.config,
|
|
6073
|
+
"get",
|
|
6074
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/slideshows`,
|
|
6075
|
+
query_params,
|
|
6076
|
+
undefined,
|
|
6077
|
+
requestHeaders,
|
|
6078
|
+
{ responseHeaders }
|
|
6079
|
+
);
|
|
6080
|
+
|
|
6081
|
+
let responseData = response;
|
|
6082
|
+
if (responseHeaders) {
|
|
6083
|
+
responseData = response[0];
|
|
6084
|
+
}
|
|
6085
|
+
|
|
6086
|
+
const {
|
|
6087
|
+
error: res_error,
|
|
6088
|
+
} = ContentPlatformModel.SlideshowGetDetails().validate(responseData, {
|
|
6089
|
+
abortEarly: false,
|
|
6090
|
+
allowUnknown: true,
|
|
6091
|
+
});
|
|
6092
|
+
|
|
6093
|
+
if (res_error) {
|
|
6094
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
6095
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
6096
|
+
} else {
|
|
6097
|
+
Logger({
|
|
6098
|
+
level: "WARN",
|
|
6099
|
+
message: `Response Validation Warnings for platform > Content > getSlideshows \n ${res_error}`,
|
|
6100
|
+
});
|
|
6101
|
+
}
|
|
6102
|
+
}
|
|
6103
|
+
|
|
6104
|
+
return response;
|
|
6105
|
+
}
|
|
6106
|
+
|
|
5777
6107
|
/**
|
|
5778
6108
|
* @param {ContentPlatformApplicationValidator.GetSupportInformationParam} arg
|
|
5779
6109
|
* - Arg object
|
|
@@ -7669,6 +7999,87 @@ class Content {
|
|
|
7669
7999
|
return response;
|
|
7670
8000
|
}
|
|
7671
8001
|
|
|
8002
|
+
/**
|
|
8003
|
+
* @param {ContentPlatformApplicationValidator.UpdateSlideshowParam} arg - Arg object
|
|
8004
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
8005
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
8006
|
+
* @returns {Promise<ContentPlatformModel.SlideshowSchema>} - Success response
|
|
8007
|
+
* @name updateSlideshow
|
|
8008
|
+
* @summary: Update a slideshow
|
|
8009
|
+
* @description: Use this API to Update Slideshow - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateSlideshow/).
|
|
8010
|
+
*/
|
|
8011
|
+
async updateSlideshow(
|
|
8012
|
+
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
8013
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
8014
|
+
) {
|
|
8015
|
+
const {
|
|
8016
|
+
error,
|
|
8017
|
+
} = ContentPlatformApplicationValidator.updateSlideshow().validate(
|
|
8018
|
+
{
|
|
8019
|
+
id,
|
|
8020
|
+
body,
|
|
8021
|
+
},
|
|
8022
|
+
{ abortEarly: false, allowUnknown: true }
|
|
8023
|
+
);
|
|
8024
|
+
if (error) {
|
|
8025
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
8026
|
+
}
|
|
8027
|
+
|
|
8028
|
+
// Showing warrnings if extra unknown parameters are found
|
|
8029
|
+
const {
|
|
8030
|
+
error: warrning,
|
|
8031
|
+
} = ContentPlatformApplicationValidator.updateSlideshow().validate(
|
|
8032
|
+
{
|
|
8033
|
+
id,
|
|
8034
|
+
body,
|
|
8035
|
+
},
|
|
8036
|
+
{ abortEarly: false, allowUnknown: false }
|
|
8037
|
+
);
|
|
8038
|
+
if (warrning) {
|
|
8039
|
+
Logger({
|
|
8040
|
+
level: "WARN",
|
|
8041
|
+
message: `Parameter Validation warrnings for platform > Content > updateSlideshow \n ${warrning}`,
|
|
8042
|
+
});
|
|
8043
|
+
}
|
|
8044
|
+
|
|
8045
|
+
const query_params = {};
|
|
8046
|
+
|
|
8047
|
+
const response = await PlatformAPIClient.execute(
|
|
8048
|
+
this.config,
|
|
8049
|
+
"put",
|
|
8050
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/slideshows/${id}`,
|
|
8051
|
+
query_params,
|
|
8052
|
+
body,
|
|
8053
|
+
requestHeaders,
|
|
8054
|
+
{ responseHeaders }
|
|
8055
|
+
);
|
|
8056
|
+
|
|
8057
|
+
let responseData = response;
|
|
8058
|
+
if (responseHeaders) {
|
|
8059
|
+
responseData = response[0];
|
|
8060
|
+
}
|
|
8061
|
+
|
|
8062
|
+
const {
|
|
8063
|
+
error: res_error,
|
|
8064
|
+
} = ContentPlatformModel.SlideshowSchema().validate(responseData, {
|
|
8065
|
+
abortEarly: false,
|
|
8066
|
+
allowUnknown: true,
|
|
8067
|
+
});
|
|
8068
|
+
|
|
8069
|
+
if (res_error) {
|
|
8070
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
8071
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
8072
|
+
} else {
|
|
8073
|
+
Logger({
|
|
8074
|
+
level: "WARN",
|
|
8075
|
+
message: `Response Validation Warnings for platform > Content > updateSlideshow \n ${res_error}`,
|
|
8076
|
+
});
|
|
8077
|
+
}
|
|
8078
|
+
}
|
|
8079
|
+
|
|
8080
|
+
return response;
|
|
8081
|
+
}
|
|
8082
|
+
|
|
7672
8083
|
/**
|
|
7673
8084
|
* @param {ContentPlatformApplicationValidator.UpdateSupportInformationParam} arg
|
|
7674
8085
|
* - Arg object
|
|
@@ -62,6 +62,10 @@ export = ContentPlatformApplicationValidator;
|
|
|
62
62
|
* @typedef CreateSEOMarkupSchemaParam
|
|
63
63
|
* @property {ContentPlatformModel.SEOSchemaMarkupTemplateRequestBody} body
|
|
64
64
|
*/
|
|
65
|
+
/**
|
|
66
|
+
* @typedef CreateSlideshowParam
|
|
67
|
+
* @property {ContentPlatformModel.SlideshowPayload} body
|
|
68
|
+
*/
|
|
65
69
|
/**
|
|
66
70
|
* @typedef DeleteAnnouncementParam
|
|
67
71
|
* @property {string} announcementId - ID allotted to the announcement.
|
|
@@ -119,6 +123,10 @@ export = ContentPlatformApplicationValidator;
|
|
|
119
123
|
* @property {string} id - Alphanumeric ID allotted to a SEO Markup Schema
|
|
120
124
|
* Template created within a business.
|
|
121
125
|
*/
|
|
126
|
+
/**
|
|
127
|
+
* @typedef DeleteSlideshowParam
|
|
128
|
+
* @property {string} id - ID allotted to the slideshow.
|
|
129
|
+
*/
|
|
122
130
|
/**
|
|
123
131
|
* @typedef EditDataLoaderParam
|
|
124
132
|
* @property {string} dataLoaderId - ID allotted to the data loader.
|
|
@@ -332,6 +340,22 @@ export = ContentPlatformApplicationValidator;
|
|
|
332
340
|
* @property {number} [pageSize] - The number of items to retrieve in each page.
|
|
333
341
|
* Default value is 10.
|
|
334
342
|
*/
|
|
343
|
+
/**
|
|
344
|
+
* @typedef GetSlideshowBySlugParam
|
|
345
|
+
* @property {string} slug - A short, human-readable, URL-friendly identifier of
|
|
346
|
+
* a slideshow. You can get slug value of a page from `getSlideshows` API.
|
|
347
|
+
* @property {string} devicePlatform - Filter slideshows by platform. Acceptable
|
|
348
|
+
* values are: web, android, ios and all
|
|
349
|
+
*/
|
|
350
|
+
/**
|
|
351
|
+
* @typedef GetSlideshowsParam
|
|
352
|
+
* @property {string} devicePlatform - Filter slideshows by platform. Acceptable
|
|
353
|
+
* values are: web, android, ios and all
|
|
354
|
+
* @property {number} [pageNo] - The page number to navigate through the given
|
|
355
|
+
* set of results. Default value is 1.
|
|
356
|
+
* @property {number} [pageSize] - The number of items to retrieve in each page.
|
|
357
|
+
* Default value is 10.
|
|
358
|
+
*/
|
|
335
359
|
/** @typedef GetSupportInformationParam */
|
|
336
360
|
/**
|
|
337
361
|
* @typedef ImportAppCustomObjectEntriesBySlugParam
|
|
@@ -443,6 +467,11 @@ export = ContentPlatformApplicationValidator;
|
|
|
443
467
|
* @typedef UpdateSEOConfigurationParam
|
|
444
468
|
* @property {ContentPlatformModel.SeoComponent} body
|
|
445
469
|
*/
|
|
470
|
+
/**
|
|
471
|
+
* @typedef UpdateSlideshowParam
|
|
472
|
+
* @property {string} id - ID allotted to the slideshow.
|
|
473
|
+
* @property {ContentPlatformModel.SlideshowPayload} body
|
|
474
|
+
*/
|
|
446
475
|
/**
|
|
447
476
|
* @typedef UpdateSupportInformationParam
|
|
448
477
|
* @property {ContentPlatformModel.Support} body
|
|
@@ -478,6 +507,8 @@ declare class ContentPlatformApplicationValidator {
|
|
|
478
507
|
static createPagePreview(): CreatePagePreviewParam;
|
|
479
508
|
/** @returns {CreateSEOMarkupSchemaParam} */
|
|
480
509
|
static createSEOMarkupSchema(): CreateSEOMarkupSchemaParam;
|
|
510
|
+
/** @returns {CreateSlideshowParam} */
|
|
511
|
+
static createSlideshow(): CreateSlideshowParam;
|
|
481
512
|
/** @returns {DeleteAnnouncementParam} */
|
|
482
513
|
static deleteAnnouncement(): DeleteAnnouncementParam;
|
|
483
514
|
/** @returns {DeleteAppCustomFieldDefinitionBySlugParam} */
|
|
@@ -504,6 +535,8 @@ declare class ContentPlatformApplicationValidator {
|
|
|
504
535
|
static deletePathRedirectionRules(): DeletePathRedirectionRulesParam;
|
|
505
536
|
/** @returns {DeleteSEOMarkupSchemaParam} */
|
|
506
537
|
static deleteSEOMarkupSchema(): DeleteSEOMarkupSchemaParam;
|
|
538
|
+
/** @returns {DeleteSlideshowParam} */
|
|
539
|
+
static deleteSlideshow(): DeleteSlideshowParam;
|
|
507
540
|
/** @returns {EditDataLoaderParam} */
|
|
508
541
|
static editDataLoader(): EditDataLoaderParam;
|
|
509
542
|
/** @returns {EditInjectableTagParam} */
|
|
@@ -588,6 +621,10 @@ declare class ContentPlatformApplicationValidator {
|
|
|
588
621
|
static getSEOMarkupSchema(): GetSEOMarkupSchemaParam;
|
|
589
622
|
/** @returns {GetSEOMarkupSchemasParam} */
|
|
590
623
|
static getSEOMarkupSchemas(): GetSEOMarkupSchemasParam;
|
|
624
|
+
/** @returns {GetSlideshowBySlugParam} */
|
|
625
|
+
static getSlideshowBySlug(): GetSlideshowBySlugParam;
|
|
626
|
+
/** @returns {GetSlideshowsParam} */
|
|
627
|
+
static getSlideshows(): GetSlideshowsParam;
|
|
591
628
|
/** @returns {GetSupportInformationParam} */
|
|
592
629
|
static getSupportInformation(): any;
|
|
593
630
|
/** @returns {ImportAppCustomObjectEntriesBySlugParam} */
|
|
@@ -634,11 +671,13 @@ declare class ContentPlatformApplicationValidator {
|
|
|
634
671
|
static updatePathRedirectionRules(): UpdatePathRedirectionRulesParam;
|
|
635
672
|
/** @returns {UpdateSEOConfigurationParam} */
|
|
636
673
|
static updateSEOConfiguration(): UpdateSEOConfigurationParam;
|
|
674
|
+
/** @returns {UpdateSlideshowParam} */
|
|
675
|
+
static updateSlideshow(): UpdateSlideshowParam;
|
|
637
676
|
/** @returns {UpdateSupportInformationParam} */
|
|
638
677
|
static updateSupportInformation(): UpdateSupportInformationParam;
|
|
639
678
|
}
|
|
640
679
|
declare namespace ContentPlatformApplicationValidator {
|
|
641
|
-
export { AddDataLoaderParam, AddFaqParam, AddInjectableTagParam, AddPathRedirectionRulesParam, CreateAnnouncementParam, CreateAppCustomFieldDefinitionParam, CreateAppCustomObjectBySlugParam, CreateAppCustomObjectDefinitionParam, CreateBlogParam, CreateFaqCategoryParam, CreateLandingPageParam, CreateNavigationParam, CreatePageParam, CreatePagePreviewParam, CreateSEOMarkupSchemaParam, DeleteAnnouncementParam, DeleteAppCustomFieldDefinitionBySlugParam, DeleteAppCustomObjectBySlugParam, DeleteAppCustomObjectDefinitionBySlugParam, DeleteBlogParam, DeleteDataLoaderParam, DeleteFaqParam, DeleteFaqCategoryParam, DeleteLandingPageParam, DeleteNavigationParam, DeletePageParam, DeletePathRedirectionRulesParam, DeleteSEOMarkupSchemaParam, EditDataLoaderParam, EditInjectableTagParam, EditSEOMarkupSchemaParam, ExportAppCustomObjectEntriesBySlugParam, GenerateSEOTitleParam, GetAnnouncementByIdParam, GetAnnouncementsListParam, GetAppCustomFieldDefinitionByResourceParam, GetAppCustomFieldDefinitionBySlugParam, GetAppCustomFieldDefinitionsParam, GetAppCustomFieldTypesParam, GetAppCustomFieldsByResourceSlugParam, GetAppCustomObjectBySlugParam, GetAppCustomObjectDefinitionBySlugParam, GetAppCustomObjectDefinitionsParam, GetAppCustomObjectsBySlugParam, GetAppJobsParam, GetAppResourcesParam, GetBlogBySlugParam, GetBlogsParam, GetDataLoadersParam, GetDataLoadersByServiceParam, GetDefaultNavigationsParam, GetDefaultSEOMarkupSchemaParam, GetFaqByIdOrSlugParam, GetFaqCategoriesParam, GetFaqCategoryBySlugOrIdParam, GetFaqsByCategoryIdOrSlugParam, GetInjectableTagsParam, GetLandingPagesParam, GetLegalInformationParam, GetNavigationBySlugParam, GetNavigationsParam, GetPageBySlugParam, GetPageMetaParam, GetPageSpecParam, GetPagesParam, GetPathRedirectionRuleParam, GetPathRedirectionRulesParam, GetSEOConfigurationParam, GetSEOMarkupSchemaParam, GetSEOMarkupSchemasParam, GetSupportInformationParam, ImportAppCustomObjectEntriesBySlugParam, RemoveInjectableTagParam, ResetDataLoaderParam, SampleAppCustomObjectBulkEntryBySlugParam, SelectDataLoaderParam, UpdateAnnouncementParam, UpdateAnnouncementScheduleParam, UpdateAppCustomFieldByResourceSlugParam, UpdateAppCustomFieldDefinitionBySlugParam, UpdateAppCustomObjectBySlugParam, UpdateAppCustomObjectDefinitionBySlugParam, UpdateBlogParam, UpdateFaqParam, UpdateFaqCategoryParam, UpdateInjectableTagParam, UpdateLandingPageParam, UpdateLegalInformationParam, UpdateNavigationParam, UpdatePageParam, UpdatePagePreviewParam, UpdatePathRedirectionRulesParam, UpdateSEOConfigurationParam, UpdateSupportInformationParam };
|
|
680
|
+
export { AddDataLoaderParam, AddFaqParam, AddInjectableTagParam, AddPathRedirectionRulesParam, CreateAnnouncementParam, CreateAppCustomFieldDefinitionParam, CreateAppCustomObjectBySlugParam, CreateAppCustomObjectDefinitionParam, CreateBlogParam, CreateFaqCategoryParam, CreateLandingPageParam, CreateNavigationParam, CreatePageParam, CreatePagePreviewParam, CreateSEOMarkupSchemaParam, CreateSlideshowParam, DeleteAnnouncementParam, DeleteAppCustomFieldDefinitionBySlugParam, DeleteAppCustomObjectBySlugParam, DeleteAppCustomObjectDefinitionBySlugParam, DeleteBlogParam, DeleteDataLoaderParam, DeleteFaqParam, DeleteFaqCategoryParam, DeleteLandingPageParam, DeleteNavigationParam, DeletePageParam, DeletePathRedirectionRulesParam, DeleteSEOMarkupSchemaParam, DeleteSlideshowParam, EditDataLoaderParam, EditInjectableTagParam, EditSEOMarkupSchemaParam, ExportAppCustomObjectEntriesBySlugParam, GenerateSEOTitleParam, GetAnnouncementByIdParam, GetAnnouncementsListParam, GetAppCustomFieldDefinitionByResourceParam, GetAppCustomFieldDefinitionBySlugParam, GetAppCustomFieldDefinitionsParam, GetAppCustomFieldTypesParam, GetAppCustomFieldsByResourceSlugParam, GetAppCustomObjectBySlugParam, GetAppCustomObjectDefinitionBySlugParam, GetAppCustomObjectDefinitionsParam, GetAppCustomObjectsBySlugParam, GetAppJobsParam, GetAppResourcesParam, GetBlogBySlugParam, GetBlogsParam, GetDataLoadersParam, GetDataLoadersByServiceParam, GetDefaultNavigationsParam, GetDefaultSEOMarkupSchemaParam, GetFaqByIdOrSlugParam, GetFaqCategoriesParam, GetFaqCategoryBySlugOrIdParam, GetFaqsByCategoryIdOrSlugParam, GetInjectableTagsParam, GetLandingPagesParam, GetLegalInformationParam, GetNavigationBySlugParam, GetNavigationsParam, GetPageBySlugParam, GetPageMetaParam, GetPageSpecParam, GetPagesParam, GetPathRedirectionRuleParam, GetPathRedirectionRulesParam, GetSEOConfigurationParam, GetSEOMarkupSchemaParam, GetSEOMarkupSchemasParam, GetSlideshowBySlugParam, GetSlideshowsParam, GetSupportInformationParam, ImportAppCustomObjectEntriesBySlugParam, RemoveInjectableTagParam, ResetDataLoaderParam, SampleAppCustomObjectBulkEntryBySlugParam, SelectDataLoaderParam, UpdateAnnouncementParam, UpdateAnnouncementScheduleParam, UpdateAppCustomFieldByResourceSlugParam, UpdateAppCustomFieldDefinitionBySlugParam, UpdateAppCustomObjectBySlugParam, UpdateAppCustomObjectDefinitionBySlugParam, UpdateBlogParam, UpdateFaqParam, UpdateFaqCategoryParam, UpdateInjectableTagParam, UpdateLandingPageParam, UpdateLegalInformationParam, UpdateNavigationParam, UpdatePageParam, UpdatePagePreviewParam, UpdatePathRedirectionRulesParam, UpdateSEOConfigurationParam, UpdateSlideshowParam, UpdateSupportInformationParam };
|
|
642
681
|
}
|
|
643
682
|
type AddDataLoaderParam = {
|
|
644
683
|
body: ContentPlatformModel.DataLoaderSchema;
|
|
@@ -691,6 +730,9 @@ type CreatePagePreviewParam = {
|
|
|
691
730
|
type CreateSEOMarkupSchemaParam = {
|
|
692
731
|
body: ContentPlatformModel.SEOSchemaMarkupTemplateRequestBody;
|
|
693
732
|
};
|
|
733
|
+
type CreateSlideshowParam = {
|
|
734
|
+
body: ContentPlatformModel.SlideshowPayload;
|
|
735
|
+
};
|
|
694
736
|
type DeleteAnnouncementParam = {
|
|
695
737
|
/**
|
|
696
738
|
* - ID allotted to the announcement.
|
|
@@ -768,6 +810,12 @@ type DeleteSEOMarkupSchemaParam = {
|
|
|
768
810
|
*/
|
|
769
811
|
id: string;
|
|
770
812
|
};
|
|
813
|
+
type DeleteSlideshowParam = {
|
|
814
|
+
/**
|
|
815
|
+
* - ID allotted to the slideshow.
|
|
816
|
+
*/
|
|
817
|
+
id: string;
|
|
818
|
+
};
|
|
771
819
|
type EditDataLoaderParam = {
|
|
772
820
|
/**
|
|
773
821
|
* - ID allotted to the data loader.
|
|
@@ -1056,6 +1104,35 @@ type GetSEOMarkupSchemasParam = {
|
|
|
1056
1104
|
*/
|
|
1057
1105
|
pageSize?: number;
|
|
1058
1106
|
};
|
|
1107
|
+
type GetSlideshowBySlugParam = {
|
|
1108
|
+
/**
|
|
1109
|
+
* - A short, human-readable, URL-friendly identifier of
|
|
1110
|
+
* a slideshow. You can get slug value of a page from `getSlideshows` API.
|
|
1111
|
+
*/
|
|
1112
|
+
slug: string;
|
|
1113
|
+
/**
|
|
1114
|
+
* - Filter slideshows by platform. Acceptable
|
|
1115
|
+
* values are: web, android, ios and all
|
|
1116
|
+
*/
|
|
1117
|
+
devicePlatform: string;
|
|
1118
|
+
};
|
|
1119
|
+
type GetSlideshowsParam = {
|
|
1120
|
+
/**
|
|
1121
|
+
* - Filter slideshows by platform. Acceptable
|
|
1122
|
+
* values are: web, android, ios and all
|
|
1123
|
+
*/
|
|
1124
|
+
devicePlatform: string;
|
|
1125
|
+
/**
|
|
1126
|
+
* - The page number to navigate through the given
|
|
1127
|
+
* set of results. Default value is 1.
|
|
1128
|
+
*/
|
|
1129
|
+
pageNo?: number;
|
|
1130
|
+
/**
|
|
1131
|
+
* - The number of items to retrieve in each page.
|
|
1132
|
+
* Default value is 10.
|
|
1133
|
+
*/
|
|
1134
|
+
pageSize?: number;
|
|
1135
|
+
};
|
|
1059
1136
|
type ImportAppCustomObjectEntriesBySlugParam = {
|
|
1060
1137
|
slug: string;
|
|
1061
1138
|
body: ContentPlatformModel.CustomObjectBulkSchema;
|
|
@@ -1186,6 +1263,13 @@ type UpdatePathRedirectionRulesParam = {
|
|
|
1186
1263
|
type UpdateSEOConfigurationParam = {
|
|
1187
1264
|
body: ContentPlatformModel.SeoComponent;
|
|
1188
1265
|
};
|
|
1266
|
+
type UpdateSlideshowParam = {
|
|
1267
|
+
/**
|
|
1268
|
+
* - ID allotted to the slideshow.
|
|
1269
|
+
*/
|
|
1270
|
+
id: string;
|
|
1271
|
+
body: ContentPlatformModel.SlideshowPayload;
|
|
1272
|
+
};
|
|
1189
1273
|
type UpdateSupportInformationParam = {
|
|
1190
1274
|
body: ContentPlatformModel.Support;
|
|
1191
1275
|
};
|