@gofynd/fdk-client-javascript 1.4.12-beta.1 → 1.4.13

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.
@@ -21,11 +21,17 @@ const Joi = require("joi");
21
21
  * @property {InvalidateShipmentCacheNestedResponse[]} [response]
22
22
  */
23
23
 
24
+ /**
25
+ * @typedef UpdatePackingErrorResponse
26
+ * @property {number} [status] - Represents the HTTP status code of the API response.
27
+ * @property {string} [error] - Descriptive error message that occurred.
28
+ */
29
+
24
30
  /**
25
31
  * @typedef ErrorResponse
26
- * @property {number} [status] - The HTTP status code corresponding to the error.
27
- * @property {boolean} [success] - Indicates whether the operation was
28
- * successful. Always false in the case of an error.
32
+ * @property {number} [status] - Represents the HTTP status code of the API response.
33
+ * @property {boolean} [success] - Indicates whether the API call was successful
34
+ * (true) or not (false).
29
35
  * @property {string} message - A message describing the error that occurred.
30
36
  * @property {string} [error_trace] - Error trace of the error that occurred.
31
37
  * @property {string} [error]
@@ -33,49 +39,62 @@ const Joi = require("joi");
33
39
 
34
40
  /**
35
41
  * @typedef StoreReassign
36
- * @property {number} store_id
37
- * @property {number} [bag_id]
38
- * @property {string} [affiliate_order_id]
39
- * @property {string} [affiliate_id]
40
- * @property {string} [item_id]
41
- * @property {string} [fynd_order_id]
42
- * @property {string} [set_id]
43
- * @property {string} [affiliate_bag_id]
44
- * @property {number[]} [reason_ids]
45
- * @property {string} [mongo_article_id]
42
+ * @property {number} store_id - Unique id of the store.
43
+ * @property {number} [bag_id] - Identifier for the bag associated with the reassignment.
44
+ * @property {string} [affiliate_order_id] - Identifier for the affiliate order
45
+ * id associated with the reassignment.
46
+ * @property {string} [affiliate_id] - Identifier for the affiliate id
47
+ * associated with the reassignment.
48
+ * @property {string} [item_id] - Identifier for the item associated with the
49
+ * reassignment.
50
+ * @property {string} [fynd_order_id] - Identifier for the fynd order id
51
+ * associated with the reassignment.
52
+ * @property {string} [set_id] - Identifier for the set of items associated with
53
+ * the reassignment.
54
+ * @property {string} [affiliate_bag_id] - Identifiers for bags associated with
55
+ * the reassignment.
56
+ * @property {number[]} [reason_ids] - List of reason ids for the reassignment.
57
+ * @property {string} [mongo_article_id] - Identifier for the article id
58
+ * associated with the reassignment.
46
59
  */
47
60
 
48
61
  /**
49
62
  * @typedef StoreReassignResponse
50
- * @property {boolean} [success]
51
- * @property {string} [message]
63
+ * @property {boolean} [success] - Indicates whether the API call was successful
64
+ * (true) or not (false).
65
+ * @property {string} [message] - A descriptive message providing additional
66
+ * information about the API response.
52
67
  */
53
68
 
54
69
  /**
55
- * @typedef Entities
70
+ * @typedef LockManagerEntities
56
71
  * @property {string} [id] - Shipment ID if 'entity_type': shipments | Bag Id if
57
72
  * 'entity_type': bags
58
- * @property {string} [affiliate_order_id] - Application/Affiliate Order ID,
59
- * Required if the ID is missing
60
- * @property {string} [affiliate_id] - Application/Affiliate ID, Required if the
61
- * ID is missing
62
- * @property {string} reason_text - Reason For Shipment/Bag Action
63
- * @property {string} [affiliate_bag_id] - Application/Affiliate Bag ID,
64
- * Required if the ID is missing
65
- * @property {string} [affiliate_shipment_id] - Application/Affiliate Shipment
66
- * ID, Required if the ID is missing
73
+ * @property {string} [affiliate_order_id] - External identifier for the order
74
+ * id associated with shipment.
75
+ * @property {string} [affiliate_id] - Identifier for application associated
76
+ * with the shipment.
77
+ * @property {string} reason_text - A descriptive reason text for lock/unlock
78
+ * action of a shipment/bag.
79
+ * @property {string} [affiliate_bag_id] - External identifier for the bag id
80
+ * associated with orders/shipment.
81
+ * @property {string} [affiliate_shipment_id] - External identifier for the
82
+ * shipment id associated with orders/shipment.
67
83
  */
68
84
 
69
85
  /**
70
86
  * @typedef UpdateShipmentLockPayload
71
- * @property {string} entity_type - Expected entity_type: [bags, shipments]
72
- * @property {string} action - Expected Actions: [lock, unlock, check]
73
- * @property {string} action_type - Expected action_type: [complete,
74
- * operational, financial]
75
- * @property {Entities[]} entities - Shipment/Entity
76
- * @property {boolean} [resume_tasks_after_unlock]
77
- * @property {boolean} [lock_after_transition] - Lock Shipment After Transition
78
- * @property {boolean} [unlock_before_transition] - Unlock Shipment After Transition
87
+ * @property {string} entity_type - Specifies the type of entity being locked or unlocked.
88
+ * @property {string} action - Indicates the action to be performed on the entity.
89
+ * @property {string} action_type - Specifies the type of action being taken.
90
+ * @property {LockManagerEntities[]} entities - List of entities to be locked or unlocked
91
+ * @property {boolean} [resume_tasks_after_unlock] - Indicates whether tasks
92
+ * should resume automatically after unlocking, such as DP assignment task and
93
+ * invoicing task.
94
+ * @property {boolean} [lock_after_transition] - Specifies whether the shipment
95
+ * should be locked automatically after a transition occurs.
96
+ * @property {boolean} [unlock_before_transition] - Specifies whether the
97
+ * shipment should be unlocked before a transition occurs.
79
98
  */
80
99
 
81
100
  /**
@@ -110,153 +129,193 @@ const Joi = require("joi");
110
129
 
111
130
  /**
112
131
  * @typedef UpdateShipmentLockResponse
113
- * @property {boolean} [success]
114
- * @property {string} [message]
115
- * @property {CheckResponse[]} [check_response] - Entity Lock Status, If the
116
- * action input as 'check'
132
+ * @property {boolean} [success] - Indicates whether the API call was successful
133
+ * (true) or not (false).
134
+ * @property {string} [message] - A descriptive message providing additional
135
+ * information about the API response, such as success confirmation or error details.
136
+ * @property {CheckResponse[]} [check_response] - An array containing the lock
137
+ * status of entities if the action performed was a 'check'. Each item in the
138
+ * array represents the status of a specific entity.
117
139
  */
118
140
 
119
141
  /**
120
142
  * @typedef AnnouncementResponse
121
- * @property {string} [to_datetime]
122
- * @property {number} id
123
- * @property {string} [description]
124
- * @property {string} [platform_name]
125
- * @property {string} [from_datetime]
126
- * @property {string} [platform_id]
127
- * @property {string} [title]
128
- * @property {number} [company_id]
129
- * @property {string} [logo_url]
130
- * @property {string} [created_at]
143
+ * @property {string} [to_datetime] - The end date and time for the event,
144
+ * indicating when the issue is expected to be resolved.
145
+ * @property {number} id - A unique identifier for the announcement.
146
+ * @property {string} [description] - A brief description providing additional
147
+ * context about the announcement.
148
+ * @property {string} [platform_name] - The name of the platform associated with
149
+ * this announcement.
150
+ * @property {string} [from_datetime] - The start date and time of the
151
+ * announcement going live.
152
+ * @property {string} [platform_id] - The unique identifier associated with the
153
+ * platform. In this case, it appears to be the same as the platform name,
154
+ * which might indicate a specific category or type.
155
+ * @property {string} [title] - The title summarizing the nature of the announcement.
156
+ * @property {number} [company_id] - A unique identifier for the company related
157
+ * to this announcement.
158
+ * @property {string} [logo_url] - A URL linking to the logo image associated
159
+ * with the platform or company.
160
+ * @property {string} [created_at] - The timestamp of when this announcement was
161
+ * created, providing context for its age and relevance.
131
162
  */
132
163
 
133
164
  /**
134
165
  * @typedef AnnouncementsResponse
135
166
  * @property {AnnouncementResponse[]} [announcements]
136
- * @property {boolean} [success]
137
- * @property {string} [message]
167
+ * @property {boolean} [success] - Indicates whether the API call was successful
168
+ * (true) or not (false).
169
+ * @property {number} [status] - Represents the HTTP status code of the API response
138
170
  */
139
171
 
140
172
  /**
141
173
  * @typedef BaseResponse
142
- * @property {boolean} [success]
143
- * @property {string} [message]
144
- */
145
-
146
- /**
147
- * @typedef Click2CallResponse
148
- * @property {string} call_id - Call ID from the provider
149
- * @property {boolean} success - Success
174
+ * @property {boolean} [success] - Indicates whether the API call was successful
175
+ * (true) or not (false).
176
+ * @property {string} [message] - A descriptive message providing additional
177
+ * information about the API response.
150
178
  */
151
179
 
152
180
  /**
153
181
  * @typedef ErrorDetail
154
- * @property {boolean} [success]
155
- * @property {string} [message]
182
+ * @property {boolean} [success] - Indicates whether the API call was successful
183
+ * (true) or not (false).
184
+ * @property {string} [message] - A descriptive message providing additional
185
+ * information about the API response.
156
186
  */
157
187
 
158
188
  /**
159
189
  * @typedef ProductsReasonsFilters
160
- * @property {number} [line_number] - Product/Bag Line number for the
161
- * Product/Bag Identifier
162
- * @property {string} [identifier] - Product/Bag Article/Item Identifier
163
- * @property {number} [quantity]
190
+ * @property {number} [line_number] - The line number for the product or bag,
191
+ * which helps identify the specific item in a list or order.
192
+ * @property {string} [identifier] - The unique article or item identifier for
193
+ * the product or bag.
194
+ * @property {number} [quantity] - The quantity of the product or bag being referenced.
164
195
  */
165
196
 
166
197
  /**
167
198
  * @typedef ProductsReasonsData
168
- * @property {string} [reason_text]
169
- * @property {number} [reason_id]
199
+ * @property {string} [reason_text] - A descriptive text providing the reason
200
+ * for the action or status associated with the product or bag.
201
+ * @property {number} [reason_id] - A unique identifier for the reason, used to
202
+ * reference specific reasons in the system.
170
203
  */
171
204
 
172
205
  /**
173
206
  * @typedef ProductsReasons
174
- * @property {ProductsReasonsFilters[]} [filters]
207
+ * @property {ProductsReasonsFilters[]} [filters] - A list of filters applied to
208
+ * specify which products the reasons pertain to.
175
209
  * @property {ProductsReasonsData} [data]
176
210
  */
177
211
 
178
212
  /**
179
213
  * @typedef EntityReasonData
180
- * @property {string} [reason_text]
181
- * @property {number} [reason_id]
214
+ * @property {string} [reason_text] - A descriptive text providing the reason
215
+ * for the action or status associated with the product or bag.
216
+ * @property {number} [reason_id] - A unique identifier for the reason, used to
217
+ * reference specific reasons in the system.
182
218
  */
183
219
 
184
220
  /**
185
221
  * @typedef EntitiesReasons
186
- * @property {Object[]} [filters]
222
+ * @property {Object[]} [filters] - A list of filters applied to specify which
223
+ * entities the reasons pertain to.
187
224
  * @property {EntityReasonData} [data]
188
225
  */
189
226
 
190
227
  /**
191
228
  * @typedef ReasonsData
192
- * @property {ProductsReasons[]} [products]
193
- * @property {EntitiesReasons[]} [entities]
229
+ * @property {ProductsReasons[]} [products] - A list of reasons specifically
230
+ * related to products involved in the shipment.
231
+ * @property {EntitiesReasons[]} [entities] - A list of reasons specifically
232
+ * related to shipment.
194
233
  */
195
234
 
196
235
  /**
197
236
  * @typedef Products
198
- * @property {number} [line_number] - Product/Bag Line number for the
199
- * Product/Bag Identifier
200
- * @property {string} [identifier] - Product/Bag Article/Item Identifier
201
- * @property {number} [quantity]
237
+ * @property {number} [line_number] - The line number for the product or bag,
238
+ * which helps identify the specific item in a list or order.
239
+ * @property {string} [identifier] - The unique article or item identifier for
240
+ * the product or bag.
241
+ * @property {number} [quantity] - The quantity of the product or bag being referenced.
202
242
  */
203
243
 
204
244
  /**
205
245
  * @typedef OrderItemDataUpdates
206
- * @property {Object} [data]
246
+ * @property {Object} [data] - Contains the specific data for updating shipment bags data.
207
247
  */
208
248
 
209
249
  /**
210
250
  * @typedef ProductsDataUpdatesFilters
211
- * @property {number} [line_number] - Product/Bag Line number for the
212
- * Product/Bag Identifier
213
- * @property {string} [identifier] - Product/Bag Article/Item Identifier
251
+ * @property {number} [line_number] - The line number for the product or bag.
252
+ * @property {string} [identifier] - The unique article or item identifier for
253
+ * the product or bag.
214
254
  */
215
255
 
216
256
  /**
217
257
  * @typedef ProductsDataUpdates
218
- * @property {ProductsDataUpdatesFilters[]} [filters] - Filter for the Product/Bag
219
- * @property {Object} [data]
258
+ * @property {ProductsDataUpdatesFilters[]} [filters] - A list of filters
259
+ * applied to specify which products or bags are targeted for updates.
260
+ * @property {Object} [data] - Contains the specific data for updating the
261
+ * products or bags.
220
262
  */
221
263
 
222
264
  /**
223
265
  * @typedef EntitiesDataUpdates
224
- * @property {Object[]} [filters]
225
- * @property {Object} [data]
266
+ * @property {Object[]} [filters] - A list of filters used to specify which
267
+ * shipments are targeted for updates.
268
+ * @property {Object} [data] - Contains the specific data for updating the shipment.
226
269
  */
227
270
 
228
271
  /**
229
272
  * @typedef DataUpdates
230
- * @property {OrderItemDataUpdates[]} [order_item_status]
231
- * @property {ProductsDataUpdates[]} [products]
232
- * @property {EntitiesDataUpdates[]} [entities]
273
+ * @property {OrderItemDataUpdates[]} [order_item_status] - A list of updates
274
+ * related to the status of order items.
275
+ * @property {ProductsDataUpdates[]} [products] - A list of updates related to
276
+ * the properties of products or bags.
277
+ * @property {EntitiesDataUpdates[]} [entities] - A list of updates related to
278
+ * the properties of any relevant entities.
233
279
  */
234
280
 
235
281
  /**
236
282
  * @typedef ShipmentsRequest
237
- * @property {string} identifier - Shipment ID
283
+ * @property {string} identifier - Unique identifier for the shipment.
238
284
  * @property {ReasonsData} [reasons]
239
- * @property {Products[]} [products] - Product/Bag to be updated
285
+ * @property {Products[]} [products] - A list of products or bags that need to
286
+ * be updated as part of the shipment status change.
240
287
  * @property {DataUpdates} [data_updates]
241
288
  */
242
289
 
243
290
  /**
244
291
  * @typedef StatuesRequest
245
- * @property {string} [status]
246
- * @property {ShipmentsRequest[]} [shipments]
247
- * @property {string} [exclude_bags_next_state] - State to be change for
248
- * Remaining Bag/Products
249
- * @property {boolean} [split_shipment] - Flag to split shipment
250
- */
251
-
252
- /**
253
- * @typedef UpdateShipmentStatusRequest
254
- * @property {boolean} [force_transition] - Force Transition
255
- * @property {StatuesRequest[]} [statuses]
256
- * @property {boolean} [lock_after_transition] - Lock Shipment After Transition
257
- * @property {boolean} [unlock_before_transition] - Unlock Shipment After Transition
258
- * @property {boolean} [task] - To Run Status Update as a background Task
259
- * @property {boolean} [resume_tasks_after_unlock] - Resume Tasks After Unlock
292
+ * @property {string} [status] - The new status to be assigned to the shipment(s).
293
+ * @property {ShipmentsRequest[]} [shipments] - A list of shipments to which the
294
+ * new status will be applied.
295
+ * @property {string} [exclude_bags_next_state] - Specifies the state to which
296
+ * remaining bags or products should be changed, effectively excluding them
297
+ * from the current status update.
298
+ * @property {boolean} [split_shipment] - A flag indicating whether the shipment
299
+ * should be split into multiple parts. If set to true, the shipment will be
300
+ * divided according to the specified logic or criteria.
301
+ */
302
+
303
+ /**
304
+ * @typedef UpdateShipmentStatusRequestSchema
305
+ * @property {boolean} [force_transition] - Indicates whether to force the
306
+ * status transition, overriding any restrictions or checks that may normally apply.
307
+ * @property {StatuesRequest[]} [statuses] - A list of status updates to be
308
+ * applied to the shipment.
309
+ * @property {boolean} [lock_after_transition] - Specifies whether the shipment
310
+ * should be locked automatically after a transition occurs.
311
+ * @property {boolean} [unlock_before_transition] - Specifies whether the
312
+ * shipment should be unlocked before a transition occurs.
313
+ * @property {boolean} [task] - Indicates whether to run the status update as a
314
+ * background task, allowing other processes to continue without waiting for
315
+ * this operation to complete.
316
+ * @property {boolean} [resume_tasks_after_unlock] - Indicates whether tasks
317
+ * should resume automatically after unlocking, such as DP assignment task and
318
+ * invoicing task.
260
319
  */
261
320
 
262
321
  /**
@@ -281,219 +340,6 @@ const Joi = require("joi");
281
340
  * @property {StatuesResponse[]} [statuses]
282
341
  */
283
342
 
