@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.
Files changed (32) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +16 -6
  4. package/sdk/application/Catalog/CatalogApplicationClient.js +71 -12
  5. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +80 -80
  6. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +48 -48
  7. package/sdk/platform/Cart/CartPlatformModel.d.ts +6 -18
  8. package/sdk/platform/Cart/CartPlatformModel.js +2 -36
  9. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +14 -48
  10. package/sdk/platform/Catalog/CatalogPlatformClient.js +85 -338
  11. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +207 -763
  12. package/sdk/platform/Catalog/CatalogPlatformModel.js +107 -392
  13. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +15 -71
  14. package/sdk/platform/Catalog/CatalogPlatformValidator.js +14 -60
  15. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +36 -0
  16. package/sdk/platform/Order/OrderPlatformApplicationClient.js +252 -0
  17. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +34 -1
  18. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +42 -0
  19. package/sdk/platform/Order/OrderPlatformClient.d.ts +69 -7
  20. package/sdk/platform/Order/OrderPlatformClient.js +453 -7
  21. package/sdk/platform/Order/OrderPlatformModel.d.ts +1938 -493
  22. package/sdk/platform/Order/OrderPlatformModel.js +1238 -506
  23. package/sdk/platform/Order/OrderPlatformValidator.d.ts +162 -16
  24. package/sdk/platform/Order/OrderPlatformValidator.js +111 -9
  25. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +14 -0
  26. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +85 -0
  27. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +17 -1
  28. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +16 -0
  29. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +861 -178
  30. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +534 -84
  31. package/sdk/public/Webhook/WebhookPublicModel.d.ts +5 -0
  32. package/sdk/public/Webhook/WebhookPublicModel.js +2 -0
@@ -266,7 +266,7 @@ const Joi = require("joi");
266
266
  * bag, used to identify and reference a particular product in a list. This
267
267
  * helps in pinpointing the exact item being updated or processed.
268
268
  * @property {string} [identifier] - A unique string that serves as the
269
- * products identifier, such as a SKU, barcode, or another distinct code.
269
+ * product's identifier, such as a SKU, barcode, or another distinct code.
270
270
  * This ensures the product is correctly identified and distinguished from
271
271
  * other items in the system.
272
272
  * @property {number} [quantity] - The quantity of the product or item,
@@ -437,8 +437,8 @@ const Joi = require("joi");
437
437
 
438
438
  /**
439
439
  * @typedef DPConfiguration
440
- * @property {string} [shipping_by] - Shipping_by denotes dp assignment
441
- * strategy- if shipping_by is fynd dp assignment would be handled by OMS
440
+ * @property {string} [shipping_by] - It denotes DP assignment strategy. If it
441
+ * is fynd, DP assignment will be handled by Fynd's OMS.
442
442
  */
443
443
 
444
444
  /**
@@ -458,17 +458,18 @@ const Joi = require("joi");
458
458
 
459
459
  /**
460
460
  * @typedef CreateOrderConfig
461
- * @property {DPConfiguration} dp_configuration
462
- * @property {boolean} [location_reassignment] - Flag denotes if the location
463
- * for the store needs to be reassigned post cancellation. If true,location
464
- * for the store gets auto reassigned post cancellation, if set false location
465
- * reassignment will not be performed as its disabled.
461
+ * @property {DPConfiguration} [dp_configuration]
462
+ * @property {boolean} [location_reassignment] - The flag denotes if the
463
+ * location for the shipment needs to be reassigned after cancellation. If the
464
+ * flag is set to true, location for the shipment gets auto reassigned post
465
+ * cancellation. If set to false, location reassignment will not be performed
466
+ * as it is disabled.
466
467
  * @property {PaymentConfig} [payment]
467
468
  * @property {boolean} [optimal_shipment_creation] - Denotes the shipment
468
- * breaking strategy. If the flag is set true, the shipment is created using
469
- * optimal shipment creation strategy based on the servicability & packaging
470
- * dimensions by OMS .If false, shipment details, including location_id, must
471
- * be passed to FDK for processing.
469
+ * breaking strategy. If the flag is set to true, the shipment is created
470
+ * using an optimal shipment creation strategy based on the serviceability &
471
+ * packaging dimensions by OMS. If the flag is set to false, shipment details
472
+ * and location_id, must be passed to FDK for processing.
472
473
  * @property {LockStateMessage[]} [lock_state_messages] - A list of
473
474
  * state-specific custom lock messages.
474
475
  * @property {string} [integration_type] - Flag denotes integration type which
@@ -734,8 +735,7 @@ const Joi = require("joi");
734
735
 
735
736
  /**
736
737
  * @typedef CreateOrderResponseSchema
737
- * @property {string} fynd_order_id - A string that represents the unique
738
- * identifier assigned to the order.
738
+ * @property {string} fynd_order_id - Unique identifier assigned to the order
739
739
  */
740
740
 
741
741
  /**
@@ -960,8 +960,8 @@ const Joi = require("joi");
960
960
  * @property {string} [ordering_channel] - The specific channel through which
961
961
  * your order was placed. This field will be phased out after version 2.4.0.
962
962
  * Please use ordering_source instead to ensure accurate order tracking and processing.
963
- * @property {string} [ordering_source] - To uniquely identify the source
964
- * through which order has been placed (e.g, marketplace, gofynd).
963
+ * @property {string} [ordering_source] - Ordering source, to be used to
964
+ * identify source of order creation.
965
965
  * @property {Object} [meta] - Meta data of the order data contains additional,
966
966
  * potentially dynamic information about the order data.
967
967
  * @property {number} [cod_charges]
@@ -1074,7 +1074,7 @@ const Joi = require("joi");
1074
1074
 
1075
1075
  /**
1076
1076
  * @typedef Tax
1077
- * @property {string} name - The name of the tax, indicating its purpose (e.g.,
1077
+ * @property {string} name - The name of the tax indicating its purpose (e.g.,
1078
1078
  * VAT, sales tax).
1079
1079
  * @property {number} rate - The tax rate as a decimal, applied to the transaction amount.
1080
1080
  * @property {Object[]} [breakup] - An array of objects detailing the components
@@ -1092,17 +1092,21 @@ const Joi = require("joi");
1092
1092
 
1093
1093
  /**
1094
1094
  * @typedef Charge
1095
- * @property {string} name - The name of the charge that indicates its purpose.
1096
1095
  * @property {AmountSchema} amount
1097
- * @property {Tax} [tax]
1096
+ * @property {string} type - The category or type of the charge.
1097
+ * @property {string} name - The name of the charge that indicates its purpose.
1098
1098
  * @property {string} [code] - An optional code associated with the charge for
1099
1099
  * internal tracking.
1100
- * @property {string} type - The category or type of the charge.
1100
+ * @property {Tax} [tax]
1101
1101
  */
1102
1102
 
1103
1103
  /**
1104
1104
  * @typedef LineItem
1105
- * @property {Charge[]} [charges] - An array of Charge objects related to the line item.
1105
+ * @property {Charge[]} [charges] - An array of Charge objects related to the
1106
+ * line item. This array must include three mandatory charge types:
1107
+ * amount_paid, price_effective and price_marked. Formula to calculate
1108
+ * amount_paid = price_effective + cod_charges + delivery_charges -
1109
+ * coupon_discount - promo_discount
1106
1110
  * @property {Object} [meta] - An object containing metadata relevant to
1107
1111
  * articles or line items.
1108
1112
  * @property {string} [custom_message] - A string for any special instructions
@@ -1159,37 +1163,33 @@ const Joi = require("joi");
1159
1163
 
1160
1164
  /**
1161
1165
  * @typedef Shipment
1162
- * @property {LineItem[]} line_items - An array of LineItem objects that
1163
- * represent the items included in the shipment.
1166
+ * @property {LineItem[]} line_items - An array of objects that represent the
1167
+ * items included in the shipment.
1164
1168
  * @property {string} [external_shipment_id] - External shipment identifier or
1165
1169
  * marketplace's unique shipment identifier.
1166
1170
  * @property {ProcessingDates} [processing_dates]
1167
1171
  * @property {Object} [meta] - Meta data of the shipment contains additional,
1168
1172
  * potentially dynamic information about the shipment.
1169
- * @property {number} [priority] - An integer indicating the priority level of
1170
- * the shipment.
1171
- * @property {number} [location_id] - Location Identifier or Store/Fulfillment
1172
- * Identifier of the shipment- This field is mandatory when
1173
- * optimal_shipment_creation flag is set to false, indicating that shipments
1174
- * must be associated with a specific location. When
1175
- * `optimal_shipment_creation` is true, the optimal location for order
1176
- * creation would be assigned, location_id becomes optional.
1173
+ * @property {number} [priority] - Priority level of the shipment.
1174
+ * @property {number} [location_id] - Location/store/fulfillment identifier of
1175
+ * the shipment. This field is mandatory when optimal_shipment_creation flag
1176
+ * is set to false, indicating that shipments must be associated with a
1177
+ * specific location. When optimal_shipment_creation is true, location_id
1178
+ * becomes optional and the system automatically assigns the optimal location
1179
+ * for order creation.
1177
1180
  * @property {string} [order_type] - Defines the specific journey a shipment
1178
1181
  * will follow based on the application's operational needs and customer
1179
1182
  * preferences. This field categorizes orders into distinct types, each
1180
- * associated with a unique processing flow. For example:
1181
- *
1182
- * - "HomeDelivery": The order undergoes all state transitions typical for a
1183
- * delivery, from processing the shipment to final delivery at the
1184
- * customer's address.
1185
- * - "PickAtStore": The order is prepared for pickup and moved to a state where it
1186
- * is ready to be handed over directly to the customer at the store. This
1187
- * type streamlines the process by bypassing traditional shipping stages
1188
- * and facilitating a quicker transition to the final handover stage.
1189
- * - "Digital": This order type likely refers to orders that involve digital goods
1190
- * or services, such as software, digital subscriptions, e-books, online
1191
- * courses, or any other item that can be delivered electronically.
1192
- *
1183
+ * associated with a unique processing flow. For example, "HomeDelivery": The
1184
+ * order undergoes all state transitions typical for a delivery, from
1185
+ * processing the shipment to final delivery at the customer's address.
1186
+ * "PickAtStore": The order is prepared for pickup and moved to a state where
1187
+ * it is ready to be handed over directly to the customer at the store. This
1188
+ * type streamlines the process by bypassing traditional shipping stages and
1189
+ * facilitating a quicker transition to the final handover stage. "Digital":
1190
+ * This order type likely refers to orders that involve digital goods or
1191
+ * services, such as software, digital subscriptions, e-books, online courses,
1192
+ * or any other item that can be delivered electronically.
1193
1193
  * @property {string[]} [tags]
1194
1194
  * @property {SystemMessages[]} [system_messages]
1195
1195
  * @property {ProcessAfterConfig} [process_after_config]
@@ -1233,55 +1233,46 @@ const Joi = require("joi");
1233
1233
 
1234
1234
  /**
1235
1235
  * @typedef ShippingInfo
1236
- * @property {string} [alternate_mobile_number] - A string for an alternate
1237
- * mobile number to reach the customer, providing an additional contact method.
1238
- * @property {string} [state] - A string representing the name of the state for
1239
- * shipping purposes.
1240
- * @property {string} [customer_code] - A string representing the customer's
1241
- * unique identifier in the seller's system.
1236
+ * @property {string} [alternate_mobile_number] - Alternate mobile number to
1237
+ * reach the customer, providing an additional contact method.
1238
+ * @property {string} [state] - The name of the state for shipping purposes.
1239
+ * @property {string} [customer_code] - Customer's unique identifier in the
1240
+ * seller's system.
1242
1241
  * @property {string} [shipping_type] - Specifies the method or service used for
1243
1242
  * the shipping of the shipment.
1244
- * @property {string} [middle_name] - A string containing the customer's middle name.
1245
- * @property {string} [primary_mobile_number] - A string for the customer's
1246
- * primary mobile number.
1247
- * @property {string} [last_name] - A string containing the customer's last name.
1243
+ * @property {string} [middle_name] - Customer's middle name
1244
+ * @property {string} [primary_mobile_number] - Customer's primary mobile number
1245
+ * @property {string} [last_name] - Customer's last name
1248
1246
  * @property {GeoLocationSchema} [geo_location]
1249
- * @property {string} [gender] - A string representing the customer's gender.
1250
- * @property {string} [house_no] - A string representing the house or apartment
1251
- * number of the customer.
1252
- * @property {string} [first_name] - A string representing the customer's first name.
1253
- * @property {string} [title] - A string representing the customer's title or prefix.
1254
- * @property {string} [landmark] - A string representing a landmark or reference
1255
- * point near the customer's location.
1256
- * @property {string} [country] - A string representing the customer's country.
1257
- * @property {string} [address_type] - A string representing the address type in
1258
- * the seller's system.
1259
- * @property {string} [state_code] - A string representing the state code of the
1260
- * customer's location.
1261
- * @property {string} [city] - A string representing the city of the customer's location.
1262
- * @property {string} [external_customer_code] - A string representing an
1263
- * external customer code in the seller's system.
1264
- * @property {string} [floor_no] - A string representing the floor number of the
1265
- * customer's location.
1266
- * @property {string} [alternate_email] - A string representing an alternate
1267
- * email address for the customer.
1247
+ * @property {string} [gender] - Customer's gender
1248
+ * @property {string} [house_no] - The house or apartment number of the customer.
1249
+ * @property {string} [first_name] - Customer's first name
1250
+ * @property {string} [title] - Customer's title or prefix
1251
+ * @property {string} [landmark] - Landmark or reference point near the
1252
+ * customer's location
1253
+ * @property {string} [country] - Customer's country
1254
+ * @property {string} [address_type] - Address type in the seller's system
1255
+ * @property {string} [state_code] - State code of the customer's location
1256
+ * @property {string} [city] - City of the customer's location
1257
+ * @property {string} [external_customer_code] - External customer code in the
1258
+ * seller's system
1259
+ * @property {string} [floor_no] - Floor number of the customer's location
1260
+ * @property {string} [alternate_email] - Alternate email address for the customer
1268
1261
  * @property {Object[]} [slot] - A list of objects representing available time
1269
1262
  * slot for delivery or pickup.
1270
1263
  * @property {string} [address] - A comma-separated string representing the address.
1271
- * @property {string} [area] - A string representing the area of the customer's location.
1272
- * @property {string} [address1] - A string representing the first line of the address.
1273
- * @property {string} [pincode] - A string representing the pincode of the
1274
- * customer's location.
1275
- * @property {string} [primary_email] - A string representing the primary email
1276
- * address for the customer.
1277
- * @property {string} [address2] - A string representing the second line of the address.
1264
+ * @property {string} [area] - Area of the customer's location
1265
+ * @property {string} [address1] - First line of the address
1266
+ * @property {string} [pincode] - Pincode of the customer's location
1267
+ * @property {string} [primary_email] - Primary email address for the customer
1268
+ * @property {string} [address2] - Second line of the address
1278
1269
  * @property {string} [country_code] - Uniquely identifies the country
1279
1270
  * associated with the shipping address. This code is essential for
1280
1271
  * international shipments, ensuring accurate routing and delivery across
1281
1272
  * global postal and customs services. Examples include 'US' for the United
1282
1273
  * States, 'IN' for India.
1283
1274
  * @property {string} [country_iso_code] - Specifies the country's unique
1284
- * identifier ollowing the ISO 3166-1 alpha-2 standard. This two-letter code
1275
+ * identifier allowing the ISO 3166-1 alpha-2 standard. This two-letter code
1285
1276
  * is crucial for distinguishing countries in international transactions, data
1286
1277
  * processing, and shipping logistics.
1287
1278
  */
