@gofynd/fdk-client-javascript 3.3.6 → 3.4.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.
Files changed (54) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +6 -3
  4. package/sdk/application/Catalog/CatalogApplicationClient.js +24 -5
  5. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +10 -0
  6. package/sdk/application/Logistic/LogisticApplicationClient.js +44 -0
  7. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +115 -47
  8. package/sdk/partner/Logistics/LogisticsPartnerModel.js +67 -35
  9. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +5 -0
  10. package/sdk/partner/Webhook/WebhookPartnerModel.js +2 -0
  11. package/sdk/platform/Cart/CartPlatformModel.d.ts +454 -12
  12. package/sdk/platform/Cart/CartPlatformModel.js +457 -10
  13. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1 -1
  14. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +4 -1
  15. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +9 -0
  16. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +4 -0
  17. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +4 -2
  18. package/sdk/platform/Catalog/CatalogPlatformClient.js +16 -3
  19. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +33 -2
  20. package/sdk/platform/Catalog/CatalogPlatformModel.js +17 -2
  21. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +5 -0
  22. package/sdk/platform/Catalog/CatalogPlatformValidator.js +2 -0
  23. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +2 -0
  24. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +2 -0
  25. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +17 -1
  26. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +15 -0
  27. package/sdk/platform/Content/ContentPlatformModel.d.ts +14 -19
  28. package/sdk/platform/Content/ContentPlatformModel.js +6 -20
  29. package/sdk/platform/Order/OrderPlatformModel.d.ts +237 -17
  30. package/sdk/platform/Order/OrderPlatformModel.js +388 -14
  31. package/sdk/platform/Order/OrderPlatformValidator.d.ts +15 -15
  32. package/sdk/platform/Order/OrderPlatformValidator.js +9 -9
  33. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +7 -5
  34. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +4 -3
  35. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +97 -1
  36. package/sdk/platform/Payment/PaymentPlatformModel.js +273 -0
  37. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +124 -1
  38. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +800 -33
  39. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +139 -1
  40. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +125 -0
  41. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +2 -2
  42. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +8 -2
  43. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1033 -113
  44. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +613 -35
  45. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +12 -0
  46. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +5 -0
  47. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +36 -0
  48. package/sdk/platform/User/UserPlatformApplicationClient.js +251 -0
  49. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +38 -1
  50. package/sdk/platform/User/UserPlatformApplicationValidator.js +42 -0
  51. package/sdk/platform/User/UserPlatformModel.d.ts +430 -10
  52. package/sdk/platform/User/UserPlatformModel.js +276 -7
  53. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +10 -0
  54. package/sdk/platform/Webhook/WebhookPlatformModel.js +4 -0
@@ -1,5 +1,82 @@
1
1
  const Joi = require("joi");
2
2
 
