@gofynd/fdk-client-javascript 3.11.0 → 3.12.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 (24) 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 +1851 -431
  22. package/sdk/platform/Order/OrderPlatformModel.js +1171 -448
  23. package/sdk/platform/Order/OrderPlatformValidator.d.ts +150 -16
  24. package/sdk/platform/Order/OrderPlatformValidator.js +105 -9
@@ -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.
@@ -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,444 @@ 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.
2823
+ * @property {string} [logo]
2824
+ */
2825
+
2826
+ /**
2827
+ * @typedef SubModeOfPaymentSchema
2828
+ * @property {string} name - Name of the Sub MOP Used.
2829
+ */
2830
+
2831
+ /**
2832
+ * @typedef PaymentMethodModeOfPaymentSchema
2833
+ * @property {string} name - Payment Mode Name.
2834
+ * @property {string} slug - Slug of the Payment Mode.
2835
+ * @property {SubModeOfPaymentSchema} [sub_mode_of_payment]
2836
+ */
2837
+
2838
+ /**
2839
+ * @typedef PaymentMethodTransactionPartySchema
2840
+ * @property {string} refund_bearer - Entity responsible for refunds (e.g., SELLER/FYND).
2841
+ * @property {string} collection_bearer - Entity responsible for collection
2842
+ * charges (e.g., SELLER/FYND).
2843
+ */
2844
+
2845
+ /**
2846
+ * @typedef LineItemPaymentMethodSchema
2847
+ * @property {PaymentMethodGatewaySchema} [gateway]
2848
+ * @property {PaymentMethodModeOfPaymentSchema} [mode_of_payment]
2849
+ * @property {number} [amount_paid] - Total Amount Paid by this Payment Method.
2850
+ * @property {string} [payment_identifier] - Transaction id
2851
+ * @property {PaymentMethodTransactionPartySchema} [transaction_party]
2852
+ */
2853
+
2854
+ /**
2855
+ * @typedef BundleDetailsSchema
2856
+ * @property {boolean} [is_base] - A flag that determines if bag is base bag of bundle.
2857
+ * @property {string[]} [images] - An array of image URLs associated with the bundle.
2858
+ * @property {string} [group_id] - Unique group identifier for the bundle.
2859
+ * @property {string} [name] - Name of the bundle.
2860
+ * @property {string} [item_type] - Type of the item (physical_bundle, virtual_bundle).
2861
+ * @property {number} [item_id] - Unique identifier for the item.
2862
+ * @property {string} [item_code] - Item code for the item.
2863
+ * @property {string} [item_name] - Name of the item.
2864
+ * @property {string} [seller_identifier] - Identifier for the seller of the bundle.
2865
+ * @property {number} [bundle_article_quantity] - Article net_quantity in bundle Product.
2866
+ * @property {string} [brand_name] - Identifier for the brand name.
2867
+ * @property {string} [size] - Size associated with the bundle item.
2868
+ */
2869
+
2870
+ /**
2871
+ * @typedef LineItemMonetaryValuesSchema
2872
+ * @property {number} amount_paid - Amount Paid by Customer
2873
+ * @property {number} price_effective - The final effective price after applying
2874
+ * discounts, promotional offers, and adjustments.
2875
+ * @property {number} [discount] - Discount amount apart from promo and coupon discount
2876
+ * @property {number} price_marked - The original marked price of the item
2877
+ * before any discounts or promotions.
2878
+ * @property {number} [coupon_discount] - Coupon Discount Applied for this Line Item
2879
+ * @property {number} [cod_charges] - Cash on Delivery Charges Applied for this Article.
2880
+ * @property {number} [promo_discount] - Promotion Discount
2881
+ * @property {number} [gift_price] - Gift Price
2882
+ * @property {number} [delivery_charges] - Delivery Charges Applied for this Article.
2883
+ */
2884
+
2885
+ /**
2886
+ * @typedef DimensionSchema
2887
+ * @property {number} height - Height of the Product.
2888
+ * @property {number} length - Length of the product.
2889
+ * @property {boolean} is_default - Not Modified, meaning these are same as
2890
+ * product uploaded while loading catelogue.
2891
+ * @property {string} unit - Unit of the measurement used.
2892
+ * @property {number} width - Width of the Product.
2893
+ */
2894
+
2895
+ /**
2896
+ * @typedef GiftDetailsSchema
2897
+ * @property {number} amount - Specifies the value or cost of the gift
2898
+ * associated with the order line item.
2899
+ * @property {string} display_text - A short description or label intended for
2900
+ * display purposes. This can be a message to the customer, such as "Gift wrap
2901
+ * included" or "Gift card value applied."
2902
+ */
2903
+
2904
+ /**
2905
+ * @typedef CPRiderDetailsSchema
2906
+ * @property {string} name
2907
+ * @property {string} phone
2908
+ */
2909
+
2910
+ /**
2911
+ * @typedef CPAreaCodeSchema
2912
+ * @property {string} source
2913
+ * @property {string} destination
2914
+ */
2915
+
2916
+ /**
2917
+ * @typedef CPTatToDeliverTheShipmentSchema
2918
+ * @property {number} min
2919
+ * @property {number} max
2920
+ */
2921
+
2922
+ /**
2923
+ * @typedef CPOptionsSchema
2924
+ * @property {string} [extension_id]
2925
+ * @property {string} [scheme_id]
2926
+ * @property {CPAreaCodeSchema} [area_code]
2927
+ * @property {boolean} [is_self_ship]
2928
+ * @property {number} [max_reattempts_for_delivery_allowed]
2929
+ * @property {string} [cp_sort_key] - A sorting key used for categorizing or
2930
+ * sorting courier partners, often related to their performance, costs, or
2931
+ * some other factor.
2932
+ * @property {string} [name] - The name of the courier partner or the delivery
2933
+ * agent handling the shipment.
2934
+ * @property {CPRiderDetailsSchema} [rider_details]
2935
+ * @property {boolean} [using_own_creds] - Specifies whether the seller's
2936
+ * credentials are being used for the courier partner.
2937
+ * @property {boolean} [qc_supported] - Specifies that Assigned CP support's
2938
+ * quality checks
2939
+ */
2940
+
2941
+ /**
2942
+ * @typedef CourierPartnerDetailsSchema
2943
+ * @property {string} [cp_sort_key] - A sorting key used for categorizing or
2944
+ * sorting courier partners, often related to their performance, costs, or
2945
+ * some other factor.
2946
+ * @property {CPOptionsSchema[]} [cp_options] - Other Available CP's
2947
+ * @property {string} scheme_id
2948
+ * @property {string} name - The name of the courier partner or the delivery
2949
+ * agent handling the shipment.
2950
+ * @property {string} extension_id
2951
+ * @property {CPRiderDetailsSchema} [rider_details]
2952
+ * @property {boolean} [qc_supported] - Specifies that Assigned CP support's
2953
+ * quality checks
2954
+ * @property {boolean} using_own_creds - Specifies weather the Seller's Creds or
2955
+ * Fynd's Creds are being used.
2956
+ * @property {number} [max_reattempts_for_delivery_allowed] - Reattempts Allowed
2957
+ * (required for ndr)
2958
+ * @property {CPTatToDeliverTheShipmentSchema} [tat_to_deliver_the_shipment]
2959
+ * @property {boolean} [is_self_ship] - Is every logistic action handled by seller.
2960
+ */
2961
+
2962
+ /**
2963
+ * @typedef TaxDetailsSchema
2964
+ * @property {string} hs_code - The HS code of the product
2965
+ * @property {string} tax_rule_id - Tax identifier.
2966
+ */
2967
+
2968
+ /**
2969
+ * @typedef PromiseDetailsSchema
2970
+ * @property {number} min_sla - Min TimeStamp (EPOCH) that will be taken to
2971
+ * deliver the product
2972
+ * @property {number} max_sla - Max TimeStamp (EPOCH) that will be taken to
2973
+ * deliver the product.
2974
+ */
2975
+
2976
+ /**
2977
+ * @typedef CustomerPickupSlotSchema
2978
+ * @property {string} start_time
2979
+ * @property {string} end_time
2980
+ */
2981
+
2982
+ /**
2983
+ * @typedef DpPickupSlotSchema
2984
+ * @property {string} start_time
2985
+ * @property {string} end_time
2986
+ */
2987
+
2988
+ /**
2989
+ * @typedef OrderFulfillmentTimelineSchema
2990
+ * @property {DpPickupSlotSchema} [dp_pickup_slot]
2991
+ * @property {string} [dispatch_after_date] - A date indicating when the order
2992
+ * can be dispatched (e.g., the earliest possible dispatch date).
2993
+ * @property {string} [dispatch_by_date] - The latest date the order must be
2994
+ * dispatched to meet delivery expectations.
2995
+ * @property {string} [confirm_by_date] - The deadline by which the merchant
2996
+ * must confirm the order.
2997
+ * @property {CustomerPickupSlotSchema} [customer_pickup_slot]
2998
+ * @property {string} [pack_by_date] - The latest time the package should be
2999
+ * packed and ready to dispatch.
3000
+ */
3001
+
3002
+ /**
3003
+ * @typedef LineItemSchema
3004
+ * @property {string} [seller_identifier] - Identifier for the seller providing the item.
3005
+ * @property {LineItemPaymentMethodSchema[]} payment_methods - Payment Methods
3006
+ * Used to fulfil this Order.
3007
+ * @property {LineItemMonetaryValuesSchema} monetary_values
3008
+ * @property {GiftDetailsSchema} [gift_details]
3009
+ * @property {string} [special_instructions] - A string for any special
3010
+ * instructions or messages.
3011
+ * @property {DimensionSchema} [dimension]
3012
+ * @property {number} [quantity] - Quantity of the Line Item
3013
+ * @property {string} [external_line_id] - Unique identifier for the LineItem as
3014
+ * assigned by an external system. You can use this to map external id to
3015
+ * Fynd's generated id
3016
+ * @property {BundleDetailsSchema} [bundle_details]
3017
+ * @property {Object} [meta] - An object containing metadata related to the shipment.
3018
+ */
3019
+
3020
+ /**
3021
+ * @typedef CreateOrderShipmentSchema
3022
+ * @property {boolean} [is_mto] - Indicates if the shipment belongs to the
3023
+ * made-to-order category, i.e., the seller will start creating this order
3024
+ * after receiving an order creation request.
3025
+ * @property {LifecycleMessageSchema[]} [shipment_lifecycle_messages] - List of
3026
+ * general-purpose messages shown across different points in the shipment's
3027
+ * journey at Order Details Screen.
3028
+ * @property {string[]} [tags] - Tags that can be attached to the shipment for
3029
+ * filtering and categorization.
3030
+ * @property {string} [type] - The shipment type defining the fulfillment method
3031
+ * and processing flow. Each type determines the specific journey a shipment
3032
+ * will follow based on operational needs and customer preferences:
3033
+ *
3034
+ * - "HomeDelivery": Standard delivery to the customer's address, undergoing all
3035
+ * typical state transitions from processing to final delivery.
3036
+ * - "PickAtStore": Order prepared for in-store pickup, bypassing traditional
3037
+ * shipping stages for direct handover to the customer.
3038
+ * - "Digital": Orders involving digital goods or services (e.g., software,
3039
+ * e-books, subscriptions) delivered electronically.
3040
+ *
3041
+ * @property {FulfillmentOptionSchema} [fulfillment_option]
3042
+ * @property {string} [external_shipment_id] - Unique identifier for the
3043
+ * shipment as assigned by an external system. Use this to map the external ID
3044
+ * to Fynd's generated ID.
3045
+ * @property {LineItemSchema[]} [line_items] - A list of items included in the shipment.
3046
+ * @property {OrderFulfillmentTimelineSchema} [order_fulfillment_timeline]
3047
+ * @property {number} [location_id] - The location ID from which this shipment
3048
+ * is being fulfilled.
3049
+ * @property {string} [external_location_id] - The external location ID from
3050
+ * which this shipment is being fulfilled.
3051
+ * @property {number} [return_location_id] - Overrides the article's default
3052
+ * return location.
3053
+ * @property {CourierPartnerDetailsSchema} [courier_partner_details]
3054
+ * @property {TaxDetailsSchema} [tax_details]
3055
+ * @property {PromiseDetailsSchema} [promise_details]
3056
+ * @property {string} [allow_processing_after] - Defines the UTC time at which
3057
+ * the shipment will automatically move to the placed state.
3058
+ * @property {Object} [meta] - Additional metadata related to the shipment.
3059
+ */
3060
+
3061
+ /**
3062
+ * @typedef OrderingCurrencySchema
3063
+ * @property {string} currency_code - The ISO 4217 currency code, such as 'INR'
3064
+ * for Indian Rupee. This field represents the standardized three-letter code
3065
+ * of a currency.
3066
+ * @property {string} currency_symbol - The symbol representing the currency,
3067
+ * such as '₹' for Indian Rupee. This is used for display purposes alongside
3068
+ * currency amounts.
3069
+ */
3070
+
3071
+ /**
3072
+ * @typedef ConversionRateSchema
3073
+ * @property {number} rate - The exchange rate used to convert monetary values
3074
+ * from the ordering currency to the seller's currency.
3075
+ * @property {number} timestamp_ms - The timestamp (in milliseconds) when the
3076
+ * conversion rate was applied.
3077
+ */
3078
+
3079
+ /**
3080
+ * @typedef CurrencySchema
3081
+ * @property {OrderingCurrencySchema} ordering_currency
3082
+ * @property {ConversionRateSchema} conversion_rate
3083
+ * @property {string} [currency_code] - The ISO 4217 currency code, such as
3084
+ * 'INR' for Indian Rupee. This field represents the standardized three-letter
3085
+ * code of a currency.
3086
+ * @property {string} [currency_symbol] - The symbol representing the currency,
3087
+ * such as '₹' for Indian Rupee. This is used for display purposes alongside
3088
+ * currency amounts.
3089
+ */
3090
+
3091
+ /**
3092
+ * @typedef CouponOwnershipSchema
3093
+ * @property {string} payable_category - Indicates who issued the coupon
3094
+ * (MARKETPLACE or SELLER).
3095
+ */
3096
+
3097
+ /**
3098
+ * @typedef CouponSchema
3099
+ * @property {string} code - The coupon code that was applied.
3100
+ * @property {string} id - Unique identifier of the coupon.
3101
+ * @property {CouponOwnershipSchema} ownership
3102
+ * @property {boolean} is_return_allowed - Indicates whether returns are allowed
3103
+ * when this coupon is applied.
3104
+ * @property {boolean} is_cancellation_allowed - Indicates whether cancellations
3105
+ * are allowed when this coupon is applied.
3106
+ */
3107
+
3108
+ /**
3109
+ * @typedef BillingDetailsSchema
3110
+ * @property {string} [first_name] - First Name of the User
3111
+ * @property {string} [phone_code] - Country phone code ex: +91
3112
+ * @property {string} [country] - Country of the User
3113
+ * @property {string} [city] - City of the User
3114
+ * @property {string} [pincode] - Pincode of the User
3115
+ * @property {string} [last_name] - Last Name of the User
3116
+ * @property {string} [mobile_number] - Primary Phone number of the User
3117
+ * @property {string} [email] - Primary Email of the User
3118
+ * @property {string} [state] - State of the User
3119
+ * @property {string} [alternate_mobile_number] - Alternate Mobile Number
3120
+ * @property {string} [address] - Full Address of the Billing User
3121
+ * @property {string} [middle_name] - A string containing the customer's middle name.
3122
+ * @property {string} [title] - A string representing the customer's title or prefix.
3123
+ * @property {string} [house_no] - A string representing the house or apartment
3124
+ * number of the customer.
3125
+ * @property {GeoLocationSchema} [geo_location]
3126
+ * @property {string} [gender] - Gender of user
3127
+ * @property {string} [landmark] - A string representing a landmark or reference
3128
+ * point near the customer's location.
3129
+ * @property {string} [address_type] - A string representing the address type in
3130
+ * the seller's system.
3131
+ * @property {string} [state_code] - A string representing the state code of the
3132
+ * customer's location.
3133
+ * @property {string} [floor_no] - A string representing the floor number of the
3134
+ * customer's location.
3135
+ * @property {string} [alternate_email] - Alternate Email Address
3136
+ * @property {string} [address1] - A string representing the first line of the address.
3137
+ * @property {string} [address2] - A string representing the second line of the address.
3138
+ * @property {string} [country_iso_code] - Specifies the country's unique
3139
+ * identifier ollowing the ISO 3166-1 alpha-2 standard. This two-letter code
3140
+ * is crucial for distinguishing countries in international transactions, data
3141
+ * processing, and shipping logistics.
3142
+ * @property {string} [user_id] - The unique identifier assigned to the user.
3143
+ * refer /user in platform documentation to get more details.
3144
+ * @property {string} [area_code] - Area Code
3145
+ * @property {string} [area_code_slug]
3146
+ * @property {string} [country_phone_code]
3147
+ */
3148
+
3149
+ /**
3150
+ * @typedef CPConfigurationSchema
3151
+ * @property {string} shipping_by - Shipping Handled by FYND or SELLER
3152
+ */
3153
+
3154
+ /**
3155
+ * @typedef ShippingDetailsSchema
3156
+ * @property {string} [first_name] - First Name of the User
3157
+ * @property {string} [phone_code] - Country phone code ex: +91
3158
+ * @property {string} [country] - Country of the User
3159
+ * @property {string} [city] - City of the User
3160
+ * @property {string} [pincode] - Pincode of the User
3161
+ * @property {string} [last_name] - Last Name of the User
3162
+ * @property {string} [mobile_number] - Primary Phone number of the User
3163
+ * @property {string} [email] - Primary Email of the User
3164
+ * @property {string} [state] - State of the User
3165
+ * @property {string} [alternate_mobile_number] - Alternate Mobile Number
3166
+ * @property {string} [address] - Full Address of the Billing User
3167
+ * @property {string} [middle_name] - A string containing the customer's middle name.
3168
+ * @property {string} [title] - A string representing the customer's title or prefix.
3169
+ * @property {string} [house_no] - A string representing the house or apartment
3170
+ * number of the customer.
3171
+ * @property {GeoLocationSchema} [geo_location]
3172
+ * @property {string} [gender] - Gender of user
3173
+ * @property {string} [landmark] - A string representing a landmark or reference
3174
+ * point near the customer's location.
3175
+ * @property {string} [address_type] - A string representing the address type in
3176
+ * the seller's system.
3177
+ * @property {string} [state_code] - A string representing the state code of the
3178
+ * customer's location.
3179
+ * @property {string} [floor_no] - A string representing the floor number of the
3180
+ * customer's location.
3181
+ * @property {string} [alternate_email] - Alternate Email Address
3182
+ * @property {string} [address1] - A string representing the first line of the address.
3183
+ * @property {string} [address2] - A string representing the second line of the address.
3184
+ * @property {string} [country_iso_code] - Specifies the country's unique
3185
+ * identifier ollowing the ISO 3166-1 alpha-2 standard. This two-letter code
3186
+ * is crucial for distinguishing countries in international transactions, data
3187
+ * processing, and shipping logistics.
3188
+ * @property {string} [user_id] - The unique identifier assigned to the user.
3189
+ * refer /user in platform documentation to get more details.
3190
+ * @property {string} [area_code] - Area Code
3191
+ * @property {string} [area_code_slug]
3192
+ * @property {string} [country_phone_code]
3193
+ */
3194
+
3195
+ /**
3196
+ * @typedef UserDetailsSchema
3197
+ * @property {string} [gstin] - The user's GSTIN (Goods and Services Tax
3198
+ * Identification Number).
3199
+ * @property {string} [pan_no] - The user's PAN (Permanent Account Number).
3200
+ */
3201
+
3202
+ /**
3203
+ * @typedef LifecycleMessageSchema
3204
+ * @property {string} message - The message text to display to users at specific
3205
+ * order states (e.g., PLACED, SHIPPED).
3206
+ * @property {string} type - The message type, which determines the color of the
3207
+ * message bar.
3208
+ * @property {string[]} states - List of OMS states at which the message should
3209
+ * be visible.
3210
+ * @property {number} priority - Determines the message display sequence, with 1
3211
+ * being the highest priority.
3212
+ */
3213
+
3214
+ /**
3215
+ * @typedef CreateOrderRequestSchema
3216
+ * @property {CreateOrderShipmentSchema[]} [shipments] - List of shipments
3217
+ * included in the order.
3218
+ * @property {string[]} [tags] - Tags that can be used to filter and categorize
3219
+ * orders and shipments.
3220
+ * @property {CurrencySchema} currency_details
3221
+ * @property {string} [external_creation_date] - Timestamp indicating when the
3222
+ * order was created in an external system.
3223
+ * @property {CouponSchema} [coupon_details]
3224
+ * @property {BillingDetailsSchema} billing_details
3225
+ * @property {string} primary_payment_mode - The primary payment method used for
3226
+ * the entire order transaction.
3227
+ * @property {CPConfigurationSchema} [cp_configuration]
3228
+ * @property {number} [ordering_location_id] - The location ID where the order
3229
+ * is placed. Required when the order is placed from one location but
3230
+ * fulfilled by another.
3231
+ * @property {boolean} [allow_location_reassignment] - Allows location
3232
+ * reassignment before order confirmation.
3233
+ * @property {ShippingDetailsSchema} shipping_details
3234
+ * @property {string} [external_order_id] - A unique identifier assigned to the
3235
+ * order by an external system or service.
3236
+ * @property {UserDetailsSchema} [user_details]
3237
+ * @property {LifecycleMessageSchema[]} [order_lifecycle_messages] - List of
3238
+ * order lifecycle messages to be displayed to the user at Order Details.
3239
+ * @property {string} [channel_application_id] - Identifies the application from
3240
+ * which the order was created. Pass this when it differs from the fulfilling
3241
+ * company's application.
3242
+ * @property {string} [b2b_gstin_number] - The GSTIN (Goods and Services Tax
3243
+ * Identification Number) for business-to-business transactions.
3244
+ * @property {string} [channel_company_id] - The company ID where the order is
3245
+ * placed. Required when the order is placed from one company but fulfilled by another.
3246
+ * @property {boolean} [is_draft] - Indicates whether the order is a draft.
3247
+ * Draft orders will be moved to upcoming state instead of placed status.
2834
3248
  */