@@ -1310,13 +1301,11 @@ const Joi = require("joi");
1310
1301
  * @property {string} [floor_no]
1311
1302
  * @property {string} [alternate_email]
1312
1303
  * @property {string} [address]
1313
- * @property {string} [area] - A string representing the area of the customer's location.
1314
- * @property {string} [address1] - A string representing the first line of the address.
1315
- * @property {string} [pincode] - A string representing the pincode of the
1316
- * customer's location.
1317
- * @property {string} [primary_email] - A string representing the primary email
1318
- * address for the customer.
1319
- * @property {string} [address2] - A string representing the second line of the address.
1304
+ * @property {string} [area] - Area of the customer's location
1305
+ * @property {string} [address1] - First line of the address
1306
+ * @property {string} [pincode] - Pincode of the customer's location
1307
+ * @property {string} [primary_email] - Primary email address for the customer
1308
+ * @property {string} [address2] - Second line of the address
1320
1309
  * @property {string} [country_code] - Uniquely identifies the country
1321
1310
  * associated with the billing address details. This code is essential for
1322
1311
  * international shipments, ensuring accurate routing and delivery across
@@ -1330,36 +1319,30 @@ const Joi = require("joi");
1330
1319
  /**
1331
1320
  * @typedef UserInfo
1332
1321
  * @property {string} [user_id] - The unique identifier assigned to the user.
1333
- * @property {string} [user_type] - A string representing the type of the user.
1334
- * @property {string} [primary_email] - A string representing the primary email
1335
- * address for the user.
1336
- * @property {string} [gender] - A string specifying the gender of the user.
1337
- * @property {string} first_name - A string which specifies the user's first name.
1338
- * @property {string} [last_name] - A string which specifies the user's last name.
1339
- * @property {string} primary_mobile_number - A string representing the primary
1340
- * mobile number for the user.
1322
+ * @property {string} [user_type] - Type of the user
1323
+ * @property {string} [primary_email] - Primary email address for the user
1324
+ * @property {string} [gender] - Gender of the user
1325
+ * @property {string} first_name - User's first name
1326
+ * @property {string} [last_name] - User's last name
1327
+ * @property {string} primary_mobile_number - Primary mobile number for the user
1341
1328
  */
1342
1329
 
1343
1330
  /**
1344
1331
  * @typedef TaxInfo
1345
- * @property {string} [b2b_gstin_number] - A string representing the GSTIN
1346
- * (Goods and Services Tax Identification Number) for business-to-business
1347
- * transactions.
1348
- * @property {string} [gstin] - A string that specifies the GSTIN for the seller.
1349
- * @property {string} [pan_no] - A string representing the PAN assigned to
1350
- * individuals or entities for tax purposes in India.
1332
+ * @property {string} [b2b_gstin_number] - Goods and Services Tax Identification
1333
+ * Number (GSTIN) for business-to-business transactions
1334
+ * @property {string} [gstin] - GSTIN of the customer
1335
+ * @property {string} [pan_no] - PAN assigned to individuals or entities for tax
1336
+ * purposes in India
1351
1337
  */
1352
1338
 
1353
1339
  /**
1354
1340
  * @typedef PaymentMethod
1355
- * @property {string} collect_by - A string indicating the entity responsible
1356
- * for collecting the payment.
1357
- * @property {string} mode - A string that specifies the mode of payment. Refer
1358
- * to [API & references (in Nav bar) → Payment Modes] for a list of valid
1359
- * payment methods.
1360
- * @property {string} refund_by - A string that indicates the entity responsible
1361
- * for processing refunds.
1362
- * @property {string} name - A string representing the name of the payment method.
1341
+ * @property {string} collect_by - Entity responsible for collecting the payment
1342
+ * @property {string} mode - Mode of payment. Refer to [API & references (in Nav
1343
+ * bar) Payment Modes] for a list of valid payment methods.
1344
+ * @property {string} refund_by - Entity responsible for processing refunds
1345
+ * @property {string} name - Name of the payment method
1363
1346
  * @property {number} amount - A number representing the monetary value
1364
1347
  * associated with the payment method.
1365
1348
  * @property {Object} [meta] - An object for any additional metadata related to
@@ -1370,10 +1353,8 @@ const Joi = require("joi");
1370
1353
 
1371
1354
  /**
1372
1355
  * @typedef PaymentInfo
1373
- * @property {string} primary_mode - A string that indicates the primary payment
1374
- * method used for the order.
1375
- * @property {string} [payment_mode] - A string that indicates the payment mode
1376
- * used for the order.
1356
+ * @property {string} primary_mode - Primary payment method used for the order
1357
+ * @property {string} [payment_mode] - Payment mode used for the order
1377
1358
  * @property {PaymentMethod[]} [payment_methods] - A lists all available payment
1378
1359
  * methods used in the transaction.
1379
1360
  */
@@ -1381,8 +1362,8 @@ const Joi = require("joi");
1381
1362
  /**
1382
1363
  * @typedef CreateOrderAPI
1383
1364
  * @property {Shipment[]} shipments - List of Shipments which includes shipment
1384
- * data like shipment items, shipment promise, Shipment type, shipment order
1385
- * type, shipment dp options etc.
1365
+ * data like shipment items, shipment promise, shipment type, shipment order
1366
+ * type, shipment DP options etc.
1386
1367
  * @property {ShippingInfo} shipping_info
1387
1368
  * @property {ShippingInfo} billing_info
1388
1369
  * @property {Object} [currency_info] - This object can accommodate a range of
@@ -1390,10 +1371,9 @@ const Joi = require("joi");
1390
1371
  * comprehensive details about the currency or currencies involved in a transaction.
1391
1372
  * @property {string} [external_order_id] - A unique identifier for the order
1392
1373
  * assigned by an external system.
1393
- * @property {Charge[]} [charges] - An array of charge objects that detail the
1394
- * various fees associated with the order.
1395
- * @property {string} [external_creation_date] - A string that specifies the
1396
- * date and time when the order was created in an external system
1374
+ * @property {Charge[]} [charges] - It details the various fees associated with the order.
1375
+ * @property {string} [external_creation_date] - Date and time when the order
1376
+ * was created in an external system
1397
1377
  * @property {Object} [meta] - Meta data of the order that contains additional,
1398
1378
  * potentially dynamic information about the order.
1399
1379
  * @property {TaxInfo} [tax_info]
@@ -1407,8 +1387,7 @@ const Joi = require("joi");
1407
1387
  * specifying whether the order is in a 'pendency' state (awaiting further
1408
1388
  * action) or marked as 'complete'.
1409
1389
  * @property {SystemMessages[]} [system_messages]
1410
- * @property {string} [order_type] - A string that specifies the type of order
1411
- * being placed.
1390
+ * @property {string} [order_type] - Type of order being placed
1412
1391
  * @property {string} [fynd_order_id] - Unique identifier for the order.
1413
1392
  * @property {string} [application_id] - A unique identifier for the application
1414
1393
  * or system that is making the order request.
@@ -2494,7 +2473,7 @@ const Joi = require("joi");
2494
2473
  * associated with a unique processing flow. For example:
2495
2474
  *
2496
2475
  * - "HomeDelivery": The order goes through all the steps needed for delivery,
2497
- * from being packed to arriving at the customers address.
2476
+ * from being packed to arriving at the customer's address.
2498
2477
  * - "PickAtStore": The order is prepared for pickup at the store, skipping
2499
2478
  * shipping steps to make it ready faster for the customer to collect in person.
2500
2479
  * - "Digital": This order type likely refers to orders that involve digital goods
@@ -2593,8 +2572,8 @@ const Joi = require("joi");
2593
2572
  * @property {string} [ordering_channel] - The specific channel through which
2594
2573
  * your order was placed. This field will be phased out after version 2.4.0.
2595
2574
  * Please use ordering_source instead to ensure accurate order tracking and processing.
2596
- * @property {string} [ordering_source] - To uniquely identify the source
2597
- * through which order has been placed (e.g, marketplace, gofynd).
2575
+ * @property {string} [ordering_source] - Ordering source, to be used to
2576
+ * identify source of order creation.
2598
2577
  * @property {string} entity - The type of entity that the configuration pertains to.
2599
2578
  */
2600
2579
 
@@ -2828,9 +2807,453 @@ const Joi = require("joi");
2828
2807
  */
2829
2808
 
