@gofynd/fdk-client-javascript 3.16.3 → 3.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/ApplicationClient.d.ts +0 -2
  4. package/sdk/application/ApplicationClient.js +0 -2
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +40 -0
  6. package/sdk/application/Cart/CartApplicationClient.js +176 -0
  7. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +18 -4
  8. package/sdk/application/Catalog/CatalogApplicationClient.js +47 -4
  9. package/sdk/application/Content/ContentApplicationClient.d.ts +21 -1
  10. package/sdk/application/Content/ContentApplicationClient.js +93 -2
  11. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +11 -21
  12. package/sdk/application/Logistic/LogisticApplicationClient.js +34 -83
  13. package/sdk/application/Order/OrderApplicationClient.d.ts +11 -0
  14. package/sdk/application/Order/OrderApplicationClient.js +50 -0
  15. package/sdk/application/Payment/PaymentApplicationClient.d.ts +5 -5
  16. package/sdk/application/Payment/PaymentApplicationClient.js +5 -4
  17. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +84 -0
  18. package/sdk/partner/Logistics/LogisticsPartnerClient.js +712 -0
  19. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +237 -1
  20. package/sdk/partner/Logistics/LogisticsPartnerModel.js +157 -0
  21. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +8 -0
  22. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +70 -0
  23. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +74 -12
  24. package/sdk/platform/Cart/CartPlatformApplicationClient.js +637 -36
  25. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +225 -1
  26. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +147 -0
  27. package/sdk/platform/Cart/CartPlatformModel.d.ts +952 -5
  28. package/sdk/platform/Cart/CartPlatformModel.js +598 -2
  29. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +125 -5
  30. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +831 -41
  31. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +205 -7
  32. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +154 -3
  33. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +5 -16
  34. package/sdk/platform/Catalog/CatalogPlatformClient.js +8 -85
  35. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1025 -159
  36. package/sdk/platform/Catalog/CatalogPlatformModel.js +840 -165
  37. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +8 -10
  38. package/sdk/platform/Catalog/CatalogPlatformValidator.js +3 -12
  39. package/sdk/platform/Common/CommonPlatformModel.d.ts +18 -1
  40. package/sdk/platform/Common/CommonPlatformModel.js +14 -0
  41. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +1 -73
  42. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +4 -462
  43. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +7 -45
  44. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +4 -55
  45. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +10 -2
  46. package/sdk/platform/Communication/CommunicationPlatformModel.js +3 -2
  47. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +14 -0
  48. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +6 -0
  49. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +92 -1
  50. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +54 -0
  51. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +21 -0
  52. package/sdk/platform/Discount/DiscountPlatformModel.js +9 -0
  53. package/sdk/platform/Order/OrderPlatformClient.d.ts +27 -19
  54. package/sdk/platform/Order/OrderPlatformClient.js +176 -108
  55. package/sdk/platform/Order/OrderPlatformModel.d.ts +359 -45
  56. package/sdk/platform/Order/OrderPlatformModel.js +218 -44
  57. package/sdk/platform/Order/OrderPlatformValidator.d.ts +40 -43
  58. package/sdk/platform/Order/OrderPlatformValidator.js +35 -30
  59. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +14 -3
  60. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +88 -6
  61. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +28 -3
  62. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +22 -2
  63. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +376 -11
  64. package/sdk/platform/Payment/PaymentPlatformModel.js +243 -10
  65. package/sdk/platform/PlatformApplicationClient.d.ts +0 -2
  66. package/sdk/platform/PlatformApplicationClient.js +0 -4
  67. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +0 -13
  68. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +0 -82
  69. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +1 -10
  70. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +0 -12
  71. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +212 -28
  72. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +133 -13
  73. package/sdk/platform/User/UserPlatformModel.d.ts +2 -2
  74. package/sdk/platform/User/UserPlatformModel.js +4 -4
  75. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +29 -0
  76. package/sdk/platform/Webhook/WebhookPlatformModel.js +13 -0
  77. package/sdk/platform/index.d.ts +0 -1
  78. package/sdk/platform/index.js +0 -2
  79. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +27 -1
  80. package/sdk/public/Configuration/ConfigurationPublicModel.js +19 -0
  81. package/sdk/public/Webhook/WebhookPublicModel.d.ts +29 -0
  82. package/sdk/public/Webhook/WebhookPublicModel.js +13 -0
  83. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +0 -79
  84. package/sdk/application/Rewards/RewardsApplicationClient.js +0 -315
  85. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +0 -136
  86. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +0 -976
  87. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -152
  88. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -157
  89. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +0 -387
  90. package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -410
@@ -1,25 +1,41 @@
1
1
  const Joi = require("joi");
2
2
 