2835
3249
 
2836
3250
  /**
@@ -2845,6 +3259,66 @@ const Joi = require("joi");
2845
3259
  * @property {number} [page_size] - The number of items per page.
2846
3260
  */
2847
3261
 
3262
+ /**
3263
+ * @typedef OrderingSourceConfig
3264
+ * @property {string} [slug] - Slug of the ordering source.
3265
+ * @property {OrderingSourceFeature[]} [configs]
3266
+ * @property {string} [logo] - Logo of the ordering source.
3267
+ */
3268
+
3269
+ /**
3270
+ * @typedef OrderingSourceFeature
3271
+ * @property {string} [name] - Name of the ordering source config item.
3272
+ * @property {string} [slug] - Slug of the ordering source config item.
3273
+ * @property {string} [description] - Description of the ordering source config item.
3274
+ * @property {boolean} [enabled] - Whether the config/feature is enabled or not.
3275
+ */
3276
+
3277
+ /**
3278
+ * @typedef ListOrderingSources
3279
+ * @property {OrderingSourceSummary[]} [items]
3280
+ * @property {Page} [page]
3281
+ */
3282
+
3283
+ /**
3284
+ * @typedef OrderingSourceSummary
3285
+ * @property {string} [text] - Display Text of the ordering source.
3286
+ * @property {string} [value] - Value of the ordering source.
3287
+ */
3288
+
3289
+ /**
3290
+ * @typedef CreateAccount
3291
+ * @property {string} channel_account_name - Unique name identifier for the
3292
+ * channel account. This represents the sales channel or marketplace through
3293
+ * which orders are received and processed.
3294
+ */
3295
+
3296
+ /**
3297
+ * @typedef Account
3298
+ * @property {string} [channel_account_id] - Unique identifier for the channel
3299
+ * account. This is a system-generated identifier used to reference the
3300
+ * account across the platform.
3301
+ * @property {number} [company_id] - Unique identifier of the company on the
3302
+ * platform to which this channel account belongs.
3303
+ * @property {string} [channel_account_name] - Name of the channel account. This
3304
+ * identifies the specific sales channel or marketplace (e.g., SHOPIFY,
3305
+ * MARKETPLACE, etc.) through which the company receives and processes orders.
3306
+ */
3307
+
3308
+ /**
3309
+ * @typedef AccountsList
3310
+ * @property {Account[]} [data] - List of channel accounts associated with the
3311
+ * company. Each account represents a different sales channel or marketplace
3312
+ * integration.
3313
+ * @property {Page} [page]
3314
+ */
3315
+
3316
+ /**
3317
+ * @typedef ValidationError
3318
+ * @property {string} message - A brief description of the error encountered.
3319
+ * @property {string} field - The field in the request that caused the error.
3320
+ */
3321
+
2848
3322
  /**
2849
3323
  * @typedef BagReasonMeta
2850
3324
  * @property {boolean} [show_text_area] - Indicates whether a text area should
@@ -2937,6 +3411,37 @@ const Joi = require("joi");
2937
3411
  * useful for formatting mobile numbers correctly.
2938
3412
  */