2830
2809
  /**
2831
- * @typedef ValidationError
2832
- * @property {string} message - A brief description of the error encountered.
2833
- * @property {string} field - The field in the request that caused the error.
2810
+ * @typedef FulfillmentOptionSchema
2811
+ * @property {string} [name] - The name of the fulfillment option (e.g.,
2812
+ * 'Standard Shipping', 'Express Delivery').
2813
+ * @property {string} [slug] - A unique identifier for the fulfillment option.
2814
+ * @property {boolean} [is_default] - The category or method of fulfillment
2815
+ * (e.g., 'Pickup', 'Delivery', 'Courier').
2816
+ * @property {string} [type] - Indicates whether this fulfillment option is the
2817
+ * default choice for customers.
2818
+ */
2819
+
2820
+ /**
2821
+ * @typedef PaymentMethodGatewaySchema
2822
+ * @property {string} name - Payment gateway name e.g., Razorpay, Stripe, etc.
2823
+ * @property {string} [logo]
2824
+ */
2825
+
2826
+ /**
2827
+ * @typedef SubModeOfPaymentSchema
2828
+ * @property {string} name - Name of the sub-mode of payment. For example, if
2829
+ * the payment mode is 'Paytm', a sub-mode could be 'Paytm Wallet'.
2830
+ */
2831
+
2832
+ /**
2833
+ * @typedef PaymentMethodModeOfPaymentSchema
2834
+ * @property {string} name - Payment mode name e.g., Credit Card, Debit Card,
2835
+ * Net Banking, Wallet, etc.
2836
+ * @property {string} slug - Slug of the payment mode e.g., cc, dc, nb, wl, etc.
2837
+ * @property {SubModeOfPaymentSchema} [sub_mode_of_payment]
2838
+ */
2839
+
2840
+ /**
2841
+ * @typedef PaymentMethodTransactionPartySchema
2842
+ * @property {string} refund_bearer - Entity responsible for refunding the
2843
+ * amount paid by the customer
2844
+ * @property {string} collection_bearer - Entity responsible for collection of
2845
+ * amount paid by the customer
2846
+ */
2847
+
2848
+ /**
2849
+ * @typedef LineItemPaymentMethodSchema
2850
+ * @property {PaymentMethodGatewaySchema} [gateway]
2851
+ * @property {PaymentMethodModeOfPaymentSchema} [mode_of_payment]
2852
+ * @property {number} [amount_paid] - Total amount paid by this payment method
2853
+ * @property {string} [payment_identifier] - Transaction id
2854
+ * @property {PaymentMethodTransactionPartySchema} [transaction_party]
2855
+ */
2856
+
2857
+ /**
2858
+ * @typedef BundleDetailsSchema
2859
+ * @property {boolean} [is_base] - This serves as the base item, with all other
2860
+ * items acting as child elements within the bundle to display the hero
2861
+ * product prominently at the top.
2862
+ * @property {string[]} [images] - An array of image URLs associated with the bundle.
2863
+ * @property {string} [group_id] - Unique group identifier for the bundle
2864
+ * generated by seller to club the articles
2865
+ * @property {string} [name] - Name of the bundle.
2866
+ * @property {string} [item_type] - Type of the bundle item
2867
+ * @property {number} [item_id] - Unique identifier of the item.
2868
+ * @property {string} [item_code] - Item code for the item.
2869
+ * @property {string} [item_name] - Name of the item.
2870
+ * @property {string} [seller_identifier] - Identifier for the seller of the bundle.
2871
+ * @property {number} [bundle_article_quantity] - In orders with multiple
2872
+ * quantities of the same line item, the line item count remains constant, but
2873
+ * multiple bundles can exist. To distinguish between these bundles, the
2874
+ * article quantity must be used.
2875
+ * @property {string} [brand_name] - Identifier for the brand name.
2876
+ * @property {string} [size] - Size associated with the bundle item.
2877
+ */
2878
+
2879
+ /**
2880
+ * @typedef LineItemMonetaryValuesSchema
2881
+ * @property {number} amount_paid - Amount paid by the customer
2882
+ * @property {number} price_effective - The final effective price after applying
2883
+ * discounts, promotional offers, and adjustments.
2884
+ * @property {number} [discount] - Discount amount apart from promo and coupon discount
2885
+ * @property {number} price_marked - The original marked price of the item
2886
+ * before any discounts or promotions.
2887
+ * @property {number} [coupon_discount] - Coupon discount applied for this article
2888
+ * @property {number} [cod_charges] - Cash on Delivery Charges Applied for this Article.
2889
+ * @property {number} [promo_discount] - Promotion Discount
2890
+ * @property {number} [gift_price] - Gift Price
2891
+ * @property {number} [delivery_charges] - Delivery Charges Applied for this Article.
2892
+ */
2893
+
2894
+ /**
2895
+ * @typedef DimensionSchema
2896
+ * @property {number} height - Height of the product.
2897
+ * @property {number} length - Length of the product.
2898
+ * @property {number} width - Width of the product
2899
+ * @property {boolean} is_default - Not Modified, meaning these are same as
2900
+ * product uploaded while loading catelogue.
2901
+ * @property {string} unit - Unit of the measurement used.
2902
+ */
2903
+
2904
+ /**
2905
+ * @typedef GiftDetailsSchema
2906
+ * @property {number} amount - Specifies the value or cost of the gift
2907
+ * associated with the order line item.
2908
+ * @property {string} display_text - A short description or label intended for
2909
+ * display purposes. This can be a message to the customer, such as "Gift wrap
2910
+ * included" or "Gift card value applied."
2911
+ */
2912
+
2913
+ /**
2914
+ * @typedef CPRiderDetailsSchema
2915
+ * @property {string} name
2916
+ * @property {string} phone
2917
+ */
2918
+
2919
+ /**
2920
+ * @typedef CPAreaCodeSchema
2921
+ * @property {string} source
2922
+ * @property {string} destination
2923
+ */
2924
+
2925
+ /**
2926
+ * @typedef CPTatToDeliverTheShipmentSchema
2927
+ * @property {number} min
2928
+ * @property {number} max
2929
+ */
2930
+
2931
+ /**
2932
+ * @typedef CPOptionsSchema
2933
+ * @property {string} [extension_id] - A string that uniquely identifies the
2934
+ * courier partner extension. Refer <a
2935
+ * href='/commerce/sdk/latest/platform/company/serviceability#getCourierPartnerAccount'>Get
2936
+ * courier partner account</a> to get the extension id.
2937
+ * @property {string} [scheme_id] - A string that specifies the unique
2938
+ * identifier for the scheme associated with the account. Refer <a
2939
+ * href='/commerce/sdk/latest/platform/company/serviceability#getCourierPartnerAccount'>Get
2940
+ * courier partner account</a> to get the scheme id.
2941
+ * @property {CPAreaCodeSchema} [area_code]
2942
+ * @property {boolean} [is_self_ship]
2943
+ * @property {number} [max_reattempts_for_delivery_allowed]
2944
+ * @property {string} [cp_sort_key] - A sorting key used for categorizing or
2945
+ * sorting courier partners, often related to their performance, costs, or
2946
+ * some other factor, (example: E-17A-4, E-17A-6, etc.).
2947
+ * @property {string} [name] - The name of the courier partner or the delivery
2948
+ * agent handling the shipment.
2949
+ * @property {CPRiderDetailsSchema} [rider_details]
2950
+ * @property {boolean} [using_own_creds] - Specifies whether the seller's
2951
+ * credentials are being used for the courier partner.
2952
+ * @property {boolean} [qc_supported] - Specifies that Assigned CP support's
2953
+ * quality checks
2954
+ */
2955
+
2956
+ /**
2957
+ * @typedef CourierPartnerDetailsSchema
2958
+ * @property {string} [cp_sort_key] - A sorting key used for categorizing or
2959
+ * sorting courier partners, often related to their performance, costs, or
2960
+ * some other factor. (example: E-17A-4, E-17A-6, etc.).
2961
+ * @property {CPOptionsSchema[]} [cp_options] - Other Available CP's
2962
+ * @property {string} scheme_id
2963
+ * @property {string} name - The name of the courier partner or the delivery
2964
+ * agent handling the shipment.
2965
+ * @property {string} extension_id
2966
+ * @property {CPRiderDetailsSchema} [rider_details]
2967
+ * @property {boolean} [qc_supported] - Specifies that Assigned CP support's
2968
+ * quality checks
2969
+ * @property {boolean} using_own_creds - Specifies weather the Seller's Creds or
2970
+ * Fynd's Creds are being used.
2971
+ * @property {number} [max_reattempts_for_delivery_allowed] - Reattempts Allowed
2972
+ * (required for NDR)
2973
+ * @property {CPTatToDeliverTheShipmentSchema} [tat_to_deliver_the_shipment]
2974
+ * @property {boolean} [is_self_ship] - Is every logistic action handled by seller.
2975
+ */
2976
+
2977
+ /**
2978
+ * @typedef TaxDetailsSchema
2979
+ * @property {string} hs_code - The HS code of the product
2980
+ * @property {string} tax_rule_id - Tax identifier.
2981
+ */
2982
+
2983
+ /**
2984
+ * @typedef PromiseDetailsSchema
2985
+ * @property {number} min_sla - Min TimeStamp (EPOCH) that will be taken to
2986
+ * deliver the product
2987
+ * @property {number} max_sla - Max TimeStamp (EPOCH) that will be taken to
2988
+ * deliver the product.
2989
+ */
2990
+
2991
+ /**
2992
+ * @typedef CustomerPickupSlotSchema
2993
+ * @property {string} start_time
2994
+ * @property {string} end_time
2995
+ */
2996
+
2997
+ /**
2998
+ * @typedef DpPickupSlotSchema
2999
+ * @property {string} start_time
3000
+ * @property {string} end_time
3001
+ */
3002
+
3003
+ /**
3004
+ * @typedef OrderFulfillmentTimelineSchema
3005
+ * @property {DpPickupSlotSchema} [dp_pickup_slot]
3006
+ * @property {string} [dispatch_after_date] - A date indicating when the order
3007
+ * can be dispatched (e.g., the earliest possible dispatch date).
3008
+ * @property {string} [dispatch_by_date] - The latest date the order must be
3009
+ * dispatched to meet delivery expectations.
3010
+ * @property {string} [confirm_by_date] - The deadline by which the seller must
3011
+ * confirm the order.
3012
+ * @property {CustomerPickupSlotSchema} [customer_pickup_slot]
3013
+ * @property {string} [pack_by_date] - The latest time the package should be
3014
+ * packed and ready to dispatch.
3015
+ */
3016
+
3017
+ /**
3018
+ * @typedef LineItemSchema
3019
+ * @property {string} [seller_identifier] - Identifier of the seller selling the item.
3020
+ * @property {LineItemPaymentMethodSchema[]} payment_methods - Payment methods
3021
+ * used to sell this order.
3022
+ * @property {LineItemMonetaryValuesSchema} monetary_values
3023
+ * @property {GiftDetailsSchema} [gift_details]
3024
+ * @property {string} [special_instructions] - These instructions are added by
3025
+ * the customer at checkout for the seller's reference.
3026
+ * @property {DimensionSchema} [dimension]
3027
+ * @property {number} [quantity] - Quantity of the Line Item
3028
+ * @property {string} [external_line_id] - Unique identifier for the LineItem as
3029
+ * assigned by an external system. You can use this to map external id to
3030
+ * Fynd's generated id
3031
+ * @property {BundleDetailsSchema} [bundle_details]
3032
+ * @property {Object} [meta] - Contains metadata related to the shipment
3033
+ */
3034
+
3035
+ /**
3036
+ * @typedef CreateOrderShipmentSchema
3037
+ * @property {boolean} [is_mto] - Indicates if the shipment belongs to the
3038
+ * made-to-order category, i.e., the seller will start creating this order
3039
+ * after receiving an order creation request.
3040
+ * @property {LifecycleMessageSchema[]} [shipment_lifecycle_messages] - List of
3041
+ * general-purpose messages shown across different points in the shipment's
3042
+ * journey at Order Details screen.
3043
+ * @property {string[]} [tags] - Tags that can be attached to the shipment for
3044
+ * filtering and categorization.
3045
+ * @property {string} [type] - The shipment type defining the fulfillment method
3046
+ * and processing flow. Each type determines the specific journey a shipment
3047
+ * will follow based on operational needs and customer preferences:
3048
+ * "HomeDelivery": Standard delivery to the customer's address, undergoing all
3049
+ * typical state transitions from processing to final delivery. "PickAtStore":
3050
+ * Order prepared for in-store pickup, bypassing traditional shipping stages
3051
+ * for direct handover to the customer. "Digital": Orders involving digital
3052
+ * goods or services (e.g., software, e-books, subscriptions) delivered electronically.
3053
+ * @property {FulfillmentOptionSchema} [fulfillment_option]
3054
+ * @property {string} [external_shipment_id] - Unique identifier for the
3055
+ * shipment as assigned by an external system. Use this to map the external ID
3056
+ * to Fynd's generated ID.
3057
+ * @property {LineItemSchema[]} [line_items] - A list of items included in the shipment.
3058
+ * @property {OrderFulfillmentTimelineSchema} [order_fulfillment_timeline]
3059
+ * @property {number} [location_id] - The location ID from which this shipment
3060
+ * is being fulfilled.
3061
+ * @property {string} [external_location_id] - The external location ID from
3062
+ * which this shipment is being fulfilled.
3063
+ * @property {number} [return_location_id] - Overrides the article's default
3064
+ * return location.
3065
+ * @property {CourierPartnerDetailsSchema} [courier_partner_details]
3066
+ * @property {TaxDetailsSchema} [tax_details]
3067
+ * @property {PromiseDetailsSchema} [promise_details]
3068
+ * @property {string} [allow_processing_after] - Defines the UTC time at which
3069
+ * the shipment will automatically move to the placed state.
3070
+ * @property {Object} [meta] - Additional metadata related to the shipment.
3071
+ */
3072
+
3073
+ /**
3074
+ * @typedef OrderingCurrencySchema
3075
+ * @property {string} currency_code - The <a
3076
+ * href='https://www.iso.org/iso-4217-currency-codes.html'>ISO 4217</a>
3077
+ * currency code, such as 'INR' for Indian Rupee. This field represents the
3078
+ * standardized three-letter code of a currency.
3079
+ * @property {string} currency_symbol - The symbol representing the currency,
3080
+ * such as '₹' for Indian Rupee. This is used for display purposes alongside
3081
+ * currency amounts.
3082
+ */
3083
+
3084
+ /**
3085
+ * @typedef ConversionRateSchema
3086
+ * @property {number} rate - The exchange rate used to convert monetary values
3087
+ * from the ordering currency to the seller's currency.
3088
+ * @property {number} timestamp_ms - The timestamp (in milliseconds) when the
3089
+ * conversion rate was applied.
3090
+ */
3091
+
3092
+ /**
3093
+ * @typedef CurrencySchema
3094
+ * @property {OrderingCurrencySchema} ordering_currency
3095
+ * @property {ConversionRateSchema} conversion_rate
3096
+ * @property {string} [currency_code] - The ISO 4217 currency code, such as
3097
+ * 'INR' for Indian Rupee. This field represents the standardized three-letter
3098
+ * code of a currency.
3099
+ * @property {string} [currency_symbol] - The symbol representing the currency,
3100
+ * such as '₹' for Indian Rupee. This is used for display purposes alongside
3101
+ * currency amounts.
3102
+ */
3103
+
3104
+ /**
3105
+ * @typedef CouponOwnershipSchema
3106
+ * @property {string} payable_category - Indicates who issued the coupon
3107
+ */
3108
+
3109
+ /**
3110
+ * @typedef CouponSchema
3111
+ * @property {string} code - The coupon code that was applied.
3112
+ * @property {string} id - Unique identifier of the coupon.
3113
+ * @property {CouponOwnershipSchema} ownership
3114
+ * @property {boolean} is_return_allowed - Indicates whether returns are allowed
3115
+ * when this coupon is applied.
3116
+ * @property {boolean} is_cancellation_allowed - Indicates whether cancellations
3117
+ * are allowed when this coupon is applied.
3118
+ */
3119
+
3120
+ /**
3121
+ * @typedef BillingDetailsSchema
3122
+ * @property {string} [first_name] - First name of the customer
3123
+ * @property {string} [phone_code] - Country phone code ex: +91
3124
+ * @property {string} [country] - Country of the customer
3125
+ * @property {string} [city] - City of the customer
3126
+ * @property {string} [pincode] - Pincode of the customer
3127
+ * @property {string} [last_name] - Last name of the customer
3128
+ * @property {string} [mobile_number] - Primary phone number of the customer
3129
+ * @property {string} [email] - Primary email of the customer
3130
+ * @property {string} [state] - State of the customer
3131
+ * @property {string} [alternate_mobile_number] - Alternate mobile number
3132
+ * @property {string} [address] - Billing address of the customer
3133
+ * @property {string} [middle_name] - Customer's middle name.
3134
+ * @property {string} [title] - Customer's title or prefix.
3135
+ * @property {string} [house_no] - House or apartment number of the customer.
3136
+ * @property {GeoLocationSchema} [geo_location]
3137
+ * @property {string} [gender] - Gender of customer
3138
+ * @property {string} [landmark] - Landmark or reference point near the
3139
+ * customer's location.
3140
+ * @property {string} [address_type] - Address type in the seller's system.
3141
+ * @property {string} [state_code] - State code of the customer's location.
3142
+ * @property {string} [floor_no] - Floor number of the customer's location.
3143
+ * @property {string} [alternate_email] - Alternate Email Address
3144
+ * @property {string} [address1] - First line of the address.
3145
+ * @property {string} [address2] - Second line of the address.
3146
+ * @property {string} [country_iso_code] - Specifies the country's unique
3147
+ * identifier allowing the ISO 3166-1 alpha-2 standard. This two-letter code
3148
+ * is crucial for distinguishing countries in international transactions, data
3149
+ * processing, and shipping logistics.
3150
+ * @property {string} [user_id] - The unique identifier assigned to the
3151
+ * customer. Refer <a
3152
+ * href='/commerce/sdk/latest/platform/application/user#customer'>Customer</a>
3153
+ * to get more details.
3154
+ * @property {string} [area_code] - Area Code
3155
+ * @property {string} [area_code_slug]
3156
+ * @property {string} [country_phone_code]
3157
+ */
3158
+
3159
+ /**
3160
+ * @typedef CPConfigurationSchema
3161
+ * @property {string} shipping_by - Shipping Handled by FYND or SELLER
3162
+ */
3163
+
3164
+ /**
3165
+ * @typedef ShippingDetailsSchema
3166
+ * @property {string} [first_name] - First name of the customer
3167
+ * @property {string} [phone_code] - Country phone code ex: +91
3168
+ * @property {string} [country] - Country of the customer
3169
+ * @property {string} [city] - City of the customer
3170
+ * @property {string} [pincode] - Pincode of the customer
3171
+ * @property {string} [last_name] - Last name of the customer
3172
+ * @property {string} [mobile_number] - Primary phone number of the customer
3173
+ * @property {string} [email] - Primary email of the customer
3174
+ * @property {string} [state] - State of the customer
3175
+ * @property {string} [alternate_mobile_number] - Alternate mobile number
3176
+ * @property {string} [address] - Shipping address of the customer
3177
+ * @property {string} [middle_name] - Customer's middle name.
3178
+ * @property {string} [title] - Customer's title or prefix.
3179
+ * @property {string} [house_no] - House or apartment number of the customer.
3180
+ * @property {GeoLocationSchema} [geo_location]
3181
+ * @property {string} [gender] - Gender of customer
3182
+ * @property {string} [landmark] - Landmark or reference point near the
3183
+ * customer's location.
3184
+ * @property {string} [address_type] - A string representing the address type in
3185
+ * the seller's system.
3186
+ * @property {string} [state_code] - State code of the customer's location.
3187
+ * @property {string} [floor_no] - Floor number of the customer's location.
3188
+ * @property {string} [alternate_email] - Alternate Email Address
3189
+ * @property {string} [address1] - First line of the address
3190
+ * @property {string} [address2] - Second line of the address
3191
+ * @property {string} [country_iso_code] - Specifies the country's unique
3192
+ * identifier allowing the ISO 3166-1 alpha-2 standard. This two-letter code
3193
+ * is crucial for distinguishing countries in international transactions, data
3194
+ * processing, and shipping logistics.
3195
+ * @property {string} [user_id] - The unique identifier assigned to the
3196
+ * customer. Refer <a
3197
+ * href='/commerce/sdk/latest/platform/application/user#customer'>Customer</a>
3198
+ * in platform documentation to get more details. details.
3199
+ * @property {string} [area_code] - Area Code
3200
+ * @property {string} [area_code_slug]
3201
+ * @property {string} [country_phone_code]
3202
+ */
3203
+
3204
+ /**
3205
+ * @typedef UserDetailsSchema
3206
+ * @property {string} [gstin] - The customer's GSTIN (Goods and Services Tax
3207
+ * Identification Number).
3208
+ * @property {string} [pan_no] - The customer's PAN (Permanent Account Number).
3209
+ */
3210
+
3211
+ /**
3212
+ * @typedef LifecycleMessageSchema
3213
+ * @property {string} message - The message text to display to users at specific
3214
+ * order states (e.g., PLACED, SHIPPED).
3215
+ * @property {string} type - The message type, which determines the color of the
3216
+ * message bar.
3217
+ * @property {string[]} states - List of OMS states at which the message should
3218
+ * be visible.
3219
+ * @property {number} priority - Determines the message display sequence, with
3220
+ * '1' being the highest priority.
3221
+ */
3222
+
3223
+ /**
3224
+ * @typedef CreateOrderRequestSchema
3225
+ * @property {CreateOrderShipmentSchema[]} [shipments] - List of shipments
3226
+ * included in the order.
3227
+ * @property {string[]} [tags] - Tags that can be used to filter and categorize
3228
+ * orders and shipments.
3229
+ * @property {CurrencySchema} currency_details
3230
+ * @property {string} [external_creation_date] - Timestamp indicating when the
3231
+ * order was created in an external system.
3232
+ * @property {CouponSchema} [coupon_details]
3233
+ * @property {BillingDetailsSchema} billing_details
3234
+ * @property {string} primary_payment_mode - The primary payment method used for
3235
+ * the entire order transaction.
3236
+ * @property {CPConfigurationSchema} [cp_configuration]
3237
+ * @property {number} [ordering_location_id] - The location ID where the order
3238
+ * is placed. Required when the order is placed from one location but
3239
+ * fulfilled by another.
3240
+ * @property {boolean} [allow_location_reassignment] - Allows location
3241
+ * reassignment before order confirmation.
3242
+ * @property {ShippingDetailsSchema} shipping_details
3243
+ * @property {string} [external_order_id] - A unique identifier assigned to the
3244
+ * order by an external system or service.
3245
+ * @property {UserDetailsSchema} [user_details]
3246
+ * @property {LifecycleMessageSchema[]} [order_lifecycle_messages] - List of
3247
+ * order lifecycle messages to be displayed to the seller at Order Details.
3248
+ * @property {string} [channel_application_id] - Identifies the application from
3249
+ * which the order was created. Pass this when it differs from the fulfilling
3250
+ * company's application.
3251
+ * @property {string} [b2b_gstin_number] - The GSTIN (Goods and Services Tax
3252
+ * Identification Number) for business-to-business transactions.
3253
+ * @property {string} [channel_company_id] - The company ID where the order is
3254
+ * placed. Required when the order is placed from one company but fulfilled by another.
3255
+ * @property {boolean} [is_draft] - Indicates whether the order is a draft.
3256
+ * Draft orders will be moved to upcoming state instead of placed status.
2834
3257
  */