3
+ /**
4
+ * @typedef FulfillmentOption
5
+ * @property {string} [name] - Name of the fulfillment option.
6
+ * @property {string} [slug] - Unique identifier for the fulfillment option.
7
+ * @property {number} [company_id] - The unique identifier of the company.
8
+ * @property {string} [application_id] - The unique identifier of the application.
9
+ * @property {string} [description] - Description of the fulfillment option.
10
+ * @property {boolean} [is_default] - Whether this is the default fulfillment option.
11
+ * @property {string} [type] - Type of fulfillment option.
12
+ * @property {string} [status] - Status of the fulfillment option.
13
+ * @property {BusinessUnit[]} [business_unit]
14
+ * @property {FulfillmentStores} [fulfillment_stores]
15
+ * @property {FulfillmentProducts} [products]
16
+ * @property {CourierPartnerSchemes} [cp_schemes]
17
+ * @property {string} [id] - Unique identifier for the fulfillment option.
18
+ */
19
+
20
+ /**
21
+ * @typedef FulfillmentOptionProducts
22
+ * @property {FulfillmentOptionProduct} [items]
23
+ * @property {Page} [page]
24
+ */
25
+
26
+ /**
27
+ * @typedef FulfillmentOptionStores
28
+ * @property {FulfillmentOptionStore[]} [items] - List of stores with their details.
29
+ * @property {Page} [page]
30
+ */
31
+
32
+ /**
33
+ * @typedef FulfillmentOptionBulkValidate
34
+ * @property {string} [store_type] - Type of store related to fulfillment.
35
+ * @property {string} [file_path] - URL of the uploaded file.
36
+ * @property {string} [action] - Action to be performed, such as import.
37
+ * @property {string} [type] - Entity type being processed.
38
+ * @property {string} [fulfillment_option_slug] - Slug representing the
39
+ * fulfillment option.
40
+ * @property {FulfillmentOptionValidate} [request]
41
+ */
42
+
43
+ /**
44
+ * @typedef FulfillmentOptionBulkValidateData
45
+ * @property {string} [request_id] - Unique id generated for bulk operation.
46
+ */
47
+
48
+ /**
49
+ * @typedef FulfillmentOptionBulk
50
+ * @property {string} [file_path] - The URL of file from which data will be imported.
51
+ * @property {string} [type] - Specifies the type of bulk fulfillment request.
52
+ */
53
+
54
+ /**
55
+ * @typedef FulfillmentOptionBulkData
56
+ * @property {string} [request_id] - Unique identifier for the request.
57
+ * @property {FulfillmentOptionValidate} [request]
58
+ * @property {string} [fulfillment_option_slug] - Slug representing the
59
+ * fulfillment option.
60
+ * @property {string} [file_url] - URL of the uploaded file.
61
+ * @property {number} [total] - Total number of records processed.
62
+ * @property {number} [success] - Number of successful records.
63
+ * @property {number} [failed] - Number of failed records.
64
+ * @property {string} [action] - Action performed in the request.
65
+ * @property {string} [updated_at] - Timestamp of the last update.
66
+ * @property {string} [updated_by] - Identifier of the user who updated the request.
67
+ * @property {string} [type] - Type of the bulk import process.
68
+ * @property {number} [company_id] - The unique identifier of the company.
69
+ * @property {string} [application_id] - The unique identifier of the application.
70
+ * @property {string} [stage] - Current stage of the import process.
71
+ */
72
+
73
+ /**
74
+ * @typedef OperationResponseSchema
75
+ * @property {boolean} success - Indicates if the operation was successful
76
+ * @property {string} [message] - Optional message providing additional
77
+ * information about the operation
78
+ */
79
+
3
80
  /**
4
81
  * @typedef SelfshipSchema
5
82
  * @property {number} tat - Turn around time in the specified unit, used to
@@ -98,11 +175,13 @@ const Joi = require("joi");
98
175
 
99
176
  /**
100
177
  * @typedef CreateZoneDataSchema
178
+ * @property {string} [fulfillment_option_slug] - Slug representing the
179
+ * fulfillment option.
101
180
  * @property {boolean} is_active - Indicates whether the zone is active or not.
102
181
  * @property {string} slug - Slug or URL-friendly version of the zone name.
103
182
  * @property {string} name - Name of the zone.
104
- * @property {number} company_id - Identifier of the company associated with the zone.
105
- * @property {string} application_id - Identifier for the application related to the zone.
183
+ * @property {number} company_id - The unique identifier of the company.
184
+ * @property {string} application_id - The unique identifier of the application.
106
185
  * @property {string[]} geo_areas - List of geographical areas associated with the zone.
107
186
  * @property {ZoneStores} stores
108
187
  * @property {ZoneProduct} product
@@ -128,9 +207,11 @@ const Joi = require("joi");
128
207
  /**
129
208
  * @typedef ZoneSchema
130
209
  * @property {Object} name - Name of the zone.
210
+ * @property {string} [fulfillment_option_slug] - Slug representing the
211
+ * fulfillment option.
131
212
  * @property {Object} slug - Slug identifier for the zone.
132
- * @property {Object} company_id - Id of the company that owns the zone.
133
- * @property {Object} application_id - Application Id associated with the zone.
213
+ * @property {Object} company_id - The unique identifier of the company.
214
+ * @property {Object} application_id - The unique identifier of the application.
134
215
  * @property {Object} is_active - Whether the zone is active or not.
135
216
  * @property {Object} geo_areas - List of geographical areas associated with the zone.
136
217
  * @property {Object} stores - List of stores in the zone, referencing a schema
@@ -298,6 +379,7 @@ const Joi = require("joi");
298
379
 
299
380
  /**
300
381
  * @typedef GeoAreaRequestBody
382
+ * @property {boolean} [is_polygon] - Indicates whether geo area is polygon or not.
301
383
  * @property {boolean} is_active - Indicates whether the geo area is active or not.
302
384
  * @property {string} name - The name of the geo area.
303
385
  * @property {string} slug - A slug is a human-readable URL segment, typically
@@ -324,6 +406,7 @@ const Joi = require("joi");
324
406
  * @property {Area[]} areas - A list of areas included in the geo area.
325
407
  * @property {string} [region_type] - Defines whether the region is based on
326
408
  * pincode or non-pincode.
409
+ * @property {boolean} [is_polygon] - Indicates whether geo area is polygon or not.
327
410
  * @property {string} type - Specifies whether the geo area is for price or
328
411
  * delivery purposes.
329
412
  * @property {string} created_on - The timestamp when the record was created.
@@ -337,6 +420,7 @@ const Joi = require("joi");
337
420
  * @typedef GeoAreaPutResponseBody
338
421
  * @property {string} [name] - Name of the geo area.
339
422
  * @property {string} [geoarea_id] - Unique identifier for the geo area.
423
+ * @property {boolean} [is_polygon] - Indicates whether geo area is polygon or not.
340
424
  * @property {string} [slug] - A slug is a human-readable URL segment, typically
341
425
  * generated from a title with special characters removed.
342
426
  * @property {boolean} [is_active] - Indicates whether the geo area is active or not.
@@ -366,6 +450,7 @@ const Joi = require("joi");
366
450
  * generated from a title with special characters removed.
367
451
  * @property {string} [application_id] - The unique identifier of the application.
368
452
  * @property {number} [company_id] - The unique identifier of the company.
453
+ * @property {boolean} [is_polygon] - Indicates whether geo area is polygon or not.
369
454
  * @property {string} geoarea_id - A unique identifier for the geoarea.
370
455
  * @property {boolean} is_active - Indicates whether the geoarea is active.
371
456
  * @property {string} type - The type of geoarea (e.g., city, country).
@@ -853,9 +938,10 @@ const Joi = require("joi");
853
938
  * fetch or modify scheme details.
854
939
  * @property {string} name - Name of the scheme.
855
940
  * @property {string} [default_forward_pickup_cutoff] - Default cutoff time for
856
- * forward pickup (nullable).
941
+ * forward pickup (nullable), having 24hour time format HH:MM.
857
942
  * @property {string} [default_reverse_pickup_cutoff] - Default cutoff time for
858
- * reverse pickup (nullable).
943
+ * reverse pickup (nullable), having 24hour time format HH:MM.
944
+ * @property {string} [default_cutoff_timezone] - Timezone for default cutoff time.
859
945
  * @property {CourierPartnerSchemeDefaultTat} [default_tat]
860
946
  * @property {ArithmeticOperations} weight
861
947
  * @property {ArithmeticOperations} [volumetric_weight]
@@ -889,7 +975,7 @@ const Joi = require("joi");
889
975
  * @property {string} [extension_id] - Unique identifier of courier partner extension.
890
976
  * @property {string} [scheme_id] - Unique identifier for the scheme, used to
891
977
  * fetch or modify scheme details.
892
- * @property {string} [company_id] - Unique identifier of company.
978
+ * @property {string} [company_id] - The unique identifier of the company.
893
979
  * @property {string} name - Name of the scheme.
894
980
  * @property {ArithmeticOperations} weight
895
981
  * @property {ArithmeticOperations} [volumetric_weight]
@@ -912,6 +998,12 @@ const Joi = require("joi");
912
998
  * @property {number} [non_qc_shipment_item_quantity] - Defines the maximum
913
999
  * quantity of items allowed in a non-quality check shipment.
914
1000
  * @property {CourierPartnerSchemeFeatures} feature
1001
+ * @property {string} [default_forward_pickup_cutoff] - Default cutoff time for
1002
+ * forward pickup (nullable), having 24hour time format HH:MM.
1003
+ * @property {string} [default_reverse_pickup_cutoff] - Default cutoff time for
1004
+ * reverse pickup (nullable), having 24hour time format HH:MM.
1005
+ * @property {string} [default_cutoff_timezone] - Timezone for default cutoff time.
1006
+ * @property {CourierPartnerSchemeDefaultTat} [default_tat]
915
1007
  */
