@gofynd/fdk-client-javascript 1.4.15-beta.3 → 1.5.0
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 +48 -50
- package/sdk/application/Content/ContentApplicationClient.d.ts +0 -20
- package/sdk/application/Content/ContentApplicationClient.js +0 -78
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +1 -1
- package/sdk/application/Logistic/LogisticApplicationClient.js +2 -0
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +10 -0
- package/sdk/application/Payment/PaymentApplicationClient.js +39 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +33 -12
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +209 -38
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +399 -19
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +212 -11
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +3 -1
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +22 -7
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +1 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +3 -12
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +0 -7
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +0 -3
- package/sdk/platform/Cart/CartPlatformModel.d.ts +28 -14
- package/sdk/platform/Cart/CartPlatformModel.js +12 -6
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +24 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.js +176 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +80 -29
- package/sdk/platform/Catalog/CatalogPlatformModel.js +72 -32
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +45 -1
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +35 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -52
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +0 -411
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -85
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -73
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1 -90
- package/sdk/platform/Content/ContentPlatformModel.js +0 -104
- package/sdk/platform/Order/OrderPlatformClient.d.ts +2 -2
- package/sdk/platform/Order/OrderPlatformClient.js +8 -0
- package/sdk/platform/Order/OrderPlatformModel.d.ts +73 -1
- package/sdk/platform/Order/OrderPlatformModel.js +39 -0
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +22 -0
- package/sdk/platform/Order/OrderPlatformValidator.js +10 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +94 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +699 -76
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +598 -23
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +382 -20
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +134 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +108 -0
|
@@ -485,6 +485,23 @@ const CatalogPlatformModel = require("./CatalogPlatformModel");
|
|
|
485
485
|
* @property {CatalogPlatformModel.InventoryRequestSchemaV2} body
|
|
486
486
|
*/
|
|
487
487
|
|
|
488
|
+
/**
|
|
489
|
+
* @typedef UpdateLocationPriceParam
|
|
490
|
+
* @property {number} storeId - The Store Id to update price of size for specific store.
|
|
491
|
+
* @property {string} sellerIdentifier - Size Identifier (Seller Identifier or
|
|
492
|
+
* Primary Identifier) of which article price is to update.
|
|
493
|
+
* @property {CatalogPlatformModel.LocationPriceRequestSchema} body
|
|
494
|
+
*/
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* @typedef UpdateLocationQuantityParam
|
|
498
|
+
* @property {number} storeId - The Store Id to update quantity of size for
|
|
499
|
+
* specific store.
|
|
500
|
+
* @property {string} sellerIdentifier - Size Identifier (Seller Identifier or
|
|
501
|
+
* Primary Identifier) of which article quantity is to update.
|
|
502
|
+
* @property {CatalogPlatformModel.LocationQuantityRequestSchema} body
|
|
503
|
+
*/
|
|
504
|
+
|
|
488
505
|
/**
|
|
489
506
|
* @typedef UpdateMarketplaceOptinParam
|
|
490
507
|
* @property {string} marketplaceSlug - Slug of the marketplace .
|
|
@@ -1108,6 +1125,24 @@ class CatalogPlatformValidator {
|
|
|
1108
1125
|
}).required();
|
|
1109
1126
|
}
|
|
1110
1127
|
|
|
1128
|
+
/** @returns {UpdateLocationPriceParam} */
|
|
1129
|
+
static updateLocationPrice() {
|
|
1130
|
+
return Joi.object({
|
|
1131
|
+
storeId: Joi.number().required(),
|
|
1132
|
+
sellerIdentifier: Joi.string().allow("").required(),
|
|
1133
|
+
body: CatalogPlatformModel.LocationPriceRequestSchema().required(),
|
|
1134
|
+
}).required();
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
/** @returns {UpdateLocationQuantityParam} */
|
|
1138
|
+
static updateLocationQuantity() {
|
|
1139
|
+
return Joi.object({
|
|
1140
|
+
storeId: Joi.number().required(),
|
|
1141
|
+
sellerIdentifier: Joi.string().allow("").required(),
|
|
1142
|
+
body: CatalogPlatformModel.LocationQuantityRequestSchema().required(),
|
|
1143
|
+
}).required();
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1111
1146
|
/** @returns {UpdateMarketplaceOptinParam} */
|
|
1112
1147
|
static updateMarketplaceOptin() {
|
|
1113
1148
|
return Joi.object({
|
|
@@ -177,16 +177,6 @@ declare class Content {
|
|
|
177
177
|
* @description: Use this API to Create SEO Markup Schema - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createSEOMarkupSchema/).
|
|
178
178
|
*/
|
|
179
179
|
createSEOMarkupSchema({ body, requestHeaders }?: ContentPlatformApplicationValidator.CreateSEOMarkupSchemaParam, { responseHeaders }?: object): Promise<ContentPlatformModel.SEOSchemaMarkupTemplate>;
|
|
180
|
-
/**
|
|
181
|
-
* @param {ContentPlatformApplicationValidator.CreateSlideshowParam} arg - Arg object
|
|
182
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
183
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
184
|
-
* @returns {Promise<ContentPlatformModel.SlideshowSchema>} - Success response
|
|
185
|
-
* @name createSlideshow
|
|
186
|
-
* @summary: Create a slideshow
|
|
187
|
-
* @description: Use this API to create a slideshow. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createSlideshow/).
|
|
188
|
-
*/
|
|
189
|
-
createSlideshow({ body, requestHeaders }?: ContentPlatformApplicationValidator.CreateSlideshowParam, { responseHeaders }?: object): Promise<ContentPlatformModel.SlideshowSchema>;
|
|
190
180
|
/**
|
|
191
181
|
* @param {ContentPlatformApplicationValidator.DeleteAnnouncementParam} arg
|
|
192
182
|
* - Arg object
|
|
@@ -337,16 +327,6 @@ declare class Content {
|
|
|
337
327
|
* @description: Use this API to Delete SEO Markup Schema - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteSEOMarkupSchema/).
|
|
338
328
|
*/
|
|
339
329
|
deleteSEOMarkupSchema({ id, requestHeaders }?: ContentPlatformApplicationValidator.DeleteSEOMarkupSchemaParam, { responseHeaders }?: object): Promise<ContentPlatformModel.SEOSchemaMarkupTemplate>;
|
|
340
|
-
/**
|
|
341
|
-
* @param {ContentPlatformApplicationValidator.DeleteSlideshowParam} arg - Arg object
|
|
342
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
343
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
344
|
-
* @returns {Promise<ContentPlatformModel.SlideshowSchema>} - Success response
|
|
345
|
-
* @name deleteSlideshow
|
|
346
|
-
* @summary: Delete a slideshow
|
|
347
|
-
* @description: Use this API to delete an existing slideshow. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteSlideshow/).
|
|
348
|
-
*/
|
|
349
|
-
deleteSlideshow({ id, requestHeaders }?: ContentPlatformApplicationValidator.DeleteSlideshowParam, { responseHeaders }?: object): Promise<ContentPlatformModel.SlideshowSchema>;
|
|
350
330
|
/**
|
|
351
331
|
* @param {ContentPlatformApplicationValidator.EditDataLoaderParam} arg - Arg object
|
|
352
332
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -838,28 +818,6 @@ declare class Content {
|
|
|
838
818
|
* @description: Use this API to List default SEO Markup Schemas - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSEOMarkupSchemas/).
|
|
839
819
|
*/
|
|
840
820
|
getSEOMarkupSchemas({ title, active, pageNo, pageSize, requestHeaders }?: ContentPlatformApplicationValidator.GetSEOMarkupSchemasParam, { responseHeaders }?: object): Promise<ContentPlatformModel.SeoSchemaComponent>;
|
|
841
|
-
/**
|
|
842
|
-
* @param {ContentPlatformApplicationValidator.GetSlideshowBySlugParam} arg
|
|
843
|
-
* - Arg object
|
|
844
|
-
*
|
|
845
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
846
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
847
|
-
* @returns {Promise<ContentPlatformModel.SlideshowSchema>} - Success response
|
|
848
|
-
* @name getSlideshowBySlug
|
|
849
|
-
* @summary: Get Slideshow
|
|
850
|
-
* @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/).
|
|
851
|
-
*/
|
|
852
|
-
getSlideshowBySlug({ slug, devicePlatform, requestHeaders }?: ContentPlatformApplicationValidator.GetSlideshowBySlugParam, { responseHeaders }?: object): Promise<ContentPlatformModel.SlideshowSchema>;
|
|
853
|
-
/**
|
|
854
|
-
* @param {ContentPlatformApplicationValidator.GetSlideshowsParam} arg - Arg object
|
|
855
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
856
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
857
|
-
* @returns {Promise<ContentPlatformModel.SlideshowGetDetails>} - Success response
|
|
858
|
-
* @name getSlideshows
|
|
859
|
-
* @summary: List Slideshows
|
|
860
|
-
* @description: Use this API to list all Slideshows - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSlideshows/).
|
|
861
|
-
*/
|
|
862
|
-
getSlideshows({ devicePlatform, pageNo, pageSize, requestHeaders }?: ContentPlatformApplicationValidator.GetSlideshowsParam, { responseHeaders }?: object): Promise<ContentPlatformModel.SlideshowGetDetails>;
|
|
863
821
|
/**
|
|
864
822
|
* @param {ContentPlatformApplicationValidator.GetSupportInformationParam} arg
|
|
865
823
|
* - Arg object
|
|
@@ -1137,16 +1095,6 @@ declare class Content {
|
|
|
1137
1095
|
* @description: Modify configuration settings for SEO. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateSEOConfiguration/).
|
|
1138
1096
|
*/
|
|
1139
1097
|
updateSEOConfiguration({ body, requestHeaders }?: ContentPlatformApplicationValidator.UpdateSEOConfigurationParam, { responseHeaders }?: object): Promise<ContentPlatformModel.SeoSchema>;
|
|
1140
|
-
/**
|
|
1141
|
-
* @param {ContentPlatformApplicationValidator.UpdateSlideshowParam} arg - Arg object
|
|
1142
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1143
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1144
|
-
* @returns {Promise<ContentPlatformModel.SlideshowSchema>} - Success response
|
|
1145
|
-
* @name updateSlideshow
|
|
1146
|
-
* @summary: Update a slideshow
|
|
1147
|
-
* @description: Use this API to Update Slideshow - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateSlideshow/).
|
|
1148
|
-
*/
|
|
1149
|
-
updateSlideshow({ id, body, requestHeaders }?: ContentPlatformApplicationValidator.UpdateSlideshowParam, { responseHeaders }?: object): Promise<ContentPlatformModel.SlideshowSchema>;
|
|
1150
1098
|
/**
|
|
1151
1099
|
* @param {ContentPlatformApplicationValidator.UpdateSupportInformationParam} arg
|
|
1152
1100
|
* - Arg object
|
|
@@ -1224,85 +1224,6 @@ 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
|
-
|
|
1306
1227
|
/**
|
|
1307
1228
|
* @param {ContentPlatformApplicationValidator.DeleteAnnouncementParam} arg
|
|
1308
1229
|
* - Arg object
|
|
@@ -2350,85 +2271,6 @@ class Content {
|
|
|
2350
2271
|
return response;
|
|
2351
2272
|
}
|
|
2352
2273
|
|
|
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
|
-
|
|
2432
2274
|
/**
|
|
2433
2275
|
* @param {ContentPlatformApplicationValidator.EditDataLoaderParam} arg - Arg object
|
|
2434
2276
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -5932,178 +5774,6 @@ class Content {
|
|
|
5932
5774
|
return response;
|
|
5933
5775
|
}
|
|
5934
5776
|
|
|
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
|
-
|
|
6107
5777
|
/**
|
|
6108
5778
|
* @param {ContentPlatformApplicationValidator.GetSupportInformationParam} arg
|
|
6109
5779
|
* - Arg object
|
|
@@ -7999,87 +7669,6 @@ class Content {
|
|
|
7999
7669
|
return response;
|
|
8000
7670
|
}
|
|
8001
7671
|
|
|
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
|
-
|
|
8083
7672
|
/**
|
|
8084
7673
|
* @param {ContentPlatformApplicationValidator.UpdateSupportInformationParam} arg
|
|
8085
7674
|
* - Arg object
|