2835
3258
 
2836
3259
  /**
@@ -2845,6 +3268,66 @@ const Joi = require("joi");
2845
3268
  * @property {number} [page_size] - The number of items per page.
2846
3269
  */
2847
3270
 
3271
+ /**
3272
+ * @typedef OrderingSourceConfig
3273
+ * @property {string} [slug] - Slug of the ordering source.
3274
+ * @property {OrderingSourceFeature[]} [configs]
3275
+ * @property {string} [logo] - Logo of the ordering source.
3276
+ */
3277
+
3278
+ /**
3279
+ * @typedef OrderingSourceFeature
3280
+ * @property {string} [name] - Name of the ordering source config item.
3281
+ * @property {string} [slug] - Slug of the ordering source config item.
3282
+ * @property {string} [description] - Description of the ordering source config item.
3283
+ * @property {boolean} [enabled] - Whether the config/feature is enabled or not.
3284
+ */
3285
+
3286
+ /**
3287
+ * @typedef ListOrderingSources
3288
+ * @property {OrderingSourceSummary[]} [items]
3289
+ * @property {Page} [page]
3290
+ */
3291
+
3292
+ /**
3293
+ * @typedef OrderingSourceSummary
3294
+ * @property {string} [text] - Display Text of the ordering source.
3295
+ * @property {string} [value] - Value of the ordering source.
3296
+ */
3297
+
3298
+ /**
3299
+ * @typedef CreateAccount
3300
+ * @property {string} channel_account_name - Unique name identifier for the
3301
+ * channel account. This represents the sales channel or marketplace through
3302
+ * which orders are received and processed.
3303
+ */
3304
+
3305
+ /**
3306
+ * @typedef Account
3307
+ * @property {string} [channel_account_id] - Unique identifier for the channel
3308
+ * account. This is a system-generated identifier used to reference the
3309
+ * account across the platform.
3310
+ * @property {number} [company_id] - Unique identifier of the company on the
3311
+ * platform to which this channel account belongs.
3312
+ * @property {string} [channel_account_name] - Name of the channel account. This
3313
+ * identifies the specific sales channel or marketplace (e.g., SHOPIFY,
3314
+ * MARKETPLACE, etc.) through which the company receives and processes orders.
3315
+ */
3316
+
3317
+ /**
3318
+ * @typedef AccountsList
3319
+ * @property {Account[]} [data] - List of channel accounts associated with the
3320
+ * company. Each account represents a different sales channel or marketplace
3321
+ * integration.
3322
+ * @property {Page} [page]
3323
+ */
3324
+
3325
+ /**
3326
+ * @typedef ValidationError
3327
+ * @property {string} message - A brief description of the error encountered.
3328
+ * @property {string} field - The field in the request that caused the error.
3329
+ */
3330
+
2848
3331
  /**
2849
3332
  * @typedef BagReasonMeta
2850
3333
  * @property {boolean} [show_text_area] - Indicates whether a text area should
@@ -2937,6 +3420,37 @@ const Joi = require("joi");
2937
3420
  * useful for formatting mobile numbers correctly.
2938
3421
  */
