@gofynd/fdk-client-javascript 3.11.0 → 3.13.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/Catalog/CatalogApplicationClient.d.ts +16 -6
- package/sdk/application/Catalog/CatalogApplicationClient.js +71 -12
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +80 -80
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +48 -48
- package/sdk/platform/Cart/CartPlatformModel.d.ts +6 -18
- package/sdk/platform/Cart/CartPlatformModel.js +2 -36
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +14 -48
- package/sdk/platform/Catalog/CatalogPlatformClient.js +85 -338
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +207 -763
- package/sdk/platform/Catalog/CatalogPlatformModel.js +107 -392
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +15 -71
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +14 -60
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +36 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +252 -0
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +34 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +42 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +69 -7
- package/sdk/platform/Order/OrderPlatformClient.js +453 -7
- package/sdk/platform/Order/OrderPlatformModel.d.ts +1938 -493
- package/sdk/platform/Order/OrderPlatformModel.js +1238 -506
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +162 -16
- package/sdk/platform/Order/OrderPlatformValidator.js +111 -9
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +14 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +85 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +17 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +16 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +861 -178
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +534 -84
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +5 -0
- package/sdk/public/Webhook/WebhookPublicModel.js +2 -0
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @typedef PlatformShipmentsRequestSchema
|
|
5
|
+
* @property {string} journey - The journey or route for the shipment.
|
|
6
|
+
* @property {PlatformLocationArticles[]} location_articles - A list of articles
|
|
7
|
+
* associated with the shipment location, grouped by fulfillment details.
|
|
8
|
+
* @property {PlatformShipmentsToServiceability} to_serviceability
|
|
9
|
+
* @property {string} [payment_mode] - The payment mode for the shipment,
|
|
10
|
+
* nullable if not applicable.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @typedef PlatformShipmentsResponseSchema
|
|
15
|
+
* @property {boolean} is_cod_available - Flag indicating whether Cash on
|
|
16
|
+
* Delivery (COD) is available for the shipment.
|
|
17
|
+
* @property {PlatformShipmentsSchema[]} shipments - List of shipments generated
|
|
18
|
+
* for the courier partner.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @typedef ShipmentsErrorResult
|
|
23
|
+
* @property {string} [message] - The error message describing the issue.
|
|
24
|
+
* @property {string} type - A string property defining error type
|
|
25
|
+
* @property {string} value - A string property providing value which is causing error
|
|
26
|
+
*/
|
|
27
|
+
|
|
3
28
|
/**
|
|
4
29
|
* @typedef FulfillmentOption
|
|
5
30
|
* @property {string} [name] - Name of the fulfillment option.
|
|
@@ -1273,6 +1298,230 @@ const Joi = require("joi");
|
|
|
1273
1298
|
* @property {string[]} [sort] - An array of strings specifying sorting preferences.
|
|
1274
1299
|
*/
|
|
1275
1300
|
|
|
1301
|
+
/**
|
|
1302
|
+
* @typedef PlatformLocationArticles
|
|
1303
|
+
* @property {PlatformLocationArticle[]} articles - List of articles for this
|
|
1304
|
+
* fulfillment location.
|
|
1305
|
+
* @property {number} [fulfillment_location_id] - Unique identifier for the
|
|
1306
|
+
* fulfillment location.
|
|
1307
|
+
* @property {string[]} [fulfillment_tags] - Tags associated with the
|
|
1308
|
+
* fulfillment location.
|
|
1309
|
+
* @property {string} fulfillment_type - Type of fulfillment (e.g., store, warehouse).
|
|
1310
|
+
*/
|
|
1311
|
+
|
|
1312
|
+
/**
|
|
1313
|
+
* @typedef PlatformLocationArticle
|
|
1314
|
+
* @property {number} price - The price of the article.
|
|
1315
|
+
* @property {number} item_id - Unique identifier for the item.
|
|
1316
|
+
* @property {string} size - The size of the article.
|
|
1317
|
+
* @property {number} quantity - The quantity of the article.
|
|
1318
|
+
* @property {ParentItemIdentifiers} [parent_item_identifiers]
|
|
1319
|
+
*/
|
|
1320
|
+
|
|
1321
|
+
/**
|
|
1322
|
+
* @typedef ParentItemIdentifiers
|
|
1323
|
+
* @property {string} identifier - Identifier of the parent item.
|
|
1324
|
+
* @property {string} parent_item_id - Parent item id.
|
|
1325
|
+
* @property {string} parent_item_size - Parent item size.
|
|
1326
|
+
*/
|
|
1327
|
+
|
|
1328
|
+
/**
|
|
1329
|
+
* @typedef PlatformShipmentsToServiceability
|
|
1330
|
+
* @property {string} [pincode] - The pincode of the serviceability location.
|
|
1331
|
+
* @property {string} [sector] - The sector of the serviceability location.
|
|
1332
|
+
* @property {string} [state] - The state of the serviceability location.
|
|
1333
|
+
* @property {string} [country] - The country of the serviceability location.
|
|
1334
|
+
* @property {string} [city] - The city of the serviceability location.
|
|
1335
|
+
* @property {string} [country_iso_code] - The ISO code of the country.
|
|
1336
|
+
*/
|
|
1337
|
+
|
|
1338
|
+
/**
|
|
1339
|
+
* @typedef PlatformShipmentsSchema
|
|
1340
|
+
* @property {string[]} [tags] - Additional tags associated with the shipment.
|
|
1341
|
+
* @property {Packaging} [packaging]
|
|
1342
|
+
* @property {FulfillmentOptionItem} [fulfillment_option]
|
|
1343
|
+
* @property {number} [weight] - The total weight of the shipment.
|
|
1344
|
+
* @property {string} [shipment_type] - The type of shipment.
|
|
1345
|
+
* @property {boolean} [is_auto_assign] - Indicates whether courier partners
|
|
1346
|
+
* should be automatically assigned to this shipment based on the store's
|
|
1347
|
+
* auto-assignment configuration.
|
|
1348
|
+
* @property {number} [volumetric_weight] - Volumetric weight of the shipment.
|
|
1349
|
+
* @property {string[]} [fulfillment_tags] - Tags associated with the fulfillment.
|
|
1350
|
+
* @property {ShipmentsPromise} [promise]
|
|
1351
|
+
* @property {boolean} [is_ewaybill_enabled] - Flag indicating whether an
|
|
1352
|
+
* ewaybill is enabled for the shipment.
|
|
1353
|
+
* @property {boolean} [is_mto] - Flag indicating whether the shipment is MTO
|
|
1354
|
+
* (Make to Order).
|
|
1355
|
+
* @property {ShipmentsArticle[]} [articles] - List of articles in the shipment.
|
|
1356
|
+
* @property {string} [fulfillment_type] - Type of fulfillment (e.g., high_street).
|
|
1357
|
+
* @property {boolean} [mps] - Flag indicating whether MPS (Multi-Part Shipment)
|
|
1358
|
+
* is enabled for the shipment.
|
|
1359
|
+
* @property {number} [fulfillment_location_id] - Unique identifier for the
|
|
1360
|
+
* fulfillment location.
|
|
1361
|
+
* @property {ShipmentsCourierPartner[]} [courier_partners] - List of courier
|
|
1362
|
+
* partners handling the shipment.
|
|
1363
|
+
*/
|
|
1364
|
+
|
|
1365
|
+
/**
|
|
1366
|
+
* @typedef Packaging
|
|
1367
|
+
* @property {string} [name] - The name of the packaging.
|
|
1368
|
+
* @property {string} [id] - A string serving as the unique identifier.
|
|
1369
|
+
* @property {Dimension} [dimension]
|
|
1370
|
+
*/
|
|
1371
|
+
|
|
1372
|
+
/**
|
|
1373
|
+
* @typedef Dimension
|
|
1374
|
+
* @property {number} [length] - Length of the packaging.
|
|
1375
|
+
* @property {number} [width] - Width of the packaging.
|
|
1376
|
+
* @property {number} [height] - Height of the packaging.
|
|
1377
|
+
*/
|
|
1378
|
+
|
|
1379
|
+
/**
|
|
1380
|
+
* @typedef FulfillmentOptionItem
|
|
1381
|
+
* @property {string} [slug] - Unique identifier for the delivery type.
|
|
1382
|
+
* @property {string} [description] - Description of the delivery service.
|
|
1383
|
+
* @property {boolean} [is_default] - Indicates if this is the default delivery option.
|
|
1384
|
+
* @property {string} [id] - Unique ID of the delivery service.
|
|
1385
|
+
* @property {string} [type] - Type of fulfillment option.
|
|
1386
|
+
* @property {string} [name] - Name of the delivery service.
|
|
1387
|
+
*/
|
|
1388
|
+
|
|
1389
|
+
/**
|
|
1390
|
+
* @typedef ShipmentsPromise
|
|
1391
|
+
* @property {string} [min] - The minimum shipment promise time.
|
|
1392
|
+
* @property {string} [max] - The maximum shipment promise time.
|
|
1393
|
+
* @property {CustomerPromise} [customer_promise]
|
|
1394
|
+
* @property {ShipmentPromiseMeta} [meta]
|
|
1395
|
+
*/
|
|
1396
|
+
|
|
1397
|
+
/**
|
|
1398
|
+
* @typedef CustomerPromise
|
|
1399
|
+
* @property {string} [min] - The earliest possible date and time when the
|
|
1400
|
+
* shipment is expected to be delivered. This timestamp is in ISO 8601 format
|
|
1401
|
+
* @property {string} [max] - The latest possible date and time when the
|
|
1402
|
+
* shipment is expected to be delivered. This timestamp is in ISO 8601 format
|
|
1403
|
+
*/
|
|
1404
|
+
|
|
1405
|
+
/**
|
|
1406
|
+
* @typedef ShipmentPromiseMeta
|
|
1407
|
+
* @property {SellerPromise} [seller_promise]
|
|
1408
|
+
* @property {CourierPartnerPromise} [courier_partner_promise]
|
|
1409
|
+
* @property {CustomerInitialPromise} [customer_initial_promise]
|
|
1410
|
+
*/
|
|
1411
|
+
|
|
1412
|
+
/**
|
|
1413
|
+
* @typedef SellerPromise
|
|
1414
|
+
* @property {string} [min] - Minimum seller delivery promise time.
|
|
1415
|
+
* @property {string} [max] - Maximum seller delivery promise time.
|
|
1416
|
+
*/
|
|
1417
|
+
|
|
1418
|
+
/**
|
|
1419
|
+
* @typedef CourierPartnerPromise
|
|
1420
|
+
* @property {string} min - Minimum courier partner delivery promise time.
|
|
1421
|
+
* @property {string} max - Maximum courier partner delivery promise time.
|
|
1422
|
+
* @property {CourierPartnerAttributes} [attributes]
|
|
1423
|
+
*/
|
|
1424
|
+
|
|
1425
|
+
/**
|
|
1426
|
+
* @typedef CourierPartnerAttributes
|
|
1427
|
+
* @property {CourierPartnerTAT} [tat]
|
|
1428
|
+
*/
|
|
1429
|
+
|
|
1430
|
+
/**
|
|
1431
|
+
* @typedef CourierPartnerTAT
|
|
1432
|
+
* @property {number} [min] - Minimum turnaround time.
|
|
1433
|
+
* @property {number} [max] - Maximum turnaround time.
|
|
1434
|
+
*/
|
|
1435
|
+
|
|
1436
|
+
/**
|
|
1437
|
+
* @typedef CustomerInitialPromise
|
|
1438
|
+
* @property {string} [min] - Minimum initial customer delivery promise time.
|
|
1439
|
+
* @property {string} [max] - Maximum initial customer delivery promise time.
|
|
1440
|
+
*/
|
|
1441
|
+
|
|
1442
|
+
/**
|
|
1443
|
+
* @typedef ShipmentsArticle
|
|
1444
|
+
* @property {string} [id] - A string serving as the unique identifier.
|
|
1445
|
+
* @property {number} [quantity] - The quantity of the shipment article.
|
|
1446
|
+
* @property {number} [item_id] - The Item Id of the article.
|
|
1447
|
+
* @property {string} [size] - The size of the article.
|
|
1448
|
+
* @property {number} [price] - Final Price of the article after discounts
|
|
1449
|
+
* @property {number} [price_marked] - Marked price before discounts (nullable).
|
|
1450
|
+
* @property {number} [department_id] - Department of the item
|
|
1451
|
+
* @property {number} [weight] - Weight of the article.
|
|
1452
|
+
* @property {Object} [attributes] - Additional attributes for the article.
|
|
1453
|
+
* @property {number} [category_id] - Category Id of the article.
|
|
1454
|
+
* @property {number} [brand_id] - Brand Id of the article.
|
|
1455
|
+
* @property {ShipmentDimension} [dimension]
|
|
1456
|
+
* @property {string[]} [tags] - List of tags associated with the article.
|
|
1457
|
+
* @property {number} [manufacturing_time] - Time required for manufacturing.
|
|
1458
|
+
* @property {string} [manufacturing_time_unit] - Unit for manufacturing time.
|
|
1459
|
+
* @property {Object} [set] - Additional properties related to sets.
|
|
1460
|
+
* @property {boolean} [is_set] - Indicates if the article is part of a set.
|
|
1461
|
+
* @property {Object} [_custom_json] - Custom JSON metadata.
|
|
1462
|
+
* @property {string} [return_reason] - Reason for returning the article (nullable).
|
|
1463
|
+
* @property {string} [group_id] - Group Id for the article.
|
|
1464
|
+
* @property {ShipmentsMeta} [meta]
|
|
1465
|
+
* @property {boolean} [is_mto] - Indicates whether the article is made-to-order (MTO)
|
|
1466
|
+
* @property {string} [sla] - Service level agreement (SLA) for the article,
|
|
1467
|
+
* represented as a date-time
|
|
1468
|
+
*/
|
|
1469
|
+
|
|
1470
|
+
/**
|
|
1471
|
+
* @typedef ShipmentDimension
|
|
1472
|
+
* @property {number} height - Height of the shipment in centimeters.
|
|
1473
|
+
* @property {number} length - Length of the shipment in centimeters.
|
|
1474
|
+
* @property {number} width - Width of the shipment in centimeters.
|
|
1475
|
+
* @property {boolean} [is_default] - If the dimensions are default.
|
|
1476
|
+
* @property {string} [unit] - Measurement unit for dimensions.
|
|
1477
|
+
*/
|
|
1478
|
+
|
|
1479
|
+
/**
|
|
1480
|
+
* @typedef ShipmentsMeta
|
|
1481
|
+
* @property {boolean} [is_set] - Whether the article is part of a set
|
|
1482
|
+
* @property {Object} [set] - Set details for the article, if applicable
|
|
1483
|
+
* @property {boolean} [is_set_article] - Whether the article is a set item
|
|
1484
|
+
* @property {number} [set_quantity] - Quantity of the set item
|
|
1485
|
+
* @property {string} [split_article_id] - Id of the split article, if applicable
|
|
1486
|
+
* @property {string[]} [promo_ids] - List of promotion Ids applicable to the article
|
|
1487
|
+
*/
|
|
1488
|
+
|
|
1489
|
+
/**
|
|
1490
|
+
* @typedef ShipmentsCourierPartner
|
|
1491
|
+
* @property {string} [extension_id] - A string that uniquely identifies the
|
|
1492
|
+
* courier partner extension.
|
|
1493
|
+
* @property {string} [scheme_id] - Unique identifier for the scheme, used to
|
|
1494
|
+
* fetch or modify scheme details.
|
|
1495
|
+
* @property {AreaCode} [area_code]
|
|
1496
|
+
* @property {TAT} [tat]
|
|
1497
|
+
* @property {string} [display_name] - The display name of the courier partner.
|
|
1498
|
+
* @property {boolean} [is_qc_enabled] - A boolean indicating quality control by
|
|
1499
|
+
* the courier partner.
|
|
1500
|
+
* @property {boolean} [is_self_ship] - Indicates whether the courier account
|
|
1501
|
+
* supports self-shipping (true if it does, false otherwise).
|
|
1502
|
+
* @property {boolean} [is_own_account] - Indicates whether the courier account
|
|
1503
|
+
* is an own account (true if it is, false otherwise).
|
|
1504
|
+
* @property {number} [ndr_attempts] - The number of non-delivery report (NDR) attempts.
|
|
1505
|
+
* @property {string} [forward_pickup_cutoff] - Cutoff time for forward pickup (nullable).
|
|
1506
|
+
* @property {string} [reverse_pickup_cutoff] - Cutoff time for reverse pickup (nullable).
|
|
1507
|
+
* @property {number} [qc_shipment_item_quantity] - Quantity of items under
|
|
1508
|
+
* quality control (nullable).
|
|
1509
|
+
* @property {number} [non_qc_shipment_item_quantity] - Quantity of items not
|
|
1510
|
+
* under quality control (nullable).
|
|
1511
|
+
*/
|
|
1512
|
+
|
|
1513
|
+
/**
|
|
1514
|
+
* @typedef AreaCode
|
|
1515
|
+
* @property {string} [source] - The starting area code.
|
|
1516
|
+
* @property {string} [destination] - The ending area code.
|
|
1517
|
+
*/
|
|
1518
|
+
|
|
1519
|
+
/**
|
|
1520
|
+
* @typedef TAT
|
|
1521
|
+
* @property {number} [min] - The minimum tat in integer.
|
|
1522
|
+
* @property {number} [max] - The maximum tat in integer.
|
|
1523
|
+
*/
|
|
1524
|
+
|
|
1276
1525
|
/**
|
|
1277
1526
|
* @typedef BusinessUnit
|
|
1278
1527
|
* @property {string} [name] - Name of the business unit.
|
|
@@ -1309,16 +1558,6 @@ const Joi = require("joi");
|
|
|
1309
1558
|
* @property {string} [cp_ext_id] - Unique identifier for the courier partner.
|
|
1310
1559
|
*/
|
|
1311
1560
|
|
|
1312
|
-
/**
|
|
1313
|
-
* @typedef FulfillmentOptionItem
|
|
1314
|
-
* @property {string} [slug] - Unique identifier for the delivery type.
|
|
1315
|
-
* @property {string} [description] - Description of the delivery service.
|
|
1316
|
-
* @property {boolean} [is_default] - Indicates if this is the default delivery option.
|
|
1317
|
-
* @property {string} [id] - Unique ID of the delivery service.
|
|
1318
|
-
* @property {string} [type] - Type of fulfillment option.
|
|
1319
|
-
* @property {string} [name] - Name of the delivery service.
|
|
1320
|
-
*/
|
|
1321
|
-
|
|
1322
1561
|
/**
|
|
1323
1562
|
* @typedef FulfillmentOptionProduct
|
|
1324
1563
|
* @property {number} [uid] - Unique identifier for the product.
|
|
@@ -1846,15 +2085,6 @@ const Joi = require("joi");
|
|
|
1846
2085
|
* @property {ShipmentsArticles[]} [articles] - List of articles in the shipment.
|
|
1847
2086
|
*/
|
|
1848
2087
|
|
|
1849
|
-
/**
|
|
1850
|
-
* @typedef ShipmentDimension
|
|
1851
|
-
* @property {number} height - Height of the shipment in centimeters.
|
|
1852
|
-
* @property {number} length - Length of the shipment in centimeters.
|
|
1853
|
-
* @property {number} width - Width of the shipment in centimeters.
|
|
1854
|
-
* @property {boolean} [is_default] - If the dimensions are default.
|
|
1855
|
-
* @property {string} [unit] - Measurement unit for dimensions.
|
|
1856
|
-
*/
|
|
1857
|
-
|
|
1858
2088
|
/**
|
|
1859
2089
|
* @typedef ShipmentsArticles
|
|
1860
2090
|
* @property {string} [id] - A string serving as the unique identifier.
|
|
@@ -1950,24 +2180,6 @@ const Joi = require("joi");
|
|
|
1950
2180
|
* @property {CourierPartnerPromise} [delivery_promise]
|
|
1951
2181
|
*/
|
|
1952
2182
|
|
|
1953
|
-
/**
|
|
1954
|
-
* @typedef CourierPartnerPromise
|
|
1955
|
-
* @property {string} min - Minimum courier partner delivery promise time.
|
|
1956
|
-
* @property {string} max - Maximum courier partner delivery promise time.
|
|
1957
|
-
* @property {CourierPartnerAttributes} [attributes]
|
|
1958
|
-
*/
|
|
1959
|
-
|
|
1960
|
-
/**
|
|
1961
|
-
* @typedef CourierPartnerAttributes
|
|
1962
|
-
* @property {CourierPartnerTAT} [tat]
|
|
1963
|
-
*/
|
|
1964
|
-
|
|
1965
|
-
/**
|
|
1966
|
-
* @typedef CourierPartnerTAT
|
|
1967
|
-
* @property {number} [min] - Minimum turnaround time.
|
|
1968
|
-
* @property {number} [max] - Maximum turnaround time.
|
|
1969
|
-
*/
|
|
1970
|
-
|
|
1971
2183
|
/**
|
|
1972
2184
|
* @typedef ShipmentCourierPartners
|
|
1973
2185
|
* @property {string} [id] - A string serving as the unique identifier.
|
|
@@ -2527,6 +2739,37 @@ const Joi = require("joi");
|
|
|
2527
2739
|
*/
|
|
2528
2740
|
|
|
2529
2741
|
class ServiceabilityPlatformModel {
|
|
2742
|
+
/** @returns {PlatformShipmentsRequestSchema} */
|
|
2743
|
+
static PlatformShipmentsRequestSchema() {
|
|
2744
|
+
return Joi.object({
|
|
2745
|
+
journey: Joi.string().allow("").required(),
|
|
2746
|
+
location_articles: Joi.array()
|
|
2747
|
+
.items(ServiceabilityPlatformModel.PlatformLocationArticles())
|
|
2748
|
+
.required(),
|
|
2749
|
+
to_serviceability: ServiceabilityPlatformModel.PlatformShipmentsToServiceability().required(),
|
|
2750
|
+
payment_mode: Joi.string().allow("").allow(null),
|
|
2751
|
+
});
|
|
2752
|
+
}
|
|
2753
|
+
|
|
2754
|
+
/** @returns {PlatformShipmentsResponseSchema} */
|
|
2755
|
+
static PlatformShipmentsResponseSchema() {
|
|
2756
|
+
return Joi.object({
|
|
2757
|
+
is_cod_available: Joi.boolean().required(),
|
|
2758
|
+
shipments: Joi.array()
|
|
2759
|
+
.items(ServiceabilityPlatformModel.PlatformShipmentsSchema())
|
|
2760
|
+
.required(),
|
|
2761
|
+
});
|
|
2762
|
+
}
|
|
2763
|
+
|
|
2764
|
+
/** @returns {ShipmentsErrorResult} */
|
|
2765
|
+
static ShipmentsErrorResult() {
|
|
2766
|
+
return Joi.object({
|
|
2767
|
+
message: Joi.string().allow("").allow(null),
|
|
2768
|
+
type: Joi.string().allow("").required(),
|
|
2769
|
+
value: Joi.string().allow("").required(),
|
|
2770
|
+
});
|
|
2771
|
+
}
|
|
2772
|
+
|
|
2530
2773
|
/** @returns {FulfillmentOption} */
|
|
2531
2774
|
static FulfillmentOption() {
|
|
2532
2775
|
return Joi.object({
|
|
@@ -3888,6 +4131,260 @@ class ServiceabilityPlatformModel {
|
|
|
3888
4131
|
});
|
|
3889
4132
|
}
|
|
3890
4133
|
|
|
4134
|
+
/** @returns {PlatformLocationArticles} */
|
|
4135
|
+
static PlatformLocationArticles() {
|
|
4136
|
+
return Joi.object({
|
|
4137
|
+
articles: Joi.array()
|
|
4138
|
+
.items(ServiceabilityPlatformModel.PlatformLocationArticle())
|
|
4139
|
+
.required(),
|
|
4140
|
+
fulfillment_location_id: Joi.number(),
|
|
4141
|
+
fulfillment_tags: Joi.array().items(Joi.string().allow("")),
|
|
4142
|
+
fulfillment_type: Joi.string().allow("").required(),
|
|
4143
|
+
});
|
|
4144
|
+
}
|
|
4145
|
+
|
|
4146
|
+
/** @returns {PlatformLocationArticle} */
|
|
4147
|
+
static PlatformLocationArticle() {
|
|
4148
|
+
return Joi.object({
|
|
4149
|
+
price: Joi.number().required(),
|
|
4150
|
+
item_id: Joi.number().required(),
|
|
4151
|
+
size: Joi.string().allow("").required(),
|
|
4152
|
+
quantity: Joi.number().required(),
|
|
4153
|
+
parent_item_identifiers: ServiceabilityPlatformModel.ParentItemIdentifiers(),
|
|
4154
|
+
});
|
|
4155
|
+
}
|
|
4156
|
+
|
|
4157
|
+
/** @returns {ParentItemIdentifiers} */
|
|
4158
|
+
static ParentItemIdentifiers() {
|
|
4159
|
+
return Joi.object({
|
|
4160
|
+
identifier: Joi.string().allow("").required(),
|
|
4161
|
+
parent_item_id: Joi.string().allow("").required(),
|
|
4162
|
+
parent_item_size: Joi.string().allow("").required(),
|
|
4163
|
+
});
|
|
4164
|
+
}
|
|
4165
|
+
|
|
4166
|
+
/** @returns {PlatformShipmentsToServiceability} */
|
|
4167
|
+
static PlatformShipmentsToServiceability() {
|
|
4168
|
+
return Joi.object({
|
|
4169
|
+
pincode: Joi.string().allow(""),
|
|
4170
|
+
sector: Joi.string().allow(""),
|
|
4171
|
+
state: Joi.string().allow(""),
|
|
4172
|
+
country: Joi.string().allow(""),
|
|
4173
|
+
city: Joi.string().allow(""),
|
|
4174
|
+
country_iso_code: Joi.string().allow(""),
|
|
4175
|
+
});
|
|
4176
|
+
}
|
|
4177
|
+
|
|
4178
|
+
/** @returns {PlatformShipmentsSchema} */
|
|
4179
|
+
static PlatformShipmentsSchema() {
|
|
4180
|
+
return Joi.object({
|
|
4181
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
4182
|
+
packaging: ServiceabilityPlatformModel.Packaging(),
|
|
4183
|
+
fulfillment_option: ServiceabilityPlatformModel.FulfillmentOptionItem(),
|
|
4184
|
+
weight: Joi.number(),
|
|
4185
|
+
shipment_type: Joi.string().allow(""),
|
|
4186
|
+
is_auto_assign: Joi.boolean(),
|
|
4187
|
+
volumetric_weight: Joi.number(),
|
|
4188
|
+
fulfillment_tags: Joi.array().items(Joi.string().allow("")),
|
|
4189
|
+
promise: ServiceabilityPlatformModel.ShipmentsPromise(),
|
|
4190
|
+
is_ewaybill_enabled: Joi.boolean(),
|
|
4191
|
+
is_mto: Joi.boolean(),
|
|
4192
|
+
articles: Joi.array().items(
|
|
4193
|
+
ServiceabilityPlatformModel.ShipmentsArticle()
|
|
4194
|
+
),
|
|
4195
|
+
fulfillment_type: Joi.string().allow(""),
|
|
4196
|
+
mps: Joi.boolean(),
|
|
4197
|
+
fulfillment_location_id: Joi.number(),
|
|
4198
|
+
courier_partners: Joi.array().items(
|
|
4199
|
+
ServiceabilityPlatformModel.ShipmentsCourierPartner()
|
|
4200
|
+
),
|
|
4201
|
+
});
|
|
4202
|
+
}
|
|
4203
|
+
|
|
4204
|
+
/** @returns {Packaging} */
|
|
4205
|
+
static Packaging() {
|
|
4206
|
+
return Joi.object({
|
|
4207
|
+
name: Joi.string().allow(""),
|
|
4208
|
+
id: Joi.string().allow(""),
|
|
4209
|
+
dimension: ServiceabilityPlatformModel.Dimension(),
|
|
4210
|
+
});
|
|
4211
|
+
}
|
|
4212
|
+
|
|
4213
|
+
/** @returns {Dimension} */
|
|
4214
|
+
static Dimension() {
|
|
4215
|
+
return Joi.object({
|
|
4216
|
+
length: Joi.number(),
|
|
4217
|
+
width: Joi.number(),
|
|
4218
|
+
height: Joi.number(),
|
|
4219
|
+
});
|
|
4220
|
+
}
|
|
4221
|
+
|
|
4222
|
+
/** @returns {FulfillmentOptionItem} */
|
|
4223
|
+
static FulfillmentOptionItem() {
|
|
4224
|
+
return Joi.object({
|
|
4225
|
+
slug: Joi.string().allow(""),
|
|
4226
|
+
description: Joi.string().allow(""),
|
|
4227
|
+
is_default: Joi.boolean(),
|
|
4228
|
+
id: Joi.string().allow(""),
|
|
4229
|
+
type: Joi.string().allow(""),
|
|
4230
|
+
name: Joi.string().allow(""),
|
|
4231
|
+
});
|
|
4232
|
+
}
|
|
4233
|
+
|
|
4234
|
+
/** @returns {ShipmentsPromise} */
|
|
4235
|
+
static ShipmentsPromise() {
|
|
4236
|
+
return Joi.object({
|
|
4237
|
+
min: Joi.string().allow(""),
|
|
4238
|
+
max: Joi.string().allow(""),
|
|
4239
|
+
customer_promise: ServiceabilityPlatformModel.CustomerPromise(),
|
|
4240
|
+
meta: ServiceabilityPlatformModel.ShipmentPromiseMeta(),
|
|
4241
|
+
});
|
|
4242
|
+
}
|
|
4243
|
+
|
|
4244
|
+
/** @returns {CustomerPromise} */
|
|
4245
|
+
static CustomerPromise() {
|
|
4246
|
+
return Joi.object({
|
|
4247
|
+
min: Joi.string().allow(""),
|
|
4248
|
+
max: Joi.string().allow(""),
|
|
4249
|
+
});
|
|
4250
|
+
}
|
|
4251
|
+
|
|
4252
|
+
/** @returns {ShipmentPromiseMeta} */
|
|
4253
|
+
static ShipmentPromiseMeta() {
|
|
4254
|
+
return Joi.object({
|
|
4255
|
+
seller_promise: ServiceabilityPlatformModel.SellerPromise(),
|
|
4256
|
+
courier_partner_promise: ServiceabilityPlatformModel.CourierPartnerPromise(),
|
|
4257
|
+
customer_initial_promise: ServiceabilityPlatformModel.CustomerInitialPromise(),
|
|
4258
|
+
});
|
|
4259
|
+
}
|
|
4260
|
+
|
|
4261
|
+
/** @returns {SellerPromise} */
|
|
4262
|
+
static SellerPromise() {
|
|
4263
|
+
return Joi.object({
|
|
4264
|
+
min: Joi.string().allow(""),
|
|
4265
|
+
max: Joi.string().allow(""),
|
|
4266
|
+
});
|
|
4267
|
+
}
|
|
4268
|
+
|
|
4269
|
+
/** @returns {CourierPartnerPromise} */
|
|
4270
|
+
static CourierPartnerPromise() {
|
|
4271
|
+
return Joi.object({
|
|
4272
|
+
min: Joi.string().allow("").required(),
|
|
4273
|
+
max: Joi.string().allow("").required(),
|
|
4274
|
+
attributes: ServiceabilityPlatformModel.CourierPartnerAttributes(),
|
|
4275
|
+
});
|
|
4276
|
+
}
|
|
4277
|
+
|
|
4278
|
+
/** @returns {CourierPartnerAttributes} */
|
|
4279
|
+
static CourierPartnerAttributes() {
|
|
4280
|
+
return Joi.object({
|
|
4281
|
+
tat: ServiceabilityPlatformModel.CourierPartnerTAT(),
|
|
4282
|
+
});
|
|
4283
|
+
}
|
|
4284
|
+
|
|
4285
|
+
/** @returns {CourierPartnerTAT} */
|
|
4286
|
+
static CourierPartnerTAT() {
|
|
4287
|
+
return Joi.object({
|
|
4288
|
+
min: Joi.number(),
|
|
4289
|
+
max: Joi.number(),
|
|
4290
|
+
});
|
|
4291
|
+
}
|
|
4292
|
+
|
|
4293
|
+
/** @returns {CustomerInitialPromise} */
|
|
4294
|
+
static CustomerInitialPromise() {
|
|
4295
|
+
return Joi.object({
|
|
4296
|
+
min: Joi.string().allow(""),
|
|
4297
|
+
max: Joi.string().allow(""),
|
|
4298
|
+
});
|
|
4299
|
+
}
|
|
4300
|
+
|
|
4301
|
+
/** @returns {ShipmentsArticle} */
|
|
4302
|
+
static ShipmentsArticle() {
|
|
4303
|
+
return Joi.object({
|
|
4304
|
+
id: Joi.string().allow(""),
|
|
4305
|
+
quantity: Joi.number(),
|
|
4306
|
+
item_id: Joi.number(),
|
|
4307
|
+
size: Joi.string().allow(""),
|
|
4308
|
+
price: Joi.number(),
|
|
4309
|
+
price_marked: Joi.number().allow(null),
|
|
4310
|
+
department_id: Joi.number(),
|
|
4311
|
+
weight: Joi.number(),
|
|
4312
|
+
attributes: Joi.object().pattern(/\S/, Joi.any()),
|
|
4313
|
+
category_id: Joi.number(),
|
|
4314
|
+
brand_id: Joi.number(),
|
|
4315
|
+
dimension: ServiceabilityPlatformModel.ShipmentDimension(),
|
|
4316
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
4317
|
+
manufacturing_time: Joi.number(),
|
|
4318
|
+
manufacturing_time_unit: Joi.string().allow(""),
|
|
4319
|
+
set: Joi.object().pattern(/\S/, Joi.any()),
|
|
4320
|
+
is_set: Joi.boolean(),
|
|
4321
|
+
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
4322
|
+
return_reason: Joi.string().allow("").allow(null),
|
|
4323
|
+
group_id: Joi.string().allow(""),
|
|
4324
|
+
meta: ServiceabilityPlatformModel.ShipmentsMeta(),
|
|
4325
|
+
is_mto: Joi.boolean(),
|
|
4326
|
+
sla: Joi.string().allow(""),
|
|
4327
|
+
});
|
|
4328
|
+
}
|
|
4329
|
+
|
|
4330
|
+
/** @returns {ShipmentDimension} */
|
|
4331
|
+
static ShipmentDimension() {
|
|
4332
|
+
return Joi.object({
|
|
4333
|
+
height: Joi.number().required(),
|
|
4334
|
+
length: Joi.number().required(),
|
|
4335
|
+
width: Joi.number().required(),
|
|
4336
|
+
is_default: Joi.boolean(),
|
|
4337
|
+
unit: Joi.string().allow(""),
|
|
4338
|
+
});
|
|
4339
|
+
}
|
|
4340
|
+
|
|
4341
|
+
/** @returns {ShipmentsMeta} */
|
|
4342
|
+
static ShipmentsMeta() {
|
|
4343
|
+
return Joi.object({
|
|
4344
|
+
is_set: Joi.boolean(),
|
|
4345
|
+
set: Joi.object().pattern(/\S/, Joi.any()),
|
|
4346
|
+
is_set_article: Joi.boolean(),
|
|
4347
|
+
set_quantity: Joi.number(),
|
|
4348
|
+
split_article_id: Joi.string().allow(""),
|
|
4349
|
+
promo_ids: Joi.array().items(Joi.string().allow("")),
|
|
4350
|
+
});
|
|
4351
|
+
}
|
|
4352
|
+
|
|
4353
|
+
/** @returns {ShipmentsCourierPartner} */
|
|
4354
|
+
static ShipmentsCourierPartner() {
|
|
4355
|
+
return Joi.object({
|
|
4356
|
+
extension_id: Joi.string().allow(""),
|
|
4357
|
+
scheme_id: Joi.string().allow(""),
|
|
4358
|
+
area_code: ServiceabilityPlatformModel.AreaCode(),
|
|
4359
|
+
tat: ServiceabilityPlatformModel.TAT(),
|
|
4360
|
+
display_name: Joi.string().allow(""),
|
|
4361
|
+
is_qc_enabled: Joi.boolean(),
|
|
4362
|
+
is_self_ship: Joi.boolean(),
|
|
4363
|
+
is_own_account: Joi.boolean(),
|
|
4364
|
+
ndr_attempts: Joi.number(),
|
|
4365
|
+
forward_pickup_cutoff: Joi.string().allow("").allow(null),
|
|
4366
|
+
reverse_pickup_cutoff: Joi.string().allow("").allow(null),
|
|
4367
|
+
qc_shipment_item_quantity: Joi.number().allow(null),
|
|
4368
|
+
non_qc_shipment_item_quantity: Joi.number().allow(null),
|
|
4369
|
+
});
|
|
4370
|
+
}
|
|
4371
|
+
|
|
4372
|
+
/** @returns {AreaCode} */
|
|
4373
|
+
static AreaCode() {
|
|
4374
|
+
return Joi.object({
|
|
4375
|
+
source: Joi.string().allow(""),
|
|
4376
|
+
destination: Joi.string().allow(""),
|
|
4377
|
+
});
|
|
4378
|
+
}
|
|
4379
|
+
|
|
4380
|
+
/** @returns {TAT} */
|
|
4381
|
+
static TAT() {
|
|
4382
|
+
return Joi.object({
|
|
4383
|
+
min: Joi.number(),
|
|
4384
|
+
max: Joi.number(),
|
|
4385
|
+
});
|
|
4386
|
+
}
|
|
4387
|
+
|
|
3891
4388
|
/** @returns {BusinessUnit} */
|
|
3892
4389
|
static BusinessUnit() {
|
|
3893
4390
|
return Joi.object({
|
|
@@ -3930,18 +4427,6 @@ class ServiceabilityPlatformModel {
|
|
|
3930
4427
|
});
|
|
3931
4428
|
}
|
|
3932
4429
|
|
|
3933
|
-
/** @returns {FulfillmentOptionItem} */
|
|
3934
|
-
static FulfillmentOptionItem() {
|
|
3935
|
-
return Joi.object({
|
|
3936
|
-
slug: Joi.string().allow(""),
|
|
3937
|
-
description: Joi.string().allow(""),
|
|
3938
|
-
is_default: Joi.boolean(),
|
|
3939
|
-
id: Joi.string().allow(""),
|
|
3940
|
-
type: Joi.string().allow(""),
|
|
3941
|
-
name: Joi.string().allow(""),
|
|
3942
|
-
});
|
|
3943
|
-
}
|
|
3944
|
-
|
|
3945
4430
|
/** @returns {FulfillmentOptionProduct} */
|
|
3946
4431
|
static FulfillmentOptionProduct() {
|
|
3947
4432
|
return Joi.object({
|
|
@@ -4523,17 +5008,6 @@ class ServiceabilityPlatformModel {
|
|
|
4523
5008
|
});
|
|
4524
5009
|
}
|
|
4525
5010
|
|
|
4526
|
-
/** @returns {ShipmentDimension} */
|
|
4527
|
-
static ShipmentDimension() {
|
|
4528
|
-
return Joi.object({
|
|
4529
|
-
height: Joi.number().required(),
|
|
4530
|
-
length: Joi.number().required(),
|
|
4531
|
-
width: Joi.number().required(),
|
|
4532
|
-
is_default: Joi.boolean(),
|
|
4533
|
-
unit: Joi.string().allow(""),
|
|
4534
|
-
});
|
|
4535
|
-
}
|
|
4536
|
-
|
|
4537
5011
|
/** @returns {ShipmentsArticles} */
|
|
4538
5012
|
static ShipmentsArticles() {
|
|
4539
5013
|
return Joi.object({
|
|
@@ -4643,30 +5117,6 @@ class ServiceabilityPlatformModel {
|
|
|
4643
5117
|
});
|
|
4644
5118
|
}
|
|
4645
5119
|
|
|
4646
|
-
/** @returns {CourierPartnerPromise} */
|
|
4647
|
-
static CourierPartnerPromise() {
|
|
4648
|
-
return Joi.object({
|
|
4649
|
-
min: Joi.string().allow("").required(),
|
|
4650
|
-
max: Joi.string().allow("").required(),
|
|
4651
|
-
attributes: ServiceabilityPlatformModel.CourierPartnerAttributes(),
|
|
4652
|
-
});
|
|
4653
|
-
}
|
|
4654
|
-
|
|
4655
|
-
/** @returns {CourierPartnerAttributes} */
|
|
4656
|
-
static CourierPartnerAttributes() {
|
|
4657
|
-
return Joi.object({
|
|
4658
|
-
tat: ServiceabilityPlatformModel.CourierPartnerTAT(),
|
|
4659
|
-
});
|
|
4660
|
-
}
|
|
4661
|
-
|
|
4662
|
-
/** @returns {CourierPartnerTAT} */
|
|
4663
|
-
static CourierPartnerTAT() {
|
|
4664
|
-
return Joi.object({
|
|
4665
|
-
min: Joi.number(),
|
|
4666
|
-
max: Joi.number(),
|
|
4667
|
-
});
|
|
4668
|
-
}
|
|
4669
|
-
|
|
4670
5120
|
/** @returns {ShipmentCourierPartners} */
|
|
4671
5121
|
static ShipmentCourierPartners() {
|
|
4672
5122
|
return Joi.object({
|
|
@@ -46,6 +46,7 @@ export = WebhookPublicModel;
|
|
|
46
46
|
*/
|
|
47
47
|
/**
|
|
48
48
|
* @typedef TransformEventData
|
|
49
|
+
* @property {string} [region] - The region of the transformation event.
|
|
49
50
|
* @property {InternalTransformEvent} [event]
|
|
50
51
|
* @property {number} [company_id] - The company ID associated with the event.
|
|
51
52
|
* @property {string[]} [contains] - List of strings related to the event.
|
|
@@ -229,6 +230,10 @@ type InternalTransformEvent = {
|
|
|
229
230
|
/** @returns {TransformEventData} */
|
|
230
231
|
declare function TransformEventData(): TransformEventData;
|
|
231
232
|
type TransformEventData = {
|
|
233
|
+
/**
|
|
234
|
+
* - The region of the transformation event.
|
|
235
|
+
*/
|
|
236
|
+
region?: string;
|
|
232
237
|
event?: InternalTransformEvent;
|
|
233
238
|
/**
|
|
234
239
|
* - The company ID associated with the event.
|