284
- /**
285
- * @typedef OrderUser
286
- * @property {number} phone
287
- * @property {string} last_name
288
- * @property {string} [address1]
289
- * @property {string} state
290
- * @property {string} pincode
291
- * @property {string} first_name
292
- * @property {number} mobile
293
- * @property {string} [address2]
294
- * @property {string} email
295
- * @property {string} country
296
- * @property {string} city
297
- */
298
-
299
- /**
300
- * @typedef OrderPriority
301
- * @property {string} [fulfilment_priority_text]
302
- * @property {string} [affiliate_priority_code]
303
- * @property {number} [fulfilment_priority]
304
- */
305
-
306
- /**
307
- * @typedef ArticleDetails
308
- * @property {string} _id
309
- * @property {number} brand_id
310
- * @property {Object} dimension
311
- * @property {Object} category
312
- * @property {Object} weight
313
- * @property {Object} attributes
314
- * @property {number} quantity
315
- */
316
-
317
- /**
318
- * @typedef LocationDetails
319
- * @property {string} fulfillment_type
320
- * @property {ArticleDetails[]} articles
321
- * @property {number} fulfillment_id
322
- */
323
-
324
- /**
325
- * @typedef ShipmentDetails
326
- * @property {string} [box_type]
327
- * @property {number} shipments
328
- * @property {number} fulfillment_id
329
- * @property {ArticleDetails[]} articles
330
- * @property {string} [dp_id]
331
- * @property {Object} [meta]
332
- * @property {string} affiliate_shipment_id
333
- * @property {Object} [dp_options]
334
- * @property {boolean} [lock_status]
335
- * @property {Object} [action_to_status]
336
- */
337
-
338
- /**
339
- * @typedef ShipmentConfig
340
- * @property {LocationDetails} [location_details]
341
- * @property {string} source
342
- * @property {string} to_pincode
343
- * @property {ShipmentDetails[]} shipment
344
- * @property {string} identifier
345
- * @property {string} payment_mode
346
- * @property {string} action
347
- * @property {string} journey
348
- */
349
-
350
- /**
351
- * @typedef ShipmentData
352
- * @property {ShipmentConfig} shipment_data
353
- */
354
-
355
- /**
356
- * @typedef MarketPlacePdf
357
- * @property {string} [invoice]
358
- * @property {string} [label]
359
- */
360
-
361
- /**
362
- * @typedef AffiliateBag
363
- * @property {MarketPlacePdf} [pdf_links]
364
- * @property {number} store_id
365
- * @property {string} sku
366
- * @property {number} discount
367
- * @property {number} unit_price
368
- * @property {number} price_effective
369
- * @property {string} affiliate_store_id
370
- * @property {Object} identifier
371
- * @property {string} seller_identifier
372
- * @property {string} item_size
373
- * @property {number} amount_paid
374
- * @property {string} fynd_store_id
375
- * @property {number} item_id
376
- * @property {number} delivery_charge
377
- * @property {number} avl_qty
378
- * @property {number} price_marked
379
- * @property {number} quantity
380
- * @property {number} company_id
381
- * @property {string} hsn_code_id
382
- * @property {string} _id
383
- * @property {Object} affiliate_meta
384
- * @property {string} modified_on
385
- * @property {number} transfer_price
386
- */
387
-
388
- /**
389
- * @typedef UserData
390
- * @property {OrderUser} [shipping_user]
391
- * @property {OrderUser} [billing_user]
392
- */
393
-
394
- /**
395
- * @typedef OrderInfo
396
- * @property {string} [affiliate_order_id]
397
- * @property {number} cod_charges
398
- * @property {Object} items
399
- * @property {number} discount
400
- * @property {OrderUser} billing_address
401
- * @property {Object} [payment]
402
- * @property {OrderPriority} [order_priority]
403
- * @property {ShipmentData} [shipment]
404
- * @property {number} delivery_charges
405
- * @property {OrderUser} shipping_address
406
- * @property {number} order_value
407
- * @property {string} payment_mode
408
- * @property {AffiliateBag[]} bags
409
- * @property {UserData} user
410
- * @property {string} [coupon]
411
- */
412
-
413
- /**
414
- * @typedef AffiliateAppConfigMeta
415
- * @property {string} value
416
- * @property {string} name
417
- */
418
-
419
- /**
420
- * @typedef AffiliateAppConfig
421
- * @property {string} id
422
- * @property {string} [description]
423
- * @property {string} updated_at
424
- * @property {string} name
425
- * @property {string} token
426
- * @property {AffiliateAppConfigMeta[]} [meta]
427
- * @property {string} owner
428
- * @property {string} secret
429
- * @property {string} created_at
430
- */
431
-
432
- /**
433
- * @typedef AffiliateInventoryArticleAssignmentConfig
434
- * @property {boolean} [post_order_reassignment]
435
- */
436
-
437
- /**
438
- * @typedef AffiliateInventoryPaymentConfig
439
- * @property {string} [source]
440
- * @property {string} [mode_of_payment]
441
- */
442
-
443
- /**
444
- * @typedef AffiliateInventoryStoreConfig
445
- * @property {Object} [store]
446
- */
447
-
448
- /**
449
- * @typedef AffiliateInventoryOrderConfig
450
- * @property {boolean} [force_reassignment]
451
- */
452
-
453
- /**
454
- * @typedef AffiliateInventoryLogisticsConfig
455
- * @property {boolean} [dp_assignment]
456
- */
457
-
458
- /**
459
- * @typedef AffiliateInventoryConfig
460
- * @property {AffiliateInventoryArticleAssignmentConfig} [article_assignment]
461
- * @property {AffiliateInventoryPaymentConfig} [payment]
462
- * @property {AffiliateInventoryStoreConfig} [inventory]
463
- * @property {AffiliateInventoryOrderConfig} [order]
464
- * @property {AffiliateInventoryLogisticsConfig} [logistics]
465
- */
466
-
467
- /**
468
- * @typedef AffiliateConfig
469
- * @property {AffiliateAppConfig} [app]
470
- * @property {AffiliateInventoryConfig} [inventory]
471
- * @property {number} [app_company_id]
472
- */
473
-
474
- /**
475
- * @typedef Affiliate
476
- * @property {string} id
477
- * @property {AffiliateConfig} [config]
478
- * @property {string} token
479
- */
480
-
481
- /**
482
- * @typedef AffiliateStoreIdMapping
483
- * @property {number} store_id
484
- * @property {string} marketplace_store_id
485
- */
486
-
487
- /**
488
- * @typedef OrderConfig
489
- * @property {boolean} [create_user]
490
- * @property {string} [article_lookup]
491
- * @property {string} [bag_end_state]
492
- * @property {Affiliate} affiliate
493
- * @property {string} [store_lookup]
494
- * @property {AffiliateStoreIdMapping[]} affiliate_store_id_mapping
495
- */
496
-
497
343
  /**
498
344
  * @typedef DPConfiguration
499
345
  * @property {string} [shipping_by] - Shipping_by denotes dp assignment
@@ -510,7 +356,7 @@ const Joi = require("joi");
510
356
 
511
357
  /**
512
358
  * @typedef CreateOrderConfig
513
- * @property {DPConfiguration} [dp_configuration]
359
+ * @property {DPConfiguration} dp_configuration
514
360
  * @property {string} [integration_type] - Flag denotes integration type which
515
361
  * is used to retrieve specific configurations and application details
516
362
  * relevant to channel fulfillment.
@@ -524,147 +370,175 @@ const Joi = require("joi");
524
370
  * be passed to FDK for processing.
525
371
  */
526
372
 
527
- /**
528
- * @typedef CreateOrderPayload
529
- * @property {string} affiliate_id
530
- * @property {OrderInfo} order_info
531
- * @property {OrderConfig} order_config
532
- */
533
-
534
373
  /**
535
374
  * @typedef CreateOrderResponse
536
- * @property {string} fynd_order_id
375
+ * @property {string} fynd_order_id - A string that represents the unique
376
+ * identifier assigned to the order.
537
377
  */
538
378
 
539
379
  /**
540
380
  * @typedef DispatchManifest
541
- * @property {string} manifest_id - Id of the manifest.
381
+ * @property {string} manifest_id - The unique identifier for the manifest being
382
+ * dispatched.
542
383
  */
543
384
 
544
385
  /**
545
386
  * @typedef SuccessResponse
546
- * @property {boolean} [success]
547
- * @property {string} [message]
387
+ * @property {boolean} [success] - Indicates whether the API call was successful
388
+ * (true) or not (false).
389
+ * @property {string} [message] - A descriptive message providing additional
390
+ * information about the API response.
548
391
  */
549
392
 
550
393
  /**
551
394
  * @typedef ActionInfo
552
- * @property {string} display_text
553
- * @property {number} id
554
- * @property {string} description
555
- * @property {string} slug
395
+ * @property {string} display_text - A user-friendly text that represents the
396
+ * action associated with the permission.
397
+ * @property {number} id - A unique identifier for the permission, used for
398
+ * referencing within the system.
399
+ * @property {string} description - A detailed explanation of what the
400
+ * permission allows the user to do.
401
+ * @property {string} slug - A URL-friendly string that serves as a unique
402
+ * identifier for the permission, often used in routing or API calls.
556
403
  */
557
404
 
558
405
  /**
559
406
  * @typedef GetActionsResponse
560
- * @property {ActionInfo[]} [permissions]
407
+ * @property {ActionInfo[]} [permissions] - A response object that contains a
408
+ * list of permissions available to the user.
561
409
  */
562
410
 
563
411
  /**
564
412
  * @typedef HistoryReason
565
- * @property {string} [text]
566
- * @property {string} [category]
567
- * @property {string} [state]
568
- * @property {string} [dislay_name]
569
- * @property {number} [code]
570
- * @property {number} [quantity]
413
+ * @property {string} [text] - A reason for the activity or change.
414
+ * @property {string} [category] - Category of the reason for the status change.
415
+ * @property {string} [state] - Current state related to the reason.
416
+ * @property {string} [dislay_name] - Display name of the reason for better user
417
+ * understanding.
418
+ * @property {number} [code] - Unique code identifying the reason.
419
+ * @property {number} [quantity] - Quantity related to the reason, if applicable.
571
420
  */
572
421
 
573
422
  /**
574
423
  * @typedef HistoryMeta
575
- * @property {number} [store_id]
576
- * @property {string} [status]
577
- * @property {string} [status1]
578
- * @property {string} [call_id]
579
- * @property {string} [starttime]
424
+ * @property {number} [store_id] - Unique identifier for the store involved in
425
+ * the activity.
426
+ * @property {string} [status] - Current status of the activity or item.
427
+ * @property {string} [status1] - Additional status information if necessary.
428
+ * @property {string} [call_id] - Identifier for any related calls, if applicable.
429
+ * @property {string} [starttime] - Start time of the activity.
580
430
  * @property {HistoryReason} [reason]
581
- * @property {string} [short_link]
582
- * @property {string} [endtime]
583
- * @property {string} [store_name]
584
- * @property {string} [caller]
585
- * @property {string} [store_code]
586
- * @property {string} [billsec]
587
- * @property {string} [recordpath]
588
- * @property {string} [status2]
589
- * @property {string} [callerid]
590
- * @property {string} [duration]
591
- * @property {string} [channel_type]
592
- * @property {string} [activity_comment]
593
- * @property {string} [activity_type]
594
- * @property {string} [receiver]
595
- * @property {string} [recipient]
596
- * @property {string} [slug]
597
- * @property {string} [message]
431
+ * @property {string} [short_link] - A shortened link related to the activity,
432
+ * if available.
433
+ * @property {string} [endtime] - End time of the activity.
434
+ * @property {string} [store_name] - Name of the store involved in the activity.
435
+ * @property {string} [caller] - Name of the caller associated with the activity.
436
+ * @property {string} [store_code] - Code associated with the store.
437
+ * @property {string} [billsec] - Duration of the billable period, if applicable.
438
+ * @property {string} [recordpath] - Path to any related recordings, if applicable.
439
+ * @property {string} [status2] - Additional status information if necessary.
440
+ * @property {string} [callerid] - Caller ID associated with the activity, if applicable.
441
+ * @property {string} [duration] - Total duration of the activity.
442
+ * @property {string} [channel_type] - Type of channel used for the activity, if
443
+ * applicable.
444
+ * @property {string} [activity_comment] - Comments related to the activity, if
445
+ * applicable.
446
+ * @property {string} [activity_type] - Type of activity being recorded, if applicable.
447
+ * @property {string} [receiver] - Name of the receiver involved in the
448
+ * activity, if applicable.
449
+ * @property {string} [recipient] - Recipient of the activity, if applicable.
450
+ * @property {string} [slug] - Slug identifier for the activity.
451
+ * @property {string} [message] - Any additional messages related to the activity.
598
452
  */
599
453
 
600
454
  /**
601
455
  * @typedef HistoryDict
602
- * @property {string} [display_message] - Display Message
603
- * @property {number} [bag_id] - Bag ID
604
- * @property {string} [ticket_url] - Ticket URL
605
- * @property {string} [l3_detail] - L3 details of bag
606
- * @property {string} createdat - Create date
607
- * @property {string} [ticket_id] - Ticket ID
608
- * @property {string} type - Type of history, Expected Values: [
609
- * activity_status, activity_escalation, activity_comment,
610
- * outbound_notification, outbound_voice ]
611
- * @property {string} [l2_detail] - L2 details of bag
612
- * @property {string} [assigned_agent] - Assigned Agent
613
- * @property {HistoryMeta} [meta] - Meta
614
- * @property {string} [l1_detail] - L1 details of bag
615
- * @property {string} message - History Message or comment
616
- * @property {string} user - User who created the history
456
+ * @property {string} [display_message] - User-friendly message displaying the
457
+ * activity or status change.
458
+ * @property {number} [bag_id] - Identifier for the bag associated with the activity.
459
+ * @property {string} [ticket_url] - URL for any related tickets.
460
+ * @property {string} [l3_detail] - L3 details regarding the bag or activity.
461
+ * @property {string} createdat - Date and time when the activity was created.
462
+ * @property {string} [created_ts] - Timestamp for when the activity was created
463
+ * in ISO format.
464
+ * @property {string} [ticket_id] - Unique identifier for the ticket associated
465
+ * with the activity.
466
+ * @property {string} type - Type of activity history
467
+ * @property {string} [l2_detail] - L2 details regarding the bag or activity.
468
+ * @property {string} [assigned_agent] - Name of the agent assigned to the activity.
469
+ * @property {HistoryMeta} [meta] - Metadata about the activity
470
+ * @property {string} [l1_detail] - L1 details regarding the bag or activity.
471
+ * @property {string} message - Message or comment regarding the history.
472
+ * @property {string} user - Name of the user who created the history record.
617
473
  */
618
474
 
619
475
  /**
620
476
  * @typedef ShipmentHistoryResponse
621
- * @property {boolean} [success]
622
- * @property {HistoryDict[]} activity_history
477
+ * @property {boolean} [success] - Indicates whether the API call was successful
478
+ * (true) or not (false).
479
+ * @property {HistoryDict[]} activity_history - A list of activity records
480
+ * related to the shipment, providing details on actions taken, comments
481
+ * added, or notifications sent.
623
482
  */
624
483
 
625
484
  /**
626
485
  * @typedef PostHistoryFilters
627
- * @property {string} shipment_id
628
- * @property {string} [line_number]
629
- * @property {string} [identifier]
486
+ * @property {string} shipment_id - Unique identifier for the shipment
487
+ * @property {string} [line_number] - Optional field to specify a particular
488
+ * line item in the shipment.
489
+ * @property {string} [identifier] - Optional field for any additional
490
+ * identifier related to the shipment.
630
491
  */
631
492
 
632
493
  /**
633
494
  * @typedef PostHistoryData
634
- * @property {string} user_name
635
- * @property {string} message
495
+ * @property {string} user_name - The name or email of the user who performed
496
+ * the action or recorded the entry.
497
+ * @property {string} message - A descriptive message detailing the action taken
498
+ * or the status related to the shipment.
636
499
  */
637
500
 
638
501
  /**
639
502
  * @typedef PostHistoryDict
640
- * @property {PostHistoryFilters[]} filters
503
+ * @property {PostHistoryFilters[]} filters - A list of filter objects, each
504
+ * following the PostHistoryFilters schema, used to identify which shipment
505
+ * history records are relevant.
641
506
  * @property {PostHistoryData} data
642
507
  */
643
508
 
644
509
  /**
645
510
  * @typedef PostShipmentHistory
646
- * @property {PostHistoryDict[]} [activity_history]
511
+ * @property {PostHistoryDict[]} [activity_history] - A list of activity history
512
+ * records, each adhering to the PostHistoryDict schema.
647
513
  */
648
514
 
649
515
  /**
650
516
  * @typedef SmsDataPayload
651
- * @property {number} shipment_id - ShipmentId
652
- * @property {number} phone_number - Phone number for communication
653
- * @property {number} [amount_paid] - Data mapped in Communication template: amount_paid
654
- * @property {string} order_id - OrderId
655
- * @property {string} [payment_mode] - Data mapped in Communication template: payment_mode
656
- * @property {string} [customer_name] - Data mapped in Communication template:
657
- * customer_name
658
- * @property {string} [brand_name] - Data mapped in Communication template: brand_name
659
- * @property {string} message - Message to be send in SMS
660
- * @property {string} country_code - Country code for SMS
517
+ * @property {number} shipment_id - Unique identifier for the shipment
518
+ * associated with the SMS.
519
+ * @property {number} phone_number - The recipient's phone number for communication.
520
+ * @property {number} [amount_paid] - The amount that has been paid, as mapped
521
+ * in the communication template.
522
+ * @property {string} order_id - Unique identifier for the order associated with
523
+ * the shipment.
524
+ * @property {string} [payment_mode] - The mode of payment used for the order,
525
+ * as mapped in the communication template.
526
+ * @property {string} [customer_name] - The name of the customer, as mapped in
527
+ * the communication template.
528
+ * @property {string} [brand_name] - The name of the brand associated with the
529
+ * order, as mapped in the communication template.
530
+ * @property {string} message - The content of the SMS to be sent to the recipient.
531
+ * @property {string} country_code - The country code for the recipient's phone
532
+ * number, necessary for proper SMS delivery.
661
533
  */
662
534
 
663
535
  /**
664
536
  * @typedef SendSmsPayload
665
- * @property {number} bag_id - Bag_id for the activity history track
666
- * @property {SmsDataPayload} [data] - SMS Data
667
- * @property {string} slug - Slug name for the template mapped in pointblank
537
+ * @property {number} bag_id - Unique identifier for the bag, used for tracking
538
+ * activity history related to this SMS.
539
+ * @property {SmsDataPayload} [data] - Contains the SMS data necessary for communication.
540
+ * @property {string} slug - Slug name for the SMS template mapped in the
541
+ * communication system, used to identify the specific messaging format or content.
668
542
  */
669
543
 
670
544
  /**
@@ -704,25 +578,34 @@ const Joi = require("joi");
704
578
 
705
579
  /**
706
580
  * @typedef Meta
707
- * @property {number} [kafka_emission_status]
708
- * @property {string} [state_manager_used]
581
+ * @property {number} [kafka_emission_status] - An integer representing the
582
+ * status of the message upon emission to Kafka. 0 indicates success, while 1
583
+ * indicates failure.
584
+ * @property {string} [state_manager_used] - A string that specifies the state
585
+ * manager utilized for handling the order's state.
709
586
  */
710
587
 