2939
3422
 
3423
+ /**
3424
+ * @typedef BundleReturnConfig
3425
+ * @property {boolean} [allow_partial_return] - Indicates whether partial
3426
+ * returns are allowed for bundle products.
3427
+ * @property {boolean} [returnable] - Indicates whether the bundle product is returnable.
3428
+ * @property {boolean} [unit] - Time unit for the return window (e.g., "week",
3429
+ * "day", "hour").
3430
+ * @property {boolean} [time] - Duration value for the return window, expressed
3431
+ * in the specified unit.
3432
+ */
3433
+
3434
+ /**
3435
+ * @typedef BundleDetails
3436
+ * @property {string} [bundle_group_id] - Unique group identifier for the bundle.
3437
+ * @property {string} [name] - Name of the bundle.
3438
+ * @property {string} [slug] - URL-friendly identifier for the bundle.
3439
+ * @property {number} [bundle_count] - Indicates bundle count of the bag.
3440
+ * @property {string} [article_bundle_id] - Unique identifier for the article bundle.
3441
+ * @property {number} [bundle_article_quantity] - Article net_quantity in bundle Product.
3442
+ * @property {boolean} [is_base] - A flag that determines if bag is base bag of bundle.
3443
+ * @property {number} [price_marked] - Maximum Retail Price of the bundle.
3444
+ * @property {number} [price_effective] - Current selling price of the bundle.
3445
+ * @property {number} [item_id] - Unique identifier for the item.
3446
+ * @property {string} [item_type] - Type of the item (physical_bundle, virtual_bundle).
3447
+ * @property {BundleReturnConfig} [return_config]
3448
+ * @property {string} [seller_identifier] - Identifier for the seller of the bundle.
3449
+ * @property {string[]} [images] - An array of image URLs associated with the bundle.
3450
+ * @property {string} [brand_name] - Identifier for the brand name.
3451
+ * @property {string} [size] - Size associated with the bundle item.
3452
+ */
3453
+
2940
3454
  /**
2941
3455
  * @typedef Address
2942
3456
  * @property {string} [phone] - The phone number at the address, used for
@@ -3752,8 +4266,8 @@ const Joi = require("joi");
3752
4266
  * @property {string} [ordering_channnel] - The specific channel through which
3753
4267
  * your order was placed. This field will be phased out after version 2.4.0.
3754
4268
  * Please use ordering_source instead to ensure accurate order tracking and processing.
3755
- * @property {string} [ordering_source] - To uniquely identify the source
3756
- * through which order has been placed (e.g, marketplace, gofynd).
4269
+ * @property {string} [ordering_source] - Ordering source, to be used to
4270
+ * identify source of order creation.
3757
4271
  * @property {string} [shipment_id] - The unique identifier for the shipment itself.
3758
4272
  * @property {string} [customer_note] - Any special notes or instructions
3759
4273
  * provided by the customer related to the shipment.
@@ -3867,8 +4381,8 @@ const Joi = require("joi");
3867
4381
  * @property {string} [ordering_channel] - The specific channel through which
3868
4382
  * your order was placed. This field will be phased out after version 2.4.0.
3869
4383
  * Please use ordering_source instead to ensure accurate order tracking and processing.
3870
- * @property {string} [ordering_source] - To uniquely identify the source
3871
- * through which order has been placed (e.g, marketplace, gofynd).
4384
+ * @property {string} [ordering_source] - Ordering source, to be used to
4385
+ * identify source of order creation.
3872
4386
  * @property {LoyaltyDiscountDetails} [loyalty_discount_details]
3873
4387
  * @property {Object} [meta] - Meta data of the order contains additional,
3874
4388
  * potentially dynamic information about the order.
@@ -4191,6 +4705,9 @@ const Joi = require("joi");
4191
4705
  * tracking is enabled for the bag.
4192
4706
  * @property {boolean} is_customer_return_allowed - A flag that determines if
4193
4707
  * customer return is allowed for the bag.
4708
+ * @property {boolean} [is_bundle_item] - Flag to indicate whether the bag is
4709
+ * part of a bundle.
4710
+ * @property {BundleDetails} [bundle_details]
4194
4711
  */
4195
4712
 
4196
4713
  /**
@@ -4666,23 +5183,13 @@ const Joi = require("joi");
4666
5183
  * track and reference the specific transaction within the merchant's system.
4667
5184
  */
4668
5185
 
4669
- /**
4670
- * @typedef CurrencySchema
4671
- * @property {string} [currency_code] - The ISO 4217 currency code, such as
4672
- * 'INR' for Indian Rupee. This field represents the standardized three-letter
4673
- * code of a currency.
4674
- * @property {string} [currency_symbol] - The symbol representing the currency,
4675
- * such as '₹' for Indian Rupee. This is used for display purposes alongside
4676
- * currency amounts.
4677
- */
4678
-
4679
5186
  /**
4680
5187
  * @typedef OrderData
4681
5188
  * @property {string} [ordering_channel] - The specific channel through which
4682
5189
  * your order was placed. This field will be phased out after version 2.4.0.
4683
5190
  * Please use ordering_source instead to ensure accurate order tracking and processing.
4684
- * @property {string} [ordering_source] - To uniquely identify the source
4685
- * through which order has been placed (e.g, marketplace, gofynd).
5191
+ * @property {string} [ordering_source] - Ordering source, to be used to
5192
+ * identify source of order creation.
4686
5193
  * @property {string} order_date - Specifies the exact date and time when the
4687
5194
  * order was placed by the customer, serving as a key timestamp for the
4688
5195
  * initiation of the order processing cycle.
@@ -5401,96 +5908,6 @@ const Joi = require("joi");
5401
5908
  * @property {string} [error]
5402
5909
  */
5403
5910
 