916
1008
 
917
1009
  /**
@@ -1178,6 +1270,196 @@ const Joi = require("joi");
1178
1270
  * @property {string[]} [sort] - An array of strings specifying sorting preferences.
1179
1271
  */
1180
1272
 
1273
+ /**
1274
+ * @typedef BusinessUnit
1275
+ * @property {string} [name] - Name of the business unit.
1276
+ * @property {boolean} [is_active] - Whether the business unit is active.
1277
+ */
1278
+
1279
+ /**
1280
+ * @typedef FulfillmentStores
1281
+ * @property {number[]} [values] - List of store IDs associated with this
1282
+ * fulfillment option.
1283
+ * @property {string} [type] - Whether fulfillment applies to all stores or
1284
+ * specific stores.
1285
+ */
1286
+
1287
+ /**
1288
+ * @typedef FulfillmentProducts
1289
+ * @property {number[]} [values] - List of product IDs associated with this
1290
+ * fulfillment option.
1291
+ * @property {string} [type] - Whether fulfillment applies to all products or
1292
+ * specific products.
1293
+ */
1294
+
1295
+ /**
1296
+ * @typedef CourierPartnerSchemes
1297
+ * @property {CourierPartnerScheme[]} [values] - List of courier partner schemes
1298
+ * associated with this fulfillment option.
1299
+ * @property {string} [type] - Indicates whether all installed courier schemes
1300
+ * are used or only those specified by the seller.
1301
+ */
1302
+
1303
+ /**
1304
+ * @typedef CourierPartnerScheme
1305
+ * @property {string} [scheme_id] - Unique identifier for the courier partner scheme.
1306
+ * @property {string} [cp_ext_id] - Unique identifier for the courier partner.
1307
+ */
1308
+
1309
+ /**
1310
+ * @typedef FulfillmentOptionProduct
1311
+ * @property {number} [uid] - Unique identifier for the product.
1312
+ * @property {string} [name] - Name of the product.
1313
+ * @property {string} [slug] - Unique slug identifier for the product.
1314
+ * @property {string} [category_slug] - Slug identifier of the product's category.
1315
+ * @property {number} [category_uid] - Unique identifier for the product's category.
1316
+ * @property {string} [short_description] - Brief description of the product.
1317
+ * @property {string} [description] - Detailed description of the product in HTML format.
1318
+ * @property {number} [brand_uid] - Unique identifier for the brand.
1319
+ * @property {string} [currency] - Currency code used for product pricing.
1320
+ * @property {string} [item_code] - Unique code assigned to the product.
1321
+ * @property {string} [item_type] - Type of product (e.g., standard, set etc.).
1322
+ * @property {NetQuantity} [net_quantity]
1323
+ * @property {boolean} [multi_size] - Indicates if the product supports multiple sizes.
1324
+ * @property {boolean} [is_set] - Indicates if the product is a set of items.
1325
+ * @property {boolean} [is_dependent] - Indicates if the product depends on
1326
+ * another product.
1327
+ * @property {boolean} [is_active] - Status indicating if the product is active.
1328
+ * @property {boolean} [is_image_less_product] - Indicates if the product has no images.
1329
+ * @property {string} [size_guide] - URL or reference to the size guide.
1330
+ * @property {Object} [teaser_tag] - Teaser tag information for the product.
1331
+ * @property {string[]} [highlights] - Key highlights of the product.
1332
+ * @property {string[]} [tags] - Tags associated with the product.
1333
+ * @property {string[]} [product_group_tag] - Group tags assigned to the product.
1334
+ * @property {number[]} [departments] - Department identifiers associated with
1335
+ * the product.
1336
+ * @property {number} [company_id] - The unique identifier of the company.
1337
+ * @property {number[]} [company_ids] - List of company IDs associated with the product.
1338
+ * @property {string} [country_of_origin] - Country where the product is manufactured.
1339
+ * @property {string} [change_request_id] - Identifier for the change request
1340
+ * related to the product.
1341
+ * @property {Trader} [trader]
1342
+ * @property {string} [trader_type] - Type of trader (e.g., Manufacturer, Wholesaler).
1343
+ * @property {ProductPublish} [product_publish]
1344
+ * @property {TaxIdentifier} [tax_identifier]
1345
+ * @property {ReturnConfig} [return_config]
1346
+ * @property {CustomOrder} [custom_order]
1347
+ * @property {Size[]} [sizes] - Available sizes for the product.
1348
+ * @property {string[]} [media] - List of media assets related to the product.
1349
+ * @property {Object} [variant_media] - Media assets for different variants of
1350
+ * the product.
1351
+ * @property {Object} [variants] - Variant-specific details for the product.
1352
+ * @property {number} [no_of_boxes] - Number of boxes required for packaging the product.
1353
+ * @property {Object} [_custom_json] - Custom JSON data associated with the product.
1354
+ */
1355
+
1356
+ /**
1357
+ * @typedef NetQuantity
1358
+ * @property {number} [value] - The quantity value of the product.
1359
+ * @property {string} [unit] - The unit of measurement for the quantity.
1360
+ */
1361
+
1362
+ /**
1363
+ * @typedef Trader
1364
+ * @property {string} [name] - Name of the trader.
1365
+ * @property {string} [address] - Address of the trader.
1366
+ */
1367
+
1368
+ /**
1369
+ * @typedef ProductPublish
1370
+ * @property {string} [product_online_date] - Date when the product went online.
1371
+ * @property {boolean} [is_set] - Indicates if the product is part of a set.
1372
+ */
1373
+
1374
+ /**
1375
+ * @typedef TaxIdentifier
1376
+ * @property {string} [hsn_code] - HSN code assigned to the product.
1377
+ * @property {string} [hsn_code_id] - Identifier for the HSN code.
1378
+ * @property {string} [reporting_hsn] - Reporting HSN code.
1379
+ */
1380
+
1381
+ /**
1382
+ * @typedef ReturnConfig
1383
+ * @property {boolean} [returnable] - Indicates if the product is returnable.
1384
+ * @property {number} [time] - Time duration allowed for returns.
1385
+ * @property {string} [unit] - Unit of time for return duration.
1386
+ */
1387
+
1388
+ /**
1389
+ * @typedef CustomOrder
1390
+ * @property {boolean} [is_custom_order] - Indicates if the product is a custom order.
1391
+ * @property {number} [manufacturing_time] - Time required for manufacturing the product.
1392
+ * @property {string} [manufacturing_time_unit] - Unit of time for manufacturing.
1393
+ */
1394
+
1395
+ /**
1396
+ * @typedef Size
1397
+ * @property {string} [size] - Size label of the product.
1398
+ * @property {number} [size_priority] - Priority assigned to the size.
1399
+ * @property {string} [item_dimensions_unit_of_measure] - Unit of measure for
1400
+ * item dimensions.
1401
+ * @property {number} [price_transfer] - Transfer price of the product.
1402
+ * @property {number} [item_height] - Height of the product.
1403
+ * @property {number} [item_length] - Length of the product.
1404
+ * @property {number} [item_width] - Width of the product.
1405
+ * @property {number} [item_weight] - Weight of the product.
1406
+ * @property {string} [item_weight_unit_of_measure] - Unit of measure for item weight.
1407
+ * @property {number} [price] - Selling price of the product.
1408
+ * @property {number} [price_effective] - Effective price after discounts.
1409
+ * @property {boolean} [is_set] - Indicates if the size belongs to a set.
1410
+ * @property {boolean} [track_inventory] - Indicates if inventory tracking is enabled.
1411
+ * @property {Identifier[]} [identifiers] - Unique identifiers associated with the size.
1412
+ * @property {Object} [_custom_json] - Custom JSON data associated with the size.
1413
+ */
1414
+
1415
+ /**
1416
+ * @typedef Identifier
1417
+ * @property {string} [gtin_type] - Type of GTIN identifier (e.g., SKU, UPC, EAN).
1418
+ * @property {string} [gtin_value] - Value of the GTIN identifier.
1419
+ * @property {boolean} [primary] - Indicates if this is the primary identifier.
1420
+ */
1421
+
1422
+ /**
1423
+ * @typedef Page
1424
+ * @property {number} [item_total] - The total number of all items across all pages.
1425
+ * @property {string} [next_id] - The identifier for the next page.
1426
+ * @property {boolean} [has_previous] - Indicates whether there is a previous page.
1427
+ * @property {boolean} [has_next] - Indicates whether there is a next page.
1428
+ * @property {number} [current] - The current page number.
1429
+ * @property {string} type - The type of the page, such as 'PageType'.
1430
+ * @property {number} [size] - The number of items per page.
1431
+ * @property {number} [page_size] - The number of items per page.
1432
+ */
1433
+
1434
+ /**
1435
+ * @typedef FulfillmentOptionStore
1436
+ * @property {number} [uid] - Unique identifier for the store.
1437
+ * @property {Address} [address]
1438
+ * @property {number} [company_id] - The unique identifier of the company.
1439
+ * @property {string} [display_name] - Store name displayed in the UI.
1440
+ * @property {string} [name] - Name of the store.
1441
+ * @property {string} [store_type] - Type of store (e.g., high_street, mall).
1442
+ * @property {string[]} [tags] - Tags associated with the store.
1443
+ */
1444
+
1445
+ /**
1446
+ * @typedef Address
1447
+ * @property {string} [address1] - Primary address line.
1448
+ * @property {string} [country] - Country where the store is located.
1449
+ * @property {string} [pincode] - Postal code of the store location.
1450
+ * @property {string} [city] - City where the store is located.
1451
+ * @property {string} [state] - State where the store is located.
1452
+ * @property {number} [latitude] - Latitude coordinate of the store.
1453
+ * @property {number} [longitude] - Longitude coordinate of the store.
1454
+ * @property {string} [country_code] - ISO country code of the store location.
1455
+ */
1456
+
1457
+ /**
1458
+ * @typedef FulfillmentOptionValidate
1459
+ * @property {string} [entity_filter_type] - Type of entity filter applied.
1460
+ * @property {string} [fulfillment_option_type] - Type of fulfillment option selected.
1461
+ */
1462
+
1181
1463
  /**
1182
1464
  * @typedef ProductSchema
1183
1465
  * @property {string} type - The classification of product type used in the
@@ -1213,8 +1495,8 @@ const Joi = require("joi");
1213
1495
  * @property {ListViewProduct} stores
1214
1496
  * @property {boolean} is_active - Indicates if the zone is active.
1215
1497
  * @property {ListViewProduct} product
1216
- * @property {number} company_id - Unique identifier for the company.
1217
- * @property {string} application_id - Unique identifier for the application.
1498
+ * @property {number} company_id - The unique identifier of the company.
1499
+ * @property {string} application_id - The unique identifier of the application.
1218
1500
  * @property {CreatedBy} created_by
1219
1501
  * @property {ModifiedBy} modified_by
1220
1502
  * @property {string} created_on - The timestamp when the record was created.
@@ -1249,18 +1531,6 @@ const Joi = require("joi");
1249
1531
  * @property {number} [count] - Count of items in the region.
1250
1532
  */