711
588
  /**
712
589
  * @typedef ShipmentDetail
713
- * @property {string} [shipment_id]
714
- * @property {string} [status]
715
- * @property {number} id
716
- * @property {number[]} [bag_list]
590
+ * @property {string} [shipment_id] - Unique identifier for the shipment
591
+ * associated with the order.
592
+ * @property {string} [status] - A string representing the current status of the shipment
593
+ * @property {number} id - An integer that serves as a unique identifier for the
594
+ * shipment detail
595
+ * @property {number[]} [bag_list] - A list of bag identifiers associated with
596
+ * the shipment.
717
597
  * @property {Meta} meta
718
- * @property {string} [remarks]
598
+ * @property {string} [remarks] - A string for any additional comments or notes
599
+ * related to the shipment,
719
600
  */
720
601
 
721
602
  /**
722
603
  * @typedef OrderStatusData
723
604
  * @property {OrderDetails} order_details
724
- * @property {string[]} [errors]
725
- * @property {ShipmentDetail[]} [shipment_details]
605
+ * @property {string[]} [errors] - A list of any errors that occurred while
606
+ * attempting to obtain the order's status.
607
+ * @property {ShipmentDetail[]} [shipment_details] - A list of the individual
608
+ * shipments associated with the order and their current statuses.
726
609
  * @property {string} [text] - A label or description of the delivery status,
727
610
  * such as 'Expected Delivery Date'.
728
611
  * @property {string} [value] - The detailed delivery status or time
@@ -735,24 +618,27 @@ const Joi = require("joi");
735
618
 
736
619
  /**
737
620
  * @typedef OrderStatusResult
738
- * @property {string} success
739
- * @property {OrderStatusData[]} [result]
621
+ * @property {string} success - Indicates whether the API call was successful
622
+ * (true) or not (false).
623
+ * @property {OrderStatusData[]} [result] - The order's current status and
624
+ * related shipment details.
740
625
  */
741
626
 
742
627
  /**
743
628
  * @typedef Dimension
744
- * @property {string} [packaging_type]
745
- * @property {string} [weight]
746
- * @property {string} [height]
747
- * @property {number} [length]
748
- * @property {number} [width]
629
+ * @property {string} [packaging_type] - Describes the type of packaging used.
630
+ * @property {number} [weight] - The weight of the package in kilograms.
631
+ * @property {number} [height] - The height of the package in centimetres.
632
+ * @property {number} [length] - The length of the package in centimetres.
633
+ * @property {number} [width] - The width of the package in centimetres.
749
634
  */
750
635
 
751
636
  /**
752
637
  * @typedef UpdatePackagingDimensionsPayload
753
- * @property {string} shipment_id
754
- * @property {string} current_status
755
- * @property {Dimension[]} dimension
638
+ * @property {string} shipment_id - Unique identifier for the shipment for which
639
+ * the packaging dimensions are being updated.
640
+ * @property {string} current_status - The current status of the shipment.
641
+ * @property {Dimension[]} dimension - A list of dimensions for the packaging.
756
642
  */
757
643
 
758
644
  /**
@@ -762,17 +648,26 @@ const Joi = require("joi");
762
648
 
763
649
  /**
764
650
  * @typedef Tax
765
- * @property {string} name
766
- * @property {number} rate
767
- * @property {Object[]} [breakup]
768
- * @property {Object} amount
651
+ * @property {string} name - The name of the tax, indicating its purpose (e.g.,
652
+ * VAT, sales tax).
653
+ * @property {number} rate - The tax rate as a decimal, applied to the transaction amount.
654
+ * @property {Object[]} [breakup] - An array of objects detailing the components
655
+ * or breakdown of the tax applied.
656
+ * @property {Object} amount - An object representing the total tax amount
657
+ * calculated for the transaction.
658
+ */
659
+
660
+ /**
661
+ * @typedef AmountSchema
662
+ * @property {string} [currency] - The value indicating the currency used for
663
+ * the transactions.
664
+ * @property {number} [value] - The final amount of the charge.
769
665
  */
770
666
 
771
667
  /**
772
668
  * @typedef Charge
773
- * @property {string} name - The name of the charge.
774
- * @property {Object} amount - The monetary value of the charge, including value
775
- * and currency details.
669
+ * @property {string} name - The name of the charge that indicates its purpose.
670
+ * @property {AmountSchema} amount
776
671
  * @property {Tax} [tax]
777
672
  * @property {string} [code] - An optional code associated with the charge for
778
673
  * internal tracking.
@@ -781,42 +676,51 @@ const Joi = require("joi");
781
676
 
782
677
  /**
783
678
  * @typedef LineItem
784
- * @property {Charge[]} [charges]
785
- * @property {Object} [meta] - Meta data of the articles or line items.
786
- * @property {string} [custom_message] - Meta data of the articles or line items.
679
+ * @property {Charge[]} [charges] - An array of Charge objects related to the line item.
680
+ * @property {Object} [meta] - An object containing metadata relevant to
681
+ * articles or line items.
682
+ * @property {string} [custom_message] - A string for any special instructions
683
+ * or messages related to the line item.
787
684
  * @property {number} [quantity] - Quantity of the articles or line items.
788
- * @property {string} seller_identifier - Seller identifier of the articles or line items.
685
+ * @property {string} seller_identifier - Unique identifier of the articles or
686
+ * line items set by seller.
789
687
  * @property {string} [external_line_id] - External unique identifier of the
790
688
  * articles or line items.
791
689
  */
792
690
 
793
691
  /**
794
692
  * @typedef ProcessingDates
795
- * @property {Object} [dp_pickup_slot]
796
- * @property {string} [dispatch_after_date]
797
- * @property {string} [dispatch_by_date]
798
- * @property {string} [confirm_by_date]
799
- * @property {Object} [customer_pickup_slot]
800
- * @property {string} [pack_by_date]
693
+ * @property {Object} [dp_pickup_slot] - An object that provides details about
694
+ * the designated pickup time slot for the order.
695
+ * @property {string} [dispatch_after_date] - A string indicating the date after
696
+ * which the order will be dispatched.
697
+ * @property {string} [dispatch_by_date] - A string representing the latest date
698
+ * by which the order must be dispatched to meet delivery expectations.
699
+ * @property {string} [confirm_by_date] - A string that indicates the deadline
700
+ * for the merchant to confirm the order.
701
+ * @property {Object} [customer_pickup_slot] - An object that provides details
702
+ * of the pick-up time slot set by the customer.
703
+ * @property {string} [pack_by_date] - A string indicating the date by which the
704
+ * order must be packaged for fulfillment.
801
705
  */
802
706
 
803
707
  /**
804
708
  * @typedef Shipment
805
- * @property {LineItem[]} line_items
709
+ * @property {LineItem[]} line_items - An array of LineItem objects that
710
+ * represent the items included in the shipment.
806
711
  * @property {string} [external_shipment_id] - External shipment identifier or
807
712
  * marketplace's unique shipment identifier.
808
713
  * @property {ProcessingDates} [processing_dates]
809
- * @property {Object} [meta] - Meta data of the shipment.
810
- * @property {number} [priority] - Integer value indicating high and low priority.
714
+ * @property {Object} [meta] - An object containing metadata related to the shipment.
715
+ * @property {number} [priority] - An integer indicating the priority level of
716
+ * the shipment.
811
717
  * @property {number} [location_id] - Location Identifier or Store/Fulfillment
812
718
  * Identifier of the shipment- This field is mandatory when
813
719
  * optimal_shipment_creation flag is set to false, indicating that shipments
814
720
  * must be associated with a specific location. When
815
721
  * `optimal_shipment_creation` is true, the optimal location for order
816
722
  * creation would be assigned, location_id becomes optional.
817
- * @property {string} [order_type] - The order type of shipment HomeDelivery -
818
- * If the customer wants the order home-delivered PickAtStore - If the
819
- * customer wants the handover of an order at the store itself.
723
+ * @property {string} [order_type] - The order type of shipment.
820
724
  * @property {string} [parent_type]
821
725
  * @property {string} [store_invoice_id]
822
726
  * @property {string} [lock_status]
@@ -847,206 +751,191 @@ const Joi = require("joi");
847
751
  */
848
752
 
849
753
  /**
850
- * @typedef ShippingInfo
851
- * @property {string} [alternate_mobile_number]
852
- * @property {string} [state]
853
- * @property {string} [customer_code]
854
- * @property {string} [shipping_type]
855
- * @property {string} [middle_name]
856
- * @property {string} [primary_mobile_number]
857
- * @property {string} [last_name]
858
- * @property {Object} [geo_location]
859
- * @property {string} [gender]
860
- * @property {string} [house_no]
861
- * @property {string} [first_name]
862
- * @property {string} [title]
863
- * @property {string} [landmark]
864
- * @property {string} [country]
865
- * @property {string} [address_type]
866
- * @property {string} [state_code]
867
- * @property {string} [city]
868
- * @property {string} [external_customer_code]
869
- * @property {string} [floor_no]
870
- * @property {string} [alternate_email]
871
- * @property {Object[]} [slot]
872
- * @property {string} [address]
873
- * @property {string} [area]
874
- * @property {string} [address1]
875
- * @property {string} [pincode]
876
- * @property {string} [primary_email]
877
- * @property {string} [address2]
878
- * @property {string} [country_code]
879
- * @property {string} [country_iso_code] - Country Code in ISO 2 format (e.g. US, IN)
754
+ * @typedef GeoLocationSchema
755
+ * @property {number} [latitude] - A number representing the geographical
756
+ * latitude of the location.
757
+ * @property {number} [longitude] - A number representing the geographical
758
+ * longitude of the location
880
759
  */
881
760
 
882
761
  /**
883
- * @typedef BillingInfo
884
- * @property {string} [alternate_mobile_number]
885
- * @property {string} [state]
886
- * @property {string} [customer_code]
887
- * @property {string} [middle_name]
888
- * @property {string} [primary_mobile_number]
889
- * @property {string} [last_name]
890
- * @property {string} [gender]
891
- * @property {string} [house_no]
892
- * @property {string} [first_name]
893
- * @property {string} [title]
894
- * @property {string} [country]
895
- * @property {string} [state_code]
896
- * @property {string} [city]
897
- * @property {string} [external_customer_code]
898
- * @property {string} [floor_no]
899
- * @property {string} [alternate_email]
900
- * @property {string} [address]
901
- * @property {string} [area]
902
- * @property {string} [address1]
903
- * @property {string} [pincode]
904
- * @property {string} [primary_email]
905
- * @property {string} [address2]
906
- * @property {string} [landmark]
907
- * @property {string} [country_code]
762
+ * @typedef ShippingInfo
763
+ * @property {string} [alternate_mobile_number] - A string for an alternate
764
+ * mobile number to reach the customer, providing an additional contact method.
765
+ * @property {string} [state] - A string representing the name of the state for
766
+ * shipping purposes.
767
+ * @property {string} [customer_code] - A string representing the customer's
768
+ * unique identifier in the seller's system.
769
+ * @property {string} [shipping_type] - A string describing the shipping type.
770
+ * @property {string} [middle_name] - A string containing the customer's middle name.
771
+ * @property {string} [primary_mobile_number] - A string for the customer's
772
+ * primary mobile number.
773
+ * @property {string} [last_name] - A string containing the customer's last name.
774
+ * @property {GeoLocationSchema} [geo_location]
775
+ * @property {string} [gender] - A string representing the customer's gender.
776
+ * @property {string} [house_no] - A string representing the house or apartment
777
+ * number of the customer.
778
+ * @property {string} [first_name] - A string representing the customer's first name.
779
+ * @property {string} [title] - A string representing the customer's title or prefix.
780
+ * @property {string} [landmark] - A string representing a landmark or reference
781
+ * point near the customer's location.
782
+ * @property {string} [country] - A string representing the customer's country.
783
+ * @property {string} [address_type] - A string representing the address type in
784
+ * the seller's system.
785
+ * @property {string} [state_code] - A string representing the state code of the
786
+ * customer's location.
787
+ * @property {string} [city] - A string representing the city of the customer's location.
788
+ * @property {string} [external_customer_code] - A string representing an
789
+ * external customer code in the seller's system.
790
+ * @property {string} [floor_no] - A string representing the floor number of the
791
+ * customer's location.
792
+ * @property {string} [alternate_email] - A string representing an alternate
793
+ * email address for the customer.
794
+ * @property {Object[]} [slot] - A list of objects representing available time
795
+ * slot for delivery or pickup.
796
+ * @property {string} [address] - A comma-separated string representing the address.
797
+ * @property {string} [area] - A string representing the area of the customer's location.
798
+ * @property {string} [address1] - A string representing the first line of the address.
799
+ * @property {string} [pincode] - A string representing the pincode of the
800
+ * customer's location.
801
+ * @property {string} [primary_email] - A string representing the primary email
802
+ * address for the customer.
803
+ * @property {string} [address2] - A string representing the second line of the address.
804
+ * @property {string} [country_code] - A string representing the country code of
805
+ * the customer's location.
908
806
  * @property {string} [country_iso_code] - Country Code in ISO 2 format (e.g. US, IN)
909
807
  */
910
808
 
911
809
  /**
912
810
  * @typedef UserInfo
913
- * @property {string} [user_id]
914
- * @property {string} [user_type]
915
- * @property {string} [primary_email]
916
- * @property {string} [gender]
917
- * @property {string} first_name
918
- * @property {string} [last_name]
919
- * @property {string} primary_mobile_number
811
+ * @property {string} [user_id] - The unique identifier assigned to the user.
812
+ * @property {string} [user_type] - A string representing the type of the user.
813
+ * @property {string} [primary_email] - A string representing the primary email
814
+ * address for the user.
815
+ * @property {string} [gender] - A string specifying the gender of the user.
816
+ * @property {string} first_name - A string which specifies the user's first name.
817
+ * @property {string} [last_name] - A string which specifies the user's last name.
818
+ * @property {string} primary_mobile_number - A string representing the primary
819
+ * mobile number for the user.
920
820
  */
921
821
 
922
822
  /**
923
823
  * @typedef TaxInfo
924
- * @property {string} [b2b_gstin_number]
925
- * @property {string} [gstin]
926
- * @property {string} [pan_no]
824
+ * @property {string} [b2b_gstin_number] - A string representing the GSTIN
825
+ * (Goods and Services Tax Identification Number) for business-to-business
826
+ * transactions.
827
+ * @property {string} [gstin] - A string that specifies the GSTIN for the seller.
828
+ * @property {string} [pan_no] - A string representing the PAN assigned to
829
+ * individuals or entities for tax purposes in India.
927
830
  */
928
831
 
929
832
  /**
930
833
  * @typedef PaymentMethod
931
- * @property {string} collect_by
932
- * @property {string} mode
933
- * @property {string} refund_by
934
- * @property {string} name
935
- * @property {number} amount
936
- * @property {Object} [meta]
937
- * @property {Object} [transaction_data]
834
+ * @property {string} collect_by - A string indicating the entity responsible
835
+ * for collecting the payment.
836
+ * @property {string} mode - A string that specifies the mode of payment.
837
+ * @property {string} refund_by - A string that indicates the entity responsible
838
+ * for processing refunds.
839
+ * @property {string} name - A string representing the name of the payment method.
840
+ * @property {number} amount - A number representing the monetary value
841
+ * associated with the payment method.
842
+ * @property {Object} [meta] - An object for any additional metadata related to
843
+ * the payment method.
844
+ * @property {Object} [transaction_data] - An object that holds
845
+ * transaction-specific information.
938
846
  */
939
847
 
940
848
  /**
941
849
  * @typedef PaymentInfo
942
- * @property {string} primary_mode
943
- * @property {PaymentMethod[]} [payment_methods]
850
+ * @property {string} primary_mode - A string that indicates the primary payment
851
+ * method used for the order.
852
+ * @property {string} [payment_mode] - A string that indicates the payment mode
853
+ * used for the order.
854
+ * @property {PaymentMethod[]} [payment_methods] - A lists all available payment
855
+ * methods used in the transaction.
944
856
  */
945
857
 
946
858
  /**
947
859
  * @typedef CreateOrderAPI
948
- * @property {Shipment[]} shipments
860
+ * @property {Shipment[]} shipments - An array of shipment objects that detail
861
+ * the items being shipped as part of the order.
949
862
  * @property {ShippingInfo} shipping_info
950
- * @property {BillingInfo} billing_info
951
- * @property {Object} [currency_info]
952
- * @property {string} [external_order_id]
953
- * @property {Charge[]} [charges]
954
- * @property {string} [external_creation_date]
955
- * @property {Object} [meta]
863
+ * @property {ShippingInfo} billing_info
864
+ * @property {Object} [currency_info] - An object that provides details about
865
+ * the currency in which the order is processed, including currency code and
866
+ * conversion rates if applicable.
867
+ * @property {string} [external_order_id] - A unique identifier for the order
868
+ * assigned by an external system.
869
+ * @property {Charge[]} [charges] - An array of charge objects that detail the
870
+ * various fees associated with the order.
871
+ * @property {string} [external_creation_date] - A string that specifies the
872
+ * date and time when the order was created in an external system
873
+ * @property {Object} [meta] - A generic object that can hold any additional
874
+ * metadata related to the order.
956
875
  * @property {TaxInfo} [tax_info]
957
- * @property {CreateOrderConfig} [config]
876
+ * @property {CreateOrderConfig} config
958
877
  * @property {PaymentInfo} payment_info
959
878
  * @property {UserInfo} [user_info]
960
- * @property {number} [ordering_store_id]
961
- * @property {string} [order_platform]
879
+ * @property {number} [ordering_store_id] - Unique identifier for the store
880
+ * where the order was placed.
881
+ * @property {string} [order_platform] - The platform used to place the order.
882
+ * @property {string} [order_type] - A string that specifies the type of order
883
+ * being placed.
884
+ * @property {string} [fynd_order_id] - Unique identifier for the order.
885
+ * @property {string} [application_id] - A unique identifier for the application
886
+ * or system that is making the order request.
887
+ * @property {string} [external_shipment_id] - External shipment identifier or
888
+ * marketplace's unique shipment identifier.
962
889
  */
963
890
 