2939
3413
 
3414
+ /**
3415
+ * @typedef BundleReturnConfig
3416
+ * @property {boolean} [allow_partial_return] - Indicates whether partial
3417
+ * returns are allowed for bundle products.
3418
+ * @property {boolean} [returnable] - Indicates whether the bundle product is returnable.
3419
+ * @property {boolean} [unit] - Time unit for the return window (e.g., "week",
3420
+ * "day", "hour").
3421
+ * @property {boolean} [time] - Duration value for the return window, expressed
3422
+ * in the specified unit.
3423
+ */
3424
+
3425
+ /**
3426
+ * @typedef BundleDetails
3427
+ * @property {string} [bundle_group_id] - Unique group identifier for the bundle.
3428
+ * @property {string} [name] - Name of the bundle.
3429
+ * @property {string} [slug] - URL-friendly identifier for the bundle.
3430
+ * @property {number} [bundle_count] - Indicates bundle count of the bag.
3431
+ * @property {string} [article_bundle_id] - Unique identifier for the article bundle.
3432
+ * @property {number} [bundle_article_quantity] - Article net_quantity in bundle Product.
3433
+ * @property {boolean} [is_base] - A flag that determines if bag is base bag of bundle.
3434
+ * @property {number} [price_marked] - Maximum Retail Price of the bundle.
3435
+ * @property {number} [price_effective] - Current selling price of the bundle.
3436
+ * @property {number} [item_id] - Unique identifier for the item.
3437
+ * @property {string} [item_type] - Type of the item (physical_bundle, virtual_bundle).
3438
+ * @property {BundleReturnConfig} [return_config]
3439
+ * @property {string} [seller_identifier] - Identifier for the seller of the bundle.
3440
+ * @property {string[]} [images] - An array of image URLs associated with the bundle.
3441
+ * @property {string} [brand_name] - Identifier for the brand name.
3442
+ * @property {string} [size] - Size associated with the bundle item.
3443
+ */
3444
+
2940
3445
  /**
2941
3446
  * @typedef Address
2942
3447
  * @property {string} [phone] - The phone number at the address, used for
@@ -3752,8 +4257,8 @@ const Joi = require("joi");
3752
4257
  * @property {string} [ordering_channnel] - The specific channel through which
3753
4258
  * your order was placed. This field will be phased out after version 2.4.0.
3754
4259
  * 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).
4260
+ * @property {string} [ordering_source] - Ordering source, to be used to
4261
+ * identify source of order creation.
3757
4262
  * @property {string} [shipment_id] - The unique identifier for the shipment itself.
3758
4263
  * @property {string} [customer_note] - Any special notes or instructions
3759
4264
  * provided by the customer related to the shipment.
@@ -3867,8 +4372,8 @@ const Joi = require("joi");
3867
4372
  * @property {string} [ordering_channel] - The specific channel through which
3868
4373
  * your order was placed. This field will be phased out after version 2.4.0.
3869
4374
  * 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).
4375
+ * @property {string} [ordering_source] - Ordering source, to be used to
4376
+ * identify source of order creation.
3872
4377
  * @property {LoyaltyDiscountDetails} [loyalty_discount_details]
3873
4378
  * @property {Object} [meta] - Meta data of the order contains additional,
3874
4379
  * potentially dynamic information about the order.
@@ -4191,6 +4696,9 @@ const Joi = require("joi");
4191
4696
  * tracking is enabled for the bag.
4192
4697
  * @property {boolean} is_customer_return_allowed - A flag that determines if
4193
4698
  * customer return is allowed for the bag.
4699
+ * @property {boolean} [is_bundle_item] - Flag to indicate whether the bag is
4700
+ * part of a bundle.
4701
+ * @property {BundleDetails} [bundle_details]
4194
4702
  */