3
3
  /**
4
- * @typedef InvalidateShipmentCachePayload
5
- * @property {string[]} [shipment_ids] - Shipment Ids to clear cache
6
- * @property {string[]} [affiliate_bag_ids] - Affiliate Bag Ids to clear cache
7
- * of shipment Ids mapped to it
8
- * @property {string[]} [bag_ids] - Bag Ids to clear cache of shipment Ids mapped to it
9
- */
10
-
11
- /**
12
- * @typedef InvalidateShipmentCacheNestedResponseSchema
13
- * @property {string} [shipment_id]
14
- * @property {number} [status] - The HTTP status code corresponding to the
15
- * overall status of the shipment response.
16
- * @property {string} [message]
17
- * @property {string} [error]
18
- */
19
-
20
- /**
21
- * @typedef InvalidateShipmentCacheResponseSchema
22
- * @property {InvalidateShipmentCacheNestedResponseSchema[]} [response]
4
+ * @typedef PackageSchema
5
+ * @property {string} [id] - Unique identifier of the physical package. If not
6
+ * provided, the system will auto-generate a unique ID with format 'PK'
7
+ * followed by a 10-digit number.
8
+ * @property {string} [packaging_id] - Optional reference to a predefined
9
+ * packaging configuration or template used for creating physical packages.
10
+ * @property {string} [name] - A human-readable name or label for the package,
11
+ * used for identification and organizational purposes.
12
+ * @property {string} [size] - The size category of the package (e.g., small,
13
+ * medium, large). Used for logistics and carrier selection.
14
+ * @property {string} [package_type] - The type or category of packaging
15
+ * material used (e.g., Box, Paper Bag, Poly Mailer, Envelope).
16
+ * @property {number} [length] - The length dimension of the package in
17
+ * centimeters. Used for volumetric weight calculation and carrier requirements.
18
+ * @property {number} [width] - The width dimension of the package in
19
+ * centimeters. Used for volumetric weight calculation and carrier requirements.
20
+ * @property {number} [height] - The height dimension of the package in
21
+ * centimeters. Used for volumetric weight calculation and carrier requirements.
22
+ * @property {number} [weight] - The actual weight of the package in kilograms,
23
+ * including packaging materials and products.
24
+ * @property {number} [error_rate] - The acceptable error rate or tolerance for
25
+ * the package weight, expressed as a decimal (e.g., 0.02 for 2% tolerance).
26
+ * @property {number} [package_vol_weight] - The volumetric weight of the
27
+ * package calculated based on dimensions, used for shipping cost calculation
28
+ * when greater than actual weight.
29
+ * @property {number} [max_weight] - The maximum weight capacity that this
30
+ * package can handle, used for validation and logistics planning.
31
+ * @property {string} [awb] - Air Waybill number assigned by the courier partner
32
+ * for tracking this specific package throughout the delivery process.
33
+ * @property {Object} [pdf_links] - Dictionary containing PDF document links
34
+ * related to this package (labels, invoices, etc.). Always returns an object
35
+ * - empty object {} if no links are present, populated object if links exist.
36
+ * Users can update values by providing new key-value pairs.
37
+ * @property {PackageProduct[]} [products] - List of products contained within
38
+ * this package. Each product specifies its line number, quantity, and identifier.
23
39
  */
24
40
 
25
41
  /**
@@ -354,6 +370,14 @@ const Joi = require("joi");
354
370
  * @property {string} message - Message for the transition.
355
371
  */
356
372
 
373
+ /**
374
+ * @typedef RefundModeTransitionData
375
+ * @property {string} [refund_mode] - Refund Mode for status transition data.
376
+ * @property {string} [display_name] - Refund Mode display name.
377
+ * @property {string[]} [payment_identifiers] - List of identifiers associated
378
+ * with the refund transaction.
379
+ */
380
+
357
381
  /**
358
382
  * @typedef ShipmentsRequestSchema
359
383
  * @property {string} identifier - Unique identifier for the shipment.
@@ -363,6 +387,8 @@ const Joi = require("joi");
363
387
  * @property {DataUpdates} [data_updates]
364
388
  * @property {TransitionComments[]} [transition_comments] - Comments or notes
365
389
  * associated with the transition of shipment status.
390
+ * @property {RefundModeTransitionData[]} [refund_modes] - Refund Mode for
391
+ * status transition.
366
392
  */
367
393
 
368
394
  /**
@@ -394,7 +420,9 @@ const Joi = require("joi");
394
420
 
395
421
  /**
396
422
  * @typedef StatuesRequestSchema
397
- * @property {string} [status] - The new status to be assigned to the shipment(s).
423
+ * @property {string} [status] - The new status to be assigned to a shipment.
424
+ * Also, refer to the <a href='/commerce/getting-started/oms-states/'>OMS
425
+ * States</a> for the complete status list.
398
426
  * @property {ShipmentsRequestSchema[]} [shipments] - A list of shipments to
399
427
  * which the new status will be applied.
400
428
  * @property {string} [exclude_bags_next_state] - Specifies the state to which
@@ -2534,6 +2562,14 @@ const Joi = require("joi");
2534
2562
  *
2535
2563
  * - `status_update`: Status Update
2536
2564
  * - `data_update`: Data Update
2565
+ *
2566
+ * @property {string} [fulfillment_option_slug] - Represents the unique slug
2567
+ * associated with the fulfillment option attached to the shipment. This slug
2568
+ * helps determine the fulfillment method and operational flow used to deliver
2569
+ * the shipment. Examples:
2570
+ *
2571
+ * - "standard-delivery"
2572
+ * - "hyperlocal-delivery"
2537
2573
  */
2538
2574
 
2539
2575
  /**
@@ -2854,6 +2890,29 @@ const Joi = require("joi");
2854
2890
  * @property {PaymentMethodTransactionPartySchema} [transaction_party]
2855
2891
  */
2856
2892
 