964
891
  /**
965
892
  * @typedef CreateOrderErrorReponse
966
- * @property {string} [request_id]
967
- * @property {number} status
968
- * @property {Object} [info]
969
- * @property {string} [stack_trace]
970
- * @property {string} [code]
971
- * @property {string} [meta]
972
- * @property {string} message
973
- * @property {string} [exception]
974
- */
975
-
976
- /**
977
- * @typedef DpConfiguration
978
- * @property {string} [shipping_by]
979
- */
980
-
981
- /**
982
- * @typedef PaymentMethods
983
- * @property {string} [collect_by]
984
- * @property {string} [refund_by]
985
- * @property {string} [mode]
986
- */
987
-
988
- /**
989
- * @typedef CreateChannelPaymentInfo
990
- * @property {string} [source]
991
- * @property {PaymentMethods[]} [payment_methods]
992
- * @property {string} [mode_of_payment]
993
- */
994
-
995
- /**
996
- * @typedef CreateChannelConfig
997
- * @property {DpConfiguration} [dp_configuration]
998
- * @property {string} [shipment_assignment]
999
- * @property {boolean} [location_reassignment]
1000
- * @property {Object} [logo_url]
1001
- * @property {CreateChannelPaymentInfo} [payment_info]
1002
- * @property {string[]} [lock_states]
1003
- */
1004
-
1005
- /**
1006
- * @typedef CreateChannelConfigData
1007
- * @property {CreateChannelConfig} [config_data]
1008
- */
1009
-
1010
- /**
1011
- * @typedef CreateChannelConifgErrorResponse
1012
- * @property {string} [error]
1013
- */
1014
-
1015
- /**
1016
- * @typedef CreateChannelConfigResponse
1017
- * @property {boolean} [is_inserted]
1018
- * @property {boolean} [is_upserted]
1019
- * @property {boolean} [acknowledged]
893
+ * @property {boolean} [success] - Indicates whether the API call was successful
894
+ * (true) or not (false).
895
+ * @property {string} [errors] - Contains details about the error.
896
+ * @property {number} [status_code] - Represents the HTTP status code of the API response.
897
+ * @property {string} [fynd_order_id] - A string that represents the unique
898
+ * identifier assigned to the order.
1020
899
  */
1021
900
 
1022
901
  /**
1023
- * @typedef UploadConsent
1024
- * @property {string} consent_url
1025
- * @property {string} manifest_id
902
+ * @typedef UploadManifestConsent
903
+ * @property {string} consent_url - A URL that directs users to a consent page
904
+ * or document related to the upload of the manifest.
905
+ * @property {string} manifest_id - The unique identifier for the manifest being uploaded.
1026
906
  */
1027
907
 
1028
908
  /**
1029
909
  * @typedef PlatformOrderUpdate
1030
- * @property {string} order_id
910
+ * @property {string} order_id - A string that represents the unique identifier
911
+ * assigned to the order.
1031
912
  */
1032
913
 
1033
914
  /**
1034
915
  * @typedef ResponseDetail
1035
- * @property {boolean} [success]
1036
- * @property {string[]} [message]
916
+ * @property {boolean} [success] - Indicates whether the API call was successful
917
+ * (true) or not (false).
918
+ * @property {string} [message] - A descriptive message providing additional
919
+ * information about the API response.
920
+ * @property {number} [status] - Represents the HTTP status code of the API response.
1037
921
  */
1038
922
 
1039
923
  /**
1040
924
  * @typedef FyndOrderIdList
1041
- * @property {string[]} [fynd_order_id]
925
+ * @property {string[]} [fynd_order_id] - An array of strings that represent
926
+ * unique identifiers assigned to an order.
927
+ * @property {string} [start_date] - A string representing the start date for
928
+ * the order status query.
929
+ * @property {string} [end_date] - A string representing the end date for the
930
+ * order status query.
931
+ * @property {number} [mobile] - An integer representing the mobile number
932
+ * associated with the order.
1042
933
  */
1043
934
 
1044
935
  /**
1045
936
  * @typedef OrderStatus
1046
- * @property {FyndOrderIdList[]} [order_details]
1047
- * @property {string} start_date
1048
- * @property {string} end_date
1049
- * @property {number} mobile
937
+ * @property {FyndOrderIdList[]} [order_details] - An array of objects that
938
+ * provide details about the orders, including their respective order IDs.
1050
939
  */
1051
940
 
1052
941
  /**
@@ -1057,174 +946,207 @@ const Joi = require("joi");
1057
946
 
1058
947
  /**
1059
948
  * @typedef RoleBaseStateTransitionMapping
1060
- * @property {boolean} [success]
1061
- * @property {string[]} [next_statuses]
949
+ * @property {boolean} [success] - Indicates whether the API call was successful
950
+ * (true) or not (false).
951
+ * @property {string[]} [next_statuses] - A list of possible next statuses that
952
+ * can be transitioned to from the current status.
1062
953
  */
1063
954
 
1064
955
  /**
1065
- * @typedef FetchCreditBalanceRequestPayload
1066
- * @property {string} affiliate_id
1067
- * @property {string} seller_id
1068
- * @property {string} customer_mobile_number
1069
- */
1070
-
1071
- /**
1072
- * @typedef CreditBalanceInfo
1073
- * @property {string} [total_credited_balance]
1074
- * @property {string} [reason]
1075
- * @property {string} [customer_mobile_number]
956
+ * @typedef RefundModeConfigRequestPayload
957
+ * @property {string} fynd_order_id - A unique identifier for the order placed
958
+ * through the Fynd platform.
959
+ * @property {number} seller_id - A unique identifier representing the seller
960
+ * associated with the order.
961
+ * @property {string} affiliate_id - An identifier for the affiliate partner
962
+ * associated with the order.
963
+ * @property {number} [customer_mobile_number] - The mobile phone number of the
964
+ * customer who placed the order.
1076
965
  */
1077
966
 
1078
967
  /**
1079
- * @typedef FetchCreditBalanceResponsePayload
1080
- * @property {boolean} success
1081
- * @property {CreditBalanceInfo} data
968
+ * @typedef RefundOption
969
+ * @property {string} [value] - The actual value representing the refund option.
970
+ * @property {string} [slug] - A unique identifier for the refund mode
971
+ * @property {string} [name] - A user-friendly name for the refund option.
972
+ * @property {string} [type] - A string indicating the type of refund
973
+ * information provided.
1082
974
  */
1083
975
 
1084
976
  /**
1085
- * @typedef RefundModeConfigRequestPayload
1086
- * @property {string} fynd_order_id
1087
- * @property {number} seller_id
1088
- * @property {string} affiliate_id
1089
- * @property {string} [customer_mobile_number]
1090
- */
1091
-
1092
- /**
1093
- * @typedef RefundOption
1094
- * @property {string} [value]
1095
- * @property {string} [slug]
1096
- * @property {string} [name]
1097
- * @property {string} [type]
977
+ * @typedef RefundModeFormat
978
+ * @property {string} [refund_to] - Specifies the destination or method for the refunds.
1098
979
  */
1099
980
 
1100
981
  /**
1101
982
  * @typedef RefundModeInfo
1102
- * @property {boolean} [is_active]
1103
- * @property {string} [slug]
1104
- * @property {RefundOption[]} [options]
1105
- * @property {string} [display_name]
983
+ * @property {boolean} [is_active] - A flag indicating whether the refund mode
984
+ * is currently active or not.
985
+ * @property {string} [slug] - A unique identifier for the refund mode.
986
+ * @property {RefundOption[]} [options] - A list of available refund options
987
+ * associated with this refund mode.
988
+ * @property {string} [display_name] - A user-friendly name for the refund mode.
989
+ * @property {RefundModeFormat} [format]
1106
990
  */
1107
991
 
1108
992
  /**
1109
993
  * @typedef RefundModeConfigResponsePayload
1110
- * @property {boolean} success
1111
- * @property {RefundModeInfo[]} data
994
+ * @property {boolean} success - Indicates whether the API call was successful
995
+ * (true) or not (false).
996
+ * @property {RefundModeInfo[]} data - An array of possible refund mode
997
+ * information objects.
998
+ * @property {number} [status] - Represents the HTTP status code of the API response.
999
+ * @property {string} [message] - A descriptive message providing additional
1000
+ * information about the API response.
1112
1001
  */
1113
1002
 
1114
1003
  /**
1115
1004
  * @typedef AttachUserOtpData
1116
- * @property {string} request_id
1005
+ * @property {string} request_id - A string representing a unique identifier for
1006
+ * the OTP request.
1117
1007
  */
1118
1008
 
1119
1009
  /**
1120
1010
  * @typedef AttachUserInfo
1121
- * @property {string} first_name
1122
- * @property {string} last_name
1123
- * @property {string} mobile
1124
- * @property {string} [country_code]
1011
+ * @property {string} first_name - A string representing the user's first name.
1012
+ * @property {string} last_name - A string representing the user's last name.
1013
+ * @property {string} mobile - A string representing the user's mobile number.
1014
+ * @property {string} [country_code] - A string representing the user's country code.
1125
1015
  */
1126
1016
 
1127
1017
  /**
1128
1018
  * @typedef AttachOrderUser
1129
1019
  * @property {AttachUserOtpData} otp_data
1130
- * @property {string} fynd_order_id
1020
+ * @property {string} fynd_order_id - A unique identifier for the order
1021
+ * associated with the user attach.
1131
1022
  * @property {AttachUserInfo} user_info
1132
1023
  */
1133
1024
 
1134
1025
  /**
1135
1026
  * @typedef AttachOrderUserResponse
1136
- * @property {boolean} [success]
1137
- * @property {string} [message]
1027
+ * @property {boolean} [success] - Indicates whether the API call was successful
1028
+ * (true) or not (false).
1029
+ * @property {string} [message] - A descriptive message providing additional
1030
+ * information about the API response.
1138
1031
  */
1139
1032
 
1140
1033
  /**
1141
1034
  * @typedef SendUserMobileOTP
1142
- * @property {string} mobile
1143
- * @property {string} [country_code]
1035
+ * @property {number} mobile - The mobile phone number of the user to whom the
1036
+ * OTP (One-Time Password) will be sent.
1037
+ * @property {string} [country_code] - The country code associated with the
1038
+ * user's mobile number.
1144
1039
  */
1145
1040
 
1146
1041
  /**
1147
1042
  * @typedef PointBlankOtpData
1148
- * @property {string} [request_id]
1149
- * @property {number} [resend_timer]
1150
- * @property {string} [message]
1151
- * @property {number} [mobile]
1043
+ * @property {string} [request_id] - A unique identifier for the OTP request.
1044
+ * @property {number} [resend_timer] - The amount of time (in seconds) before
1045
+ * the OTP can be resent to the user.
1046
+ * @property {string} [message] - A message providing additional information
1047
+ * about the OTP request.
1048
+ * @property {number} [mobile] - The mobile number (in integer format)
1049
+ * associated with the OTP request.
1152
1050
  */
1153
1051
 
1154
1052
  /**
1155
1053
  * @typedef SendUserMobileOtpResponse
1156
- * @property {boolean} [success]
1157
- * @property {string} [message]
1054
+ * @property {boolean} [success] - Indicates whether the API call was successful
1055
+ * (true) or not (false).
1056
+ * @property {number} [status] - The HTTP status code of the API response
1057
+ * (200/400/500/503).
1058
+ * @property {string} [message] - A descriptive message providing additional
1059
+ * information about the API response.
1158
1060
  * @property {PointBlankOtpData} [data]
1159
1061
  */
1160
1062
 
1161
1063
  /**
1162
1064
  * @typedef VerifyOtpData
1163
- * @property {string} request_id
1164
- * @property {string} mobile
1165
- * @property {number} otp_code
1065
+ * @property {string} request_id - A unique identifier for the OTP verification request.
1066
+ * @property {string} mobile - The mobile number associated with the OTP verification.
1067
+ * @property {number} otp_code - The OTP code received by the user.
1166
1068
  */
1167
1069
 
1168
1070
  /**
1169
1071
  * @typedef VerifyMobileOTP
1170
1072
  * @property {VerifyOtpData} otp_data
1171
- * @property {string} fynd_order_id
1073
+ * @property {string} fynd_order_id - A unique identifier for the order
1074
+ * associated with the OTP verification.
1172
1075
  */
1173
1076
 
1174
1077
  /**
1175
1078
  * @typedef VerifyOtpResponseData
1176
- * @property {string} [mobile]
1177
- * @property {string} [message]
1178
- * @property {string} [fynd_order_id]
1179
- * @property {string} [country_code]
1079
+ * @property {string} [mobile] - The mobile number associated with the verified OTP.
1080
+ * @property {string} [message] - A string that provides a message about the
1081
+ * outcome of the verification process.
1082
+ * @property {string} [fynd_order_id] - Unique identifier for the order
1083
+ * associated with the OTP verification.
1084
+ * @property {string} [country_code] - A string indicating the country code
1085
+ * associated with the mobile number.
1180
1086
  */
1181
1087
 
1182
1088
  /**
1183
1089
  * @typedef VerifyOtpResponse
1184
- * @property {number} [status]
1185
- * @property {boolean} [success]
1186
- * @property {string} [message]
1090
+ * @property {number} [status] - Represents the HTTP status code of the API response.
1091
+ * @property {boolean} [success] - Indicates whether the API call was successful
1092
+ * (true) or not (false).
1093
+ * @property {string} [message] - A descriptive message providing additional
1094
+ * information about the API response.
1187
1095
  * @property {VerifyOtpResponseData} [data]
1188
1096
  */
1189
1097
 
1190
1098
  /**
1191
1099
  * @typedef BulkReportsDownloadRequest
1192
- * @property {string[]} [store_ids] - Download for specific store ids.
1193
- * @property {string} [lane_type]
1194
- * @property {string} [custom_headers] - Download report with specific headers
1195
- * @property {string} [report_type] - Type of report
1196
- * @property {string} [start_date] - UTC start date in ISO format
1197
- * @property {string} [end_date] - UTC end date in ISO format
1198
- * @property {string[]} [entities] - Download for specific enitites, entities
1199
- * can be bag, shipment or order_id, etc.
1200
- * @property {string} [filter_type]
1201
- * @property {boolean} [is_cross_company_enabled] - Download lanes for cross company.
1202
- * @property {Object} [custom_filters_for_lane]
1100
+ * @property {string[]} [store_ids] - A list of specific store IDs for which the
1101
+ * reports should be generated.
1102
+ * @property {string} [lane_type] - Specifies the type of lane for which the
1103
+ * report is being requested.
1104
+ * @property {string[]} [custom_headers] - Allows users to specify custom
1105
+ * headers for the downloaded report.
1106
+ * @property {string} [report_type] - Indicates the type of report being requested.
1107
+ * @property {string} [start_date] - UTC start date in ISO format, defines the
1108
+ * beginning of the date range for which the report data should be collected.
1109
+ * @property {string} [end_date] - UTC end date in ISO format, defines the end
1110
+ * date range for which the report data should be collected.
1111
+ * @property {string[]} [entities] - Download for specific enitites or for
1112
+ * search filters applied, entities can be bag, shipment or order_id, etc.
1113
+ * @property {string} [filter_type] - Specifies the type of filtering to be
1114
+ * applied to the report data.
1115
+ * @property {boolean} [is_cross_company_enabled] - Indicates whether the report
1116
+ * should include data from cross-company operations.
1117
+ * @property {Object} [custom_filters_for_lane] - A flexible object that allows
1118
+ * users to define custom filters specific to the lanes being reported on.
1203
1119
  */
1204
1120
 
1205
1121
  /**
1206
1122
  * @typedef BulkReportsDownloadResponse
1207
- * @property {boolean} [success]
1208
- * @property {string} [batch_id]
1123
+ * @property {boolean} [success] - Indicates whether the API call was successful
1124
+ * (true) or not (false).
1125
+ * @property {string} [batch_id] - A unique identifier for the batch of reports generated.
1209
1126
  */
1210
1127
 
1211
1128
  /**
1212
- * @typedef BulkFailedResponse
1213
- * @property {boolean} [status]
1214
- * @property {string} [error]
1129
+ * @typedef APIFailedResponse
1130
+ * @property {boolean} [status] - Indicates whether the API call was successful
1131
+ * (true) or not (false).
1132
+ * @property {string} [error] - A descriptive message detailing the error that
1133
+ * occurred during the API call.
1215
1134
  */
1216
1135
 
1217
1136
  /**
1218
- * @typedef BulkStateTransistionRequest
1219
- * @property {string} [url]
1220
- * @property {string} [file_name]
1137
+ * @typedef BulkStateTransistionRequestSchema
1138
+ * @property {string} [url] - Endpoint or resource URL where the bulk state
1139
+ * transition request should be directed.
1140
+ * @property {string} [file_name] - Name of the file associated with the bulk operation.
1221
1141
  */
1222
1142
 
1223
1143
  /**
1224
1144
  * @typedef BulkStateTransistionResponse
1225
- * @property {boolean} [status]
1226
- * @property {string} [message]
1227
- * @property {string} [batch_id]
1145
+ * @property {boolean} [status] - Indicates whether the API call was successful
1146
+ * (true) or not (false).
1147
+ * @property {string} [message] - A descriptive message providing additional
1148
+ * information about the API response.
1149
+ * @property {string} [batch_id] - A unique identifier for the batch of reports generated.
1228
1150
  */
1229
1151
 