5404
- /**
5405
- * @typedef {| "storefront"
5406
- * | "store_os_pos"
5407
- * | "kiosk"
5408
- * | "scan_go"
5409
- * | "smart_trolley"
5410
- * | "gofynd"
5411
- * | "uniket"
5412
- * | "marketplace"
5413
- * | "social_commerce"
5414
- * | "ondc"
5415
- * | "nexus"
5416
- * | "nykaa_fashion"
5417
- * | "etsy"
5418
- * | "vuivui"
5419
- * | "zilingo"
5420
- * | "firstcry"
5421
- * | "bukalapak"
5422
- * | "myntra_ppmp"
5423
- * | "lazada"
5424
- * | "tiktok"
5425
- * | "sfcc"
5426
- * | "debenhams"
5427
- * | "prestomall"
5428
- * | "meesho"
5429
- * | "amazon_vdf"
5430
- * | "bigcommerce"
5431
- * | "sendo"
5432
- * | "storehippo"
5433
- * | "cdiscount"
5434
- * | "nykaa"
5435
- * | "trendyol"
5436
- * | "weloveshopping"
5437
- * | "jollee"
5438
- * | "wish"
5439
- * | "tiki"
5440
- * | "central_online"
5441
- * | "q10"
5442
- * | "cred"
5443
- * | "walmart"
5444
- * | "snapdeal"
5445
- * | "flipkart"
5446
- * | "blibli"
5447
- * | "ajio_jit"
5448
- * | "pharmeasy"
5449
- * | "ezmall"
5450
- * | "adobe_commerce"
5451
- * | "kartmax"
5452
- * | "shopee"
5453
- * | "zalora"
5454
- * | "prestashop"
5455
- * | "smytten"
5456
- * | "amazon_sc"
5457
- * | "urbanpiper"
5458
- * | "flipkart_quick"
5459
- * | "woocommerce"
5460
- * | "zivame"
5461
- * | "lelong"
5462
- * | "facebook"
5463
- * | "jiomart"
5464
- * | "gmc"
5465
- * | "robins"
5466
- * | "akulaku"
5467
- * | "noon"
5468
- * | "tatacliq"
5469
- * | "kartrocket"
5470
- * | "inorbit"
5471
- * | "ajio_business"
5472
- * | "swiggy"
5473
- * | "asos"
5474
- * | "tokopedia"
5475
- * | "limeroad"
5476
- * | "myntra_omni"
5477
- * | "spoyl"
5478
- * | "amazon_mlf"
5479
- * | "fulfilled_by_lazada"
5480
- * | "ebay"
5481
- * | "jd"
5482
- * | "amazon_pharmacy"
5483
- * | "ajio_vms"
5484
- * | "daraz"
5485
- * | "oker"
5486
- * | "flipkart_b2b"
5487
- * | "amazon_mlf_ss"
5488
- * | "woovly"
5489
- * | "tata1mg"
5490
- * | "zomato"
5491
- * | "shopify"} OrderingSource
5492
- */
5493
-
5494
5911
  class OrderPlatformModel {
5495
5912
  /** @returns {InvalidateShipmentCachePayload} */
5496
5913
  static InvalidateShipmentCachePayload() {
@@ -5938,7 +6355,7 @@ class OrderPlatformModel {
5938
6355
  /** @returns {CreateOrderConfig} */
5939
6356
  static CreateOrderConfig() {
5940
6357
  return Joi.object({
5941
- dp_configuration: OrderPlatformModel.DPConfiguration().required(),
6358
+ dp_configuration: OrderPlatformModel.DPConfiguration(),
5942
6359
  location_reassignment: Joi.boolean(),
5943
6360
  payment: OrderPlatformModel.PaymentConfig(),
5944
6361
  optimal_shipment_creation: Joi.boolean(),
@@ -6554,11 +6971,11 @@ class OrderPlatformModel {
6554
6971
  /** @returns {Charge} */
6555
6972
  static Charge() {
6556
6973
  return Joi.object({
6557
- name: Joi.string().allow("").required(),
6558
6974
  amount: OrderPlatformModel.AmountSchema().required(),
6559
- tax: OrderPlatformModel.Tax(),
6560
- code: Joi.string().allow(""),
6561
6975
  type: Joi.string().allow("").required(),
6976
+ name: Joi.string().allow("").required(),
6977
+ code: Joi.string().allow(""),
6978
+ tax: OrderPlatformModel.Tax(),
6562
6979
  });
6563
6980
  }
6564
6981
 
@@ -8105,115 +8522,619 @@ class OrderPlatformModel {
8105
8522
  });
8106
8523
  }
8107
8524
 
8108
- /** @returns {ValidationError} */
8109
- static ValidationError() {
8525
+ /** @returns {FulfillmentOptionSchema} */
8526
+ static FulfillmentOptionSchema() {
8110
8527
  return Joi.object({
8111
- message: Joi.string().allow("").required(),
8112
- field: Joi.string().allow("").required(),
8528
+ name: Joi.string().allow(""),
8529
+ slug: Joi.string().allow(""),
8530
+ is_default: Joi.boolean(),
8531
+ type: Joi.string().allow(""),
8113
8532
  });
8114
8533
  }
8115
8534
 
8116
- /** @returns {Page} */
8117
- static Page() {
8535
+ /** @returns {PaymentMethodGatewaySchema} */
8536
+ static PaymentMethodGatewaySchema() {
8118
8537
  return Joi.object({
8119
- item_total: Joi.number(),
8120
- next_id: Joi.string().allow(""),
8121
- has_previous: Joi.boolean(),
8122
- has_next: Joi.boolean(),
8123
- current: Joi.number(),
8124
- type: Joi.string().allow("").required(),
8125
- size: Joi.number(),
8126
- page_size: Joi.number(),
8538
+ name: Joi.string().allow("").required(),
8539
+ logo: Joi.string().allow(""),
8127
8540
  });
8128
8541
  }
8129
8542
 
8130
- /** @returns {BagReasonMeta} */
8131
- static BagReasonMeta() {
8543
+ /** @returns {SubModeOfPaymentSchema} */
8544
+ static SubModeOfPaymentSchema() {
8132
8545
  return Joi.object({
8133
- show_text_area: Joi.boolean(),
8546
+ name: Joi.string().allow("").required(),
8134
8547
  });
8135
8548
  }
8136
8549
 
8137
- /** @returns {QuestionSet} */
8138
- static QuestionSet() {
8550
+ /** @returns {PaymentMethodModeOfPaymentSchema} */
8551
+ static PaymentMethodModeOfPaymentSchema() {
8139
8552
  return Joi.object({
8140
- id: Joi.number(),
8141
- display_name: Joi.string().allow(""),
8553
+ name: Joi.string().allow("").required(),
8554
+ slug: Joi.string().allow("").required(),
8555
+ sub_mode_of_payment: OrderPlatformModel.SubModeOfPaymentSchema(),
8142
8556
  });
8143
8557
  }
8144
8558
 
8145
- /** @returns {BagReasons} */
8146
- static BagReasons() {
8559
+ /** @returns {PaymentMethodTransactionPartySchema} */
8560
+ static PaymentMethodTransactionPartySchema() {
8147
8561
  return Joi.object({
8148
- qc_type: Joi.array().items(Joi.string().allow("")),
8149
- id: Joi.number(),
8150
- display_name: Joi.string().allow(""),
8151
- meta: OrderPlatformModel.BagReasonMeta(),
8152
- question_set: Joi.array().items(OrderPlatformModel.QuestionSet()),
8153
- reasons: Joi.array().items(Joi.link("#BagReasons")),
8154
- }).id("BagReasons");
8562
+ refund_bearer: Joi.string().allow("").required(),
8563
+ collection_bearer: Joi.string().allow("").required(),
8564
+ });
8155
8565
  }
8156
8566
 
8157
- /** @returns {ShipmentBagReasons} */
8158
- static ShipmentBagReasons() {
8567
+ /** @returns {LineItemPaymentMethodSchema} */
8568
+ static LineItemPaymentMethodSchema() {
8159
8569
  return Joi.object({
8160
- reasons: Joi.array().items(OrderPlatformModel.BagReasons()),
8161
- success: Joi.boolean(),
8162
- rule_id: Joi.number().allow(null),
8570
+ gateway: OrderPlatformModel.PaymentMethodGatewaySchema(),
8571
+ mode_of_payment: OrderPlatformModel.PaymentMethodModeOfPaymentSchema(),
8572
+ amount_paid: Joi.number(),
8573
+ payment_identifier: Joi.string().allow(""),
8574
+ transaction_party: OrderPlatformModel.PaymentMethodTransactionPartySchema(),
8163
8575
  });
8164
8576
  }
8165
8577
 
8166
- /** @returns {ShipmentStatus} */
8167
- static ShipmentStatus() {
8578
+ /** @returns {BundleDetailsSchema} */
8579
+ static BundleDetailsSchema() {
8168
8580
  return Joi.object({
8169
- current_shipment_status: Joi.string().allow("").allow(null),
8170
- meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
8171
- id: Joi.number().allow(null),
8172
- bag_list: Joi.array().items(Joi.string().allow("")).allow(null, ""),
8173
- title: Joi.string().allow("").required(),
8174
- display_name: Joi.string().allow(""),
8175
- created_at: Joi.string().allow("").allow(null),
8176
- created_ts: Joi.string().allow("").allow(null),
8177
- shipment_id: Joi.string().allow("").allow(null),
8178
- status_created_at: Joi.string().allow("").allow(null),
8179
- updated_ts: Joi.string().allow("").allow(null),
8180
- status: Joi.string().allow("").required(),
8581
+ is_base: Joi.boolean(),
8582
+ images: Joi.array().items(Joi.string().allow("")),
8583
+ group_id: Joi.string().allow(""),
8584
+ name: Joi.string().allow(""),
8585
+ item_type: Joi.string().allow(""),
8586
+ item_id: Joi.number(),
8587
+ item_code: Joi.string().allow(""),
8588
+ item_name: Joi.string().allow(""),
8589
+ seller_identifier: Joi.string().allow(""),
8590
+ bundle_article_quantity: Joi.number(),
8591
+ brand_name: Joi.string().allow(""),
8592
+ size: Joi.string().allow(""),
8181
8593
  });
8182
8594
  }
8183
8595
 
8184
- /** @returns {UserDataInfo} */
8185
- static UserDataInfo() {
8596
+ /** @returns {LineItemMonetaryValuesSchema} */
8597
+ static LineItemMonetaryValuesSchema() {
8186
8598
  return Joi.object({
8187
- id: Joi.number().allow(null),
8188
- user_oid: Joi.string().allow("").allow(null),
8189
- mongo_user_id: Joi.string().allow("").allow(null),
8190
- external_customer_id: Joi.string().allow("").allow(null),
8191
- first_name: Joi.string().allow("").allow(null),
8192
- last_name: Joi.string().allow("").allow(null),
8193
- mobile: Joi.string().allow("").allow(null),
8194
- email: Joi.string().allow("").allow(null),
8195
- meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
8196
- is_anonymous_user: Joi.boolean().allow(null),
8197
- name: Joi.string().allow("").allow(null),
8198
- gender: Joi.string().allow("").allow(null),
8199
- country_phone_code: Joi.string().allow(""),
8599
+ amount_paid: Joi.number().required(),
8600
+ price_effective: Joi.number().required(),
8601
+ discount: Joi.number(),
8602
+ price_marked: Joi.number().required(),
8603
+ coupon_discount: Joi.number(),
8604
+ cod_charges: Joi.number(),
8605
+ promo_discount: Joi.number(),
8606
+ gift_price: Joi.number(),
8607
+ delivery_charges: Joi.number(),
8200
8608
  });
8201
8609
  }
8202
8610
 
8203
- /** @returns {Address} */
8204
- static Address() {
8611
+ /** @returns {DimensionSchema} */
8612
+ static DimensionSchema() {
8205
8613
  return Joi.object({
8206
- phone: Joi.string().allow("").allow(null),
8207
- address2: Joi.string().allow("").allow(null),
8208
- address: Joi.string().allow("").allow(null),
8209
- longitude: Joi.number().allow(null),
8210
- pincode: Joi.string().allow("").allow(null),
8211
- area: Joi.string().allow("").allow(null),
8212
- address_type: Joi.string().allow("").allow(null),
8213
- country: Joi.string().allow("").allow(null),
8214
- address_category: Joi.string().allow("").allow(null),
8215
- email: Joi.string().allow("").allow(null),
8216
- created_at: Joi.string().allow("").allow(null),
8614
+ height: Joi.number().required(),
8615
+ length: Joi.number().required(),
8616
+ width: Joi.number().required(),
8617
+ is_default: Joi.boolean().required(),
8618
+ unit: Joi.string().allow("").required(),
8619
+ });
8620
+ }
8621
+
8622
+ /** @returns {GiftDetailsSchema} */
8623
+ static GiftDetailsSchema() {
8624
+ return Joi.object({
8625
+ amount: Joi.number().required(),
8626
+ display_text: Joi.string().allow("").required(),
8627
+ });
8628
+ }
8629
+
8630
+ /** @returns {CPRiderDetailsSchema} */
8631
+ static CPRiderDetailsSchema() {
8632
+ return Joi.object({
8633
+ name: Joi.string().allow("").required(),
8634
+ phone: Joi.string().allow("").required(),
8635
+ });
8636
+ }
8637
+
8638
+ /** @returns {CPAreaCodeSchema} */
8639
+ static CPAreaCodeSchema() {
8640
+ return Joi.object({
8641
+ source: Joi.string().allow("").required(),
8642
+ destination: Joi.string().allow("").required(),
8643
+ });
8644
+ }
8645
+
8646
+ /** @returns {CPTatToDeliverTheShipmentSchema} */
8647
+ static CPTatToDeliverTheShipmentSchema() {
8648
+ return Joi.object({
8649
+ min: Joi.number().required(),
8650
+ max: Joi.number().required(),
8651
+ });
8652
+ }
8653
+
8654
+ /** @returns {CPOptionsSchema} */
8655
+ static CPOptionsSchema() {
8656
+ return Joi.object({
8657
+ extension_id: Joi.string().allow(""),
8658
+ scheme_id: Joi.string().allow(""),
8659
+ area_code: OrderPlatformModel.CPAreaCodeSchema(),
8660
+ is_self_ship: Joi.boolean(),
8661
+ max_reattempts_for_delivery_allowed: Joi.number(),
8662
+ cp_sort_key: Joi.string().allow(""),
8663
+ name: Joi.string().allow(""),
8664
+ rider_details: OrderPlatformModel.CPRiderDetailsSchema(),
8665
+ using_own_creds: Joi.boolean(),
8666
+ qc_supported: Joi.boolean(),
8667
+ });
8668
+ }
8669
+
8670
+ /** @returns {CourierPartnerDetailsSchema} */
8671
+ static CourierPartnerDetailsSchema() {
8672
+ return Joi.object({
8673
+ cp_sort_key: Joi.string().allow(""),
8674
+ cp_options: Joi.array().items(OrderPlatformModel.CPOptionsSchema()),
8675
+ scheme_id: Joi.string().allow("").required(),
8676
+ name: Joi.string().allow("").required(),
8677
+ extension_id: Joi.string().allow("").required(),
8678
+ rider_details: OrderPlatformModel.CPRiderDetailsSchema(),
8679
+ qc_supported: Joi.boolean(),
8680
+ using_own_creds: Joi.boolean().required(),
8681
+ max_reattempts_for_delivery_allowed: Joi.number(),
8682
+ tat_to_deliver_the_shipment: OrderPlatformModel.CPTatToDeliverTheShipmentSchema(),
8683
+ is_self_ship: Joi.boolean(),
8684
+ });
8685
+ }
8686
+
8687
+ /** @returns {TaxDetailsSchema} */
8688
+ static TaxDetailsSchema() {
8689
+ return Joi.object({
8690
+ hs_code: Joi.string().allow("").required(),
8691
+ tax_rule_id: Joi.string().allow("").required(),
8692
+ });
8693
+ }
8694
+
8695
+ /** @returns {PromiseDetailsSchema} */
8696
+ static PromiseDetailsSchema() {
8697
+ return Joi.object({
8698
+ min_sla: Joi.number().required(),
8699
+ max_sla: Joi.number().required(),
8700
+ });
8701
+ }
8702
+
8703
+ /** @returns {CustomerPickupSlotSchema} */
8704
+ static CustomerPickupSlotSchema() {
8705
+ return Joi.object({
8706
+ start_time: Joi.string().allow("").required(),
8707
+ end_time: Joi.string().allow("").required(),
8708
+ });
8709
+ }
8710
+
8711
+ /** @returns {DpPickupSlotSchema} */
8712
+ static DpPickupSlotSchema() {
8713
+ return Joi.object({
8714
+ start_time: Joi.string().allow("").required(),
8715
+ end_time: Joi.string().allow("").required(),
8716
+ });
8717
+ }
8718
+
8719
+ /** @returns {OrderFulfillmentTimelineSchema} */
8720
+ static OrderFulfillmentTimelineSchema() {
8721
+ return Joi.object({
8722
+ dp_pickup_slot: OrderPlatformModel.DpPickupSlotSchema(),
8723
+ dispatch_after_date: Joi.string().allow(""),
8724
+ dispatch_by_date: Joi.string().allow(""),
8725
+ confirm_by_date: Joi.string().allow(""),
8726
+ customer_pickup_slot: OrderPlatformModel.CustomerPickupSlotSchema(),
8727
+ pack_by_date: Joi.string().allow(""),
8728
+ });
8729
+ }
8730
+
8731
+ /** @returns {LineItemSchema} */
8732
+ static LineItemSchema() {
8733
+ return Joi.object({
8734
+ seller_identifier: Joi.string().allow(""),
8735
+ payment_methods: Joi.array()
8736
+ .items(OrderPlatformModel.LineItemPaymentMethodSchema())
8737
+ .required(),
8738
+ monetary_values: OrderPlatformModel.LineItemMonetaryValuesSchema().required(),
8739
+ gift_details: OrderPlatformModel.GiftDetailsSchema(),
8740
+ special_instructions: Joi.string().allow(""),
8741
+ dimension: OrderPlatformModel.DimensionSchema(),
8742
+ quantity: Joi.number(),
8743
+ external_line_id: Joi.string().allow(""),
8744
+ bundle_details: OrderPlatformModel.BundleDetailsSchema(),
8745
+ meta: Joi.object().pattern(/\S/, Joi.any()),
8746
+ });
8747
+ }
8748
+
8749
+ /** @returns {CreateOrderShipmentSchema} */
8750
+ static CreateOrderShipmentSchema() {
8751
+ return Joi.object({
8752
+ is_mto: Joi.boolean(),
8753
+ shipment_lifecycle_messages: Joi.array().items(
8754
+ OrderPlatformModel.LifecycleMessageSchema()
8755
+ ),
8756
+ tags: Joi.array().items(Joi.string().allow("")),
8757
+ type: Joi.string().allow(""),
8758
+ fulfillment_option: OrderPlatformModel.FulfillmentOptionSchema(),
8759
+ external_shipment_id: Joi.string().allow(""),
8760
+ line_items: Joi.array().items(OrderPlatformModel.LineItemSchema()),
8761
+ order_fulfillment_timeline: OrderPlatformModel.OrderFulfillmentTimelineSchema(),
8762
+ location_id: Joi.number(),
8763
+ external_location_id: Joi.string().allow(""),
8764
+ return_location_id: Joi.number(),
8765
+ courier_partner_details: OrderPlatformModel.CourierPartnerDetailsSchema(),
8766
+ tax_details: OrderPlatformModel.TaxDetailsSchema(),
8767
+ promise_details: OrderPlatformModel.PromiseDetailsSchema(),
8768
+ allow_processing_after: Joi.string().allow(""),
8769
+ meta: Joi.object().pattern(/\S/, Joi.any()),
8770
+ });
8771
+ }
8772
+
8773
+ /** @returns {OrderingCurrencySchema} */
8774
+ static OrderingCurrencySchema() {
8775
+ return Joi.object({
8776
+ currency_code: Joi.string().allow("").required(),
8777
+ currency_symbol: Joi.string().allow("").required(),
8778
+ });
8779
+ }
8780
+
8781
+ /** @returns {ConversionRateSchema} */
8782
+ static ConversionRateSchema() {
8783
+ return Joi.object({
8784
+ rate: Joi.number().required(),
8785
+ timestamp_ms: Joi.number().required(),
8786
+ });
8787
+ }
8788
+
8789
+ /** @returns {CurrencySchema} */
8790
+ static CurrencySchema() {
8791
+ return Joi.object({
8792
+ ordering_currency: OrderPlatformModel.OrderingCurrencySchema().required(),
8793
+ conversion_rate: OrderPlatformModel.ConversionRateSchema().required(),
8794
+ currency_code: Joi.string().allow(""),
8795
+ currency_symbol: Joi.string().allow(""),
8796
+ });
8797
+ }
8798
+
8799
+ /** @returns {CouponOwnershipSchema} */
8800
+ static CouponOwnershipSchema() {
8801
+ return Joi.object({
8802
+ payable_category: Joi.string().allow("").required(),
8803
+ });
8804
+ }
8805
+
8806
+ /** @returns {CouponSchema} */
8807
+ static CouponSchema() {
8808
+ return Joi.object({
8809
+ code: Joi.string().allow("").required(),
8810
+ id: Joi.string().allow("").required(),
8811
+ ownership: OrderPlatformModel.CouponOwnershipSchema().required(),
8812
+ is_return_allowed: Joi.boolean().required(),
8813
+ is_cancellation_allowed: Joi.boolean().required(),
8814
+ });
8815
+ }
8816
+
8817
+ /** @returns {BillingDetailsSchema} */
8818
+ static BillingDetailsSchema() {
8819
+ return Joi.object({
8820
+ first_name: Joi.string().allow(""),
8821
+ phone_code: Joi.string().allow(""),
8822
+ country: Joi.string().allow(""),
8823
+ city: Joi.string().allow(""),
8824
+ pincode: Joi.string().allow(""),
8825
+ last_name: Joi.string().allow(""),
8826
+ mobile_number: Joi.string().allow(""),
8827
+ email: Joi.string().allow(""),
8828
+ state: Joi.string().allow(""),
8829
+ alternate_mobile_number: Joi.string().allow(""),
8830
+ address: Joi.string().allow(""),
8831
+ middle_name: Joi.string().allow(""),
8832
+ title: Joi.string().allow(""),
8833
+ house_no: Joi.string().allow(""),
8834
+ geo_location: OrderPlatformModel.GeoLocationSchema(),
8835
+ gender: Joi.string().allow(""),
8836
+ landmark: Joi.string().allow(""),
8837
+ address_type: Joi.string().allow(""),
8838
+ state_code: Joi.string().allow(""),
8839
+ floor_no: Joi.string().allow(""),
8840
+ alternate_email: Joi.string().allow(""),
8841
+ address1: Joi.string().allow(""),
8842
+ address2: Joi.string().allow(""),
8843
+ country_iso_code: Joi.string().allow(""),
8844
+ user_id: Joi.string().allow(""),
8845
+ area_code: Joi.string().allow(""),
8846
+ area_code_slug: Joi.string().allow(""),
8847
+ country_phone_code: Joi.string().allow(""),
8848
+ });
8849
+ }
8850
+
8851
+ /** @returns {CPConfigurationSchema} */
8852
+ static CPConfigurationSchema() {
8853
+ return Joi.object({
8854
+ shipping_by: Joi.string().allow("").required(),
8855
+ });
8856
+ }
8857
+
8858
+ /** @returns {ShippingDetailsSchema} */
8859
+ static ShippingDetailsSchema() {
8860
+ return Joi.object({
8861
+ first_name: Joi.string().allow(""),
8862
+ phone_code: Joi.string().allow(""),
8863
+ country: Joi.string().allow(""),
8864
+ city: Joi.string().allow(""),
8865
+ pincode: Joi.string().allow(""),
8866
+ last_name: Joi.string().allow(""),
8867
+ mobile_number: Joi.string().allow(""),
8868
+ email: Joi.string().allow(""),
8869
+ state: Joi.string().allow(""),
8870
+ alternate_mobile_number: Joi.string().allow(""),
8871
+ address: Joi.string().allow(""),
8872
+ middle_name: Joi.string().allow(""),
8873
+ title: Joi.string().allow(""),
8874
+ house_no: Joi.string().allow(""),
8875
+ geo_location: OrderPlatformModel.GeoLocationSchema(),
8876
+ gender: Joi.string().allow(""),
8877
+ landmark: Joi.string().allow(""),
8878
+ address_type: Joi.string().allow(""),
8879
+ state_code: Joi.string().allow(""),
8880
+ floor_no: Joi.string().allow(""),
8881
+ alternate_email: Joi.string().allow(""),
8882
+ address1: Joi.string().allow(""),
8883
+ address2: Joi.string().allow(""),
8884
+ country_iso_code: Joi.string().allow(""),
8885
+ user_id: Joi.string().allow(""),
8886
+ area_code: Joi.string().allow(""),
8887
+ area_code_slug: Joi.string().allow(""),
8888
+ country_phone_code: Joi.string().allow(""),
8889
+ });
8890
+ }
8891
+
8892
+ /** @returns {UserDetailsSchema} */
8893
+ static UserDetailsSchema() {
8894
+ return Joi.object({
8895
+ gstin: Joi.string().allow(""),
8896
+ pan_no: Joi.string().allow(""),
8897
+ });
8898
+ }
8899
+
8900
+ /** @returns {LifecycleMessageSchema} */
8901
+ static LifecycleMessageSchema() {
8902
+ return Joi.object({
8903
+ message: Joi.string().allow("").required(),
8904
+ type: Joi.string().allow("").required(),
8905
+ states: Joi.array().items(Joi.string().allow("")).required(),
8906
+ priority: Joi.number().required(),
8907
+ });
8908
+ }
8909
+
8910
+ /** @returns {CreateOrderRequestSchema} */
8911
+ static CreateOrderRequestSchema() {
8912
+ return Joi.object({
8913
+ shipments: Joi.array().items(
8914
+ OrderPlatformModel.CreateOrderShipmentSchema()
8915
+ ),
8916
+ tags: Joi.array().items(Joi.string().allow("")),
8917
+ currency_details: OrderPlatformModel.CurrencySchema().required(),
8918
+ external_creation_date: Joi.string().allow(""),
8919
+ coupon_details: OrderPlatformModel.CouponSchema(),
8920
+ billing_details: OrderPlatformModel.BillingDetailsSchema().required(),
8921
+ primary_payment_mode: Joi.string().allow("").required(),
8922
+ cp_configuration: OrderPlatformModel.CPConfigurationSchema(),
8923
+ ordering_location_id: Joi.number(),
8924
+ allow_location_reassignment: Joi.boolean(),
8925
+ shipping_details: OrderPlatformModel.ShippingDetailsSchema().required(),
8926
+ external_order_id: Joi.string().allow(""),
8927
+ user_details: OrderPlatformModel.UserDetailsSchema(),
8928
+ order_lifecycle_messages: Joi.array().items(
8929
+ OrderPlatformModel.LifecycleMessageSchema()
8930
+ ),
8931
+ channel_application_id: Joi.string().allow(""),
8932
+ b2b_gstin_number: Joi.string().allow(""),
8933
+ channel_company_id: Joi.string().allow(""),
8934
+ is_draft: Joi.boolean(),
8935
+ });
8936
+ }
8937
+
8938
+ /** @returns {Page} */
8939
+ static Page() {
8940
+ return Joi.object({
8941
+ item_total: Joi.number(),
8942
+ next_id: Joi.string().allow(""),
8943
+ has_previous: Joi.boolean(),
8944
+ has_next: Joi.boolean(),
8945
+ current: Joi.number(),
8946
+ type: Joi.string().allow("").required(),
8947
+ size: Joi.number(),
8948
+ page_size: Joi.number(),
8949
+ });
8950
+ }
8951
+
8952
+ /** @returns {OrderingSourceConfig} */
8953
+ static OrderingSourceConfig() {
8954
+ return Joi.object({
8955
+ slug: Joi.string().allow(""),
8956
+ configs: Joi.array().items(OrderPlatformModel.OrderingSourceFeature()),
8957
+ logo: Joi.string().allow(""),
8958
+ });
8959
+ }
8960
+
8961
+ /** @returns {OrderingSourceFeature} */
8962
+ static OrderingSourceFeature() {
8963
+ return Joi.object({
8964
+ name: Joi.string().allow(""),
8965
+ slug: Joi.string().allow(""),
8966
+ description: Joi.string().allow(""),
8967
+ enabled: Joi.boolean(),
8968
+ });
8969
+ }
8970
+
8971
+ /** @returns {ListOrderingSources} */
8972
+ static ListOrderingSources() {
8973
+ return Joi.object({
8974
+ items: Joi.array().items(OrderPlatformModel.OrderingSourceSummary()),
8975
+ page: OrderPlatformModel.Page(),
8976
+ });
8977
+ }
8978
+
8979
+ /** @returns {OrderingSourceSummary} */
8980
+ static OrderingSourceSummary() {
8981
+ return Joi.object({
8982
+ text: Joi.string().allow(""),
8983
+ value: Joi.string().allow(""),
8984
+ });
8985
+ }
8986
+
8987
+ /** @returns {CreateAccount} */
8988
+ static CreateAccount() {
8989
+ return Joi.object({
8990
+ channel_account_name: Joi.string().allow("").required(),
8991
+ });
8992
+ }
8993
+
8994
+ /** @returns {Account} */
8995
+ static Account() {
8996
+ return Joi.object({
8997
+ channel_account_id: Joi.string().allow(""),
8998
+ company_id: Joi.number(),
8999
+ channel_account_name: Joi.string().allow(""),
9000
+ });
9001
+ }
9002
+
9003
+ /** @returns {AccountsList} */
9004
+ static AccountsList() {
9005
+ return Joi.object({
9006
+ data: Joi.array().items(OrderPlatformModel.Account()),
9007
+ page: OrderPlatformModel.Page(),
9008
+ });
9009
+ }
9010
+
9011
+ /** @returns {ValidationError} */
9012
+ static ValidationError() {
9013
+ return Joi.object({
9014
+ message: Joi.string().allow("").required(),
9015
+ field: Joi.string().allow("").required(),
9016
+ });
9017
+ }
9018
+
9019
+ /** @returns {BagReasonMeta} */
9020
+ static BagReasonMeta() {
9021
+ return Joi.object({
9022
+ show_text_area: Joi.boolean(),
9023
+ });
9024
+ }
9025
+
9026
+ /** @returns {QuestionSet} */
9027
+ static QuestionSet() {
9028
+ return Joi.object({
9029
+ id: Joi.number(),
9030
+ display_name: Joi.string().allow(""),
9031
+ });
9032
+ }
9033
+
9034
+ /** @returns {BagReasons} */
9035
+ static BagReasons() {
9036
+ return Joi.object({
9037
+ qc_type: Joi.array().items(Joi.string().allow("")),
9038
+ id: Joi.number(),
9039
+ display_name: Joi.string().allow(""),
9040
+ meta: OrderPlatformModel.BagReasonMeta(),
9041
+ question_set: Joi.array().items(OrderPlatformModel.QuestionSet()),
9042
+ reasons: Joi.array().items(Joi.link("#BagReasons")),
9043
+ }).id("BagReasons");
9044
+ }
9045
+
9046
+ /** @returns {ShipmentBagReasons} */
9047
+ static ShipmentBagReasons() {
9048
+ return Joi.object({
9049
+ reasons: Joi.array().items(OrderPlatformModel.BagReasons()),
9050
+ success: Joi.boolean(),
9051
+ rule_id: Joi.number().allow(null),
9052
+ });
9053
+ }
9054
+
9055
+ /** @returns {ShipmentStatus} */
9056
+ static ShipmentStatus() {
9057
+ return Joi.object({
9058
+ current_shipment_status: Joi.string().allow("").allow(null),
9059
+ meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
9060
+ id: Joi.number().allow(null),
9061
+ bag_list: Joi.array().items(Joi.string().allow("")).allow(null, ""),
9062
+ title: Joi.string().allow("").required(),
9063
+ display_name: Joi.string().allow(""),
9064
+ created_at: Joi.string().allow("").allow(null),
9065
+ created_ts: Joi.string().allow("").allow(null),
9066
+ shipment_id: Joi.string().allow("").allow(null),
9067
+ status_created_at: Joi.string().allow("").allow(null),
9068
+ updated_ts: Joi.string().allow("").allow(null),
9069
+ status: Joi.string().allow("").required(),
9070
+ });
9071
+ }
9072
+
9073
+ /** @returns {UserDataInfo} */
9074
+ static UserDataInfo() {
9075
+ return Joi.object({
9076
+ id: Joi.number().allow(null),
9077
+ user_oid: Joi.string().allow("").allow(null),
9078
+ mongo_user_id: Joi.string().allow("").allow(null),
9079
+ external_customer_id: Joi.string().allow("").allow(null),
9080
+ first_name: Joi.string().allow("").allow(null),
9081
+ last_name: Joi.string().allow("").allow(null),
9082
+ mobile: Joi.string().allow("").allow(null),
9083
+ email: Joi.string().allow("").allow(null),
9084
+ meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
9085
+ is_anonymous_user: Joi.boolean().allow(null),
9086
+ name: Joi.string().allow("").allow(null),
9087
+ gender: Joi.string().allow("").allow(null),
9088
+ country_phone_code: Joi.string().allow(""),
9089
+ });
9090
+ }
9091
+
9092
+ /** @returns {BundleReturnConfig} */
9093
+ static BundleReturnConfig() {
9094
+ return Joi.object({
9095
+ allow_partial_return: Joi.boolean().allow(null),
9096
+ returnable: Joi.boolean().allow(null),
9097
+ unit: Joi.boolean().allow(null),
9098
+ time: Joi.boolean().allow(null),
9099
+ });
9100
+ }
9101
+
9102
+ /** @returns {BundleDetails} */
9103
+ static BundleDetails() {
9104
+ return Joi.object({
9105
+ bundle_group_id: Joi.string().allow(""),
9106
+ name: Joi.string().allow(""),
9107
+ slug: Joi.string().allow(""),
9108
+ bundle_count: Joi.number(),
9109
+ article_bundle_id: Joi.string().allow(""),
9110
+ bundle_article_quantity: Joi.number(),
9111
+ is_base: Joi.boolean(),
9112
+ price_marked: Joi.number(),
9113
+ price_effective: Joi.number(),
9114
+ item_id: Joi.number(),
9115
+ item_type: Joi.string().allow(""),
9116
+ return_config: OrderPlatformModel.BundleReturnConfig(),
9117
+ seller_identifier: Joi.string().allow(""),
9118
+ images: Joi.array().items(Joi.string().allow("")),
9119
+ brand_name: Joi.string().allow(""),
9120
+ size: Joi.string().allow(""),
9121
+ });
9122
+ }
9123
+
9124
+ /** @returns {Address} */
9125
+ static Address() {
9126
+ return Joi.object({
9127
+ phone: Joi.string().allow("").allow(null),
9128
+ address2: Joi.string().allow("").allow(null),
9129
+ address: Joi.string().allow("").allow(null),
9130
+ longitude: Joi.number().allow(null),
9131
+ pincode: Joi.string().allow("").allow(null),
9132
+ area: Joi.string().allow("").allow(null),
9133
+ address_type: Joi.string().allow("").allow(null),
9134
+ country: Joi.string().allow("").allow(null),
9135
+ address_category: Joi.string().allow("").allow(null),
9136
+ email: Joi.string().allow("").allow(null),
9137
+ created_at: Joi.string().allow("").allow(null),
8217
9138
  address1: Joi.string().allow("").allow(null),
8218
9139
  display_address: Joi.string().allow("").allow(null),
8219
9140
  landmark: Joi.string().allow("").allow(null),
@@ -9076,6 +9997,8 @@ class OrderPlatformModel {
9076
9997
  can_be_cancelled: Joi.boolean().required(),
9077
9998
  enable_tracking: Joi.boolean().required(),
9078
9999
  is_customer_return_allowed: Joi.boolean().required(),
10000
+ is_bundle_item: Joi.boolean(),
10001
+ bundle_details: OrderPlatformModel.BundleDetails(),
9079
10002
  });
9080
10003
  }
9081
10004
 
@@ -9432,14 +10355,6 @@ class OrderPlatformModel {
9432
10355
  });
9433
10356
  }
9434
10357
 
9435
- /** @returns {CurrencySchema} */
9436
- static CurrencySchema() {
9437
- return Joi.object({
9438
- currency_code: Joi.string().allow(""),
9439
- currency_symbol: Joi.string().allow(""),
9440
- });
9441
- }
9442
-
9443
10358
  /** @returns {OrderData} */
9444
10359
  static OrderData() {
9445
10360
  return Joi.object({
@@ -10117,188 +11032,5 @@ class OrderPlatformModel {
10117
11032
  error: Joi.string().allow(""),
10118
11033
  });
10119
11034
  }
10120
-
10121
- /**
10122
- * Enum: OrderingSource Used By: Order
10123
- *
10124
- * @returns {OrderingSource}
10125
- */
10126
- static OrderingSource() {
10127
- return Joi.string().valid(
10128
- "storefront",
10129
-
10130
- "store_os_pos",
10131
-
10132
- "kiosk",
10133
-
10134
- "scan_go",
10135
-
10136
- "smart_trolley",
10137
-
10138
- "gofynd",
10139
-
10140
- "uniket",
10141
-
10142
- "marketplace",
10143
-
10144
- "social_commerce",
10145
-
10146
- "ondc",
10147
-
10148
- "nexus",
10149
-
10150
- "nykaa_fashion",
10151
-
10152
- "etsy",
10153
-
10154
- "vuivui",
10155
-
10156
- "zilingo",
10157
-
10158
- "firstcry",
10159
-
10160
- "bukalapak",
10161
-
10162
- "myntra_ppmp",
10163
-
10164
- "lazada",
10165
-
10166
- "tiktok",
10167
-
10168
- "sfcc",
10169
-
10170
- "debenhams",
10171
-
10172
- "prestomall",
10173
-
10174
- "meesho",
10175
-
10176
- "amazon_vdf",
10177
-
10178
- "bigcommerce",
10179
-
10180
- "sendo",
10181
-
10182
- "storehippo",
10183
-
10184
- "cdiscount",
10185
-
10186
- "nykaa",
10187
-
10188
- "trendyol",
10189
-
10190
- "weloveshopping",
10191
-
10192
- "jollee",
10193
-
10194
- "wish",
10195
-
10196
- "tiki",
10197
-
10198
- "central_online",
10199
-
10200
- "q10",
10201
-
10202
- "cred",
10203
-
10204
- "walmart",
10205
-
10206
- "snapdeal",
10207
-
10208
- "flipkart",
10209
-
10210
- "blibli",
10211
-
10212
- "ajio_jit",
10213
-
10214
- "pharmeasy",
10215
-
10216
- "ezmall",
10217
-
10218
- "adobe_commerce",
10219
-
10220
- "kartmax",
10221
-
10222
- "shopee",
10223
-
10224
- "zalora",
10225
-
10226
- "prestashop",
10227
-
10228
- "smytten",
10229
-
10230
- "amazon_sc",
10231
-
10232
- "urbanpiper",
10233
-
10234
- "flipkart_quick",
10235
-
10236
- "woocommerce",
10237
-
10238
- "zivame",
10239
-
10240
- "lelong",
10241
-
10242
- "facebook",
10243
-
10244
- "jiomart",
10245
-
10246
- "gmc",
10247
-
10248
- "robins",
10249
-
10250
- "akulaku",
10251
-
10252
- "noon",
10253
-
10254
- "tatacliq",
10255
-
10256
- "kartrocket",
10257
-
10258
- "inorbit",
10259
-
10260
- "ajio_business",
10261
-
10262
- "swiggy",
10263
-
10264
- "asos",
10265
-
10266
- "tokopedia",
10267
-
10268
- "limeroad",
10269
-
10270
- "myntra_omni",
10271
-
10272
- "spoyl",
10273
-
10274
- "amazon_mlf",
10275
-
10276
- "fulfilled_by_lazada",
10277
-
10278
- "ebay",
10279
-
10280
- "jd",
10281
-
10282
- "amazon_pharmacy",
10283
-
10284
- "ajio_vms",
10285
-
10286
- "daraz",
10287
-
10288
- "oker",
10289
-
10290
- "flipkart_b2b",
10291
-
10292
- "amazon_mlf_ss",
10293
-
10294
- "woovly",
10295
-
10296
- "tata1mg",
10297
-
10298
- "zomato",
10299
-
10300
- "shopify"
10301
- );
10302
- }
10303
11035
  }
10304
11036
  module.exports = OrderPlatformModel;