@gofynd/fdk-client-javascript 0.1.36 → 0.1.37
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/documentation/application/CART.md +291 -285
- package/documentation/application/CATALOG.md +411 -411
- package/documentation/application/LOGISTIC.md +423 -101
- package/documentation/application/ORDER.md +287 -287
- package/documentation/application/POSCART.md +319 -313
- package/documentation/application/README.md +1 -1
- package/documentation/platform/AUDITTRAIL.md +2 -2
- package/documentation/platform/CART.md +488 -488
- package/documentation/platform/CATALOG.md +1656 -1439
- package/documentation/platform/COMPANYPROFILE.md +250 -229
- package/documentation/platform/ORDER.md +1183 -1183
- package/package.json +2 -2
- package/sdk/application/ApplicationAPIClient.js +3 -0
- package/sdk/application/ApplicationClient.d.ts +1 -0
- package/sdk/application/ApplicationClient.js +11 -1
- package/sdk/application/ApplicationConfig.d.ts +1 -0
- package/sdk/application/ApplicationConfig.js +1 -0
- package/sdk/application/ApplicationModels.d.ts +83 -78
- package/sdk/application/ApplicationModels.js +1445 -1354
- package/sdk/application/client/LogisticApplicationClient.d.ts +32 -21
- package/sdk/application/client/LogisticApplicationClient.js +62 -27
- package/sdk/application/models/LogisticValidator.d.ts +2 -1
- package/sdk/application/models/LogisticValidator.js +11 -6
- package/sdk/common/AxiosHelper.js +1 -1
- package/sdk/platform/PlatformApplicationClient.d.ts +5328 -5185
- package/sdk/platform/PlatformApplicationClient.js +2877 -2795
- package/sdk/platform/PlatformApplicationModels.d.ts +5 -5
- package/sdk/platform/PlatformApplicationModels.js +3707 -3571
- package/sdk/platform/PlatformClient.d.ts +2577 -2509
- package/sdk/platform/PlatformClient.js +2770 -2688
- package/sdk/platform/PlatformModels.d.ts +146 -139
- package/sdk/platform/PlatformModels.js +3718 -3582
- package/sdk/platform/client/CatalogPlatformClient.d.ts +21 -12
- package/sdk/platform/client/CatalogPlatformClient.js +48 -17
- package/sdk/platform/models/CatalogValidator.d.ts +2 -1
- package/sdk/platform/models/CatalogValidator.js +11 -5
|
@@ -360,12 +360,12 @@ declare class Catalog {
|
|
|
360
360
|
}): Promise<any>;
|
|
361
361
|
/**
|
|
362
362
|
* @param {Object} arg - Arg object.
|
|
363
|
-
* @param {
|
|
363
|
+
* @param {ProductCreateUpdateSchemaV2} arg.body
|
|
364
364
|
* @summary: Create a product.
|
|
365
365
|
* @description: This API allows to create product.
|
|
366
366
|
*/
|
|
367
367
|
createProduct({ body }?: {
|
|
368
|
-
body:
|
|
368
|
+
body: ProductCreateUpdateSchemaV2;
|
|
369
369
|
}): Promise<any>;
|
|
370
370
|
/**
|
|
371
371
|
* @param {Object} arg - Arg object.
|
|
@@ -428,34 +428,43 @@ declare class Catalog {
|
|
|
428
428
|
/**
|
|
429
429
|
* @param {Object} arg - Arg object.
|
|
430
430
|
* @param {number} arg.itemId - Id of the product to be updated.
|
|
431
|
-
* @
|
|
431
|
+
* @summary: Delete a product.
|
|
432
|
+
* @description: This API allows to delete product.
|
|
433
|
+
*/
|
|
434
|
+
deleteProduct({ itemId }?: {
|
|
435
|
+
itemId: number;
|
|
436
|
+
}): Promise<any>;
|
|
437
|
+
/**
|
|
438
|
+
* @param {Object} arg - Arg object.
|
|
439
|
+
* @param {number} arg.itemId - Id of the product to be updated.
|
|
440
|
+
* @param {ProductCreateUpdateSchemaV2} arg.body
|
|
432
441
|
* @summary: Edit a product.
|
|
433
442
|
* @description: This API allows to edit product.
|
|
434
443
|
*/
|
|
435
444
|
editProduct({ itemId, body }?: {
|
|
436
445
|
itemId: number;
|
|
437
|
-
body:
|
|
446
|
+
body: ProductCreateUpdateSchemaV2;
|
|
438
447
|
}): Promise<any>;
|
|
439
448
|
/**
|
|
440
449
|
* @param {Object} arg - Arg object.
|
|
441
|
-
* @param {string} [arg.itemCode] - Item code of the product.
|
|
442
450
|
* @param {number} arg.itemId - Item Id of the product.
|
|
443
451
|
* @param {number} [arg.brandUid] - Brand Id of the product.
|
|
452
|
+
* @param {string} [arg.itemCode] - Item code of the product.
|
|
444
453
|
* @summary: Get a single product.
|
|
445
454
|
* @description: This API helps to get data associated to a particular product.
|
|
446
455
|
*/
|
|
447
|
-
getProduct({ itemId,
|
|
448
|
-
itemCode?: string;
|
|
456
|
+
getProduct({ itemId, brandUid, itemCode }?: {
|
|
449
457
|
itemId: number;
|
|
450
458
|
brandUid?: number;
|
|
459
|
+
itemCode?: string;
|
|
451
460
|
}): Promise<any>;
|
|
452
461
|
/**
|
|
453
462
|
* @param {Object} arg - Arg object.
|
|
454
463
|
* @param {number} arg.itemId - Id of the product to be updated.
|
|
455
|
-
* @summary:
|
|
456
|
-
* @description: This API allows to
|
|
464
|
+
* @summary: All Sizes for a given Product
|
|
465
|
+
* @description: This API allows to get All Sizes for a given Product.
|
|
457
466
|
*/
|
|
458
|
-
|
|
467
|
+
allSizes({ itemId }?: {
|
|
459
468
|
itemId: number;
|
|
460
469
|
}): Promise<any>;
|
|
461
470
|
/**
|
|
@@ -569,13 +578,13 @@ declare class Catalog {
|
|
|
569
578
|
* @param {Object} arg - Arg object.
|
|
570
579
|
* @param {number} arg.itemId - Item Id of the product associated with size
|
|
571
580
|
* to be deleted.
|
|
572
|
-
* @param {
|
|
581
|
+
* @param {string} arg.size - Size to be deleted.
|
|
573
582
|
* @summary: Delete a Size associated with product.
|
|
574
583
|
* @description: This API allows to delete size associated with product.
|
|
575
584
|
*/
|
|
576
585
|
deleteSize({ itemId, size }?: {
|
|
577
586
|
itemId: number;
|
|
578
|
-
size:
|
|
587
|
+
size: string;
|
|
579
588
|
}): Promise<any>;
|
|
580
589
|
/**
|
|
581
590
|
* @param {Object} arg - Arg object.
|
|
@@ -1124,7 +1124,7 @@ class Catalog {
|
|
|
1124
1124
|
|
|
1125
1125
|
/**
|
|
1126
1126
|
* @param {Object} arg - Arg object.
|
|
1127
|
-
* @param {
|
|
1127
|
+
* @param {ProductCreateUpdateSchemaV2} arg.body
|
|
1128
1128
|
* @summary: Create a product.
|
|
1129
1129
|
* @description: This API allows to create product.
|
|
1130
1130
|
*/
|
|
@@ -1146,7 +1146,7 @@ class Catalog {
|
|
|
1146
1146
|
return PlatformAPIClient.execute(
|
|
1147
1147
|
this.config,
|
|
1148
1148
|
"post",
|
|
1149
|
-
`/service/platform/catalog/
|
|
1149
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/`,
|
|
1150
1150
|
query_params,
|
|
1151
1151
|
body,
|
|
1152
1152
|
xHeaders
|
|
@@ -1216,7 +1216,7 @@ class Catalog {
|
|
|
1216
1216
|
return PlatformAPIClient.execute(
|
|
1217
1217
|
this.config,
|
|
1218
1218
|
"get",
|
|
1219
|
-
`/service/platform/catalog/
|
|
1219
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/`,
|
|
1220
1220
|
query_params,
|
|
1221
1221
|
undefined,
|
|
1222
1222
|
xHeaders
|
|
@@ -1303,7 +1303,38 @@ class Catalog {
|
|
|
1303
1303
|
/**
|
|
1304
1304
|
* @param {Object} arg - Arg object.
|
|
1305
1305
|
* @param {number} arg.itemId - Id of the product to be updated.
|
|
1306
|
-
* @
|
|
1306
|
+
* @summary: Delete a product.
|
|
1307
|
+
* @description: This API allows to delete product.
|
|
1308
|
+
*/
|
|
1309
|
+
deleteProduct({ itemId } = {}) {
|
|
1310
|
+
const { error } = CatalogValidator.deleteProduct().validate(
|
|
1311
|
+
{
|
|
1312
|
+
itemId,
|
|
1313
|
+
},
|
|
1314
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1315
|
+
);
|
|
1316
|
+
if (error) {
|
|
1317
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
const query_params = {};
|
|
1321
|
+
|
|
1322
|
+
const xHeaders = {};
|
|
1323
|
+
|
|
1324
|
+
return PlatformAPIClient.execute(
|
|
1325
|
+
this.config,
|
|
1326
|
+
"delete",
|
|
1327
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/`,
|
|
1328
|
+
query_params,
|
|
1329
|
+
undefined,
|
|
1330
|
+
xHeaders
|
|
1331
|
+
);
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
/**
|
|
1335
|
+
* @param {Object} arg - Arg object.
|
|
1336
|
+
* @param {number} arg.itemId - Id of the product to be updated.
|
|
1337
|
+
* @param {ProductCreateUpdateSchemaV2} arg.body
|
|
1307
1338
|
* @summary: Edit a product.
|
|
1308
1339
|
* @description: This API allows to edit product.
|
|
1309
1340
|
*/
|
|
@@ -1326,7 +1357,7 @@ class Catalog {
|
|
|
1326
1357
|
return PlatformAPIClient.execute(
|
|
1327
1358
|
this.config,
|
|
1328
1359
|
"put",
|
|
1329
|
-
`/service/platform/catalog/
|
|
1360
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/`,
|
|
1330
1361
|
query_params,
|
|
1331
1362
|
body,
|
|
1332
1363
|
xHeaders
|
|
@@ -1335,18 +1366,18 @@ class Catalog {
|
|
|
1335
1366
|
|
|
1336
1367
|
/**
|
|
1337
1368
|
* @param {Object} arg - Arg object.
|
|
1338
|
-
* @param {string} [arg.itemCode] - Item code of the product.
|
|
1339
1369
|
* @param {number} arg.itemId - Item Id of the product.
|
|
1340
1370
|
* @param {number} [arg.brandUid] - Brand Id of the product.
|
|
1371
|
+
* @param {string} [arg.itemCode] - Item code of the product.
|
|
1341
1372
|
* @summary: Get a single product.
|
|
1342
1373
|
* @description: This API helps to get data associated to a particular product.
|
|
1343
1374
|
*/
|
|
1344
|
-
getProduct({ itemId,
|
|
1375
|
+
getProduct({ itemId, brandUid, itemCode } = {}) {
|
|
1345
1376
|
const { error } = CatalogValidator.getProduct().validate(
|
|
1346
1377
|
{
|
|
1347
1378
|
itemId,
|
|
1348
|
-
itemCode,
|
|
1349
1379
|
brandUid,
|
|
1380
|
+
itemCode,
|
|
1350
1381
|
},
|
|
1351
1382
|
{ abortEarly: false, allowUnknown: true }
|
|
1352
1383
|
);
|
|
@@ -1355,15 +1386,15 @@ class Catalog {
|
|
|
1355
1386
|
}
|
|
1356
1387
|
|
|
1357
1388
|
const query_params = {};
|
|
1358
|
-
query_params["item_code"] = itemCode;
|
|
1359
1389
|
query_params["brand_uid"] = brandUid;
|
|
1390
|
+
query_params["item_code"] = itemCode;
|
|
1360
1391
|
|
|
1361
1392
|
const xHeaders = {};
|
|
1362
1393
|
|
|
1363
1394
|
return PlatformAPIClient.execute(
|
|
1364
1395
|
this.config,
|
|
1365
1396
|
"get",
|
|
1366
|
-
`/service/platform/catalog/
|
|
1397
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/`,
|
|
1367
1398
|
query_params,
|
|
1368
1399
|
undefined,
|
|
1369
1400
|
xHeaders
|
|
@@ -1373,11 +1404,11 @@ class Catalog {
|
|
|
1373
1404
|
/**
|
|
1374
1405
|
* @param {Object} arg - Arg object.
|
|
1375
1406
|
* @param {number} arg.itemId - Id of the product to be updated.
|
|
1376
|
-
* @summary:
|
|
1377
|
-
* @description: This API allows to
|
|
1407
|
+
* @summary: All Sizes for a given Product
|
|
1408
|
+
* @description: This API allows to get All Sizes for a given Product.
|
|
1378
1409
|
*/
|
|
1379
|
-
|
|
1380
|
-
const { error } = CatalogValidator.
|
|
1410
|
+
allSizes({ itemId } = {}) {
|
|
1411
|
+
const { error } = CatalogValidator.allSizes().validate(
|
|
1381
1412
|
{
|
|
1382
1413
|
itemId,
|
|
1383
1414
|
},
|
|
@@ -1393,8 +1424,8 @@ class Catalog {
|
|
|
1393
1424
|
|
|
1394
1425
|
return PlatformAPIClient.execute(
|
|
1395
1426
|
this.config,
|
|
1396
|
-
"
|
|
1397
|
-
`/service/platform/catalog/
|
|
1427
|
+
"get",
|
|
1428
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/all_sizes`,
|
|
1398
1429
|
query_params,
|
|
1399
1430
|
undefined,
|
|
1400
1431
|
xHeaders
|
|
@@ -1742,7 +1773,7 @@ class Catalog {
|
|
|
1742
1773
|
* @param {Object} arg - Arg object.
|
|
1743
1774
|
* @param {number} arg.itemId - Item Id of the product associated with size
|
|
1744
1775
|
* to be deleted.
|
|
1745
|
-
* @param {
|
|
1776
|
+
* @param {string} arg.size - Size to be deleted.
|
|
1746
1777
|
* @summary: Delete a Size associated with product.
|
|
1747
1778
|
* @description: This API allows to delete size associated with product.
|
|
1748
1779
|
*/
|
|
@@ -37,9 +37,10 @@ declare class CatalogValidator {
|
|
|
37
37
|
static getProducts(): any;
|
|
38
38
|
static getVariantsOfProducts(): any;
|
|
39
39
|
static getProductAttributes(): any;
|
|
40
|
+
static deleteProduct(): any;
|
|
40
41
|
static editProduct(): any;
|
|
41
42
|
static getProduct(): any;
|
|
42
|
-
static
|
|
43
|
+
static allSizes(): any;
|
|
43
44
|
static getProductValidation(): any;
|
|
44
45
|
static getProductSize(): any;
|
|
45
46
|
static createBulkProductUploadJob(): any;
|
|
@@ -216,7 +216,7 @@ class CatalogValidator {
|
|
|
216
216
|
|
|
217
217
|
static createProduct() {
|
|
218
218
|
return Joi.object({
|
|
219
|
-
body: Validator.
|
|
219
|
+
body: Validator.ProductCreateUpdateSchemaV2().required(),
|
|
220
220
|
}).required();
|
|
221
221
|
}
|
|
222
222
|
|
|
@@ -250,22 +250,28 @@ class CatalogValidator {
|
|
|
250
250
|
}).required();
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
+
static deleteProduct() {
|
|
254
|
+
return Joi.object({
|
|
255
|
+
itemId: Joi.number().required(),
|
|
256
|
+
}).required();
|
|
257
|
+
}
|
|
258
|
+
|
|
253
259
|
static editProduct() {
|
|
254
260
|
return Joi.object({
|
|
255
261
|
itemId: Joi.number().required(),
|
|
256
|
-
body: Validator.
|
|
262
|
+
body: Validator.ProductCreateUpdateSchemaV2().required(),
|
|
257
263
|
}).required();
|
|
258
264
|
}
|
|
259
265
|
|
|
260
266
|
static getProduct() {
|
|
261
267
|
return Joi.object({
|
|
262
|
-
itemCode: Joi.string().allow(""),
|
|
263
268
|
itemId: Joi.number().required(),
|
|
264
269
|
brandUid: Joi.number(),
|
|
270
|
+
itemCode: Joi.string().allow(""),
|
|
265
271
|
}).required();
|
|
266
272
|
}
|
|
267
273
|
|
|
268
|
-
static
|
|
274
|
+
static allSizes() {
|
|
269
275
|
return Joi.object({
|
|
270
276
|
itemId: Joi.number().required(),
|
|
271
277
|
}).required();
|
|
@@ -339,7 +345,7 @@ class CatalogValidator {
|
|
|
339
345
|
static deleteSize() {
|
|
340
346
|
return Joi.object({
|
|
341
347
|
itemId: Joi.number().required(),
|
|
342
|
-
size: Joi.
|
|
348
|
+
size: Joi.string().allow("").required(),
|
|
343
349
|
}).required();
|
|
344
350
|
}
|
|
345
351
|
|