1230
1152
  /**
@@ -1242,255 +1164,308 @@ const Joi = require("joi");
1242
1164
 
1243
1165
  /**
1244
1166
  * @typedef BulkActionListingData
1245
- * @property {number} [store_id]
1246
- * @property {string} [uploaded_on]
1247
- * @property {number} [company_id]
1167
+ * @property {number} [store_id] - The unique identifier for the store
1168
+ * associated with the bulk action.
1169
+ * @property {string} [uploaded_on] - A timestamp indicating when the bulk
1170
+ * action was uploaded.
1171
+ * @property {number} [company_id] - Unique identifier of a company on the platform.
1248
1172
  * @property {ShipmentActionInfo} [shipments_action_info]
1249
- * @property {boolean} [is_invoiceable]
1250
- * @property {string} [user_name]
1251
- * @property {string} [file_url]
1252
- * @property {Object} [meta]
1253
- * @property {string} [invoice_document_type]
1254
- * @property {string} [label_document_type]
1255
- * @property {string} [file_name]
1256
- * @property {string} [store_name]
1257
- * @property {number} [updated_ts]
1258
- * @property {boolean} [status]
1259
- * @property {string} [store_code]
1260
- * @property {string} [bulk_action_type]
1261
- * @property {string} [created_ts]
1262
- * @property {string} [invoice_status]
1263
- * @property {boolean} [do_invoice_label_generated]
1264
- * @property {number} [id]
1265
- * @property {string} [user_id]
1266
- * @property {string} [last_selected_invoice_label_type]
1267
- * @property {string} [batch_id]
1268
- * @property {string} [uploaded_by]
1173
+ * @property {boolean} [is_invoiceable] - Indicates whether the bulk action is
1174
+ * eligible for invoicing.
1175
+ * @property {string} [user_name] - The name of the user who initiated or
1176
+ * uploaded the bulk action.
1177
+ * @property {string} [file_url] - The URL where the uploaded file can be accessed.
1178
+ * @property {Object} [meta] - A flexible object that can contain additional
1179
+ * metadata related to the bulk action.
1180
+ * @property {string} [invoice_document_type] - The type of document that is
1181
+ * used for invoicing this bulk action.
1182
+ * @property {string} [label_document_type] - The type of document that is used
1183
+ * for creating labels for this bulk action.
1184
+ * @property {string} [file_name] - The name of the file that was uploaded as
1185
+ * part of the bulk action.
1186
+ * @property {string} [store_name] - The name of the store associated with the
1187
+ * bulk action.
1188
+ * @property {number} [updated_ts] - A timestamp (in Unix format) indicating
1189
+ * when the bulk action was last updated.
1190
+ * @property {boolean} [status] - Indicates the current status of the bulk action.
1191
+ * @property {string} [store_code] - A code representing the store, which can be
1192
+ * used for internal tracking or identification.
1193
+ * @property {string} [bulk_action_type] - Specifies the type of bulk action
1194
+ * being performed.
1195
+ * @property {string} [created_ts] - A timestamp indicating when the bulk action
1196
+ * was created.
1197
+ * @property {string} [invoice_status] - Represents the current status of the
1198
+ * invoice associated with the bulk action.
1199
+ * @property {boolean} [do_invoice_label_generated] - Indicates whether an
1200
+ * invoice label has been generated for the bulk action or not.
1201
+ * @property {number} [id] - A unique identifier for the bulk action record.
1202
+ * @property {string} [user_id] - The unique identifier for the user who
1203
+ * initiated the bulk action.
1204
+ * @property {string} [last_selected_invoice_label_type] - Indicates the last
1205
+ * invoice label type selected for the bulk action.
1206
+ * @property {string} [batch_id] - A unique identifier for the batch associated
1207
+ * with this bulk action.
1208
+ * @property {string} [uploaded_by] - The identifier or name of the individual
1209
+ * or system that uploaded the bulk action.
1210
+ * @property {string} [invoicelabel_document_type] - The type of document
1211
+ * generated for invoice labels.
1212
+ * @property {number} [failed_sh_count] - The number of failed shipments in this
1213
+ * bulk action.
1214
+ * @property {number} [successful_sh_count] - The number of successful shipments
1215
+ * in this bulk action.
1216
+ * @property {number} [total_count] - The total number of shipments processed in
1217
+ * this bulk action.
1218
+ * @property {string[]} [failed_shipments] - An array of shipment identifiers
1219
+ * that failed during processing.
1220
+ * @property {number} [successful_invoiced_count] - The number of shipments
1221
+ * successfully invoiced.
1222
+ * @property {number} [failed_invoiced_count] - The number of shipments that
1223
+ * failed during invoicing.
1224
+ * @property {number} [total_invoiced_count] - The total number of shipments
1225
+ * that have been invoiced.
1269
1226
  */
1270
1227
 
1271
1228
  /**
1272
1229
  * @typedef BulkListinPage
1273
- * @property {number} [current]
1274
- * @property {boolean} [has_previous]
1275
- * @property {boolean} [has_next]
1276
- * @property {number} [total]
1277
- * @property {number} [item_total]
1278
- * @property {string} [type]
1279
- * @property {number} [size]
1230
+ * @property {number} [current] - Indicates the current page number being viewed
1231
+ * in the pagination.
1232
+ * @property {boolean} [has_previous] - A flag indicating whether there is a
1233
+ * previous page available.
1234
+ * @property {boolean} [has_next] - A flag indicating whether there is a next
1235
+ * page available.
1236
+ * @property {number} [total] - The total number of items available in the
1237
+ * dataset, regardless of pagination.
1238
+ * @property {number} [item_total] - The total number of items present on the
1239
+ * current page.
1240
+ * @property {string} [type] - A string that may indicate the type of pagination
1241
+ * or the context of the data being paginated.
1242
+ * @property {number} [size] - The number of items per page.
1280
1243
  */
1281
1244
 
1282
1245
  /**
1283
1246
  * @typedef BulkListingResponse
1284
- * @property {boolean} [success]
1285
- * @property {BulkActionListingData[]} [data]
1247
+ * @property {boolean} [success] - Indicates whether the API call was successful
1248
+ * (true) or not (false).
1249
+ * @property {BulkActionListingData[]} [data] - An array containing the details
1250
+ * of the bulk actions listed.
1286
1251
  * @property {BulkListinPage} [page]
1287
- * @property {number} [total_count]
1252
+ * @property {number} [total_count] - Total number of bulk actions available in
1253
+ * the system, regardless of pagination.
1288
1254
  */
1289
1255
 
1290
1256
  /**
1291
1257
  * @typedef JobDetailsData
1292
- * @property {string} [batch_id]
1293
- * @property {number} [total_shipments_count]
1294
- * @property {string[]} [successful_shipment_ids]
1295
- * @property {number} [successful_shipments_count]
1296
- * @property {number} [failed_shipments_count]
1297
- * @property {number} [processing_shipments_count]
1298
- * @property {string} [company_id]
1258
+ * @property {string} [batch_id] - A unique identifier for the batch of bulk
1259
+ * actions associated with this job.
1260
+ * @property {number} [total_shipments_count] - The total number of shipments
1261
+ * processed in this job.
1262
+ * @property {string[]} [successful_shipment_ids] - An array of identifiers for
1263
+ * shipments that were successfully processed.
1264
+ * @property {number} [successful_shipments_count] - The number of successful
1265
+ * shipments processed in this job.
1266
+ * @property {number} [failed_shipments_count] - The number of shipments that
1267
+ * failed to process in this job.
1268
+ * @property {number} [processing_shipments_count] - The number of shipments
1269
+ * currently being processed for this job.
1270
+ * @property {string} [company_id] - Unique identifier of a company on the platform.
1299
1271
  */
1300
1272
 
1301
1273
  /**
1302
1274
  * @typedef JobDetailsResponse
1303
- * @property {boolean} [success]
1304
- * @property {JobDetailsData[]} [data]
1305
- * @property {string} [file_url]
1306
- * @property {string} [message]
1307
- * @property {Object[]} [failed_records]
1308
- * @property {string} [uploaded_by]
1309
- * @property {string} [user_id]
1310
- * @property {string} [created_ts]
1311
- * @property {string} [uploaded_on]
1312
- * @property {string} [status]
1275
+ * @property {boolean} [success] - Indicates whether the API call was successful
1276
+ * (true) or not (false).
1277
+ * @property {JobDetailsData[]} [data] - An array representing the details of a job.
1278
+ * @property {string} [file_url] - An URL to download the submitted job file.
1279
+ * @property {string} [message] - A message providing additional context about
1280
+ * the request's outcome.
1281
+ * @property {Object[]} [failed_records] - An array of records that failed
1282
+ * during processing, with additional properties providing details about each failure.
1283
+ * @property {string} [uploaded_by] - The name or identifier of the user who
1284
+ * uploaded the job.
1285
+ * @property {string} [user_id] - The unique identifier for the user who
1286
+ * performed the upload.
1287
+ * @property {string} [created_ts] - A timestamp indicating when the job was created.
1288
+ * @property {string} [uploaded_on] - A timestamp indicating when the job was uploaded.
1289
+ * @property {string} [status] - The current status of the job.
1313
1290
  */
1314
1291
 
1315
1292
  /**
1316
1293
  * @typedef JobFailedResponse
1317
- * @property {string} [file_name]
1318
- * @property {string} [url]
1294
+ * @property {string} [file_name] - The name of the file associated with the failed job.
1295
+ * @property {string} [url] - The URL where the uploaded bulk file can be accessed.
1319
1296
  */
1320
1297
 
1321
1298
  /**
1322
1299
  * @typedef ManifestPageInfo
1323
- * @property {number} current
1324
- * @property {number} total
1325
- * @property {boolean} has_next
1326
- * @property {number} size
1327
- * @property {boolean} has_previous
1328
- * @property {string} type
1300
+ * @property {number} current - The current page number being viewed.
1301
+ * @property {number} total - The total number of records available across all pages.
1302
+ * @property {boolean} has_next - Indicates whether there is a next page available.
1303
+ * @property {number} size - The size of the current page's results set.
1304
+ * @property {boolean} has_previous - Indicates whether there is a previous page
1305
+ * available.
1306
+ * @property {string} type - Indicates whether there is a previous page available.
1329
1307
  */
1330
1308
 
1331
1309
  /**
1332
1310
  * @typedef ManifestItemDetails
1333
- * @property {number} [quantity]
1334
- * @property {string} shipment_id
1335
- * @property {string} order_id
1336
- * @property {string} [awb_number]
1337
- * @property {string} [invoice_id]
1338
- * @property {string} [shipment_created_at]
1311
+ * @property {number} [quantity] - The quantity of items in the shipment.
1312
+ * @property {string} shipment_id - Unique identifier for the shipment.
1313
+ * @property {string} order_id - Unique identifier for the order.
1314
+ * @property {string} [awb_number] - Unique identifier for the shipment's air
1315
+ * waybill number.
1316
+ * @property {string} [invoice_id] - Unique identifier for the invoice
1317
+ * associated with the shipment.
1318
+ * @property {string} [shipment_created_at] - Timestamp indicating when the
1319
+ * shipment was created.
1339
1320
  */
1340
1321
 
1341
1322
  /**
1342
1323
  * @typedef ManifestShipmentListing
1343
- * @property {number} total_count
1344
- * @property {string} [lane]
1324
+ * @property {number} total_count - Total number of shipment items in the manifest.
1325
+ * @property {string} lane - Identifier or name for the lane associated with the
1326
+ * shipments.
1345
1327
  * @property {ManifestPageInfo} page
1346
- * @property {boolean} success
1347
- * @property {number} status
1348
- * @property {ManifestItemDetails[]} [items]
1349
- * @property {string} [message]
1328
+ * @property {boolean} success - Indicates whether the API call was successful
1329
+ * (true) or not (false).
1330
+ * @property {number} [status] - Represents the HTTP status code of the API response.
1331
+ * @property {ManifestItemDetails[]} items - List of items in the manifest, each
1332
+ * containing detailed shipment information.
1333
+ * @property {string} [message] - Additional message or information regarding
1334
+ * the response.
1350
1335
  */
1351
1336
 
1352
1337
  /**
1353
1338
  * @typedef DateRange
1354
- * @property {string} [from_date]
1355
- * @property {string} [to_date]
1339
+ * @property {string} [from_date] - The start date of the range.
1340
+ * @property {string} [to_date] - The end date of the range.
1356
1341
  */
1357
1342
 
1358
1343
  /**
1359
1344
  * @typedef Filters
1360
1345
  * @property {DateRange} [date_range]
1361
1346
  * @property {string} [logo] - CDN link of the logo displayed on the manifest page.
1362
- * @property {string} [from_date] - UTC start date in ISO format.
1363
- * @property {number} [stores] - Filter with the specific store.
1364
- * @property {string} [to_date] - UTC end date in ISO format.
1365
- * @property {string} [dp_name] - Filter with the specific courier partner name.
1347
+ * @property {string} [from_date] - The start date for filtering records,
1348
+ * provided in UTC and formatted in ISO format.
1349
+ * @property {number} [stores] - Specifies a specific store ID for filtering the records.
1350
+ * @property {string} [to_date] - The end date for filtering records, provided
1351
+ * in UTC and formatted in ISO format.
1352
+ * @property {string} [dp_name] - The name of the courier partner to filter records by.
1366
1353
  * @property {string} [dp_ids] - Combination of courier partner ids separated by
1367
- * byte operator.
1368
- * @property {string} [lane] - Criteria for lane on which shipments must be fetched.
1369
- * @property {string} [selected_shipments] - Selected shipments mapped to the manifest.
1370
- * @property {string} [store_name] - Filter with the specific store name.
1371
- * @property {string} [deselected_shipments] - Deselected shipments unmapped
1372
- * from the manifest.
1354
+ * comma operator.
1355
+ * @property {string} [lane] - Specifies criteria related to the shipment lanes.
1356
+ * @property {string} [selected_shipments] - A list of selected shipments that
1357
+ * are mapped to the manifest.
1358
+ * @property {string} [store_name] - The name of the store for filtering records.
1359
+ * @property {string} [deselected_shipments] - A list of shipments that have
1360
+ * been unmapped from the manifest.
1373
1361
  */
1374
1362
 
1375
1363
  /**
1376
1364
  * @typedef ManifestFile
1377
- * @property {string} [key]
1378
- * @property {string} [region]
1379
- * @property {string} [bucket]
1365
+ * @property {string} [key] - This field represents the unique identifier for
1366
+ * the file within the storage system.
1367
+ * @property {string} [region] - Indicates the geographical region where the
1368
+ * file is stored.
1369
+ * @property {string} [bucket] - The name of the storage bucket where the file is stored.
1380
1370
  */
1381
1371
 
1382
1372
  /**
1383
1373
  * @typedef ManifestMediaUpdate
1384
- * @property {string} [entity]
1385
- * @property {string} [link]
1386
- * @property {number} [code]
1387
- * @property {string} [media_type]
1388
- * @property {boolean} [status]
1374
+ * @property {string} [entity] - The name or type of the media entity being updated.
1375
+ * @property {string} [link] - A URL or link to the media resource.
1376
+ * @property {number} [code] - A numerical code representing the media update
1377
+ * status or type.
1378
+ * @property {string} [media_type] - The type of media being updated.
1379
+ * @property {boolean} [status] - Indicate the status of this media update.
1389
1380
  * @property {ManifestFile} [file]
1390
1381
  */
1391
1382
 
1392
1383
  /**
1393
- * @typedef PDFMeta
1394
- * @property {string} [consent]
1395
- * @property {ManifestMediaUpdate[]} [media_updates]
1396
- */
1397
-
1398
- /**
1399
- * @typedef TotalShipmentPricesCount
1400
- * @property {number} [total_price]
1401
- * @property {number} [shipment_count]
1402
- */
1403
-
1404
- /**
1405
- * @typedef ManifestMeta
1406
- * @property {Filters} [filters]
1407
- * @property {TotalShipmentPricesCount} [total_shipment_prices_count]
1408
- */
1409
-
1410
- /**
1411
- * @typedef Manifest
1412
- * @property {number} company_id
1413
- * @property {Filters} [filters]
1414
- * @property {PDFMeta} [pdf_meta]
1415
- * @property {ManifestMeta} [meta]
1416
- * @property {boolean} is_active
1417
- * @property {string} user_id
1418
- * @property {string} created_at
1419
- * @property {string} [created_ts]
1420
- * @property {string} manifest_id
1421
- * @property {string} status
1422
- * @property {number} id
1423
- * @property {string} uid
1424
- * @property {string} created_by
1425
- */
1426
-
1427
- /**
1428
- * @typedef ManifestList
1429
- * @property {Manifest[]} [items]
1430
- * @property {ManifestPageInfo} [page]
1384
+ * @typedef PDFMeta
1385
+ * @property {string} [consent] - This field contains information related to user consent.
1386
+ * @property {ManifestMediaUpdate[]} [media_updates] - An array of media update
1387
+ * entries associated with the manifest.
1431
1388
  */
1432
1389
 
1433
1390
  /**
1434
- * @typedef ManifestDetails
1435
- * @property {ManifestItemDetails[]} [items]
1436
- * @property {ManifestPageInfo} [page]
1437
- * @property {number} [additional_shipment_count]
1438
- * @property {Manifest[]} [manifest_details]
1391
+ * @typedef TotalShipmentPricesCount
1392
+ * @property {number} [total_price] - This field represents the total monetary
1393
+ * value of the shipments.
1394
+ * @property {number} [shipment_count] - This field represents the number of
1395
+ * shipments associated with the manifest.
1439
1396
  */
1440
1397
 
1441
1398
  /**
1442
- * @typedef FiltersRequest
1443
- * @property {DateRange} [date_range]
1444
- * @property {string} [logo]
1445
- * @property {number} stores
1446
- * @property {string} dp_name
1447
- * @property {number} dp_ids
1448
- * @property {string} lane
1449
- * @property {string} store_name
1399
+ * @typedef ManifestMeta
1400
+ * @property {Filters} [filters]
1401
+ * @property {TotalShipmentPricesCount} [total_shipment_prices_count]
1450
1402
  */
1451
1403
 
1452
1404
  /**
1453
- * @typedef ProcessManifest
1454
- * @property {FiltersRequest} filters
1455
- * @property {string} action
1456
- * @property {string} unique_id
1457
- * @property {string} [manifest_id]
1405
+ * @typedef Manifest
1406
+ * @property {number} company_id - Unique identifier of a company on the platform.
1407
+ * @property {Filters} [filters]
1408
+ * @property {PDFMeta} [pdf_meta]
1409
+ * @property {ManifestMeta} [meta]
1410
+ * @property {boolean} is_active - Indicates whether the manifest is currently
1411
+ * active or has been completed/closed.
1412
+ * @property {string} user_id - The unique identifier of the user who created or
1413
+ * modified the manifest.
1414
+ * @property {string} created_at - The date and time when the manifest was created.
1415
+ * @property {string} [created_ts] - A timestamp representing when the manifest
1416
+ * was created, typically in UTC.
1417
+ * @property {string} manifest_id - The unique identifier assigned to the manifest.
1418
+ * @property {string} status - The current status of the Manifest.
1419
+ * @property {number} id - The unique identifier assigned to the manifest item.
1420
+ * @property {string} uid - A universally unique identifier for the manifest.
1421
+ * @property {string} created_by - The username or identifier of the individual
1422
+ * who created the manifest.
1458
1423
  */
1459
1424
 
1460
1425
  /**
1461
- * @typedef ProcessManifestResponse
1462
- * @property {number} [company_id] - Id of the company.
1463
- * @property {Filters} [filters]
1464
- * @property {string} [user_id] - Id of the user.
1465
- * @property {string} [manifest_id] - Id of the manifest.
1466
- * @property {string} [action]
1467
- * @property {string} [uid]
1468
- * @property {string} [created_by]
1426
+ * @typedef ManifestList
1427
+ * @property {Manifest[]} [items] - A list of manifest records.
1428
+ * @property {ManifestPageInfo} [page]
1469
1429
  */
1470
1430
 
1471
1431
  /**
1472
- * @typedef ProcessManifestItemResponse
1473
- * @property {ProcessManifestResponse} [items]
1432
+ * @typedef ManifestDetails
1433
+ * @property {ManifestItemDetails[]} [items] - An list of detailed information
1434
+ * about individual shipments within the manifest.
1435
+ * @property {ManifestPageInfo} [page]
1436
+ * @property {number} [additional_shipment_count] - Represents the count of
1437
+ * additional shipments associated with the manifest.
1438
+ * @property {Manifest[]} [manifest_details] - An array of manifest objects that
1439
+ * provide overarching details about the manifest itself.
1474
1440
  */