2893
+ /**
2894
+ * @typedef PackagesSchema
2895
+ * @property {PackageSchema[]} packages - Array of packages to be created or
2896
+ * updated for the shipment. At least two packages are required for MPS functionality.
2897
+ */
2898
+
2899
+ /**
2900
+ * @typedef PackagesResponseSchema
2901
+ * @property {boolean} success - Indicates whether the API call was successful
2902
+ * (true) or failed (false).
2903
+ * @property {PackagesSchema} data
2904
+ * @property {string} [message] - A descriptive message providing additional
2905
+ * information about the API response.
2906
+ */
2907
+
2908
+ /**
2909
+ * @typedef PackagesErrorResponseSchema
2910
+ * @property {boolean} success - Indicates whether the API call was successful.
2911
+ * Will always be false for error responses.
2912
+ * @property {string} error - A detailed error message describing what went
2913
+ * wrong during the API call.
2914
+ */
2915
+
2857
2916
  /**
2858
2917
  * @typedef BundleDetailsSchema
2859
2918
  * @property {boolean} [is_base] - This serves as the base item, with all other
@@ -3054,6 +3113,8 @@ const Joi = require("joi");
3054
3113
  * @property {string} [external_shipment_id] - Unique identifier for the
3055
3114
  * shipment as assigned by an external system. Use this to map the external ID
3056
3115
  * to Fynd's generated ID.
3116
+ * @property {string} [invoice_id] - Indicates whether the order was created in
3117
+ * offline mode. Used to enable offline-specific processing and sync behavior.
3057
3118
  * @property {LineItemSchema[]} [line_items] - A list of items included in the shipment.
3058
3119
  * @property {OrderFulfillmentTimelineSchema} [order_fulfillment_timeline]
3059
3120
  * @property {number} [location_id] - The location ID from which this shipment
@@ -3254,6 +3315,8 @@ const Joi = require("joi");
3254
3315
  * placed. Required when the order is placed from one company but fulfilled by another.
3255
3316
  * @property {boolean} [is_draft] - Indicates whether the order is a draft.
3256
3317
  * Draft orders will be moved to upcoming state instead of placed status.
3318
+ * @property {boolean} [is_offline_order] - Indicates whether the order is an
3319
+ * offline order placed through a physical store or offline channel.
3257
3320
  * @property {Object} [meta] - Metadata related to the order may include
3258
3321
  * additional, dynamic information that provides further context about the
3259
3322
  * order. This information can also be viewed on the Order or Shipment Details page.
@@ -3325,6 +3388,15 @@ const Joi = require("joi");
3325
3388
  * @property {Page} [page]
3326
3389
  */
3327
3390
 
3391
+ /**
3392
+ * @typedef PackageProduct
3393
+ * @property {number} line_number - The line number of the product within the
3394
+ * shipment, used for tracking and identification purposes.
3395
+ * @property {number} quantity - The quantity of the product included in this package.
3396
+ * @property {string} identifier - The unique identifier or SKU (Stock Keeping
3397
+ * Unit) of the product. This is used to match products across packages and bags.
3398
+ */
3399
+
3328
3400
  /**
3329
3401
  * @typedef ValidationError
3330
3402
  * @property {string} message - A brief description of the error encountered.
@@ -3401,6 +3473,15 @@ const Joi = require("joi");
3401
3473
  * providing a clear indication of its current processing stage.
3402
3474
  */
3403
3475
 
3476
+ /**
3477
+ * @typedef OrderingSourceDetails
3478
+ * @property {string} [type] - Type of the ordering source.
3479
+ * @property {string} [slug] - Slug identifier of the ordering source.
3480
+ * @property {string} [display_name] - Display name of the ordering source.
3481
+ * @property {boolean} [is_active] - Indicates whether the ordering source is active.
3482
+ * @property {string} [logo] - Logo URL of the ordering source.
3483
+ */
3484
+
3404
3485
  /**
3405
3486
  * @typedef UserDataInfo
3406
3487
  * @property {number} [id] - The unique identifier associated with the user.
@@ -3579,6 +3660,8 @@ const Joi = require("joi");
3579
3660
  * used in the transaction.
3580
3661
  * @property {number} [amount_to_be_collected] - Total amount to be collected in
3581
3662
  * scenarios involving multiple payment methods.
3663
+ * @property {number} [cost_price] - The base cost incurred by the seller to
3664
+ * acquire or produce the product before margin or discount.
3582
3665
  * @property {number} [loyalty_discount] - Amount reduced from the payable price
3583
3666
  * when the customer applies loyalty program points while placing the order.
3584
3667
  */
@@ -3669,6 +3752,8 @@ const Joi = require("joi");
3669
3752
  * purchased by the customer, usable for future transactions.
3670
3753
  * @property {number} [amount_to_be_collected] - Amount to be collected from the
3671
3754
  * customer when multiple payment methods are utilized for a single order.
3755
+ * @property {number} [cost_price] - The base cost incurred by the seller to
3756
+ * acquire or produce the product before margin or discount.
3672
3757
  * @property {number} [loyalty_discount] - Amount reduced from the payable price
3673
3758
  * when the customer applies loyalty program points while placing the order.
3674
3759
  */
@@ -3711,6 +3796,16 @@ const Joi = require("joi");
3711
3796
  * services before tax is applied.
3712
3797
  */
3713
3798
 