4195
4703
 
4196
4704
  /**
@@ -4666,23 +5174,13 @@ const Joi = require("joi");
4666
5174
  * track and reference the specific transaction within the merchant's system.
4667
5175
  */
4668
5176
 
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
5177
  /**
4680
5178
  * @typedef OrderData
4681
5179
  * @property {string} [ordering_channel] - The specific channel through which
4682
5180
  * your order was placed. This field will be phased out after version 2.4.0.
4683
5181
  * 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).
5182
+ * @property {string} [ordering_source] - Ordering source, to be used to
5183
+ * identify source of order creation.
4686
5184
  * @property {string} order_date - Specifies the exact date and time when the
4687
5185
  * order was placed by the customer, serving as a key timestamp for the
4688
5186
  * initiation of the order processing cycle.
@@ -5401,96 +5899,6 @@ const Joi = require("joi");
5401
5899
  * @property {string} [error]
5402
5900
  */
5403
5901
 
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
5902
  class OrderPlatformModel {
5495
5903
  /** @returns {InvalidateShipmentCachePayload} */
5496
5904
  static InvalidateShipmentCachePayload() {
@@ -5938,7 +6346,7 @@ class OrderPlatformModel {
5938
6346
  /** @returns {CreateOrderConfig} */
5939
6347
  static CreateOrderConfig() {
5940
6348
  return Joi.object({
5941
- dp_configuration: OrderPlatformModel.DPConfiguration().required(),
6349
+ dp_configuration: OrderPlatformModel.DPConfiguration(),
5942
6350
  location_reassignment: Joi.boolean(),
5943
6351
  payment: OrderPlatformModel.PaymentConfig(),
5944
6352
  optimal_shipment_creation: Joi.boolean(),
@@ -6554,11 +6962,11 @@ class OrderPlatformModel {
6554
6962
  /** @returns {Charge} */
6555
6963
  static Charge() {
6556
6964
  return Joi.object({
6557
- name: Joi.string().allow("").required(),
6558
6965
  amount: OrderPlatformModel.AmountSchema().required(),
6559
- tax: OrderPlatformModel.Tax(),
6560
- code: Joi.string().allow(""),
6561
6966
  type: Joi.string().allow("").required(),
6967
+ name: Joi.string().allow("").required(),
6968
+ code: Joi.string().allow(""),
6969
+ tax: OrderPlatformModel.Tax(),
6562
6970
  });
6563
6971
  }
6564
6972
 
@@ -8105,40 +8513,512 @@ class OrderPlatformModel {
8105
8513
  });
8106
8514
  }
8107
8515
 
8108
- /** @returns {ValidationError} */
8109
- static ValidationError() {
8516
+ /** @returns {FulfillmentOptionSchema} */
8517
+ static FulfillmentOptionSchema() {
8110
8518
  return Joi.object({
8111
- message: Joi.string().allow("").required(),
8112
- field: Joi.string().allow("").required(),
8519
+ name: Joi.string().allow(""),
8520
+ slug: Joi.string().allow(""),
8521
+ is_default: Joi.boolean(),
8522
+ type: Joi.string().allow(""),
8113
8523
  });
8114
8524
  }
8115
8525
 
8116
- /** @returns {Page} */
8117
- static Page() {
8526
+ /** @returns {PaymentMethodGatewaySchema} */
8527
+ static PaymentMethodGatewaySchema() {
8118
8528
  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(),
8529
+ name: Joi.string().allow("").required(),
8530
+ logo: Joi.string().allow(""),
8127
8531
  });
8128
8532
  }
8129
8533
 
8130
- /** @returns {BagReasonMeta} */
8131
- static BagReasonMeta() {
8534
+ /** @returns {SubModeOfPaymentSchema} */
8535
+ static SubModeOfPaymentSchema() {
8132
8536
  return Joi.object({
8133
- show_text_area: Joi.boolean(),
8537
+ name: Joi.string().allow("").required(),
8134
8538
  });
8135
8539
  }
8136
8540
 
8137
- /** @returns {QuestionSet} */
8138
- static QuestionSet() {
8541
+ /** @returns {PaymentMethodModeOfPaymentSchema} */
8542
+ static PaymentMethodModeOfPaymentSchema() {
8139
8543
  return Joi.object({
8140
- id: Joi.number(),
8141
- display_name: Joi.string().allow(""),
8544
+ name: Joi.string().allow("").required(),
8545
+ slug: Joi.string().allow("").required(),
8546
+ sub_mode_of_payment: OrderPlatformModel.SubModeOfPaymentSchema(),
8547
+ });
8548
+ }
8549
+
8550
+ /** @returns {PaymentMethodTransactionPartySchema} */
8551
+ static PaymentMethodTransactionPartySchema() {
8552
+ return Joi.object({
8553
+ refund_bearer: Joi.string().allow("").required(),
8554
+ collection_bearer: Joi.string().allow("").required(),
8555
+ });
8556
+ }
8557
+
8558
+ /** @returns {LineItemPaymentMethodSchema} */
8559
+ static LineItemPaymentMethodSchema() {
8560
+ return Joi.object({
8561
+ gateway: OrderPlatformModel.PaymentMethodGatewaySchema(),
8562
+ mode_of_payment: OrderPlatformModel.PaymentMethodModeOfPaymentSchema(),
8563
+ amount_paid: Joi.number(),
8564
+ payment_identifier: Joi.string().allow(""),
8565
+ transaction_party: OrderPlatformModel.PaymentMethodTransactionPartySchema(),
8566
+ });
8567
+ }
8568
+
8569
+ /** @returns {BundleDetailsSchema} */
8570
+ static BundleDetailsSchema() {
8571
+ return Joi.object({
8572
+ is_base: Joi.boolean(),
8573
+ images: Joi.array().items(Joi.string().allow("")),
8574
+ group_id: Joi.string().allow(""),
8575
+ name: Joi.string().allow(""),
8576
+ item_type: Joi.string().allow(""),
8577
+ item_id: Joi.number(),
8578
+ item_code: Joi.string().allow(""),
8579
+ item_name: Joi.string().allow(""),
8580
+ seller_identifier: Joi.string().allow(""),
8581
+ bundle_article_quantity: Joi.number(),
8582
+ brand_name: Joi.string().allow(""),
8583
+ size: Joi.string().allow(""),
8584
+ });
8585
+ }
8586
+
8587
+ /** @returns {LineItemMonetaryValuesSchema} */
8588
+ static LineItemMonetaryValuesSchema() {
8589
+ return Joi.object({
8590
+ amount_paid: Joi.number().required(),
8591
+ price_effective: Joi.number().required(),
8592
+ discount: Joi.number(),
8593
+ price_marked: Joi.number().required(),
8594
+ coupon_discount: Joi.number(),
8595
+ cod_charges: Joi.number(),
8596
+ promo_discount: Joi.number(),
8597
+ gift_price: Joi.number(),
8598
+ delivery_charges: Joi.number(),
8599
+ });
8600
+ }
8601
+
8602
+ /** @returns {DimensionSchema} */
8603
+ static DimensionSchema() {
8604
+ return Joi.object({
8605
+ height: Joi.number().required(),
8606
+ length: Joi.number().required(),
8607
+ is_default: Joi.boolean().required(),
8608
+ unit: Joi.string().allow("").required(),
8609
+ width: Joi.number().required(),
8610
+ });
8611
+ }
8612
+
8613
+ /** @returns {GiftDetailsSchema} */
8614
+ static GiftDetailsSchema() {
8615
+ return Joi.object({
8616
+ amount: Joi.number().required(),
8617
+ display_text: Joi.string().allow("").required(),
8618
+ });
8619
+ }
8620
+
8621
+ /** @returns {CPRiderDetailsSchema} */
8622
+ static CPRiderDetailsSchema() {
8623
+ return Joi.object({
8624
+ name: Joi.string().allow("").required(),
8625
+ phone: Joi.string().allow("").required(),
8626
+ });
8627
+ }
8628
+
8629
+ /** @returns {CPAreaCodeSchema} */
8630
+ static CPAreaCodeSchema() {
8631
+ return Joi.object({
8632
+ source: Joi.string().allow("").required(),
8633
+ destination: Joi.string().allow("").required(),
8634
+ });
8635
+ }
8636
+
8637
+ /** @returns {CPTatToDeliverTheShipmentSchema} */
8638
+ static CPTatToDeliverTheShipmentSchema() {
8639
+ return Joi.object({
8640
+ min: Joi.number().required(),
8641
+ max: Joi.number().required(),
8642
+ });
8643
+ }
8644
+
8645
+ /** @returns {CPOptionsSchema} */
8646
+ static CPOptionsSchema() {
8647
+ return Joi.object({
8648
+ extension_id: Joi.string().allow(""),
8649
+ scheme_id: Joi.string().allow(""),
8650
+ area_code: OrderPlatformModel.CPAreaCodeSchema(),
8651
+ is_self_ship: Joi.boolean(),
8652
+ max_reattempts_for_delivery_allowed: Joi.number(),
8653
+ cp_sort_key: Joi.string().allow(""),
8654
+ name: Joi.string().allow(""),
8655
+ rider_details: OrderPlatformModel.CPRiderDetailsSchema(),
8656
+ using_own_creds: Joi.boolean(),
8657
+ qc_supported: Joi.boolean(),
8658
+ });
8659
+ }
8660
+
8661
+ /** @returns {CourierPartnerDetailsSchema} */
8662
+ static CourierPartnerDetailsSchema() {
8663
+ return Joi.object({
8664
+ cp_sort_key: Joi.string().allow(""),
8665
+ cp_options: Joi.array().items(OrderPlatformModel.CPOptionsSchema()),
8666
+ scheme_id: Joi.string().allow("").required(),
8667
+ name: Joi.string().allow("").required(),
8668
+ extension_id: Joi.string().allow("").required(),
8669
+ rider_details: OrderPlatformModel.CPRiderDetailsSchema(),
8670
+ qc_supported: Joi.boolean(),
8671
+ using_own_creds: Joi.boolean().required(),
8672
+ max_reattempts_for_delivery_allowed: Joi.number(),
8673
+ tat_to_deliver_the_shipment: OrderPlatformModel.CPTatToDeliverTheShipmentSchema(),
8674
+ is_self_ship: Joi.boolean(),
8675
+ });
8676
+ }
8677
+
8678
+ /** @returns {TaxDetailsSchema} */
8679
+ static TaxDetailsSchema() {
8680
+ return Joi.object({
8681
+ hs_code: Joi.string().allow("").required(),
8682
+ tax_rule_id: Joi.string().allow("").required(),
8683
+ });
8684
+ }
8685
+
8686
+ /** @returns {PromiseDetailsSchema} */
8687
+ static PromiseDetailsSchema() {
8688
+ return Joi.object({
8689
+ min_sla: Joi.number().required(),
8690
+ max_sla: Joi.number().required(),
8691
+ });
8692
+ }
8693
+
8694
+ /** @returns {CustomerPickupSlotSchema} */
8695
+ static CustomerPickupSlotSchema() {
8696
+ return Joi.object({
8697
+ start_time: Joi.string().allow("").required(),
8698
+ end_time: Joi.string().allow("").required(),
8699
+ });
8700
+ }
8701
+
8702
+ /** @returns {DpPickupSlotSchema} */
8703
+ static DpPickupSlotSchema() {
8704
+ return Joi.object({
8705
+ start_time: Joi.string().allow("").required(),
8706
+ end_time: Joi.string().allow("").required(),
8707
+ });
8708
+ }
8709
+
8710
+ /** @returns {OrderFulfillmentTimelineSchema} */
8711
+ static OrderFulfillmentTimelineSchema() {
8712
+ return Joi.object({
8713
+ dp_pickup_slot: OrderPlatformModel.DpPickupSlotSchema(),
8714
+ dispatch_after_date: Joi.string().allow(""),
8715
+ dispatch_by_date: Joi.string().allow(""),
8716
+ confirm_by_date: Joi.string().allow(""),
8717
+ customer_pickup_slot: OrderPlatformModel.CustomerPickupSlotSchema(),
8718
+ pack_by_date: Joi.string().allow(""),
8719
+ });
8720
+ }
8721
+
8722
+ /** @returns {LineItemSchema} */
8723
+ static LineItemSchema() {
8724
+ return Joi.object({
8725
+ seller_identifier: Joi.string().allow(""),
8726
+ payment_methods: Joi.array()
8727
+ .items(OrderPlatformModel.LineItemPaymentMethodSchema())
8728
+ .required(),
8729
+ monetary_values: OrderPlatformModel.LineItemMonetaryValuesSchema().required(),
8730
+ gift_details: OrderPlatformModel.GiftDetailsSchema(),
8731
+ special_instructions: Joi.string().allow(""),
8732
+ dimension: OrderPlatformModel.DimensionSchema(),
8733
+ quantity: Joi.number(),
8734
+ external_line_id: Joi.string().allow(""),
8735
+ bundle_details: OrderPlatformModel.BundleDetailsSchema(),
8736
+ meta: Joi.object().pattern(/\S/, Joi.any()),
8737
+ });
8738
+ }
8739
+
8740
+ /** @returns {CreateOrderShipmentSchema} */
8741
+ static CreateOrderShipmentSchema() {
8742
+ return Joi.object({
8743
+ is_mto: Joi.boolean(),
8744
+ shipment_lifecycle_messages: Joi.array().items(
8745
+ OrderPlatformModel.LifecycleMessageSchema()
8746
+ ),
8747
+ tags: Joi.array().items(Joi.string().allow("")),
8748
+ type: Joi.string().allow(""),
8749
+ fulfillment_option: OrderPlatformModel.FulfillmentOptionSchema(),
8750
+ external_shipment_id: Joi.string().allow(""),
8751
+ line_items: Joi.array().items(OrderPlatformModel.LineItemSchema()),
8752
+ order_fulfillment_timeline: OrderPlatformModel.OrderFulfillmentTimelineSchema(),
8753
+ location_id: Joi.number(),
8754
+ external_location_id: Joi.string().allow(""),
8755
+ return_location_id: Joi.number(),
8756
+ courier_partner_details: OrderPlatformModel.CourierPartnerDetailsSchema(),
8757
+ tax_details: OrderPlatformModel.TaxDetailsSchema(),
8758
+ promise_details: OrderPlatformModel.PromiseDetailsSchema(),
8759
+ allow_processing_after: Joi.string().allow(""),
8760
+ meta: Joi.object().pattern(/\S/, Joi.any()),
8761
+ });
8762
+ }
8763
+
8764
+ /** @returns {OrderingCurrencySchema} */
8765
+ static OrderingCurrencySchema() {
8766
+ return Joi.object({
8767
+ currency_code: Joi.string().allow("").required(),
8768
+ currency_symbol: Joi.string().allow("").required(),
8769
+ });
8770
+ }
8771
+
8772
+ /** @returns {ConversionRateSchema} */
8773
+ static ConversionRateSchema() {
8774
+ return Joi.object({
8775
+ rate: Joi.number().required(),
8776
+ timestamp_ms: Joi.number().required(),
8777
+ });
8778
+ }
8779
+
8780
+ /** @returns {CurrencySchema} */
8781
+ static CurrencySchema() {
8782
+ return Joi.object({
8783
+ ordering_currency: OrderPlatformModel.OrderingCurrencySchema().required(),
8784
+ conversion_rate: OrderPlatformModel.ConversionRateSchema().required(),
8785
+ currency_code: Joi.string().allow(""),
8786
+ currency_symbol: Joi.string().allow(""),
8787
+ });
8788
+ }
8789
+
8790
+ /** @returns {CouponOwnershipSchema} */
8791
+ static CouponOwnershipSchema() {
8792
+ return Joi.object({
8793
+ payable_category: Joi.string().allow("").required(),
8794
+ });
8795
+ }
8796
+
8797
+ /** @returns {CouponSchema} */
8798
+ static CouponSchema() {
8799
+ return Joi.object({
8800
+ code: Joi.string().allow("").required(),
8801
+ id: Joi.string().allow("").required(),
8802
+ ownership: OrderPlatformModel.CouponOwnershipSchema().required(),
8803
+ is_return_allowed: Joi.boolean().required(),
8804
+ is_cancellation_allowed: Joi.boolean().required(),
8805
+ });
8806
+ }
8807
+
8808
+ /** @returns {BillingDetailsSchema} */
8809
+ static BillingDetailsSchema() {
8810
+ return Joi.object({
8811
+ first_name: Joi.string().allow(""),
8812
+ phone_code: Joi.string().allow(""),
8813
+ country: Joi.string().allow(""),
8814
+ city: Joi.string().allow(""),
8815
+ pincode: Joi.string().allow(""),
8816
+ last_name: Joi.string().allow(""),
8817
+ mobile_number: Joi.string().allow(""),
8818
+ email: Joi.string().allow(""),
8819
+ state: Joi.string().allow(""),
8820
+ alternate_mobile_number: Joi.string().allow(""),
8821
+ address: Joi.string().allow(""),
8822
+ middle_name: Joi.string().allow(""),
8823
+ title: Joi.string().allow(""),
8824
+ house_no: Joi.string().allow(""),
8825
+ geo_location: OrderPlatformModel.GeoLocationSchema(),
8826
+ gender: Joi.string().allow(""),
8827
+ landmark: Joi.string().allow(""),
8828
+ address_type: Joi.string().allow(""),
8829
+ state_code: Joi.string().allow(""),
8830
+ floor_no: Joi.string().allow(""),
8831
+ alternate_email: Joi.string().allow(""),
8832
+ address1: Joi.string().allow(""),
8833
+ address2: Joi.string().allow(""),
8834
+ country_iso_code: Joi.string().allow(""),
8835
+ user_id: Joi.string().allow(""),
8836
+ area_code: Joi.string().allow(""),
8837
+ area_code_slug: Joi.string().allow(""),
8838
+ country_phone_code: Joi.string().allow(""),
8839
+ });
8840
+ }
8841
+
8842
+ /** @returns {CPConfigurationSchema} */
8843
+ static CPConfigurationSchema() {
8844
+ return Joi.object({
8845
+ shipping_by: Joi.string().allow("").required(),
8846
+ });
8847
+ }
8848
+
8849
+ /** @returns {ShippingDetailsSchema} */
8850
+ static ShippingDetailsSchema() {
8851
+ return Joi.object({
8852
+ first_name: Joi.string().allow(""),
8853
+ phone_code: Joi.string().allow(""),
8854
+ country: Joi.string().allow(""),
8855
+ city: Joi.string().allow(""),
8856
+ pincode: Joi.string().allow(""),
8857
+ last_name: Joi.string().allow(""),
8858
+ mobile_number: Joi.string().allow(""),
8859
+ email: Joi.string().allow(""),
8860
+ state: Joi.string().allow(""),
8861
+ alternate_mobile_number: Joi.string().allow(""),
8862
+ address: Joi.string().allow(""),
8863
+ middle_name: Joi.string().allow(""),
8864
+ title: Joi.string().allow(""),
8865
+ house_no: Joi.string().allow(""),
8866
+ geo_location: OrderPlatformModel.GeoLocationSchema(),
8867
+ gender: Joi.string().allow(""),
8868
+ landmark: Joi.string().allow(""),
8869
+ address_type: Joi.string().allow(""),
8870
+ state_code: Joi.string().allow(""),
8871
+ floor_no: Joi.string().allow(""),
8872
+ alternate_email: Joi.string().allow(""),
8873
+ address1: Joi.string().allow(""),
8874
+ address2: Joi.string().allow(""),
8875
+ country_iso_code: Joi.string().allow(""),
8876
+ user_id: Joi.string().allow(""),
8877
+ area_code: Joi.string().allow(""),
8878
+ area_code_slug: Joi.string().allow(""),
8879
+ country_phone_code: Joi.string().allow(""),
8880
+ });
8881
+ }
8882
+
8883
+ /** @returns {UserDetailsSchema} */
8884
+ static UserDetailsSchema() {
8885
+ return Joi.object({
8886
+ gstin: Joi.string().allow(""),
8887
+ pan_no: Joi.string().allow(""),
8888
+ });
8889
+ }
8890
+
8891
+ /** @returns {LifecycleMessageSchema} */
8892
+ static LifecycleMessageSchema() {
8893
+ return Joi.object({
8894
+ message: Joi.string().allow("").required(),
8895
+ type: Joi.string().allow("").required(),
8896
+ states: Joi.array().items(Joi.string().allow("")).required(),
8897
+ priority: Joi.number().required(),
8898
+ });
8899
+ }
8900
+
8901
+ /** @returns {CreateOrderRequestSchema} */
8902
+ static CreateOrderRequestSchema() {
8903
+ return Joi.object({
8904
+ shipments: Joi.array().items(
8905
+ OrderPlatformModel.CreateOrderShipmentSchema()
8906
+ ),
8907
+ tags: Joi.array().items(Joi.string().allow("")),
8908
+ currency_details: OrderPlatformModel.CurrencySchema().required(),
8909
+ external_creation_date: Joi.string().allow(""),
8910
+ coupon_details: OrderPlatformModel.CouponSchema(),
8911
+ billing_details: OrderPlatformModel.BillingDetailsSchema().required(),
8912
+ primary_payment_mode: Joi.string().allow("").required(),
8913
+ cp_configuration: OrderPlatformModel.CPConfigurationSchema(),
8914
+ ordering_location_id: Joi.number(),
8915
+ allow_location_reassignment: Joi.boolean(),
8916
+ shipping_details: OrderPlatformModel.ShippingDetailsSchema().required(),
8917
+ external_order_id: Joi.string().allow(""),
8918
+ user_details: OrderPlatformModel.UserDetailsSchema(),
8919
+ order_lifecycle_messages: Joi.array().items(
8920
+ OrderPlatformModel.LifecycleMessageSchema()
8921
+ ),
8922
+ channel_application_id: Joi.string().allow(""),
8923
+ b2b_gstin_number: Joi.string().allow(""),
8924
+ channel_company_id: Joi.string().allow(""),
8925
+ is_draft: Joi.boolean(),
8926
+ });
8927
+ }
8928
+
8929
+ /** @returns {Page} */
8930
+ static Page() {
8931
+ return Joi.object({
8932
+ item_total: Joi.number(),
8933
+ next_id: Joi.string().allow(""),
8934
+ has_previous: Joi.boolean(),
8935
+ has_next: Joi.boolean(),
8936
+ current: Joi.number(),
8937
+ type: Joi.string().allow("").required(),
8938
+ size: Joi.number(),
8939
+ page_size: Joi.number(),
8940
+ });
8941
+ }
8942
+
8943
+ /** @returns {OrderingSourceConfig} */
8944
+ static OrderingSourceConfig() {
8945
+ return Joi.object({
8946
+ slug: Joi.string().allow(""),
8947
+ configs: Joi.array().items(OrderPlatformModel.OrderingSourceFeature()),
8948
+ logo: Joi.string().allow(""),
8949
+ });
8950
+ }
8951
+
8952
+ /** @returns {OrderingSourceFeature} */
8953
+ static OrderingSourceFeature() {
8954
+ return Joi.object({
8955
+ name: Joi.string().allow(""),
8956
+ slug: Joi.string().allow(""),
8957
+ description: Joi.string().allow(""),
8958
+ enabled: Joi.boolean(),
8959
+ });
8960
+ }
8961
+
8962
+ /** @returns {ListOrderingSources} */
8963
+ static ListOrderingSources() {
8964
+ return Joi.object({
8965
+ items: Joi.array().items(OrderPlatformModel.OrderingSourceSummary()),
8966
+ page: OrderPlatformModel.Page(),
8967
+ });
8968
+ }
8969
+
8970
+ /** @returns {OrderingSourceSummary} */
8971
+ static OrderingSourceSummary() {
8972
+ return Joi.object({
8973
+ text: Joi.string().allow(""),
8974
+ value: Joi.string().allow(""),
8975
+ });
8976
+ }
8977
+
8978
+ /** @returns {CreateAccount} */
8979
+ static CreateAccount() {
8980
+ return Joi.object({
8981
+ channel_account_name: Joi.string().allow("").required(),
8982
+ });
8983
+ }
8984
+
8985
+ /** @returns {Account} */
8986
+ static Account() {
8987
+ return Joi.object({
8988
+ channel_account_id: Joi.string().allow(""),
8989
+ company_id: Joi.number(),
8990
+ channel_account_name: Joi.string().allow(""),
8991
+ });
8992
+ }
8993
+
8994
+ /** @returns {AccountsList} */
8995
+ static AccountsList() {
8996
+ return Joi.object({
8997
+ data: Joi.array().items(OrderPlatformModel.Account()),
8998
+ page: OrderPlatformModel.Page(),
8999
+ });
9000
+ }
9001
+
9002
+ /** @returns {ValidationError} */
9003
+ static ValidationError() {
9004
+ return Joi.object({
9005
+ message: Joi.string().allow("").required(),
9006
+ field: Joi.string().allow("").required(),
9007
+ });
9008
+ }
9009
+
9010
+ /** @returns {BagReasonMeta} */
9011
+ static BagReasonMeta() {
9012
+ return Joi.object({
9013
+ show_text_area: Joi.boolean(),
9014
+ });
9015
+ }
9016
+
9017
+ /** @returns {QuestionSet} */
9018
+ static QuestionSet() {
9019
+ return Joi.object({
9020
+ id: Joi.number(),
9021
+ display_name: Joi.string().allow(""),
8142
9022
  });
8143
9023
  }
8144
9024
 
@@ -8200,6 +9080,38 @@ class OrderPlatformModel {
8200
9080
  });
8201
9081
  }
8202
9082
 
9083
+ /** @returns {BundleReturnConfig} */
9084
+ static BundleReturnConfig() {
9085
+ return Joi.object({
9086
+ allow_partial_return: Joi.boolean().allow(null),
9087
+ returnable: Joi.boolean().allow(null),
9088
+ unit: Joi.boolean().allow(null),
9089
+ time: Joi.boolean().allow(null),
9090
+ });
9091
+ }
9092
+
9093
+ /** @returns {BundleDetails} */
9094
+ static BundleDetails() {
9095
+ return Joi.object({
9096
+ bundle_group_id: Joi.string().allow(""),
9097
+ name: Joi.string().allow(""),
9098
+ slug: Joi.string().allow(""),
9099
+ bundle_count: Joi.number(),
9100
+ article_bundle_id: Joi.string().allow(""),
9101
+ bundle_article_quantity: Joi.number(),
9102
+ is_base: Joi.boolean(),
9103
+ price_marked: Joi.number(),
9104
+ price_effective: Joi.number(),
9105
+ item_id: Joi.number(),
9106
+ item_type: Joi.string().allow(""),
9107
+ return_config: OrderPlatformModel.BundleReturnConfig(),
9108
+ seller_identifier: Joi.string().allow(""),
9109
+ images: Joi.array().items(Joi.string().allow("")),
9110
+ brand_name: Joi.string().allow(""),
9111
+ size: Joi.string().allow(""),
9112
+ });
9113
+ }
9114
+
8203
9115
  /** @returns {Address} */
8204
9116
  static Address() {
8205
9117
  return Joi.object({
@@ -9076,6 +9988,8 @@ class OrderPlatformModel {
9076
9988
  can_be_cancelled: Joi.boolean().required(),
9077
9989
  enable_tracking: Joi.boolean().required(),
9078
9990
  is_customer_return_allowed: Joi.boolean().required(),
9991
+ is_bundle_item: Joi.boolean(),
9992
+ bundle_details: OrderPlatformModel.BundleDetails(),
9079
9993
  });
9080
9994
  }
9081
9995
 
@@ -9432,14 +10346,6 @@ class OrderPlatformModel {
9432
10346
  });
9433
10347
  }
9434
10348
 
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
10349
  /** @returns {OrderData} */
9444
10350
  static OrderData() {
9445
10351
  return Joi.object({
@@ -10117,188 +11023,5 @@ class OrderPlatformModel {
10117
11023
  error: Joi.string().allow(""),
10118
11024
  });
10119
11025
  }
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
11026
  }
10304
11027
  module.exports = OrderPlatformModel;