1475
1441
 
1476
1442
  /**
1477
1443
  * @typedef FilterInfoOption
1478
- * @property {string} [text]
1479
- * @property {string} [name]
1480
- * @property {string} [placeholder_text]
1481
- * @property {string} [value]
1482
- * @property {number} [min_search_size]
1483
- * @property {boolean} [show_ui]
1444
+ * @property {string} [text] - The option value or text set for the filter option.
1445
+ * @property {string} [name] - The option name indicating the type of
1446
+ * information the filter relates to.
1447
+ * @property {string} [placeholder_text] - Represents the placeholder text that
1448
+ * might appear in a UI element.
1449
+ * @property {string} [value] - A unique value for the filter used in processing
1450
+ * filter selections.
1451
+ * @property {number} [min_search_size] - Indicates the minimum size for search
1452
+ * criteria, potentially related to how many items to display or filter.
1453
+ * @property {boolean} [show_ui] - Indicates whether this option should be
1454
+ * visible in the user interface.
1484
1455
  */
1485
1456
 
1486
1457
  /**
1487
1458
  * @typedef FiltersInfo
1488
1459
  * @property {FilterInfoOption[]} [options]
1489
- * @property {string} text
1490
- * @property {string} [placeholder_text]
1491
- * @property {string} value
1492
- * @property {boolean} [required]
1493
- * @property {string} type
1460
+ * @property {string} text - The label or name for the filter, which indicates
1461
+ * what the filter is related to.
1462
+ * @property {string} [placeholder_text] - A placeholder text that provides
1463
+ * guidance on how to use the filter.
1464
+ * @property {string} value - A unique identifier for the filter, used for
1465
+ * processing filter selections.
1466
+ * @property {boolean} [required] - Indicates whether the filter is mandatory to
1467
+ * fill out when applying the filter set.
1468
+ * @property {string} type - Specifies the type of filter.
1494
1469
  */
1495
1470
 
1496
1471
  /**
@@ -1584,22 +1559,28 @@ const Joi = require("joi");
1584
1559
 
1585
1560
  /**
1586
1561
  * @typedef CourierPartnerTrackingDetails
1587
- * @property {string} awb - AWB Number
1588
- * @property {string} [dp_location] - Current location of Courier partner
1589
- * @property {string} dp_name - Courier Partner name
1590
- * @property {string} dp_status - Status at Courier partner end
1591
- * @property {string} dp_status_updated_at - Date Time at which status was
1592
- * updated at Courier partner
1593
- * @property {string} [estimated_delivery_date] - Estimated delivery date
1594
- * received from Courier partner
1595
- * @property {number} [id] - Id of Tracking history
1596
- * @property {string} journey - Journey type of the shipment
1597
- * @property {Object} [meta] - Meta field to store Courier partner's meta data
1598
- * @property {string} operational_status - Operational status of OMS
1599
- * @property {string} [promised_delivery_date] - Promised delivery date received
1600
- * from Courier partner
1601
- * @property {string} [remark] - Remark from courier partner
1602
- * @property {string} shipment_id - Shipment ID
1562
+ * @property {string} awb - The Air Waybill (AWB) number associated with the
1563
+ * shipment, used for tracking the parcel in transit.
1564
+ * @property {string} [dp_location] - The current geographic location of the
1565
+ * courier partner.
1566
+ * @property {string} dp_name - The name of the courier partner responsible for
1567
+ * the shipment.
1568
+ * @property {string} dp_status - The current status of the shipment as updated
1569
+ * by the courier partner.
1570
+ * @property {string} dp_status_updated_at - The timestamp when the status was
1571
+ * last updated by the courier partner.
1572
+ * @property {string} [estimated_delivery_date] - The estimated date and time
1573
+ * for delivery as provided by the courier partner.
1574
+ * @property {number} [id] - A unique identifier for the tracking history entry.
1575
+ * @property {string} journey - Indicates the type of journey the shipment.
1576
+ * @property {Object} [meta] - A field to store additional metadata related to
1577
+ * the courier partner's operations or the shipment.
1578
+ * @property {string} operational_status - The operational status of the shipment.
1579
+ * @property {string} [promised_delivery_date] - PThe promised date and time for
1580
+ * delivery as provided by the courier partner.
1581
+ * @property {string} [remark] - Any additional remarks or comments from the
1582
+ * courier partner regarding the shipment.
1583
+ * @property {string} shipment_id - The unique identifier for the shipment.
1603
1584
  */
1604
1585
 
1605
1586
  /**
@@ -1664,7 +1645,7 @@ const Joi = require("joi");
1664
1645
  */
1665
1646
 
1666
1647
  /**
1667
- * @typedef GenerateInvoiceIDRequest
1648
+ * @typedef GenerateInvoiceIDRequestSchema
1668
1649
  * @property {string[]} shipment_ids
1669
1650
  */
1670
1651
 
@@ -1685,31 +1666,35 @@ const Joi = require("joi");
1685
1666
 
1686
1667
  /**
1687
1668
  * @typedef ProcessManifestRequest
1688
- * @property {string} [action] - Expected Actions: [save, process,
1689
- * pdf_generated,invalidate,pdf_failed,complete]
1690
- * @property {string} [manifest_id] - Id of The Manifest.
1691
- * @property {Filters} [filters]
1692
- * @property {string} [unique_id] - Unique Id.
1669
+ * @property {string} action - Represents the operation to be performed on the manifest.
1670
+ * @property {string} [manifest_id] - Represents the identifier for a specific manifest.
1671
+ * @property {Filters} filters
1672
+ * @property {string} unique_id - A unique identifier for the request or the
1673
+ * operation being performed.
1693
1674
  */
1694
1675
 
1695
1676
  /**
1696
1677
  * @typedef ManifestItems
1697
1678
  * @property {Filters} [filters]
1698
- * @property {string} [manifest_id] - Id of the manifest.
1699
- * @property {string} [unique_id] - Unique Id.
1700
- * @property {number} [company_id] - Id of the company.
1701
- * @property {string} [dp_id] - Shipment with the specific courier partner Id.
1702
- * @property {string} [courier_partner_slug]
1703
- * @property {string} [action] - Expected Actions: [Save, Process, Pdf
1704
- * Generated, Invalidate, Pdf Failed, Complete]
1705
- * @property {string} [created_by] - Created date of the manifest.
1706
- * @property {string} [user_id] - Id of user.
1679
+ * @property {string} [manifest_id] - The unique identifier for the manifest.
1680
+ * @property {string} [unique_id] - A unique identifier for the request or
1681
+ * operation involving the manifest items.
1682
+ * @property {number} [company_id] - Unique identifier of a company on the platform.
1683
+ * @property {string} [dp_id] - Unique identifier of the delivery partner.
1684
+ * @property {string} [courier_partner_slug] - A slug or unique identifier for
1685
+ * the courier partner.
1686
+ * @property {string} [action] - Defines the expected action for the manifest items.
1687
+ * @property {string} [created_by] - The identifier for the user or system that
1688
+ * created the manifest.
1689
+ * @property {string} [user_id] - The identifier for the user associated with
1690
+ * the manifest items.
1707
1691
  */
1708
1692
 
1709
1693
  /**
1710
1694
  * @typedef ManifestErrorResponse
1711
- * @property {boolean} [success] - Success State.
1712
- * @property {string} [error] - Error String.
1695
+ * @property {boolean} [success] - Indicates whether the API call was successful
1696
+ * (true) or not (false).
1697
+ * @property {string} [error] - Provides a descriptive error message.
1713
1698
  */
1714
1699
 
1715
1700
  /**
@@ -1927,6 +1912,19 @@ const Joi = require("joi");
1927
1912
  * @property {TransitionConfigData} [data]
1928
1913
  */
1929
1914
 
1915
+ /**
1916
+ * @typedef CommonErrorResponse
1917
+ * @property {number} [status] - The HTTP status code corresponding to the error.
1918
+ * @property {string} [message] - A message describing the error that occurred.
1919
+ */
1920
+
1921
+ /**
1922
+ * @typedef ExceptionErrorResponse
1923
+ * @property {string} [message] - A message describing the error that occurred.
1924
+ * @property {string} [exception] - The class path of the exception that was thrown.
1925
+ * @property {string} [stack_trace] - The stack trace from the server for the error.
1926
+ */
1927
+
1930
1928
  /**
1931
1929
  * @typedef Page
1932
1930
  * @property {number} [item_total] - The total number of items on the page.
@@ -2626,6 +2624,11 @@ const Joi = require("joi");
2626
2624
  * @property {string} [po_invoice]
2627
2625
  */
2628
2626
 
2627
+ /**
2628
+ * @typedef AffiliateConfig
2629
+ * @property {number} [app_company_id]
2630
+ */
2631
+
2629
2632
  /**
2630
2633
  * @typedef AffiliateDetails
2631
2634
  * @property {ShipmentMeta} shipment_meta
@@ -3279,6 +3282,14 @@ const Joi = require("joi");
3279
3282
  * @property {string} [label_url]
3280
3283
  */
3281
3284
 
3285
+ /**
3286
+ * @typedef ShipmentDetails
3287
+ * @property {string} [dp_id]
3288
+ * @property {Object} [dp_options]
3289
+ * @property {boolean} [lock_status]
3290
+ * @property {Object} [action_to_status]
3291
+ */
3292
+
3282
3293
  /**
3283
3294
  * @typedef UserDetails
3284
3295
  * @property {string} [user_oid]
@@ -3310,7 +3321,7 @@ const Joi = require("joi");
3310
3321
  * @property {Article} [article]
3311
3322
  * @property {ArticleStatusDetails} [article_details]
3312
3323
  * @property {BagStatusHistory[]} [bag_status]
3313
- * @property {BagStatusHistory} [bag_status_history]
3324
+ * @property {BagStatusHistory[]} [bag_status_history]
3314
3325
  * @property {Brand} [brand]
3315
3326
  * @property {Company} [company]
3316
3327
  * @property {BagStatusHistory} [current_operational_status]
@@ -3436,6 +3447,12 @@ const Joi = require("joi");
3436
3447
  * @property {boolean} [success]
3437
3448
  */
3438
3449
 
3450
+ /**
3451
+ * @typedef BulkFailedResponse
3452
+ * @property {boolean} [status]
3453
+ * @property {string} [error]
3454
+ */
3455
+
3439
3456
  class OrderPlatformModel {
3440
3457
  /** @returns {InvalidateShipmentCachePayload} */
3441
3458
  static InvalidateShipmentCachePayload() {
@@ -3465,6 +3482,14 @@ class OrderPlatformModel {
3465
3482
  });
3466
3483
  }
3467
3484
 
3485
+ /** @returns {UpdatePackingErrorResponse} */
3486
+ static UpdatePackingErrorResponse() {
3487
+ return Joi.object({
3488
+ status: Joi.number().allow(null),
3489
+ error: Joi.string().allow("").allow(null),
3490
+ });
3491
+ }
3492
+
3468
3493
  /** @returns {ErrorResponse} */