3799
+ /**
3800
+ * @typedef SellerQcDetails
3801
+ * @property {number} [line_number] - Represents the line number in an order or
3802
+ * transaction associated with the bag.
3803
+ * @property {number} [bad_quantity] - Represents the total number of items in a
3804
+ * bag that have failed quality control and are marked as bad QC.
3805
+ * @property {number} [good_quantity] - Represents the total number of items in
3806
+ * a bag that have passed quality control and are marked as good QC.
3807
+ */
3808
+
3714
3809
  /**
3715
3810
  * @typedef FinancialBreakup
3716
3811
  * @property {number} refund_credit - The amount of refund credits applicable
@@ -4213,6 +4308,7 @@ const Joi = require("joi");
4213
4308
  * placed by the customer. This timestamp is crucial for tracking the order'
4214
4309
  * @property {string} [order_created_ts] - The timestamp indicating when the
4215
4310
  * order was created in UTC format.
4311
+ * @property {OrderingSourceDetails} [ordering_source_details]
4216
4312
  * @property {ShipmentStatus} [shipment_status]
4217
4313
  * @property {UserDataInfo} [user]
4218
4314
  * @property {string} [estimated_sla_time] - The estimated Service Level
@@ -4892,6 +4988,7 @@ const Joi = require("joi");
4892
4988
  * @property {BagStatusHistory[]} [bag_status]
4893
4989
  * @property {Object} [parent_promo_bags] - An object containing details of
4894
4990
  * parent promotional bags.
4991
+ * @property {SellerQcDetails} [seller_qc_details]
4895
4992
  * @property {FinancialBreakup} [financial_breakup]
4896
4993
  * @property {BagConfigs} [bag_configs]
4897
4994
  * @property {string} [seller_identifier]
@@ -5146,6 +5243,8 @@ const Joi = require("joi");
5146
5243
  * @property {Object} [logistics_meta] - An object storing detailed
5147
5244
  * logistics-related information, including courier partner details and other
5148
5245
  * relevant metadata.
5246
+ * @property {PackageSchema[]} [packages] - Array of packages to be created or
5247
+ * updated for the shipment. At least two packages are required for MPS functionality.
5149
5248
  */
5150
5249
 
5151
5250
  /**
@@ -5193,6 +5292,7 @@ const Joi = require("joi");
5193
5292
  * Please use ordering_source instead to ensure accurate order tracking and processing.
5194
5293
  * @property {string} [ordering_source] - Ordering source, to be used to
5195
5294
  * identify source of order creation.
5295
+ * @property {OrderingSourceDetails} [ordering_source_details]
5196
5296
  * @property {string} order_date - Specifies the exact date and time when the
5197
5297
  * order was placed by the customer, serving as a key timestamp for the
5198
5298
  * initiation of the order processing cycle.
@@ -5286,6 +5386,9 @@ const Joi = require("joi");
5286
5386
  * @property {string} [order_created_time] - The Date and time when the order was created.
5287
5387
  * @property {string} [order_created_ts] - The timestamp indicating when the
5288
5388
  * order was created.
5389
+ * @property {string} [ordering_source] - Ordering source, to be used to
5390
+ * identify source of order creation.
5391
+ * @property {OrderingSourceDetails} [ordering_source_details]
5289
5392
  * @property {string} [payment_mode] - The payment mode used for the order.
5290
5393
  * @property {PlatformShipment[]} [shipments] - An array of shipment items
5291
5394
  * returned as part of the order.
@@ -5912,31 +6015,24 @@ const Joi = require("joi");
5912
6015
  */
5913
6016
 
5914
6017
  class OrderPlatformModel {
5915
- /** @returns {InvalidateShipmentCachePayload} */
5916
- static InvalidateShipmentCachePayload() {
5917
- return Joi.object({
5918
- shipment_ids: Joi.array().items(Joi.string().allow("")),
5919
- affiliate_bag_ids: Joi.array().items(Joi.string().allow("")),
5920
- bag_ids: Joi.array().items(Joi.string().allow("")),
5921
- });
5922
- }
5923
-
5924
- /** @returns {InvalidateShipmentCacheNestedResponseSchema} */
5925
- static InvalidateShipmentCacheNestedResponseSchema() {
5926
- return Joi.object({
5927
- shipment_id: Joi.string().allow(""),
5928
- status: Joi.number(),
5929
- message: Joi.string().allow(""),
5930
- error: Joi.string().allow(""),
5931
- });
5932
- }
5933
-
5934
- /** @returns {InvalidateShipmentCacheResponseSchema} */
5935
- static InvalidateShipmentCacheResponseSchema() {
6018
+ /** @returns {PackageSchema} */
6019
+ static PackageSchema() {
5936
6020
  return Joi.object({
5937
- response: Joi.array().items(
5938
- OrderPlatformModel.InvalidateShipmentCacheNestedResponseSchema()
5939
- ),
6021
+ id: Joi.string().allow(""),
6022
+ packaging_id: Joi.string().allow("").allow(null),
6023
+ name: Joi.string().allow("").allow(null),
6024
+ size: Joi.string().allow("").allow(null),
6025
+ package_type: Joi.string().allow("").allow(null),
6026
+ length: Joi.number().allow(null),
6027
+ width: Joi.number().allow(null),
6028
+ height: Joi.number().allow(null),
6029
+ weight: Joi.number().allow(null),
6030
+ error_rate: Joi.number().allow(null),
6031
+ package_vol_weight: Joi.number().allow(null),
6032
+ max_weight: Joi.number().allow(null),
6033
+ awb: Joi.string().allow("").allow(null),
6034
+ pdf_links: Joi.object().pattern(/\S/, Joi.string().allow("")),
6035
+ products: Joi.array().items(OrderPlatformModel.PackageProduct()),
5940
6036
  });
5941
6037
  }
5942
6038
 
@@ -6255,6 +6351,15 @@ class OrderPlatformModel {
6255
6351
  });
6256
6352
  }
6257
6353
 
6354
+ /** @returns {RefundModeTransitionData} */
6355
+ static RefundModeTransitionData() {
6356
+ return Joi.object({
6357
+ refund_mode: Joi.string().allow(""),
6358
+ display_name: Joi.string().allow(""),
6359
+ payment_identifiers: Joi.array().items(Joi.string().allow("")),
6360
+ });
6361
+ }
6362
+
6258
6363
  /** @returns {ShipmentsRequestSchema} */