1251
1533
 
1252
- /**
1253
- * @typedef Page
1254
- * @property {number} [item_total] - The total number of all items across all pages.
1255
- * @property {string} [next_id] - The identifier for the next page.
1256
- * @property {boolean} [has_previous] - Indicates whether there is a previous page.
1257
- * @property {boolean} [has_next] - Indicates whether there is a next page.
1258
- * @property {number} [current] - The current page number.
1259
- * @property {string} type - The type of the page, such as 'PageType'.
1260
- * @property {number} [size] - The number of items per page.
1261
- * @property {number} [page_size] - The number of items per page.
1262
- */
1263
-
1264
1534
  /**
1265
1535
  * @typedef ZoneStores
1266
1536
  * @property {Object} type - Type of zone store.
@@ -2244,6 +2514,100 @@ const Joi = require("joi");
2244
2514
  */
2245
2515
 
2246
2516
  class ServiceabilityPlatformModel {
2517
+ /** @returns {FulfillmentOption} */
2518
+ static FulfillmentOption() {
2519
+ return Joi.object({
2520
+ name: Joi.string().allow(""),
2521
+ slug: Joi.string().allow(""),
2522
+ company_id: Joi.number(),
2523
+ application_id: Joi.string().allow(""),
2524
+ description: Joi.string().allow(""),
2525
+ is_default: Joi.boolean(),
2526
+ type: Joi.string().allow(""),
2527
+ status: Joi.string().allow(""),
2528
+ business_unit: Joi.array().items(
2529
+ ServiceabilityPlatformModel.BusinessUnit()
2530
+ ),
2531
+ fulfillment_stores: ServiceabilityPlatformModel.FulfillmentStores(),
2532
+ products: ServiceabilityPlatformModel.FulfillmentProducts(),
2533
+ cp_schemes: ServiceabilityPlatformModel.CourierPartnerSchemes(),
2534
+ id: Joi.string().allow(""),
2535
+ });
2536
+ }
2537
+
2538
+ /** @returns {FulfillmentOptionProducts} */
2539
+ static FulfillmentOptionProducts() {
2540
+ return Joi.object({
2541
+ items: ServiceabilityPlatformModel.FulfillmentOptionProduct(),
2542
+ page: ServiceabilityPlatformModel.Page(),
2543
+ });
2544
+ }
2545
+
2546
+ /** @returns {FulfillmentOptionStores} */
2547
+ static FulfillmentOptionStores() {
2548
+ return Joi.object({
2549
+ items: Joi.array().items(
2550
+ ServiceabilityPlatformModel.FulfillmentOptionStore()
2551
+ ),
2552
+ page: ServiceabilityPlatformModel.Page(),
2553
+ });
2554
+ }
2555
+
2556
+ /** @returns {FulfillmentOptionBulkValidate} */
2557
+ static FulfillmentOptionBulkValidate() {
2558
+ return Joi.object({
2559
+ store_type: Joi.string().allow(""),
2560
+ file_path: Joi.string().allow(""),
2561
+ action: Joi.string().allow(""),
2562
+ type: Joi.string().allow(""),
2563
+ fulfillment_option_slug: Joi.string().allow(""),
2564
+ request: ServiceabilityPlatformModel.FulfillmentOptionValidate(),
2565
+ });
2566
+ }
2567
+
2568
+ /** @returns {FulfillmentOptionBulkValidateData} */
2569
+ static FulfillmentOptionBulkValidateData() {
2570
+ return Joi.object({
2571
+ request_id: Joi.string().allow(""),
2572
+ });
2573
+ }
2574
+
2575
+ /** @returns {FulfillmentOptionBulk} */
2576
+ static FulfillmentOptionBulk() {
2577
+ return Joi.object({
2578
+ file_path: Joi.string().allow(""),
2579
+ type: Joi.string().allow(""),
2580
+ });
2581
+ }
2582
+
2583
+ /** @returns {FulfillmentOptionBulkData} */
2584
+ static FulfillmentOptionBulkData() {
2585
+ return Joi.object({
2586
+ request_id: Joi.string().allow(""),
2587
+ request: ServiceabilityPlatformModel.FulfillmentOptionValidate(),
2588
+ fulfillment_option_slug: Joi.string().allow(""),
2589
+ file_url: Joi.string().allow(""),
2590
+ total: Joi.number(),
2591
+ success: Joi.number(),
2592
+ failed: Joi.number(),
2593
+ action: Joi.string().allow(""),
2594
+ updated_at: Joi.string().allow(""),
2595
+ updated_by: Joi.string().allow("").allow(null),
2596
+ type: Joi.string().allow(""),
2597
+ company_id: Joi.number(),
2598
+ application_id: Joi.string().allow(""),
2599
+ stage: Joi.string().allow(""),
2600
+ });
2601
+ }
2602
+
2603
+ /** @returns {OperationResponseSchema} */
2604
+ static OperationResponseSchema() {
2605
+ return Joi.object({
2606
+ success: Joi.boolean().required(),
2607
+ message: Joi.string().allow(""),
2608
+ });
2609
+ }
2610
+
2247
2611
  /** @returns {SelfshipSchema} */
2248
2612
  static SelfshipSchema() {
2249
2613
  return Joi.object({
@@ -2353,6 +2717,7 @@ class ServiceabilityPlatformModel {
2353
2717
  /** @returns {CreateZoneDataSchema} */
2354
2718
  static CreateZoneDataSchema() {
2355
2719
  return Joi.object({
2720
+ fulfillment_option_slug: Joi.string().allow("").allow(null),
2356
2721
  is_active: Joi.boolean().required(),
2357
2722
  slug: Joi.string().allow("").required(),
2358
2723
  name: Joi.string().allow("").required(),
@@ -2390,6 +2755,7 @@ class ServiceabilityPlatformModel {
2390
2755
  static ZoneSchema() {
2391
2756
  return Joi.object({
2392
2757
  name: Joi.any().required(),
2758
+ fulfillment_option_slug: Joi.string().allow("").allow(null),
2393
2759
  slug: Joi.any().required(),
2394
2760
  company_id: Joi.any().required(),
2395
2761
  application_id: Joi.any().required(),
@@ -2591,6 +2957,7 @@ class ServiceabilityPlatformModel {
2591
2957
  /** @returns {GeoAreaRequestBody} */
2592
2958
  static GeoAreaRequestBody() {
2593
2959
  return Joi.object({
2960
+ is_polygon: Joi.boolean().allow(null),
2594
2961
  is_active: Joi.boolean().required(),
2595
2962
  name: Joi.string().allow("").required(),
2596
2963
  slug: Joi.string().allow("").required(),
@@ -2617,6 +2984,7 @@ class ServiceabilityPlatformModel {
2617
2984
  is_active: Joi.boolean().required(),
2618
2985
  areas: Joi.array().items(ServiceabilityPlatformModel.Area()).required(),
2619
2986
  region_type: Joi.string().allow("").allow(null),
2987
+ is_polygon: Joi.boolean().allow(null),
2620
2988
  type: Joi.string().allow("").required(),
2621
2989
  created_on: Joi.string().allow("").required(),
2622
2990
  modified_on: Joi.string().allow("").required(),
@@ -2631,6 +2999,7 @@ class ServiceabilityPlatformModel {
2631
2999
  return Joi.object({
2632
3000
  name: Joi.string().allow(""),
2633
3001
  geoarea_id: Joi.string().allow(""),
3002
+ is_polygon: Joi.boolean().allow(null),
2634
3003
  slug: Joi.string().allow(""),
2635
3004
  is_active: Joi.boolean(),
2636
3005
  areas: Joi.array().items(ServiceabilityPlatformModel.Area()),
@@ -2659,6 +3028,7 @@ class ServiceabilityPlatformModel {
2659
3028
  slug: Joi.string().allow("").required(),
2660
3029
  application_id: Joi.string().allow(""),
2661
3030
  company_id: Joi.number(),
3031
+ is_polygon: Joi.boolean().allow(null),
2662
3032
  geoarea_id: Joi.string().allow("").required(),
2663
3033
  is_active: Joi.boolean().required(),
2664
3034
  type: Joi.string().allow("").required(),
@@ -3184,6 +3554,7 @@ class ServiceabilityPlatformModel {
3184
3554
  name: Joi.string().allow("").required(),
3185
3555
  default_forward_pickup_cutoff: Joi.string().allow("").allow(null),
3186
3556
  default_reverse_pickup_cutoff: Joi.string().allow("").allow(null),
3557
+ default_cutoff_timezone: Joi.string().allow("").allow(null),
3187
3558
  default_tat: ServiceabilityPlatformModel.CourierPartnerSchemeDefaultTat(),
3188
3559
  weight: ServiceabilityPlatformModel.ArithmeticOperations().required(),
3189
3560
  volumetric_weight: ServiceabilityPlatformModel.ArithmeticOperations(),
@@ -3223,6 +3594,10 @@ class ServiceabilityPlatformModel {
3223
3594
  qc_shipment_item_quantity: Joi.number().allow(null),
3224
3595
  non_qc_shipment_item_quantity: Joi.number().allow(null),
3225
3596
  feature: ServiceabilityPlatformModel.CourierPartnerSchemeFeatures().required(),
3597
+ default_forward_pickup_cutoff: Joi.string().allow("").allow(null),
3598
+ default_reverse_pickup_cutoff: Joi.string().allow("").allow(null),
3599
+ default_cutoff_timezone: Joi.string().allow("").allow(null),
3600
+ default_tat: ServiceabilityPlatformModel.CourierPartnerSchemeDefaultTat(),
3226
3601
  });
3227
3602
  }
3228
3603
 
@@ -3493,6 +3868,223 @@ class ServiceabilityPlatformModel {
3493
3868
  });
3494
3869
  }
3495
3870
 
3871
+ /** @returns {BusinessUnit} */
3872
+ static BusinessUnit() {
3873
+ return Joi.object({
3874
+ name: Joi.string().allow(""),
3875
+ is_active: Joi.boolean(),
3876
+ });
3877
+ }
3878
+
3879
+ /** @returns {FulfillmentStores} */
3880
+ static FulfillmentStores() {
3881
+ return Joi.object({
3882
+ values: Joi.array().items(Joi.number()),
3883
+ type: Joi.string().allow(""),
3884
+ });
3885
+ }
3886
+
3887
+ /** @returns {FulfillmentProducts} */
3888
+ static FulfillmentProducts() {
3889
+ return Joi.object({
3890
+ values: Joi.array().items(Joi.number()),
3891
+ type: Joi.string().allow(""),
3892
+ });
3893
+ }
3894
+
3895
+ /** @returns {CourierPartnerSchemes} */
3896
+ static CourierPartnerSchemes() {
3897
+ return Joi.object({
3898
+ values: Joi.array().items(
3899
+ ServiceabilityPlatformModel.CourierPartnerScheme()
3900
+ ),
3901
+ type: Joi.string().allow(""),
3902
+ });
3903
+ }
3904
+
3905
+ /** @returns {CourierPartnerScheme} */
3906
+ static CourierPartnerScheme() {
3907
+ return Joi.object({
3908
+ scheme_id: Joi.string().allow(""),
3909
+ cp_ext_id: Joi.string().allow(""),
3910
+ });
3911
+ }
3912
+
3913
+ /** @returns {FulfillmentOptionProduct} */
3914
+ static FulfillmentOptionProduct() {
3915
+ return Joi.object({
3916
+ uid: Joi.number(),
3917
+ name: Joi.string().allow(""),
3918
+ slug: Joi.string().allow(""),
3919
+ category_slug: Joi.string().allow(""),
3920
+ category_uid: Joi.number(),
3921
+ short_description: Joi.string().allow(""),
3922
+ description: Joi.string().allow(""),
3923
+ brand_uid: Joi.number(),
3924
+ currency: Joi.string().allow(""),
3925
+ item_code: Joi.string().allow(""),
3926
+ item_type: Joi.string().allow(""),
3927
+ net_quantity: ServiceabilityPlatformModel.NetQuantity(),
3928
+ multi_size: Joi.boolean(),
3929
+ is_set: Joi.boolean(),
3930
+ is_dependent: Joi.boolean(),
3931
+ is_active: Joi.boolean(),
3932
+ is_image_less_product: Joi.boolean(),
3933
+ size_guide: Joi.string().allow(""),
3934
+ teaser_tag: Joi.object().pattern(/\S/, Joi.any()),
3935
+ highlights: Joi.array().items(Joi.string().allow("")),
3936
+ tags: Joi.array().items(Joi.string().allow("")),
3937
+ product_group_tag: Joi.array().items(Joi.string().allow("")),
3938
+ departments: Joi.array().items(Joi.number()),
3939
+ company_id: Joi.number(),
3940
+ company_ids: Joi.array().items(Joi.number()),
3941
+ country_of_origin: Joi.string().allow(""),
3942
+ change_request_id: Joi.string().allow(""),
3943
+ trader: ServiceabilityPlatformModel.Trader(),
3944
+ trader_type: Joi.string().allow(""),
3945
+ product_publish: ServiceabilityPlatformModel.ProductPublish(),
3946
+ tax_identifier: ServiceabilityPlatformModel.TaxIdentifier(),
3947
+ return_config: ServiceabilityPlatformModel.ReturnConfig(),
3948
+ custom_order: ServiceabilityPlatformModel.CustomOrder(),
3949
+ sizes: Joi.array().items(ServiceabilityPlatformModel.Size()),
3950
+ media: Joi.array().items(Joi.string().allow("")),
3951
+ variant_media: Joi.object().pattern(/\S/, Joi.any()),
3952
+ variants: Joi.object().pattern(/\S/, Joi.any()),
3953
+ no_of_boxes: Joi.number(),
3954
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
3955
+ });
3956
+ }
3957
+
3958
+ /** @returns {NetQuantity} */
3959
+ static NetQuantity() {
3960
+ return Joi.object({
3961
+ value: Joi.number(),
3962
+ unit: Joi.string().allow(""),
3963
+ });
3964
+ }
3965
+
3966
+ /** @returns {Trader} */
3967
+ static Trader() {
3968
+ return Joi.object({
3969
+ name: Joi.string().allow(""),
3970
+ address: Joi.string().allow(""),
3971
+ });
3972
+ }
3973
+
3974
+ /** @returns {ProductPublish} */
3975
+ static ProductPublish() {
3976
+ return Joi.object({
3977
+ product_online_date: Joi.string().allow(""),
3978
+ is_set: Joi.boolean(),
3979
+ });
3980
+ }
3981
+
3982
+ /** @returns {TaxIdentifier} */
3983
+ static TaxIdentifier() {
3984
+ return Joi.object({
3985
+ hsn_code: Joi.string().allow(""),
3986
+ hsn_code_id: Joi.string().allow(""),
3987
+ reporting_hsn: Joi.string().allow(""),
3988
+ });
3989
+ }
3990
+
3991
+ /** @returns {ReturnConfig} */
3992
+ static ReturnConfig() {
3993
+ return Joi.object({
3994
+ returnable: Joi.boolean(),
3995
+ time: Joi.number(),
3996
+ unit: Joi.string().allow(""),
3997
+ });
3998
+ }
3999
+
4000
+ /** @returns {CustomOrder} */
4001
+ static CustomOrder() {
4002
+ return Joi.object({
4003
+ is_custom_order: Joi.boolean(),
4004
+ manufacturing_time: Joi.number(),
4005
+ manufacturing_time_unit: Joi.string().allow(""),
4006
+ });
4007
+ }
4008
+
4009
+ /** @returns {Size} */
4010
+ static Size() {
4011
+ return Joi.object({
4012
+ size: Joi.string().allow(""),
4013
+ size_priority: Joi.number(),
4014
+ item_dimensions_unit_of_measure: Joi.string().allow(""),
4015
+ price_transfer: Joi.number(),
4016
+ item_height: Joi.number(),
4017
+ item_length: Joi.number(),
4018
+ item_width: Joi.number(),
4019
+ item_weight: Joi.number(),
4020
+ item_weight_unit_of_measure: Joi.string().allow(""),
4021
+ price: Joi.number(),
4022
+ price_effective: Joi.number(),
4023
+ is_set: Joi.boolean(),
4024
+ track_inventory: Joi.boolean(),
4025
+ identifiers: Joi.array().items(ServiceabilityPlatformModel.Identifier()),
4026
+ _custom_json: Joi.any(),
4027
+ });
4028
+ }
4029
+
4030
+ /** @returns {Identifier} */
4031
+ static Identifier() {
4032
+ return Joi.object({
4033
+ gtin_type: Joi.string().allow(""),
4034
+ gtin_value: Joi.string().allow(""),
4035
+ primary: Joi.boolean(),
4036
+ });
4037
+ }
4038
+
4039
+ /** @returns {Page} */
4040
+ static Page() {
4041
+ return Joi.object({
4042
+ item_total: Joi.number(),
4043
+ next_id: Joi.string().allow(""),
4044
+ has_previous: Joi.boolean(),
4045
+ has_next: Joi.boolean(),
4046
+ current: Joi.number(),
4047
+ type: Joi.string().allow("").required(),
4048
+ size: Joi.number(),
4049
+ page_size: Joi.number(),
4050
+ });
4051
+ }
4052
+
4053
+ /** @returns {FulfillmentOptionStore} */
4054
+ static FulfillmentOptionStore() {
4055
+ return Joi.object({
4056
+ uid: Joi.number(),
4057
+ address: ServiceabilityPlatformModel.Address(),
4058
+ company_id: Joi.number(),
4059
+ display_name: Joi.string().allow(""),
4060
+ name: Joi.string().allow(""),
4061
+ store_type: Joi.string().allow(""),
4062
+ tags: Joi.array().items(Joi.string().allow("")),
4063
+ });
4064
+ }
4065
+
4066
+ /** @returns {Address} */
4067
+ static Address() {
4068
+ return Joi.object({
4069
+ address1: Joi.string().allow(""),
4070
+ country: Joi.string().allow(""),
4071
+ pincode: Joi.string().allow(""),
4072
+ city: Joi.string().allow(""),
4073
+ state: Joi.string().allow(""),
4074
+ latitude: Joi.number(),
4075
+ longitude: Joi.number(),
4076
+ country_code: Joi.string().allow(""),
4077
+ });
4078
+ }
4079
+
4080
+ /** @returns {FulfillmentOptionValidate} */
4081
+ static FulfillmentOptionValidate() {
4082
+ return Joi.object({
4083
+ entity_filter_type: Joi.string().allow(""),
4084
+ fulfillment_option_type: Joi.string().allow(""),
4085
+ });
4086
+ }
4087
+
3496
4088
  /** @returns {ProductSchema} */
3497
4089
  static ProductSchema() {
3498
4090
  return Joi.object({
@@ -3580,20 +4172,6 @@ class ServiceabilityPlatformModel {
3580
4172
  });
3581
4173
  }
3582
4174
 
3583
- /** @returns {Page} */
3584
- static Page() {
3585
- return Joi.object({
3586
- item_total: Joi.number(),
3587
- next_id: Joi.string().allow(""),
3588
- has_previous: Joi.boolean(),
3589
- has_next: Joi.boolean(),
3590
- current: Joi.number(),
3591
- type: Joi.string().allow("").required(),
3592
- size: Joi.number(),
3593
- page_size: Joi.number(),
3594
- });
3595
- }
3596
-
3597
4175
  /** @returns {ZoneStores} */
3598
4176
  static ZoneStores() {
3599
4177
  return Joi.object({