3469
3494
  static ErrorResponse() {
3470
3495
  return Joi.object({
@@ -3500,8 +3525,8 @@ class OrderPlatformModel {
3500
3525
  });
3501
3526
  }
3502
3527
 
3503
- /** @returns {Entities} */
3504
- static Entities() {
3528
+ /** @returns {LockManagerEntities} */
3529
+ static LockManagerEntities() {
3505
3530
  return Joi.object({
3506
3531
  id: Joi.string().allow(""),
3507
3532
  affiliate_order_id: Joi.string().allow(""),
@@ -3518,7 +3543,9 @@ class OrderPlatformModel {
3518
3543
  entity_type: Joi.string().allow("").required(),
3519
3544
  action: Joi.string().allow("").required(),
3520
3545
  action_type: Joi.string().allow("").required(),
3521
- entities: Joi.array().items(OrderPlatformModel.Entities()).required(),
3546
+ entities: Joi.array()
3547
+ .items(OrderPlatformModel.LockManagerEntities())
3548
+ .required(),
3522
3549
  resume_tasks_after_unlock: Joi.boolean().allow(null),
3523
3550
  lock_after_transition: Joi.boolean(),
3524
3551
  unlock_before_transition: Joi.boolean(),
@@ -3590,7 +3617,7 @@ class OrderPlatformModel {
3590
3617
  OrderPlatformModel.AnnouncementResponse()
3591
3618
  ),
3592
3619
  success: Joi.boolean(),
3593
- message: Joi.string().allow(""),
3620
+ status: Joi.number(),
3594
3621
  });
3595
3622
  }
3596
3623
 
@@ -3602,14 +3629,6 @@ class OrderPlatformModel {
3602
3629
  });
3603
3630
  }
3604
3631
 
3605
- /** @returns {Click2CallResponse} */
3606
- static Click2CallResponse() {
3607
- return Joi.object({
3608
- call_id: Joi.string().allow("").required(),
3609
- success: Joi.boolean().required(),
3610
- });
3611
- }
3612
-
3613
3632
  /** @returns {ErrorDetail} */
3614
3633
  static ErrorDetail() {
3615
3634
  return Joi.object({
@@ -3709,341 +3728,74 @@ class OrderPlatformModel {
3709
3728
  });
3710
3729
  }
3711
3730
 
3712
- /** @returns {DataUpdates} */
3713
- static DataUpdates() {
3714
- return Joi.object({
3715
- order_item_status: Joi.array().items(
3716
- OrderPlatformModel.OrderItemDataUpdates()
3717
- ),
3718
- products: Joi.array().items(OrderPlatformModel.ProductsDataUpdates()),
3719
- entities: Joi.array().items(OrderPlatformModel.EntitiesDataUpdates()),
3720
- });
3721
- }
3722
-
3723
- /** @returns {ShipmentsRequest} */
3724
- static ShipmentsRequest() {
3725
- return Joi.object({
3726
- identifier: Joi.string().allow("").required(),
3727
- reasons: OrderPlatformModel.ReasonsData(),
3728
- products: Joi.array().items(OrderPlatformModel.Products()),
3729
- data_updates: OrderPlatformModel.DataUpdates(),
3730
- });
3731
- }
3732
-
3733
- /** @returns {StatuesRequest} */
3734
- static StatuesRequest() {
3735
- return Joi.object({
3736
- status: Joi.string().allow(""),
3737
- shipments: Joi.array().items(OrderPlatformModel.ShipmentsRequest()),
3738
- exclude_bags_next_state: Joi.string().allow(""),
3739
- split_shipment: Joi.boolean(),
3740
- });
3741
- }
3742
-
3743
- /** @returns {UpdateShipmentStatusRequest} */
3744
- static UpdateShipmentStatusRequest() {
3745
- return Joi.object({
3746
- force_transition: Joi.boolean(),
3747
- statuses: Joi.array().items(OrderPlatformModel.StatuesRequest()),
3748
- lock_after_transition: Joi.boolean(),
3749
- unlock_before_transition: Joi.boolean(),
3750
- task: Joi.boolean(),
3751
- resume_tasks_after_unlock: Joi.boolean(),
3752
- });
3753
- }
3754
-
3755
- /** @returns {ShipmentsResponse} */
3756
- static ShipmentsResponse() {
3757
- return Joi.object({
3758
- status: Joi.number().allow(null),
3759
- final_state: Joi.any().allow(null),
3760
- identifier: Joi.string().allow("").allow(null),
3761
- stack_trace: Joi.string().allow("").allow(null),
3762
- code: Joi.string().allow("").allow(null),
3763
- meta: Joi.any().allow(null),
3764
- message: Joi.string().allow("").allow(null),
3765
- exception: Joi.string().allow("").allow(null),
3766
- });
3767
- }
3768
-
3769
- /** @returns {StatuesResponse} */
3770
- static StatuesResponse() {
3771
- return Joi.object({
3772
- shipments: Joi.array().items(OrderPlatformModel.ShipmentsResponse()),
3773
- });
3774
- }
3775
-
3776
- /** @returns {UpdateShipmentStatusResponseBody} */
3777
- static UpdateShipmentStatusResponseBody() {
3778
- return Joi.object({
3779
- statuses: Joi.array().items(OrderPlatformModel.StatuesResponse()),
3780
- });
3781
- }
3782
-
3783
- /** @returns {OrderUser} */
3784
- static OrderUser() {
3785
- return Joi.object({
3786
- phone: Joi.number().required(),
3787
- last_name: Joi.string().allow("").required(),
3788
- address1: Joi.string().allow("").allow(null),
3789
- state: Joi.string().allow("").required(),
3790
- pincode: Joi.string().allow("").required(),
3791
- first_name: Joi.string().allow("").required(),
3792
- mobile: Joi.number().required(),
3793
- address2: Joi.string().allow("").allow(null),
3794
- email: Joi.string().allow("").required(),
3795
- country: Joi.string().allow("").required(),
3796
- city: Joi.string().allow("").required(),
3797
- });
3798
- }
3799
-
3800
- /** @returns {OrderPriority} */
3801
- static OrderPriority() {
3802
- return Joi.object({
3803
- fulfilment_priority_text: Joi.string().allow(""),
3804
- affiliate_priority_code: Joi.string().allow("").allow(null),
3805
- fulfilment_priority: Joi.number().allow(null),
3806
- });
3807
- }
3808
-
3809
- /** @returns {ArticleDetails} */
3810
- static ArticleDetails() {
3811
- return Joi.object({
3812
- _id: Joi.string().allow("").required(),
3813
- brand_id: Joi.number().required(),
3814
- dimension: Joi.any().required(),
3815
- category: Joi.any().required(),
3816
- weight: Joi.any().required(),
3817
- attributes: Joi.any().required(),
3818
- quantity: Joi.number().required(),
3819
- });
3820
- }
3821
-
3822
- /** @returns {LocationDetails} */
3823
- static LocationDetails() {
3824
- return Joi.object({
3825
- fulfillment_type: Joi.string().allow("").required(),
3826
- articles: Joi.array()
3827
- .items(OrderPlatformModel.ArticleDetails())
3828
- .required(),
3829
- fulfillment_id: Joi.number().required(),
3830
- });
3831
- }
3832
-
3833
- /** @returns {ShipmentDetails} */
3834
- static ShipmentDetails() {
3835
- return Joi.object({
3836
- box_type: Joi.string().allow("").allow(null),
3837
- shipments: Joi.number().required(),
3838
- fulfillment_id: Joi.number().required(),
3839
- articles: Joi.array()
3840
- .items(OrderPlatformModel.ArticleDetails())
3841
- .required(),
3842
- dp_id: Joi.string().allow("").allow(null),
3843
- meta: Joi.any(),
3844
- affiliate_shipment_id: Joi.string().allow("").required(),
3845
- dp_options: Joi.any().allow(null),
3846
- lock_status: Joi.boolean().allow(null),
3847
- action_to_status: Joi.any().allow(null),
3848
- }).allow(null);
3849
- }
3850
-
3851
- /** @returns {ShipmentConfig} */
3852
- static ShipmentConfig() {
3853
- return Joi.object({
3854
- location_details: OrderPlatformModel.LocationDetails(),
3855
- source: Joi.string().allow("").required(),
3856
- to_pincode: Joi.string().allow("").required(),
3857
- shipment: Joi.array()
3858
- .items(OrderPlatformModel.ShipmentDetails())
3859
- .required(),
3860
- identifier: Joi.string().allow("").required(),
3861
- payment_mode: Joi.string().allow("").required(),
3862
- action: Joi.string().allow("").required(),
3863
- journey: Joi.string().allow("").required(),
3864
- });
3865
- }
3866
-
3867
- /** @returns {ShipmentData} */
3868
- static ShipmentData() {
3869
- return Joi.object({
3870
- shipment_data: OrderPlatformModel.ShipmentConfig().required(),
3871
- });
3872
- }
3873
-
3874
- /** @returns {MarketPlacePdf} */
3875
- static MarketPlacePdf() {
3876
- return Joi.object({
3877
- invoice: Joi.string().allow("").allow(null),
3878
- label: Joi.string().allow("").allow(null),
3879
- });
3880
- }
3881
-
3882
- /** @returns {AffiliateBag} */
3883
- static AffiliateBag() {
3884
- return Joi.object({
3885
- pdf_links: OrderPlatformModel.MarketPlacePdf(),
3886
- store_id: Joi.number().required(),
3887
- sku: Joi.string().allow("").required(),
3888
- discount: Joi.number().required(),
3889
- unit_price: Joi.number().required(),
3890
- price_effective: Joi.number().required(),
3891
- affiliate_store_id: Joi.string().allow("").required(),
3892
- identifier: Joi.any().required(),
3893
- seller_identifier: Joi.string().allow("").required(),
3894
- item_size: Joi.string().allow("").required(),
3895
- amount_paid: Joi.number().required(),
3896
- fynd_store_id: Joi.string().allow("").required(),
3897
- item_id: Joi.number().required(),
3898
- delivery_charge: Joi.number().required(),
3899
- avl_qty: Joi.number().required(),
3900
- price_marked: Joi.number().required(),
3901
- quantity: Joi.number().required(),
3902
- company_id: Joi.number().required(),
3903
- hsn_code_id: Joi.string().allow("").required(),
3904
- _id: Joi.string().allow("").required(),
3905
- affiliate_meta: Joi.any().required(),
3906
- modified_on: Joi.string().allow("").required(),
3907
- transfer_price: Joi.number().required(),
3908
- });
3909
- }
3910
-
3911
- /** @returns {UserData} */
3912
- static UserData() {
3913
- return Joi.object({
3914
- shipping_user: OrderPlatformModel.OrderUser(),
3915
- billing_user: OrderPlatformModel.OrderUser(),
3916
- });
3917
- }
3918
-
3919
- /** @returns {OrderInfo} */
3920
- static OrderInfo() {
3921
- return Joi.object({
3922
- affiliate_order_id: Joi.string().allow(""),
3923
- cod_charges: Joi.number().required(),
3924
- items: Joi.any().required(),
3925
- discount: Joi.number().required(),
3926
- billing_address: OrderPlatformModel.OrderUser().required(),
3927
- payment: Joi.any(),
3928
- order_priority: OrderPlatformModel.OrderPriority(),
3929
- shipment: OrderPlatformModel.ShipmentData(),
3930
- delivery_charges: Joi.number().required(),
3931
- shipping_address: OrderPlatformModel.OrderUser().required(),
3932
- order_value: Joi.number().required(),
3933
- payment_mode: Joi.string().allow("").required(),
3934
- bags: Joi.array().items(OrderPlatformModel.AffiliateBag()).required(),
3935
- user: OrderPlatformModel.UserData().required(),
3936
- coupon: Joi.string().allow("").allow(null),
3937
- });
3938
- }
3939
-
3940
- /** @returns {AffiliateAppConfigMeta} */
3941
- static AffiliateAppConfigMeta() {
3942
- return Joi.object({
3943
- value: Joi.string().allow("").required(),
3944
- name: Joi.string().allow("").required(),
3945
- });
3946
- }
3947
-
3948
- /** @returns {AffiliateAppConfig} */
3949
- static AffiliateAppConfig() {
3950
- return Joi.object({
3951
- id: Joi.string().allow("").required(),
3952
- description: Joi.string().allow(""),
3953
- updated_at: Joi.string().allow("").required(),
3954
- name: Joi.string().allow("").required(),
3955
- token: Joi.string().allow("").required(),
3956
- meta: Joi.array().items(OrderPlatformModel.AffiliateAppConfigMeta()),
3957
- owner: Joi.string().allow("").required(),
3958
- secret: Joi.string().allow("").required(),
3959
- created_at: Joi.string().allow("").required(),
3960
- });
3961
- }
3962
-
3963
- /** @returns {AffiliateInventoryArticleAssignmentConfig} */
3964
- static AffiliateInventoryArticleAssignmentConfig() {
3965
- return Joi.object({
3966
- post_order_reassignment: Joi.boolean(),
3967
- });
3968
- }
3969
-
3970
- /** @returns {AffiliateInventoryPaymentConfig} */
3971
- static AffiliateInventoryPaymentConfig() {
3972
- return Joi.object({
3973
- source: Joi.string().allow(""),
3974
- mode_of_payment: Joi.string().allow(""),
3975
- });
3976
- }
3977
-
3978
- /** @returns {AffiliateInventoryStoreConfig} */
3979
- static AffiliateInventoryStoreConfig() {
3980
- return Joi.object({
3981
- store: Joi.any(),
3982
- });
3983
- }
3984
-
3985
- /** @returns {AffiliateInventoryOrderConfig} */
3986
- static AffiliateInventoryOrderConfig() {
3731
+ /** @returns {DataUpdates} */
3732
+ static DataUpdates() {
3987
3733
  return Joi.object({
3988
- force_reassignment: Joi.boolean(),
3734
+ order_item_status: Joi.array().items(
3735
+ OrderPlatformModel.OrderItemDataUpdates()
3736
+ ),
3737
+ products: Joi.array().items(OrderPlatformModel.ProductsDataUpdates()),
3738
+ entities: Joi.array().items(OrderPlatformModel.EntitiesDataUpdates()),
3989
3739
  });
3990
3740
  }
3991
3741
 
3992
- /** @returns {AffiliateInventoryLogisticsConfig} */
3993
- static AffiliateInventoryLogisticsConfig() {
3742
+ /** @returns {ShipmentsRequest} */
3743
+ static ShipmentsRequest() {
3994
3744
  return Joi.object({
3995
- dp_assignment: Joi.boolean(),
3745
+ identifier: Joi.string().allow("").required(),
3746
+ reasons: OrderPlatformModel.ReasonsData(),
3747
+ products: Joi.array().items(OrderPlatformModel.Products()),
3748
+ data_updates: OrderPlatformModel.DataUpdates(),
3996
3749
  });
3997
3750
  }
3998
3751
 
3999
- /** @returns {AffiliateInventoryConfig} */
4000
- static AffiliateInventoryConfig() {
3752
+ /** @returns {StatuesRequest} */
3753
+ static StatuesRequest() {
4001
3754
  return Joi.object({
4002
- article_assignment: OrderPlatformModel.AffiliateInventoryArticleAssignmentConfig(),
4003
- payment: OrderPlatformModel.AffiliateInventoryPaymentConfig(),
4004
- inventory: OrderPlatformModel.AffiliateInventoryStoreConfig(),
4005
- order: OrderPlatformModel.AffiliateInventoryOrderConfig(),
4006
- logistics: OrderPlatformModel.AffiliateInventoryLogisticsConfig(),
3755
+ status: Joi.string().allow(""),
3756
+ shipments: Joi.array().items(OrderPlatformModel.ShipmentsRequest()),
3757
+ exclude_bags_next_state: Joi.string().allow(""),
3758
+ split_shipment: Joi.boolean(),
4007
3759
  });
4008
3760
  }
4009
3761
 
4010
- /** @returns {AffiliateConfig} */
4011
- static AffiliateConfig() {
3762
+ /** @returns {UpdateShipmentStatusRequestSchema} */
3763
+ static UpdateShipmentStatusRequestSchema() {
4012
3764
  return Joi.object({
4013
- app: OrderPlatformModel.AffiliateAppConfig(),
4014
- inventory: OrderPlatformModel.AffiliateInventoryConfig(),
4015
- app_company_id: Joi.number().allow(null),
3765
+ force_transition: Joi.boolean(),
3766
+ statuses: Joi.array().items(OrderPlatformModel.StatuesRequest()),
3767
+ lock_after_transition: Joi.boolean(),
3768
+ unlock_before_transition: Joi.boolean(),
3769
+ task: Joi.boolean(),
3770
+ resume_tasks_after_unlock: Joi.boolean(),
4016
3771
  });
4017
3772
  }
4018
3773
 
4019
- /** @returns {Affiliate} */
4020
- static Affiliate() {
3774
+ /** @returns {ShipmentsResponse} */
3775
+ static ShipmentsResponse() {
4021
3776
  return Joi.object({
4022
- id: Joi.string().allow("").required(),
4023
- config: OrderPlatformModel.AffiliateConfig(),
4024
- token: Joi.string().allow("").required(),
3777
+ status: Joi.number().allow(null),
3778
+ final_state: Joi.any().allow(null),
3779
+ identifier: Joi.string().allow("").allow(null),
3780
+ stack_trace: Joi.string().allow("").allow(null),
3781
+ code: Joi.string().allow("").allow(null),
3782
+ meta: Joi.any().allow(null),
3783
+ message: Joi.string().allow("").allow(null),
3784
+ exception: Joi.string().allow("").allow(null),
4025
3785
  });
4026
3786
  }
4027
3787
 
4028
- /** @returns {AffiliateStoreIdMapping} */
4029
- static AffiliateStoreIdMapping() {
3788
+ /** @returns {StatuesResponse} */
3789
+ static StatuesResponse() {
4030
3790
  return Joi.object({
4031
- store_id: Joi.number().required(),
4032
- marketplace_store_id: Joi.string().allow("").required(),
3791
+ shipments: Joi.array().items(OrderPlatformModel.ShipmentsResponse()),
4033
3792
  });
4034
3793
  }
4035
3794
 
4036
- /** @returns {OrderConfig} */
4037
- static OrderConfig() {
3795
+ /** @returns {UpdateShipmentStatusResponseBody} */
3796
+ static UpdateShipmentStatusResponseBody() {
4038
3797
  return Joi.object({
4039
- create_user: Joi.boolean(),
4040
- article_lookup: Joi.string().allow(""),
4041
- bag_end_state: Joi.string().allow(""),
4042
- affiliate: OrderPlatformModel.Affiliate().required(),
4043
- store_lookup: Joi.string().allow(""),
4044
- affiliate_store_id_mapping: Joi.array()
4045
- .items(OrderPlatformModel.AffiliateStoreIdMapping())
4046
- .required(),
3798
+ statuses: Joi.array().items(OrderPlatformModel.StatuesResponse()),
4047
3799
  });
4048
3800
  }
4049
3801
 
@@ -4065,7 +3817,7 @@ class OrderPlatformModel {
4065
3817
  /** @returns {CreateOrderConfig} */
4066
3818
  static CreateOrderConfig() {
4067
3819
  return Joi.object({
4068
- dp_configuration: OrderPlatformModel.DPConfiguration(),
3820
+ dp_configuration: OrderPlatformModel.DPConfiguration().required(),
4069
3821
  integration_type: Joi.string().allow(""),
4070
3822
  location_reassignment: Joi.boolean(),
4071
3823
  payment: OrderPlatformModel.PaymentConfig(),
@@ -4073,15 +3825,6 @@ class OrderPlatformModel {
4073
3825
  });
4074
3826
  }
4075
3827
 
4076
- /** @returns {CreateOrderPayload} */
4077
- static CreateOrderPayload() {
4078
- return Joi.object({
4079
- affiliate_id: Joi.string().allow("").required(),
4080
- order_info: OrderPlatformModel.OrderInfo().required(),
4081
- order_config: OrderPlatformModel.OrderConfig().required(),
4082
- });
4083
- }
4084
-
4085
3828
  /** @returns {CreateOrderResponse} */
4086
3829
  static CreateOrderResponse() {
4087
3830
  return Joi.object({
@@ -4170,6 +3913,7 @@ class OrderPlatformModel {
4170
3913
  ticket_url: Joi.string().allow(""),
4171
3914
  l3_detail: Joi.string().allow(""),
4172
3915
  createdat: Joi.string().allow("").required(),
3916
+ created_ts: Joi.string().allow(""),
4173
3917
  ticket_id: Joi.string().allow(""),
4174
3918
  type: Joi.string().allow("").required(),
4175
3919
  l2_detail: Joi.string().allow(""),
@@ -4331,8 +4075,8 @@ class OrderPlatformModel {
4331
4075
  static Dimension() {
4332
4076
  return Joi.object({
4333
4077
  packaging_type: Joi.string().allow(""),
4334
- weight: Joi.string().allow(""),
4335
- height: Joi.string().allow(""),
4078
+ weight: Joi.number(),
4079
+ height: Joi.number(),
4336
4080
  length: Joi.number(),
4337
4081
  width: Joi.number(),
4338
4082
  });
@@ -4364,11 +4108,19 @@ class OrderPlatformModel {
4364
4108
  });
4365
4109
  }
4366
4110
 
4111
+ /** @returns {AmountSchema} */
4112
+ static AmountSchema() {
4113
+ return Joi.object({
4114
+ currency: Joi.string().allow(""),
4115
+ value: Joi.number(),
4116
+ });
4117
+ }
4118
+
4367
4119
  /** @returns {Charge} */
4368
4120
  static Charge() {
4369
4121
  return Joi.object({
4370
4122
  name: Joi.string().allow("").required(),
4371
- amount: Joi.any().required(),
4123
+ amount: OrderPlatformModel.AmountSchema().required(),
4372
4124
  tax: OrderPlatformModel.Tax(),
4373
4125
  code: Joi.string().allow(""),
4374
4126
  type: Joi.string().allow("").required(),
@@ -4439,6 +4191,14 @@ class OrderPlatformModel {
4439
4191
  });
4440
4192
  }
4441
4193
 
4194
+ /** @returns {GeoLocationSchema} */
4195
+ static GeoLocationSchema() {
4196
+ return Joi.object({
4197
+ latitude: Joi.number(),
4198
+ longitude: Joi.number(),
4199
+ });
4200
+ }
4201
+
4442
4202
  /** @returns {ShippingInfo} */
4443
4203
  static ShippingInfo() {
4444
4204
  return Joi.object({
@@ -4449,7 +4209,7 @@ class OrderPlatformModel {
4449
4209
  middle_name: Joi.string().allow(""),
4450
4210
  primary_mobile_number: Joi.string().allow(""),
4451
4211
  last_name: Joi.string().allow(""),
4452
- geo_location: Joi.any(),
4212
+ geo_location: OrderPlatformModel.GeoLocationSchema(),
4453
4213
  gender: Joi.string().allow(""),
4454
4214
  house_no: Joi.string().allow(""),
4455
4215
  first_name: Joi.string().allow(""),
@@ -4474,37 +4234,6 @@ class OrderPlatformModel {
4474
4234
  });
4475
4235
  }
4476
4236
 
4477
- /** @returns {BillingInfo} */
4478
- static BillingInfo() {
4479
- return Joi.object({
4480
- alternate_mobile_number: Joi.string().allow(""),
4481
- state: Joi.string().allow(""),
4482
- customer_code: Joi.string().allow(""),
4483
- middle_name: Joi.string().allow(""),
4484
- primary_mobile_number: Joi.string().allow(""),
4485
- last_name: Joi.string().allow(""),
4486
- gender: Joi.string().allow(""),
4487
- house_no: Joi.string().allow(""),
4488
- first_name: Joi.string().allow(""),
4489
- title: Joi.string().allow(""),
4490
- country: Joi.string().allow(""),
4491
- state_code: Joi.string().allow(""),
4492
- city: Joi.string().allow(""),
4493
- external_customer_code: Joi.string().allow(""),
4494
- floor_no: Joi.string().allow(""),
4495
- alternate_email: Joi.string().allow(""),
4496
- address: Joi.string().allow(""),
4497
- area: Joi.string().allow(""),
4498
- address1: Joi.string().allow(""),
4499
- pincode: Joi.string().allow(""),
4500
- primary_email: Joi.string().allow(""),
4501
- address2: Joi.string().allow(""),
4502
- landmark: Joi.string().allow(""),
4503
- country_code: Joi.string().allow(""),
4504
- country_iso_code: Joi.string().allow(""),
4505
- });
4506
- }
4507
-
4508
4237
  /** @returns {UserInfo} */
4509
4238
  static UserInfo() {
4510
4239
  return Joi.object({
@@ -4544,6 +4273,7 @@ class OrderPlatformModel {
4544
4273
  static PaymentInfo() {
4545
4274
  return Joi.object({
4546
4275
  primary_mode: Joi.string().allow("").required(),
4276
+ payment_mode: Joi.string().allow(""),
4547
4277
  payment_methods: Joi.array().items(OrderPlatformModel.PaymentMethod()),
4548
4278
  });
4549
4279
  }
@@ -4553,97 +4283,37 @@ class OrderPlatformModel {
4553
4283
  return Joi.object({
4554
4284
  shipments: Joi.array().items(OrderPlatformModel.Shipment()).required(),
4555
4285
  shipping_info: OrderPlatformModel.ShippingInfo().required(),
4556
- billing_info: OrderPlatformModel.BillingInfo().required(),
4286
+ billing_info: OrderPlatformModel.ShippingInfo().required(),
4557
4287
  currency_info: Joi.any(),
4558
4288
  external_order_id: Joi.string().allow(""),
4559
4289
  charges: Joi.array().items(OrderPlatformModel.Charge()),
4560
4290
  external_creation_date: Joi.string().allow(""),
4561
4291
  meta: Joi.any(),
4562
4292
  tax_info: OrderPlatformModel.TaxInfo(),
4563
- config: OrderPlatformModel.CreateOrderConfig(),
4293
+ config: OrderPlatformModel.CreateOrderConfig().required(),
4564
4294
  payment_info: OrderPlatformModel.PaymentInfo().required(),
4565
4295
  user_info: OrderPlatformModel.UserInfo(),
4566
4296
  ordering_store_id: Joi.number(),
4567
4297
  order_platform: Joi.string().allow(""),
4298
+ order_type: Joi.string().allow(""),
4299
+ fynd_order_id: Joi.string().allow(""),
4300
+ application_id: Joi.string().allow(""),
4301
+ external_shipment_id: Joi.string().allow(""),
4568
4302
  });
4569
4303
  }
4570
4304
 
4571
4305
  /** @returns {CreateOrderErrorReponse} */
4572
4306
  static CreateOrderErrorReponse() {
4573
4307
  return Joi.object({
4574
- request_id: Joi.string().allow("").allow(null),
4575
- status: Joi.number().required(),
4576
- info: Joi.any(),
4577
- stack_trace: Joi.string().allow("").allow(null),
4578
- code: Joi.string().allow("").allow(null),
4579
- meta: Joi.string().allow("").allow(null),
4580
- message: Joi.string().allow("").required(),
4581
- exception: Joi.string().allow("").allow(null),
4582
- });
4583
- }
4584
-
4585
- /** @returns {DpConfiguration} */
4586
- static DpConfiguration() {
4587
- return Joi.object({
4588
- shipping_by: Joi.string().allow(""),
4589
- });
4590
- }
4591
-
4592
- /** @returns {PaymentMethods} */
4593
- static PaymentMethods() {
4594
- return Joi.object({
4595
- collect_by: Joi.string().allow(""),
4596
- refund_by: Joi.string().allow(""),
4597
- mode: Joi.string().allow(""),
4598
- });
4599
- }
4600
-
4601
- /** @returns {CreateChannelPaymentInfo} */
4602
- static CreateChannelPaymentInfo() {
4603
- return Joi.object({
4604
- source: Joi.string().allow(""),
4605
- payment_methods: Joi.array().items(OrderPlatformModel.PaymentMethods()),
4606
- mode_of_payment: Joi.string().allow(""),
4607
- });
4608
- }
4609
-
4610
- /** @returns {CreateChannelConfig} */
4611
- static CreateChannelConfig() {
4612
- return Joi.object({
4613
- dp_configuration: OrderPlatformModel.DpConfiguration(),
4614
- shipment_assignment: Joi.string().allow(""),
4615
- location_reassignment: Joi.boolean(),
4616
- logo_url: Joi.any(),
4617
- payment_info: OrderPlatformModel.CreateChannelPaymentInfo(),
4618
- lock_states: Joi.array().items(Joi.string().allow("")),
4619
- });
4620
- }
4621
-
4622
- /** @returns {CreateChannelConfigData} */
4623
- static CreateChannelConfigData() {
4624
- return Joi.object({
4625
- config_data: OrderPlatformModel.CreateChannelConfig(),
4626
- });
4627
- }
4628
-
4629
- /** @returns {CreateChannelConifgErrorResponse} */
4630
- static CreateChannelConifgErrorResponse() {
4631
- return Joi.object({
4632
- error: Joi.string().allow(""),
4633
- });
4634
- }
4635
-
4636
- /** @returns {CreateChannelConfigResponse} */
4637
- static CreateChannelConfigResponse() {
4638
- return Joi.object({
4639
- is_inserted: Joi.boolean(),
4640
- is_upserted: Joi.boolean(),
4641
- acknowledged: Joi.boolean(),
4308
+ success: Joi.boolean(),
4309
+ errors: Joi.string().allow(""),
4310
+ status_code: Joi.number(),
4311
+ fynd_order_id: Joi.string().allow(""),
4642
4312
  });
4643
4313
  }
4644
4314
 
4645
- /** @returns {UploadConsent} */
4646
- static UploadConsent() {
4315
+ /** @returns {UploadManifestConsent} */
4316
+ static UploadManifestConsent() {
4647
4317
  return Joi.object({
4648
4318
  consent_url: Joi.string().allow("").required(),
4649
4319
  manifest_id: Joi.string().allow("").required(),
@@ -4661,7 +4331,8 @@ class OrderPlatformModel {
4661
4331
  static ResponseDetail() {
4662
4332
  return Joi.object({
4663
4333
  success: Joi.boolean(),
4664
- message: Joi.array().items(Joi.string().allow("")),
4334
+ message: Joi.string().allow(""),
4335
+ status: Joi.number(),
4665
4336
  });
4666
4337
  }
4667
4338
 
@@ -4669,6 +4340,9 @@ class OrderPlatformModel {
4669
4340
  static FyndOrderIdList() {
4670
4341
  return Joi.object({
4671
4342
  fynd_order_id: Joi.array().items(Joi.string().allow("")),
4343
+ start_date: Joi.string().allow(""),
4344
+ end_date: Joi.string().allow(""),
4345
+ mobile: Joi.number(),
4672
4346
  });
4673
4347
  }
4674
4348
 
@@ -4676,9 +4350,6 @@ class OrderPlatformModel {
4676
4350
  static OrderStatus() {
4677
4351
  return Joi.object({
4678
4352
  order_details: Joi.array().items(OrderPlatformModel.FyndOrderIdList()),
4679
- start_date: Joi.string().allow("").required(),
4680
- end_date: Joi.string().allow("").required(),
4681
- mobile: Joi.number().required(),
4682
4353
  });
4683
4354
  }
4684
4355
 
@@ -4698,39 +4369,13 @@ class OrderPlatformModel {
4698
4369
  });
4699
4370
  }
4700
4371
 
4701
- /** @returns {FetchCreditBalanceRequestPayload} */
4702
- static FetchCreditBalanceRequestPayload() {
4703
- return Joi.object({
4704
- affiliate_id: Joi.string().allow("").required(),
4705
- seller_id: Joi.string().allow("").required(),
4706
- customer_mobile_number: Joi.string().allow("").required(),
4707
- });
4708
- }
4709
-
4710
- /** @returns {CreditBalanceInfo} */
4711
- static CreditBalanceInfo() {
4712
- return Joi.object({
4713
- total_credited_balance: Joi.string().allow(""),
4714
- reason: Joi.string().allow(""),
4715
- customer_mobile_number: Joi.string().allow(""),
4716
- });
4717
- }
4718
-
4719
- /** @returns {FetchCreditBalanceResponsePayload} */
4720
- static FetchCreditBalanceResponsePayload() {
4721
- return Joi.object({
4722
- success: Joi.boolean().required(),
4723
- data: OrderPlatformModel.CreditBalanceInfo().required(),
4724
- });
4725
- }
4726
-
4727
4372
  /** @returns {RefundModeConfigRequestPayload} */
4728
4373
  static RefundModeConfigRequestPayload() {
4729
4374
  return Joi.object({
4730
4375
  fynd_order_id: Joi.string().allow("").required(),
4731
4376
  seller_id: Joi.number().required(),
4732
4377
  affiliate_id: Joi.string().allow("").required(),
4733
- customer_mobile_number: Joi.string().allow(""),
4378
+ customer_mobile_number: Joi.number(),
4734
4379
  });
4735
4380
  }
4736
4381
 
@@ -4744,6 +4389,13 @@ class OrderPlatformModel {
4744
4389
  });
4745
4390
  }
4746
4391
 
4392
+ /** @returns {RefundModeFormat} */
4393
+ static RefundModeFormat() {
4394
+ return Joi.object({
4395
+ refund_to: Joi.string().allow(""),
4396
+ });
4397
+ }
4398
+
4747
4399
  /** @returns {RefundModeInfo} */
4748
4400
  static RefundModeInfo() {
4749
4401
  return Joi.object({
@@ -4751,6 +4403,7 @@ class OrderPlatformModel {
4751
4403
  slug: Joi.string().allow(""),
4752
4404
  options: Joi.array().items(OrderPlatformModel.RefundOption()),
4753
4405
  display_name: Joi.string().allow(""),
4406
+ format: OrderPlatformModel.RefundModeFormat(),
4754
4407
  });
4755
4408
  }
4756
4409
 
@@ -4759,6 +4412,8 @@ class OrderPlatformModel {
4759
4412
  return Joi.object({
4760
4413
  success: Joi.boolean().required(),
4761
4414
  data: Joi.array().items(OrderPlatformModel.RefundModeInfo()).required(),
4415
+ status: Joi.number(),
4416
+ message: Joi.string().allow(""),
4762
4417
  });
4763
4418
  }
4764
4419
 
@@ -4799,7 +4454,7 @@ class OrderPlatformModel {
4799
4454
  /** @returns {SendUserMobileOTP} */
4800
4455
  static SendUserMobileOTP() {
4801
4456
  return Joi.object({
4802
- mobile: Joi.string().allow("").required(),
4457
+ mobile: Joi.number().required(),
4803
4458
  country_code: Joi.string().allow(""),
4804
4459
  });
4805
4460
  }
@@ -4818,6 +4473,7 @@ class OrderPlatformModel {
4818
4473
  static SendUserMobileOtpResponse() {
4819
4474
  return Joi.object({
4820
4475
  success: Joi.boolean(),
4476
+ status: Joi.number(),
4821
4477
  message: Joi.string().allow(""),
4822
4478
  data: OrderPlatformModel.PointBlankOtpData(),
4823
4479
  });
@@ -4865,7 +4521,7 @@ class OrderPlatformModel {
4865
4521
  return Joi.object({
4866
4522
  store_ids: Joi.array().items(Joi.string().allow("")),
4867
4523
  lane_type: Joi.string().allow(""),
4868
- custom_headers: Joi.string().allow(""),
4524
+ custom_headers: Joi.array().items(Joi.string().allow("")),
4869
4525
  report_type: Joi.string().allow(""),
4870
4526
  start_date: Joi.string().allow(""),
4871
4527
  end_date: Joi.string().allow(""),
@@ -4884,16 +4540,16 @@ class OrderPlatformModel {
4884
4540
  });
4885
4541
  }
4886
4542
 
4887
- /** @returns {BulkFailedResponse} */
4888
- static BulkFailedResponse() {
4543
+ /** @returns {APIFailedResponse} */
4544
+ static APIFailedResponse() {
4889
4545
  return Joi.object({
4890
4546
  status: Joi.boolean(),
4891
4547
  error: Joi.string().allow(""),
4892
4548
  });
4893
4549
  }
4894
4550
 
4895
- /** @returns {BulkStateTransistionRequest} */
4896
- static BulkStateTransistionRequest() {
4551
+ /** @returns {BulkStateTransistionRequestSchema} */
4552
+ static BulkStateTransistionRequestSchema() {
4897
4553
  return Joi.object({
4898
4554
  url: Joi.string().allow(""),
4899
4555
  file_name: Joi.string().allow(""),
@@ -4956,6 +4612,14 @@ class OrderPlatformModel {
4956
4612
  last_selected_invoice_label_type: Joi.string().allow(""),
4957
4613
  batch_id: Joi.string().allow(""),
4958
4614
  uploaded_by: Joi.string().allow(""),
4615
+ invoicelabel_document_type: Joi.string().allow(""),
4616
+ failed_sh_count: Joi.number(),
4617
+ successful_sh_count: Joi.number(),
4618
+ total_count: Joi.number(),
4619
+ failed_shipments: Joi.array().items(Joi.string().allow("")),
4620
+ successful_invoiced_count: Joi.number(),
4621
+ failed_invoiced_count: Joi.number(),
4622
+ total_invoiced_count: Joi.number(),
4959
4623
  });
4960
4624
  }
4961
4625
 
@@ -5049,11 +4713,13 @@ class OrderPlatformModel {
5049
4713
  static ManifestShipmentListing() {
5050
4714
  return Joi.object({
5051
4715
  total_count: Joi.number().required(),
5052
- lane: Joi.string().allow(""),
4716
+ lane: Joi.string().allow("").required(),
5053
4717
  page: OrderPlatformModel.ManifestPageInfo().required(),
5054
4718
  success: Joi.boolean().required(),
5055
- status: Joi.number().required(),
5056
- items: Joi.array().items(OrderPlatformModel.ManifestItemDetails()),
4719
+ status: Joi.number(),
4720
+ items: Joi.array()
4721
+ .items(OrderPlatformModel.ManifestItemDetails())
4722
+ .required(),
5057
4723
  message: Joi.string().allow(""),
5058
4724
  });
5059
4725
  }
@@ -5167,49 +4833,6 @@ class OrderPlatformModel {
5167
4833
  });
5168
4834
  }
5169
4835
 
5170
- /** @returns {FiltersRequest} */
5171
- static FiltersRequest() {
5172
- return Joi.object({
5173
- date_range: OrderPlatformModel.DateRange(),
5174
- logo: Joi.string().allow(""),
5175
- stores: Joi.number().required(),
5176
- dp_name: Joi.string().allow("").required(),
5177
- dp_ids: Joi.number().required(),
5178
- lane: Joi.string().allow("").required(),
5179
- store_name: Joi.string().allow("").required(),
5180
- });
5181
- }
5182
-
5183
- /** @returns {ProcessManifest} */
5184
- static ProcessManifest() {
5185
- return Joi.object({
5186
- filters: OrderPlatformModel.FiltersRequest().required(),
5187
- action: Joi.string().allow("").required(),
5188
- unique_id: Joi.string().allow("").required(),
5189
- manifest_id: Joi.string().allow(""),
5190
- });
5191
- }
5192
-
5193
- /** @returns {ProcessManifestResponse} */
5194
- static ProcessManifestResponse() {
5195
- return Joi.object({
5196
- company_id: Joi.number(),
5197
- filters: OrderPlatformModel.Filters(),
5198
- user_id: Joi.string().allow(""),
5199
- manifest_id: Joi.string().allow(""),
5200
- action: Joi.string().allow(""),
5201
- uid: Joi.string().allow(""),
5202
- created_by: Joi.string().allow(""),
5203
- });
5204
- }
5205
-
5206
- /** @returns {ProcessManifestItemResponse} */
5207
- static ProcessManifestItemResponse() {
5208
- return Joi.object({
5209
- items: OrderPlatformModel.ProcessManifestResponse(),
5210
- });
5211
- }
5212
-
5213
4836
  /** @returns {FilterInfoOption} */
5214
4837
  static FilterInfoOption() {
5215
4838
  return Joi.object({
@@ -5460,8 +5083,8 @@ class OrderPlatformModel {
5460
5083
  });
5461
5084
  }
5462
5085
 
5463
- /** @returns {GenerateInvoiceIDRequest} */
5464
- static GenerateInvoiceIDRequest() {
5086
+ /** @returns {GenerateInvoiceIDRequestSchema} */
5087
+ static GenerateInvoiceIDRequestSchema() {
5465
5088
  return Joi.object({
5466
5089
  shipment_ids: Joi.array().items(Joi.string().allow("")).required(),
5467
5090
  });
@@ -5495,10 +5118,10 @@ class OrderPlatformModel {
5495
5118
  /** @returns {ProcessManifestRequest} */
5496
5119
  static ProcessManifestRequest() {
5497
5120
  return Joi.object({
5498
- action: Joi.string().allow(""),
5121
+ action: Joi.string().allow("").required(),
5499
5122
  manifest_id: Joi.string().allow(""),
5500
- filters: OrderPlatformModel.Filters(),
5501
- unique_id: Joi.string().allow(""),
5123
+ filters: OrderPlatformModel.Filters().required(),
5124
+ unique_id: Joi.string().allow("").required(),
5502
5125
  });
5503
5126
  }
5504
5127
 
@@ -5655,6 +5278,23 @@ class OrderPlatformModel {
5655
5278
  });
5656
5279
  }
5657
5280
 
5281
+ /** @returns {CommonErrorResponse} */
5282
+ static CommonErrorResponse() {
5283
+ return Joi.object({
5284
+ status: Joi.number(),
5285
+ message: Joi.string().allow(""),
5286
+ });
5287
+ }
5288
+
5289
+ /** @returns {ExceptionErrorResponse} */
5290
+ static ExceptionErrorResponse() {
5291
+ return Joi.object({
5292
+ message: Joi.string().allow(""),
5293
+ exception: Joi.string().allow(""),
5294
+ stack_trace: Joi.string().allow(""),
5295
+ });
5296
+ }
5297
+
5658
5298
  /** @returns {Page} */
5659
5299
  static Page() {
5660
5300
  return Joi.object({
@@ -6464,6 +6104,13 @@ class OrderPlatformModel {
6464
6104
  });
6465
6105
  }
6466
6106
 
6107
+ /** @returns {AffiliateConfig} */
6108
+ static AffiliateConfig() {
6109
+ return Joi.object({
6110
+ app_company_id: Joi.number().allow(null),
6111
+ });
6112
+ }
6113
+
6467
6114
  /** @returns {AffiliateDetails} */
6468
6115
  static AffiliateDetails() {
6469
6116
  return Joi.object({
@@ -7257,6 +6904,16 @@ class OrderPlatformModel {
7257
6904
  }).allow(null);
7258
6905
  }
7259
6906
 
6907
+ /** @returns {ShipmentDetails} */
6908
+ static ShipmentDetails() {
6909
+ return Joi.object({
6910
+ dp_id: Joi.string().allow("").allow(null),
6911
+ dp_options: Joi.any().allow(null),
6912
+ lock_status: Joi.boolean().allow(null),
6913
+ action_to_status: Joi.any().allow(null),
6914
+ }).allow(null);
6915
+ }
6916
+
7260
6917
  /** @returns {UserDetails} */
7261
6918
  static UserDetails() {
7262
6919
  return Joi.object({
@@ -7293,7 +6950,9 @@ class OrderPlatformModel {
7293
6950
  article: OrderPlatformModel.Article(),
7294
6951
  article_details: OrderPlatformModel.ArticleStatusDetails(),
7295
6952
  bag_status: Joi.array().items(OrderPlatformModel.BagStatusHistory()),
7296
- bag_status_history: OrderPlatformModel.BagStatusHistory(),
6953
+ bag_status_history: Joi.array().items(
6954
+ OrderPlatformModel.BagStatusHistory()
6955
+ ),
7297
6956
  brand: OrderPlatformModel.Brand(),
7298
6957
  company: OrderPlatformModel.Company(),
7299
6958
  current_operational_status: OrderPlatformModel.BagStatusHistory(),
@@ -7441,5 +7100,13 @@ class OrderPlatformModel {
7441
7100
  success: Joi.boolean(),
7442
7101
  });
7443
7102
  }
7103
+
7104
+ /** @returns {BulkFailedResponse} */
7105
+ static BulkFailedResponse() {
7106
+ return Joi.object({
7107
+ status: Joi.boolean(),
7108
+ error: Joi.string().allow(""),
7109
+ });
7110
+ }
7444
7111
  }
7445
7112
  module.exports = OrderPlatformModel;