6259
6364
  static ShipmentsRequestSchema() {
6260
6365
  return Joi.object({
@@ -6265,6 +6370,9 @@ class OrderPlatformModel {
6265
6370
  transition_comments: Joi.array().items(
6266
6371
  OrderPlatformModel.TransitionComments()
6267
6372
  ),
6373
+ refund_modes: Joi.array().items(
6374
+ OrderPlatformModel.RefundModeTransitionData()
6375
+ ),
6268
6376
  });
6269
6377
  }
6270
6378
 
@@ -8282,6 +8390,7 @@ class OrderPlatformModel {
8282
8390
  customer_country_code: Joi.string().allow(""),
8283
8391
  is_test_order: Joi.boolean(),
8284
8392
  task_trigger_condition: Joi.array().items(Joi.string().allow("")),
8393
+ fulfillment_option_slug: Joi.string().allow(""),
8285
8394
  });
8286
8395
  }
8287
8396
 
@@ -8578,6 +8687,32 @@ class OrderPlatformModel {
8578
8687
  });
8579
8688
  }
8580
8689
 
8690
+ /** @returns {PackagesSchema} */
8691
+ static PackagesSchema() {
8692
+ return Joi.object({
8693
+ packages: Joi.array()
8694
+ .items(OrderPlatformModel.PackageSchema())
8695
+ .required(),
8696
+ });
8697
+ }
8698
+
8699
+ /** @returns {PackagesResponseSchema} */
8700
+ static PackagesResponseSchema() {
8701
+ return Joi.object({
8702
+ success: Joi.boolean().required(),
8703
+ data: OrderPlatformModel.PackagesSchema().required(),
8704
+ message: Joi.string().allow("").allow(null),
8705
+ });
8706
+ }
8707
+
8708
+ /** @returns {PackagesErrorResponseSchema} */
8709
+ static PackagesErrorResponseSchema() {
8710
+ return Joi.object({
8711
+ success: Joi.boolean().required(),
8712
+ error: Joi.string().allow("").required(),
8713
+ });
8714
+ }
8715
+
8581
8716
  /** @returns {BundleDetailsSchema} */
8582
8717
  static BundleDetailsSchema() {
8583
8718
  return Joi.object({
@@ -8760,6 +8895,7 @@ class OrderPlatformModel {
8760
8895
  type: Joi.string().allow(""),
8761
8896
  fulfillment_option: OrderPlatformModel.FulfillmentOptionSchema(),
8762
8897
  external_shipment_id: Joi.string().allow(""),
8898
+ invoice_id: Joi.string().allow(""),
8763
8899
  line_items: Joi.array().items(OrderPlatformModel.LineItemSchema()),
8764
8900
  order_fulfillment_timeline: OrderPlatformModel.OrderFulfillmentTimelineSchema(),
8765
8901
  location_id: Joi.number(),
@@ -8935,6 +9071,7 @@ class OrderPlatformModel {
8935
9071
  b2b_gstin_number: Joi.string().allow(""),
8936
9072
  channel_company_id: Joi.string().allow(""),
8937
9073
  is_draft: Joi.boolean(),
9074
+ is_offline_order: Joi.boolean(),
8938
9075
  meta: Joi.object().pattern(/\S/, Joi.any()),
8939
9076
  });
8940
9077
  }
@@ -9012,6 +9149,15 @@ class OrderPlatformModel {
9012
9149
  });
9013
9150
  }
9014
9151
 
9152
+ /** @returns {PackageProduct} */
9153
+ static PackageProduct() {
9154
+ return Joi.object({
9155
+ line_number: Joi.number().required(),
9156
+ quantity: Joi.number().required(),
9157
+ identifier: Joi.string().allow("").required(),
9158
+ });
9159
+ }
9160
+
9015
9161
  /** @returns {ValidationError} */
9016
9162
  static ValidationError() {
9017
9163
  return Joi.object({
@@ -9074,6 +9220,17 @@ class OrderPlatformModel {
9074
9220
  });
9075
9221
  }
9076
9222
 
9223
+ /** @returns {OrderingSourceDetails} */
9224
+ static OrderingSourceDetails() {
9225
+ return Joi.object({
9226
+ type: Joi.string().allow(""),
9227
+ slug: Joi.string().allow(""),
9228
+ display_name: Joi.string().allow(""),
9229
+ is_active: Joi.boolean(),
9230
+ logo: Joi.string().allow(""),
9231
+ });
9232
+ }
9233
+
9077
9234
  /** @returns {UserDataInfo} */
9078
9235
  static UserDataInfo() {
9079
9236
  return Joi.object({
@@ -9198,6 +9355,7 @@ class OrderPlatformModel {
9198
9355
  fynd_credits: Joi.number().allow(null),
9199
9356
  gift_price: Joi.number().allow(null),
9200
9357
  amount_to_be_collected: Joi.number().allow(null),
9358
+ cost_price: Joi.number().allow(null),
9201
9359
  loyalty_discount: Joi.number(),
9202
9360
  });
9203
9361
  }
@@ -9270,6 +9428,7 @@ class OrderPlatformModel {
9270
9428
  fynd_credits: Joi.number().allow(null),
9271
9429
  gift_price: Joi.number().allow(null),
9272
9430
  amount_to_be_collected: Joi.number().allow(null),
9431
+ cost_price: Joi.number().allow(null),
9273
9432
  loyalty_discount: Joi.number(),
9274
9433
  });
9275
9434
  }
@@ -9295,6 +9454,15 @@ class OrderPlatformModel {
9295
9454
  });
9296
9455
  }
9297
9456
 
9457
+ /** @returns {SellerQcDetails} */
9458
+ static SellerQcDetails() {
9459
+ return Joi.object({
9460
+ line_number: Joi.number(),
9461
+ bad_quantity: Joi.number(),
9462
+ good_quantity: Joi.number(),
9463
+ }).allow(null);
9464
+ }
9465
+
9298
9466
  /** @returns {FinancialBreakup} */
9299
9467
  static FinancialBreakup() {
9300
9468
  return Joi.object({
@@ -9645,6 +9813,7 @@ class OrderPlatformModel {
9645
9813
  return Joi.object({
9646
9814
  order_date: Joi.string().allow("").allow(null),
9647
9815
  order_created_ts: Joi.string().allow("").allow(null),
9816
+ ordering_source_details: OrderPlatformModel.OrderingSourceDetails(),
9648
9817
  shipment_status: OrderPlatformModel.ShipmentStatus(),
9649
9818
  user: OrderPlatformModel.UserDataInfo(),
9650
9819
  estimated_sla_time: Joi.string().allow("").allow(null),
@@ -10152,6 +10321,7 @@ class OrderPlatformModel {
10152
10321
  gst_details: OrderPlatformModel.GSTDetailsData(),
10153
10322
  bag_status: Joi.array().items(OrderPlatformModel.BagStatusHistory()),
10154
10323
  parent_promo_bags: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
10324
+ seller_qc_details: OrderPlatformModel.SellerQcDetails(),
10155
10325
  financial_breakup: OrderPlatformModel.FinancialBreakup(),
10156
10326
  bag_configs: OrderPlatformModel.BagConfigs(),
10157
10327
  seller_identifier: Joi.string().allow("").allow(null),
@@ -10324,6 +10494,7 @@ class OrderPlatformModel {
10324
10494
  is_lapa_enabled: Joi.boolean(),
10325
10495
  forward_end_shipment_id: Joi.string().allow("").allow(null),
10326
10496
  logistics_meta: Joi.object().pattern(/\S/, Joi.any()),
10497
+ packages: Joi.array().items(OrderPlatformModel.PackageSchema()),
10327
10498
  });
10328
10499
  }
10329
10500
 
@@ -10364,6 +10535,7 @@ class OrderPlatformModel {
10364
10535
  return Joi.object({
10365
10536
  ordering_channel: Joi.string().allow(""),
10366
10537
  ordering_source: Joi.string().allow(""),
10538
+ ordering_source_details: OrderPlatformModel.OrderingSourceDetails(),
10367
10539
  order_date: Joi.string().allow("").required(),
10368
10540
  created_ts: Joi.string().allow(""),
10369
10541
  tax_details: OrderPlatformModel.TaxDetails(),
@@ -10448,6 +10620,8 @@ class OrderPlatformModel {
10448
10620
  meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
10449
10621
  order_created_time: Joi.string().allow("").allow(null),
10450
10622
  order_created_ts: Joi.string().allow("").allow(null),
10623
+ ordering_source: Joi.string().allow("").allow(null),
10624
+ ordering_source_details: OrderPlatformModel.OrderingSourceDetails(),
10451
10625
  payment_mode: Joi.string().allow("").allow(null),
10452
10626
  shipments: Joi.array().items(OrderPlatformModel.PlatformShipment()),
10453
10627
  order_id: Joi.string().allow("").allow(null),
@@ -50,18 +50,9 @@ export = OrderPlatformValidator;
50
50
  * @property {OrderPlatformModel.CreateOrderRequestSchema} body
51
51
  */
52
52
  /**
53
- * @typedef CreateOrderDeprecatedParam
54
- * @property {string} xOrderingSource - To uniquely identify the source through
55
- * which order has been placed.
56
- * @property {string} [xApplicationId] - The Application ID is a unique
57
- * identifier assigned to a storefront that typically follows a 24-character
58
- * hexadecimal string. Either `x-application-id` or `x-extension-id` header is
59
- * mandatory. At least one of them must be provided.
60
- * @property {string} [xExtensionId] - The Extension ID is a unique identifier
61
- * assigned to an extension that typically follows a 24-character hexadecimal
62
- * string. Either `x-application-id` or `x-extension-id` header is mandatory.
63
- * At least one of them must be provided.
64
- * @property {OrderPlatformModel.CreateOrderAPI} body
53
+ * @typedef CreateShipmentPackagesParam
54
+ * @property {string} shipmentId - Unique identifier of the shipment.
55
+ * @property {OrderPlatformModel.PackagesSchema} body
65
56
  */
66
57
  /**
67
58
  * @typedef DispatchManifestsParam
@@ -328,6 +319,11 @@ export = OrderPlatformValidator;
328
319
  * @property {string} [shipmentId] - Identifier for the shipment
329
320
  * @property {number} [bagId] - Identifier for a bag or product.
330
321
  */
322
+ /**
323
+ * @typedef GetShipmentPackagesParam
324
+ * @property {string} shipmentId - Unique identifier for the shipment whose
325
+ * packages are being retrieved.
326
+ */
331
327
  /**
332
328
  * @typedef GetShipmentReasonsParam
333
329
  * @property {string} shipmentId - ID of the shipment. An order may contain
@@ -437,10 +433,6 @@ export = OrderPlatformValidator;
437
433
  * @property {string} view - Name of view
438
434
  * @property {string} [groupEntity] - Name of group entity
439
435
  */
440
- /**
441
- * @typedef InvalidateShipmentCacheParam
442
- * @property {OrderPlatformModel.InvalidateShipmentCachePayload} body
443
- */
444
436
  /**
445
437
  * @typedef JobDetailsParam
446
438
  * @property {string} batchId - A unique identifier for the batch associated
@@ -502,6 +494,12 @@ export = OrderPlatformValidator;
502
494
  * @typedef UpdateShipmentLockParam
503
495
  * @property {OrderPlatformModel.UpdateShipmentLockPayload} body
504
496
  */
497
+ /**
498
+ * @typedef UpdateShipmentPackagesParam
499
+ * @property {string} shipmentId - Unique identifier for the shipment whose
500
+ * packages will be updated.
501
+ * @property {OrderPlatformModel.PackagesSchema} body
502
+ */
505
503
  /**
506
504
  * @typedef UpdateShipmentStatusParam
507
505
  * @property {OrderPlatformModel.UpdateShipmentStatusRequestSchema} body
@@ -535,8 +533,8 @@ declare class OrderPlatformValidator {
535
533
  static createChannelConfig(): CreateChannelConfigParam;
536
534
  /** @returns {CreateOrderParam} */
537
535
  static createOrder(): CreateOrderParam;
538
- /** @returns {CreateOrderDeprecatedParam} */
539
- static createOrderDeprecated(): CreateOrderDeprecatedParam;
536
+ /** @returns {CreateShipmentPackagesParam} */
537
+ static createShipmentPackages(): CreateShipmentPackagesParam;
540
538
  /** @returns {DispatchManifestsParam} */
541
539
  static dispatchManifests(): DispatchManifestsParam;
542
540
  /** @returns {DownloadBulkActionTemplateParam} */
@@ -597,6 +595,8 @@ declare class OrderPlatformValidator {
597
595
  static getShipmentById(): GetShipmentByIdParam;
598
596
  /** @returns {GetShipmentHistoryParam} */
599
597
  static getShipmentHistory(): GetShipmentHistoryParam;
598
+ /** @returns {GetShipmentPackagesParam} */
599
+ static getShipmentPackages(): GetShipmentPackagesParam;
600
600
  /** @returns {GetShipmentReasonsParam} */
601
601
  static getShipmentReasons(): GetShipmentReasonsParam;
602
602
  /** @returns {GetShipmentsParam} */
@@ -609,8 +609,6 @@ declare class OrderPlatformValidator {
609
609
  static getTemplate(): GetTemplateParam;
610
610
  /** @returns {GetfiltersParam} */
611
611
  static getfilters(): GetfiltersParam;
612
- /** @returns {InvalidateShipmentCacheParam} */
613
- static invalidateShipmentCache(): InvalidateShipmentCacheParam;
614
612
  /** @returns {JobDetailsParam} */
615
613
  static jobDetails(): JobDetailsParam;
616
614
  /** @returns {ListAccountsParam} */
@@ -637,6 +635,8 @@ declare class OrderPlatformValidator {
637
635
  static updatePaymentInfo(): UpdatePaymentInfoParam;
638
636
  /** @returns {UpdateShipmentLockParam} */
639
637
  static updateShipmentLock(): UpdateShipmentLockParam;
638
+ /** @returns {UpdateShipmentPackagesParam} */
639
+ static updateShipmentPackages(): UpdateShipmentPackagesParam;
640
640
  /** @returns {UpdateShipmentStatusParam} */
641
641
  static updateShipmentStatus(): UpdateShipmentStatusParam;
642
642
  /** @returns {UpdateShipmentTrackingParam} */
@@ -647,7 +647,7 @@ declare class OrderPlatformValidator {
647
647
  static verifyMobileOTP(): VerifyMobileOTPParam;
648
648
  }
649
649
  declare namespace OrderPlatformValidator {
650
- export { AddStateManagerConfigParam, AttachOrderUserParam, BulkListingParam, BulkStateTransistionParam, CheckOrderStatusParam, CreateAccountParam, CreateChannelConfigParam, CreateOrderParam, CreateOrderDeprecatedParam, DispatchManifestsParam, DownloadBulkActionTemplateParam, DownloadLanesReportParam, EInvoiceRetryParam, FailedOrderLogDetailsParam, FailedOrderLogsParam, FetchRefundModeConfigParam, GenerateInvoiceIDParam, GeneratePOSReceiptByOrderIdParam, GenerateProcessManifestParam, GetAccountByIdParam, GetAllowedStateTransitionParam, GetAllowedTemplatesForBulkParam, GetAnnouncementsParam, GetBagByIdParam, GetBagsParam, GetBulkActionTemplateParam, GetBulkShipmentExcelFileParam, GetChannelConfigParam, GetFileByStatusParam, GetLaneConfigParam, GetManifestDetailsParam, GetManifestShipmentsParam, GetManifestfiltersParam, GetManifestsParam, GetOrderByIdParam, GetOrdersParam, GetRoleBasedActionsParam, GetShipmentByIdParam, GetShipmentHistoryParam, GetShipmentReasonsParam, GetShipmentsParam, GetStateManagerConfigParam, GetStateTransitionMapParam, GetTemplateParam, GetfiltersParam, InvalidateShipmentCacheParam, JobDetailsParam, ListAccountsParam, OrderUpdateParam, PostShipmentHistoryParam, ReassignLocationParam, SendSmsNinjaParam, SendUserMobileOTPParam, TrackShipmentParam, UpdateAccountParam, UpdateAddressParam, UpdatePackagingDimensionsParam, UpdatePaymentInfoParam, UpdateShipmentLockParam, UpdateShipmentStatusParam, UpdateShipmentTrackingParam, UploadConsentsParam, VerifyMobileOTPParam };
650
+ export { AddStateManagerConfigParam, AttachOrderUserParam, BulkListingParam, BulkStateTransistionParam, CheckOrderStatusParam, CreateAccountParam, CreateChannelConfigParam, CreateOrderParam, CreateShipmentPackagesParam, DispatchManifestsParam, DownloadBulkActionTemplateParam, DownloadLanesReportParam, EInvoiceRetryParam, FailedOrderLogDetailsParam, FailedOrderLogsParam, FetchRefundModeConfigParam, GenerateInvoiceIDParam, GeneratePOSReceiptByOrderIdParam, GenerateProcessManifestParam, GetAccountByIdParam, GetAllowedStateTransitionParam, GetAllowedTemplatesForBulkParam, GetAnnouncementsParam, GetBagByIdParam, GetBagsParam, GetBulkActionTemplateParam, GetBulkShipmentExcelFileParam, GetChannelConfigParam, GetFileByStatusParam, GetLaneConfigParam, GetManifestDetailsParam, GetManifestShipmentsParam, GetManifestfiltersParam, GetManifestsParam, GetOrderByIdParam, GetOrdersParam, GetRoleBasedActionsParam, GetShipmentByIdParam, GetShipmentHistoryParam, GetShipmentPackagesParam, GetShipmentReasonsParam, GetShipmentsParam, GetStateManagerConfigParam, GetStateTransitionMapParam, GetTemplateParam, GetfiltersParam, JobDetailsParam, ListAccountsParam, OrderUpdateParam, PostShipmentHistoryParam, ReassignLocationParam, SendSmsNinjaParam, SendUserMobileOTPParam, TrackShipmentParam, UpdateAccountParam, UpdateAddressParam, UpdatePackagingDimensionsParam, UpdatePaymentInfoParam, UpdateShipmentLockParam, UpdateShipmentPackagesParam, UpdateShipmentStatusParam, UpdateShipmentTrackingParam, UploadConsentsParam, VerifyMobileOTPParam };
651
651
  }
652
652
  type AddStateManagerConfigParam = {
653
653
  body: OrderPlatformModel.TransitionConfigPayload;
@@ -721,27 +721,12 @@ type CreateOrderParam = {
721
721
  xExtensionId?: string;
722
722
  body: OrderPlatformModel.CreateOrderRequestSchema;
723
723
  };
724
- type CreateOrderDeprecatedParam = {
724
+ type CreateShipmentPackagesParam = {
725
725
  /**
726
- * - To uniquely identify the source through
727
- * which order has been placed.
726
+ * - Unique identifier of the shipment.
728
727
  */
729
- xOrderingSource: string;
730
- /**
731
- * - The Application ID is a unique
732
- * identifier assigned to a storefront that typically follows a 24-character
733
- * hexadecimal string. Either `x-application-id` or `x-extension-id` header is
734
- * mandatory. At least one of them must be provided.
735
- */
736
- xApplicationId?: string;
737
- /**
738
- * - The Extension ID is a unique identifier
739
- * assigned to an extension that typically follows a 24-character hexadecimal
740
- * string. Either `x-application-id` or `x-extension-id` header is mandatory.
741
- * At least one of them must be provided.
742
- */
743
- xExtensionId?: string;
744
- body: OrderPlatformModel.CreateOrderAPI;
728
+ shipmentId: string;
729
+ body: OrderPlatformModel.PackagesSchema;
745
730
  };
746
731
  type DispatchManifestsParam = {
747
732
  body: OrderPlatformModel.DispatchManifest;
@@ -1305,6 +1290,13 @@ type GetShipmentHistoryParam = {
1305
1290
  */
1306
1291
  bagId?: number;
1307
1292
  };
1293
+ type GetShipmentPackagesParam = {
1294
+ /**
1295
+ * - Unique identifier for the shipment whose
1296
+ * packages are being retrieved.
1297
+ */
1298
+ shipmentId: string;
1299
+ };
1308
1300
  type GetShipmentReasonsParam = {
1309
1301
  /**
1310
1302
  * - ID of the shipment. An order may contain
@@ -1552,9 +1544,6 @@ type GetfiltersParam = {
1552
1544
  */
1553
1545
  groupEntity?: string;
1554
1546
  };
1555
- type InvalidateShipmentCacheParam = {
1556
- body: OrderPlatformModel.InvalidateShipmentCachePayload;
1557
- };
1558
1547
  type JobDetailsParam = {
1559
1548
  /**
1560
1549
  * - A unique identifier for the batch associated
@@ -1630,6 +1619,14 @@ type UpdatePaymentInfoParam = {
1630
1619
  type UpdateShipmentLockParam = {
1631
1620
  body: OrderPlatformModel.UpdateShipmentLockPayload;
1632
1621
  };
1622
+ type UpdateShipmentPackagesParam = {
1623
+ /**
1624
+ * - Unique identifier for the shipment whose
1625
+ * packages will be updated.
1626
+ */
1627
+ shipmentId: string;
1628
+ body: OrderPlatformModel.PackagesSchema;
1629
+ };
1633
1630
  type UpdateShipmentStatusParam = {
1634
1631
  body: OrderPlatformModel.UpdateShipmentStatusRequestSchema;
1635
1632
  };