@gofynd/fdk-client-javascript 1.4.12 → 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.
- package/README.md +1 -1
- package/package.json +2 -2
- package/sdk/application/Content/ContentApplicationModel.d.ts +3 -2
- package/sdk/application/Content/ContentApplicationModel.js +5 -2
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +3 -2
- package/sdk/application/Theme/ThemeApplicationModel.js +5 -2
- package/sdk/common/Clickstream.js +12 -0
- package/sdk/common/Constant.d.ts +5 -0
- package/sdk/common/Constant.js +5 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +3 -2
- package/sdk/partner/Theme/ThemePartnerModel.js +5 -2
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +38 -35
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +42 -39
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +27 -23
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +14 -12
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +2 -2
- package/sdk/platform/Catalog/CatalogPlatformClient.js +2 -2
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1107 -232
- package/sdk/platform/Catalog/CatalogPlatformModel.js +466 -224
- package/sdk/platform/Content/ContentPlatformModel.d.ts +3 -2
- package/sdk/platform/Content/ContentPlatformModel.js +5 -2
- package/sdk/platform/Order/OrderPlatformClient.d.ts +5 -49
- package/sdk/platform/Order/OrderPlatformClient.js +32 -328
- package/sdk/platform/Order/OrderPlatformModel.d.ts +2638 -1394
- package/sdk/platform/Order/OrderPlatformModel.js +1068 -1387
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +142 -110
- package/sdk/platform/Order/OrderPlatformValidator.js +64 -91
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +3 -2
- package/sdk/platform/Theme/ThemePlatformModel.js +5 -2
|
@@ -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] -
|
|
27
|
-
* @property {boolean} [success] - Indicates whether the
|
|
28
|
-
*
|
|
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
|
-
*
|
|
40
|
-
* @property {string} [
|
|
41
|
-
*
|
|
42
|
-
* @property {string} [
|
|
43
|
-
*
|
|
44
|
-
* @property {
|
|
45
|
-
*
|
|
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
|
-
*
|
|
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
|
|
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] -
|
|
59
|
-
*
|
|
60
|
-
* @property {string} [affiliate_id] -
|
|
61
|
-
*
|
|
62
|
-
* @property {string} reason_text -
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
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 -
|
|
72
|
-
* @property {string} action -
|
|
73
|
-
* @property {string} action_type -
|
|
74
|
-
*
|
|
75
|
-
* @property {
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
* @property {boolean} [
|
|
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
|
-
*
|
|
115
|
-
* @property {
|
|
116
|
-
*
|
|
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
|
-
*
|
|
123
|
-
* @property {
|
|
124
|
-
* @property {string} [
|
|
125
|
-
*
|
|
126
|
-
* @property {string} [
|
|
127
|
-
*
|
|
128
|
-
* @property {
|
|
129
|
-
*
|
|
130
|
-
* @property {string} [
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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] -
|
|
161
|
-
*
|
|
162
|
-
* @property {string} [identifier] -
|
|
163
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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] -
|
|
199
|
-
*
|
|
200
|
-
* @property {string} [identifier] -
|
|
201
|
-
*
|
|
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] -
|
|
212
|
-
*
|
|
213
|
-
*
|
|
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] -
|
|
219
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
232
|
-
* @property {
|
|
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 -
|
|
283
|
+
* @property {string} identifier - Unique identifier for the shipment.
|
|
238
284
|
* @property {ReasonsData} [reasons]
|
|
239
|
-
* @property {Products[]} [products] -
|
|
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
|
-
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
*
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
* @
|
|
258
|
-
* @property {boolean} [
|
|
259
|
-
*
|
|
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}
|
|
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 -
|
|
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
|
-
*
|
|
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
|
-
*
|
|
554
|
-
* @property {
|
|
555
|
-
*
|
|
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
|
-
*
|
|
570
|
-
* @property {number} [
|
|
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
|
-
*
|
|
577
|
-
* @property {string} [
|
|
578
|
-
* @property {string} [
|
|
579
|
-
* @property {string} [
|
|
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
|
-
*
|
|
583
|
-
* @property {string} [
|
|
584
|
-
* @property {string} [
|
|
585
|
-
* @property {string} [
|
|
586
|
-
* @property {string} [
|
|
587
|
-
* @property {string} [
|
|
588
|
-
* @property {string} [
|
|
589
|
-
* @property {string} [
|
|
590
|
-
* @property {string} [
|
|
591
|
-
* @property {string} [
|
|
592
|
-
* @property {string} [
|
|
593
|
-
*
|
|
594
|
-
* @property {string} [
|
|
595
|
-
*
|
|
596
|
-
* @property {string} [
|
|
597
|
-
* @property {string} [
|
|
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] -
|
|
603
|
-
*
|
|
604
|
-
* @property {
|
|
605
|
-
* @property {string} [
|
|
606
|
-
* @property {string}
|
|
607
|
-
* @property {string}
|
|
608
|
-
* @property {string}
|
|
609
|
-
*
|
|
610
|
-
*
|
|
611
|
-
*
|
|
612
|
-
* @property {string}
|
|
613
|
-
* @property {
|
|
614
|
-
* @property {string} [
|
|
615
|
-
* @property {
|
|
616
|
-
* @property {string}
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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 -
|
|
652
|
-
*
|
|
653
|
-
* @property {number}
|
|
654
|
-
* @property {
|
|
655
|
-
*
|
|
656
|
-
* @property {string}
|
|
657
|
-
*
|
|
658
|
-
* @property {string} [
|
|
659
|
-
*
|
|
660
|
-
* @property {string}
|
|
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 -
|
|
666
|
-
*
|
|
667
|
-
* @property {
|
|
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,47 +578,67 @@ const Joi = require("joi");
|
|
|
704
578
|
|
|
705
579
|
/**
|
|
706
580
|
* @typedef Meta
|
|
707
|
-
* @property {number} [kafka_emission_status]
|
|
708
|
-
*
|
|
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
|
-
*
|
|
715
|
-
* @property {
|
|
716
|
-
* @property {number
|
|
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
|
-
*
|
|
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.
|
|
609
|
+
* @property {string} [text] - A label or description of the delivery status,
|
|
610
|
+
* such as 'Expected Delivery Date'.
|
|
611
|
+
* @property {string} [value] - The detailed delivery status or time
|
|
612
|
+
* information, such as 'Arriving on 24 Nov 2022 15:54:00'.
|
|
613
|
+
* @property {string} [color_code] - Hex code for the color representing the
|
|
614
|
+
* delivery status.
|
|
615
|
+
* @property {string} [expected_delivery_date] - The ISO 8601 formatted date and
|
|
616
|
+
* time when the delivery is expected, e.g., '2022-11-24T22:15:54+00:00'.
|
|
726
617
|
*/
|
|
727
618
|
|
|
728
619
|
/**
|
|
729
620
|
* @typedef OrderStatusResult
|
|
730
|
-
* @property {string} success
|
|
731
|
-
*
|
|
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.
|
|
732
625
|
*/
|
|
733
626
|
|
|
734
627
|
/**
|
|
735
628
|
* @typedef Dimension
|
|
736
|
-
* @property {string} [packaging_type]
|
|
737
|
-
* @property {
|
|
738
|
-
* @property {
|
|
739
|
-
* @property {number} [length]
|
|
740
|
-
* @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.
|
|
741
634
|
*/
|
|
742
635
|
|
|
743
636
|
/**
|
|
744
637
|
* @typedef UpdatePackagingDimensionsPayload
|
|
745
|
-
* @property {string} shipment_id
|
|
746
|
-
*
|
|
747
|
-
* @property {
|
|
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.
|
|
748
642
|
*/
|
|
749
643
|
|
|
750
644
|
/**
|
|
@@ -754,17 +648,26 @@ const Joi = require("joi");
|
|
|
754
648
|
|
|
755
649
|
/**
|
|
756
650
|
* @typedef Tax
|
|
757
|
-
* @property {string} name
|
|
758
|
-
*
|
|
759
|
-
* @property {
|
|
760
|
-
* @property {Object}
|
|
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.
|
|
761
665
|
*/
|
|
762
666
|
|
|
763
667
|
/**
|
|
764
668
|
* @typedef Charge
|
|
765
|
-
* @property {string} name - The name of the charge.
|
|
766
|
-
* @property {
|
|
767
|
-
* and currency details.
|
|
669
|
+
* @property {string} name - The name of the charge that indicates its purpose.
|
|
670
|
+
* @property {AmountSchema} amount
|
|
768
671
|
* @property {Tax} [tax]
|
|
769
672
|
* @property {string} [code] - An optional code associated with the charge for
|
|
770
673
|
* internal tracking.
|
|
@@ -773,42 +676,51 @@ const Joi = require("joi");
|
|
|
773
676
|
|
|
774
677
|
/**
|
|
775
678
|
* @typedef LineItem
|
|
776
|
-
* @property {Charge[]} [charges]
|
|
777
|
-
* @property {Object} [meta] -
|
|
778
|
-
*
|
|
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.
|
|
779
684
|
* @property {number} [quantity] - Quantity of the articles or line items.
|
|
780
|
-
* @property {string} seller_identifier -
|
|
685
|
+
* @property {string} seller_identifier - Unique identifier of the articles or
|
|
686
|
+
* line items set by seller.
|
|
781
687
|
* @property {string} [external_line_id] - External unique identifier of the
|
|
782
688
|
* articles or line items.
|
|
783
689
|
*/
|
|
784
690
|
|
|
785
691
|
/**
|
|
786
692
|
* @typedef ProcessingDates
|
|
787
|
-
* @property {Object} [dp_pickup_slot]
|
|
788
|
-
*
|
|
789
|
-
* @property {string} [
|
|
790
|
-
*
|
|
791
|
-
* @property {
|
|
792
|
-
*
|
|
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.
|
|
793
705
|
*/
|
|
794
706
|
|
|
795
707
|
/**
|
|
796
708
|
* @typedef Shipment
|
|
797
|
-
* @property {LineItem[]} line_items
|
|
709
|
+
* @property {LineItem[]} line_items - An array of LineItem objects that
|
|
710
|
+
* represent the items included in the shipment.
|
|
798
711
|
* @property {string} [external_shipment_id] - External shipment identifier or
|
|
799
712
|
* marketplace's unique shipment identifier.
|
|
800
713
|
* @property {ProcessingDates} [processing_dates]
|
|
801
|
-
* @property {Object} [meta] -
|
|
802
|
-
* @property {number} [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.
|
|
803
717
|
* @property {number} [location_id] - Location Identifier or Store/Fulfillment
|
|
804
718
|
* Identifier of the shipment- This field is mandatory when
|
|
805
719
|
* optimal_shipment_creation flag is set to false, indicating that shipments
|
|
806
720
|
* must be associated with a specific location. When
|
|
807
721
|
* `optimal_shipment_creation` is true, the optimal location for order
|
|
808
722
|
* creation would be assigned, location_id becomes optional.
|
|
809
|
-
* @property {string} [order_type] - The order type of shipment
|
|
810
|
-
* If the customer wants the order home-delivered PickAtStore - If the
|
|
811
|
-
* customer wants the handover of an order at the store itself.
|
|
723
|
+
* @property {string} [order_type] - The order type of shipment.
|
|
812
724
|
* @property {string} [parent_type]
|
|
813
725
|
* @property {string} [store_invoice_id]
|
|
814
726
|
* @property {string} [lock_status]
|
|
@@ -839,206 +751,191 @@ const Joi = require("joi");
|
|
|
839
751
|
*/
|
|
840
752
|
|
|
841
753
|
/**
|
|
842
|
-
* @typedef
|
|
843
|
-
* @property {
|
|
844
|
-
*
|
|
845
|
-
* @property {
|
|
846
|
-
*
|
|
847
|
-
* @property {string} [middle_name]
|
|
848
|
-
* @property {string} [primary_mobile_number]
|
|
849
|
-
* @property {string} [last_name]
|
|
850
|
-
* @property {Object} [geo_location]
|
|
851
|
-
* @property {string} [gender]
|
|
852
|
-
* @property {string} [house_no]
|
|
853
|
-
* @property {string} [first_name]
|
|
854
|
-
* @property {string} [title]
|
|
855
|
-
* @property {string} [landmark]
|
|
856
|
-
* @property {string} [country]
|
|
857
|
-
* @property {string} [address_type]
|
|
858
|
-
* @property {string} [state_code]
|
|
859
|
-
* @property {string} [city]
|
|
860
|
-
* @property {string} [external_customer_code]
|
|
861
|
-
* @property {string} [floor_no]
|
|
862
|
-
* @property {string} [alternate_email]
|
|
863
|
-
* @property {Object[]} [slot]
|
|
864
|
-
* @property {string} [address]
|
|
865
|
-
* @property {string} [area]
|
|
866
|
-
* @property {string} [address1]
|
|
867
|
-
* @property {string} [pincode]
|
|
868
|
-
* @property {string} [primary_email]
|
|
869
|
-
* @property {string} [address2]
|
|
870
|
-
* @property {string} [country_code]
|
|
871
|
-
* @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
|
|
872
759
|
*/
|
|
873
760
|
|
|
874
761
|
/**
|
|
875
|
-
* @typedef
|
|
876
|
-
* @property {string} [alternate_mobile_number]
|
|
877
|
-
*
|
|
878
|
-
* @property {string} [
|
|
879
|
-
*
|
|
880
|
-
* @property {string} [
|
|
881
|
-
*
|
|
882
|
-
* @property {string} [
|
|
883
|
-
* @property {string} [
|
|
884
|
-
* @property {string} [
|
|
885
|
-
*
|
|
886
|
-
* @property {string} [
|
|
887
|
-
* @property {
|
|
888
|
-
* @property {string} [
|
|
889
|
-
* @property {string} [
|
|
890
|
-
*
|
|
891
|
-
* @property {string} [
|
|
892
|
-
* @property {string} [
|
|
893
|
-
* @property {string} [
|
|
894
|
-
*
|
|
895
|
-
* @property {string} [
|
|
896
|
-
* @property {string} [
|
|
897
|
-
*
|
|
898
|
-
* @property {string} [
|
|
899
|
-
*
|
|
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.
|
|
900
806
|
* @property {string} [country_iso_code] - Country Code in ISO 2 format (e.g. US, IN)
|
|
901
807
|
*/
|
|
902
808
|
|
|
903
809
|
/**
|
|
904
810
|
* @typedef UserInfo
|
|
905
|
-
* @property {string} [user_id]
|
|
906
|
-
* @property {string} [user_type]
|
|
907
|
-
* @property {string} [primary_email]
|
|
908
|
-
*
|
|
909
|
-
* @property {string}
|
|
910
|
-
* @property {string}
|
|
911
|
-
* @property {string}
|
|
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.
|
|
912
820
|
*/
|
|
913
821
|
|
|
914
822
|
/**
|
|
915
823
|
* @typedef TaxInfo
|
|
916
|
-
* @property {string} [b2b_gstin_number]
|
|
917
|
-
*
|
|
918
|
-
*
|
|
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.
|
|
919
830
|
*/
|
|
920
831
|
|
|
921
832
|
/**
|
|
922
833
|
* @typedef PaymentMethod
|
|
923
|
-
* @property {string} collect_by
|
|
924
|
-
*
|
|
925
|
-
* @property {string}
|
|
926
|
-
* @property {string}
|
|
927
|
-
*
|
|
928
|
-
* @property {
|
|
929
|
-
* @property {
|
|
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.
|
|
930
846
|
*/
|
|
931
847
|
|
|
932
848
|
/**
|
|
933
849
|
* @typedef PaymentInfo
|
|
934
|
-
* @property {string} primary_mode
|
|
935
|
-
*
|
|
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.
|
|
936
856
|
*/
|
|
937
857
|
|
|
938
858
|
/**
|
|
939
859
|
* @typedef CreateOrderAPI
|
|
940
|
-
* @property {Shipment[]} shipments
|
|
860
|
+
* @property {Shipment[]} shipments - An array of shipment objects that detail
|
|
861
|
+
* the items being shipped as part of the order.
|
|
941
862
|
* @property {ShippingInfo} shipping_info
|
|
942
|
-
* @property {
|
|
943
|
-
* @property {Object} [currency_info]
|
|
944
|
-
*
|
|
945
|
-
*
|
|
946
|
-
* @property {string} [
|
|
947
|
-
*
|
|
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.
|
|
948
875
|
* @property {TaxInfo} [tax_info]
|
|
949
|
-
* @property {CreateOrderConfig}
|
|
876
|
+
* @property {CreateOrderConfig} config
|
|
950
877
|
* @property {PaymentInfo} payment_info
|
|
951
878
|
* @property {UserInfo} [user_info]
|
|
952
|
-
* @property {number} [ordering_store_id]
|
|
953
|
-
*
|
|
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.
|
|
954
889
|
*/
|
|
955
890
|
|
|
956
891
|
/**
|
|
957
892
|
* @typedef CreateOrderErrorReponse
|
|
958
|
-
* @property {
|
|
959
|
-
*
|
|
960
|
-
* @property {
|
|
961
|
-
* @property {
|
|
962
|
-
* @property {string} [
|
|
963
|
-
*
|
|
964
|
-
* @property {string} message
|
|
965
|
-
* @property {string} [exception]
|
|
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.
|
|
966
899
|
*/
|
|
967
900
|
|
|
968
901
|
/**
|
|
969
|
-
* @typedef
|
|
970
|
-
* @property {string}
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
/**
|
|
974
|
-
* @typedef PaymentMethods
|
|
975
|
-
* @property {string} [collect_by]
|
|
976
|
-
* @property {string} [refund_by]
|
|
977
|
-
* @property {string} [mode]
|
|
978
|
-
*/
|
|
979
|
-
|
|
980
|
-
/**
|
|
981
|
-
* @typedef CreateChannelPaymentInfo
|
|
982
|
-
* @property {string} [source]
|
|
983
|
-
* @property {PaymentMethods[]} [payment_methods]
|
|
984
|
-
* @property {string} [mode_of_payment]
|
|
985
|
-
*/
|
|
986
|
-
|
|
987
|
-
/**
|
|
988
|
-
* @typedef CreateChannelConfig
|
|
989
|
-
* @property {DpConfiguration} [dp_configuration]
|
|
990
|
-
* @property {string} [shipment_assignment]
|
|
991
|
-
* @property {boolean} [location_reassignment]
|
|
992
|
-
* @property {Object} [logo_url]
|
|
993
|
-
* @property {CreateChannelPaymentInfo} [payment_info]
|
|
994
|
-
* @property {string[]} [lock_states]
|
|
995
|
-
*/
|
|
996
|
-
|
|
997
|
-
/**
|
|
998
|
-
* @typedef CreateChannelConfigData
|
|
999
|
-
* @property {CreateChannelConfig} [config_data]
|
|
1000
|
-
*/
|
|
1001
|
-
|
|
1002
|
-
/**
|
|
1003
|
-
* @typedef CreateChannelConifgErrorResponse
|
|
1004
|
-
* @property {string} [error]
|
|
1005
|
-
*/
|
|
1006
|
-
|
|
1007
|
-
/**
|
|
1008
|
-
* @typedef CreateChannelConfigResponse
|
|
1009
|
-
* @property {boolean} [is_inserted]
|
|
1010
|
-
* @property {boolean} [is_upserted]
|
|
1011
|
-
* @property {boolean} [acknowledged]
|
|
1012
|
-
*/
|
|
1013
|
-
|
|
1014
|
-
/**
|
|
1015
|
-
* @typedef UploadConsent
|
|
1016
|
-
* @property {string} consent_url
|
|
1017
|
-
* @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.
|
|
1018
906
|
*/
|
|
1019
907
|
|
|
1020
908
|
/**
|
|
1021
909
|
* @typedef PlatformOrderUpdate
|
|
1022
|
-
* @property {string} order_id
|
|
910
|
+
* @property {string} order_id - A string that represents the unique identifier
|
|
911
|
+
* assigned to the order.
|
|
1023
912
|
*/
|
|
1024
913
|
|
|
1025
914
|
/**
|
|
1026
915
|
* @typedef ResponseDetail
|
|
1027
|
-
* @property {boolean} [success]
|
|
1028
|
-
*
|
|
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.
|
|
1029
921
|
*/
|
|
1030
922
|
|
|
1031
923
|
/**
|
|
1032
924
|
* @typedef FyndOrderIdList
|
|
1033
|
-
* @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.
|
|
1034
933
|
*/
|
|
1035
934
|
|
|
1036
935
|
/**
|
|
1037
936
|
* @typedef OrderStatus
|
|
1038
|
-
* @property {FyndOrderIdList[]} [order_details]
|
|
1039
|
-
*
|
|
1040
|
-
* @property {string} end_date
|
|
1041
|
-
* @property {number} mobile
|
|
937
|
+
* @property {FyndOrderIdList[]} [order_details] - An array of objects that
|
|
938
|
+
* provide details about the orders, including their respective order IDs.
|
|
1042
939
|
*/
|
|
1043
940
|
|
|
1044
941
|
/**
|
|
@@ -1049,174 +946,207 @@ const Joi = require("joi");
|
|
|
1049
946
|
|
|
1050
947
|
/**
|
|
1051
948
|
* @typedef RoleBaseStateTransitionMapping
|
|
1052
|
-
* @property {boolean} [success]
|
|
1053
|
-
*
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
/**
|
|
1057
|
-
* @typedef FetchCreditBalanceRequestPayload
|
|
1058
|
-
* @property {string} affiliate_id
|
|
1059
|
-
* @property {string} seller_id
|
|
1060
|
-
* @property {string} customer_mobile_number
|
|
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.
|
|
1061
953
|
*/
|
|
1062
954
|
|
|
1063
955
|
/**
|
|
1064
|
-
* @typedef
|
|
1065
|
-
* @property {string}
|
|
1066
|
-
*
|
|
1067
|
-
* @property {
|
|
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.
|
|
1068
965
|
*/
|
|
1069
966
|
|
|
1070
967
|
/**
|
|
1071
|
-
* @typedef
|
|
1072
|
-
* @property {
|
|
1073
|
-
* @property {
|
|
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.
|
|
1074
974
|
*/
|
|
1075
975
|
|
|
1076
976
|
/**
|
|
1077
|
-
* @typedef
|
|
1078
|
-
* @property {string}
|
|
1079
|
-
* @property {number} seller_id
|
|
1080
|
-
* @property {string} affiliate_id
|
|
1081
|
-
* @property {string} [customer_mobile_number]
|
|
1082
|
-
*/
|
|
1083
|
-
|
|
1084
|
-
/**
|
|
1085
|
-
* @typedef RefundOption
|
|
1086
|
-
* @property {string} [value]
|
|
1087
|
-
* @property {string} [slug]
|
|
1088
|
-
* @property {string} [name]
|
|
1089
|
-
* @property {string} [type]
|
|
977
|
+
* @typedef RefundModeFormat
|
|
978
|
+
* @property {string} [refund_to] - Specifies the destination or method for the refunds.
|
|
1090
979
|
*/
|
|
1091
980
|
|
|
1092
981
|
/**
|
|
1093
982
|
* @typedef RefundModeInfo
|
|
1094
|
-
* @property {boolean} [is_active]
|
|
1095
|
-
*
|
|
1096
|
-
* @property {
|
|
1097
|
-
* @property {
|
|
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]
|
|
1098
990
|
*/
|
|
1099
991
|
|
|
1100
992
|
/**
|
|
1101
993
|
* @typedef RefundModeConfigResponsePayload
|
|
1102
|
-
* @property {boolean} success
|
|
1103
|
-
*
|
|
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.
|
|
1104
1001
|
*/
|
|
1105
1002
|
|
|
1106
1003
|
/**
|
|
1107
1004
|
* @typedef AttachUserOtpData
|
|
1108
|
-
* @property {string} request_id
|
|
1005
|
+
* @property {string} request_id - A string representing a unique identifier for
|
|
1006
|
+
* the OTP request.
|
|
1109
1007
|
*/
|
|
1110
1008
|
|
|
1111
1009
|
/**
|
|
1112
1010
|
* @typedef AttachUserInfo
|
|
1113
|
-
* @property {string} first_name
|
|
1114
|
-
* @property {string} last_name
|
|
1115
|
-
* @property {string} mobile
|
|
1116
|
-
* @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.
|
|
1117
1015
|
*/
|
|
1118
1016
|
|
|
1119
1017
|
/**
|
|
1120
1018
|
* @typedef AttachOrderUser
|
|
1121
1019
|
* @property {AttachUserOtpData} otp_data
|
|
1122
|
-
* @property {string} fynd_order_id
|
|
1020
|
+
* @property {string} fynd_order_id - A unique identifier for the order
|
|
1021
|
+
* associated with the user attach.
|
|
1123
1022
|
* @property {AttachUserInfo} user_info
|
|
1124
1023
|
*/
|
|
1125
1024
|
|
|
1126
1025
|
/**
|
|
1127
1026
|
* @typedef AttachOrderUserResponse
|
|
1128
|
-
* @property {boolean} [success]
|
|
1129
|
-
*
|
|
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.
|
|
1130
1031
|
*/
|
|
1131
1032
|
|
|
1132
1033
|
/**
|
|
1133
1034
|
* @typedef SendUserMobileOTP
|
|
1134
|
-
* @property {
|
|
1135
|
-
*
|
|
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.
|
|
1136
1039
|
*/
|
|
1137
1040
|
|
|
1138
1041
|
/**
|
|
1139
1042
|
* @typedef PointBlankOtpData
|
|
1140
|
-
* @property {string} [request_id]
|
|
1141
|
-
* @property {number} [resend_timer]
|
|
1142
|
-
*
|
|
1143
|
-
* @property {
|
|
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.
|
|
1144
1050
|
*/
|
|
1145
1051
|
|
|
1146
1052
|
/**
|
|
1147
1053
|
* @typedef SendUserMobileOtpResponse
|
|
1148
|
-
* @property {boolean} [success]
|
|
1149
|
-
*
|
|
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.
|
|
1150
1060
|
* @property {PointBlankOtpData} [data]
|
|
1151
1061
|
*/
|
|
1152
1062
|
|
|
1153
1063
|
/**
|
|
1154
1064
|
* @typedef VerifyOtpData
|
|
1155
|
-
* @property {string} request_id
|
|
1156
|
-
* @property {string} mobile
|
|
1157
|
-
* @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.
|
|
1158
1068
|
*/
|
|
1159
1069
|
|
|
1160
1070
|
/**
|
|
1161
1071
|
* @typedef VerifyMobileOTP
|
|
1162
1072
|
* @property {VerifyOtpData} otp_data
|
|
1163
|
-
* @property {string} fynd_order_id
|
|
1073
|
+
* @property {string} fynd_order_id - A unique identifier for the order
|
|
1074
|
+
* associated with the OTP verification.
|
|
1164
1075
|
*/
|
|
1165
1076
|
|
|
1166
1077
|
/**
|
|
1167
1078
|
* @typedef VerifyOtpResponseData
|
|
1168
|
-
* @property {string} [mobile]
|
|
1169
|
-
* @property {string} [message]
|
|
1170
|
-
*
|
|
1171
|
-
* @property {string} [
|
|
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.
|
|
1172
1086
|
*/
|
|
1173
1087
|
|
|
1174
1088
|
/**
|
|
1175
1089
|
* @typedef VerifyOtpResponse
|
|
1176
|
-
* @property {number} [status]
|
|
1177
|
-
* @property {boolean} [success]
|
|
1178
|
-
*
|
|
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.
|
|
1179
1095
|
* @property {VerifyOtpResponseData} [data]
|
|
1180
1096
|
*/
|
|
1181
1097
|
|
|
1182
1098
|
/**
|
|
1183
1099
|
* @typedef BulkReportsDownloadRequest
|
|
1184
|
-
* @property {string[]} [store_ids] -
|
|
1185
|
-
*
|
|
1186
|
-
* @property {string} [
|
|
1187
|
-
*
|
|
1188
|
-
* @property {string} [
|
|
1189
|
-
*
|
|
1190
|
-
* @property {string
|
|
1191
|
-
*
|
|
1192
|
-
*
|
|
1193
|
-
* @property {
|
|
1194
|
-
*
|
|
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.
|
|
1195
1119
|
*/
|
|
1196
1120
|
|
|
1197
1121
|
/**
|
|
1198
1122
|
* @typedef BulkReportsDownloadResponse
|
|
1199
|
-
* @property {boolean} [success]
|
|
1200
|
-
*
|
|
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.
|
|
1201
1126
|
*/
|
|
1202
1127
|
|
|
1203
1128
|
/**
|
|
1204
|
-
* @typedef
|
|
1205
|
-
* @property {boolean} [status]
|
|
1206
|
-
*
|
|
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.
|
|
1207
1134
|
*/
|
|
1208
1135
|
|
|
1209
1136
|
/**
|
|
1210
|
-
* @typedef
|
|
1211
|
-
* @property {string} [url]
|
|
1212
|
-
*
|
|
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.
|
|
1213
1141
|
*/
|
|
1214
1142
|
|
|
1215
1143
|
/**
|
|
1216
1144
|
* @typedef BulkStateTransistionResponse
|
|
1217
|
-
* @property {boolean} [status]
|
|
1218
|
-
*
|
|
1219
|
-
* @property {string} [
|
|
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.
|
|
1220
1150
|
*/
|
|
1221
1151
|
|
|
1222
1152
|
/**
|
|
@@ -1234,163 +1164,235 @@ const Joi = require("joi");
|
|
|
1234
1164
|
|
|
1235
1165
|
/**
|
|
1236
1166
|
* @typedef BulkActionListingData
|
|
1237
|
-
* @property {number} [store_id]
|
|
1238
|
-
*
|
|
1239
|
-
* @property {
|
|
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.
|
|
1240
1172
|
* @property {ShipmentActionInfo} [shipments_action_info]
|
|
1241
|
-
* @property {boolean} [is_invoiceable]
|
|
1242
|
-
*
|
|
1243
|
-
* @property {string} [
|
|
1244
|
-
*
|
|
1245
|
-
* @property {string} [
|
|
1246
|
-
* @property {
|
|
1247
|
-
*
|
|
1248
|
-
* @property {string} [
|
|
1249
|
-
*
|
|
1250
|
-
* @property {
|
|
1251
|
-
*
|
|
1252
|
-
* @property {string} [
|
|
1253
|
-
*
|
|
1254
|
-
* @property {string} [
|
|
1255
|
-
*
|
|
1256
|
-
* @property {number} [
|
|
1257
|
-
*
|
|
1258
|
-
* @property {
|
|
1259
|
-
* @property {string} [
|
|
1260
|
-
*
|
|
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.
|
|
1261
1226
|
*/
|
|
1262
1227
|
|
|
1263
1228
|
/**
|
|
1264
1229
|
* @typedef BulkListinPage
|
|
1265
|
-
* @property {number} [current]
|
|
1266
|
-
*
|
|
1267
|
-
* @property {boolean} [
|
|
1268
|
-
*
|
|
1269
|
-
* @property {
|
|
1270
|
-
*
|
|
1271
|
-
* @property {number} [
|
|
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.
|
|
1272
1243
|
*/
|
|
1273
1244
|
|
|
1274
1245
|
/**
|
|
1275
1246
|
* @typedef BulkListingResponse
|
|
1276
|
-
* @property {boolean} [success]
|
|
1277
|
-
*
|
|
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.
|
|
1278
1251
|
* @property {BulkListinPage} [page]
|
|
1279
|
-
* @property {number} [total_count]
|
|
1252
|
+
* @property {number} [total_count] - Total number of bulk actions available in
|
|
1253
|
+
* the system, regardless of pagination.
|
|
1280
1254
|
*/
|
|
1281
1255
|
|
|
1282
1256
|
/**
|
|
1283
1257
|
* @typedef JobDetailsData
|
|
1284
|
-
* @property {string} [batch_id]
|
|
1285
|
-
*
|
|
1286
|
-
* @property {
|
|
1287
|
-
*
|
|
1288
|
-
* @property {
|
|
1289
|
-
*
|
|
1290
|
-
* @property {
|
|
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.
|
|
1291
1271
|
*/
|
|
1292
1272
|
|
|
1293
1273
|
/**
|
|
1294
1274
|
* @typedef JobDetailsResponse
|
|
1295
|
-
* @property {boolean} [success]
|
|
1296
|
-
*
|
|
1297
|
-
* @property {
|
|
1298
|
-
* @property {string} [
|
|
1299
|
-
* @property {
|
|
1300
|
-
*
|
|
1301
|
-
* @property {
|
|
1302
|
-
*
|
|
1303
|
-
* @property {string} [
|
|
1304
|
-
*
|
|
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.
|
|
1305
1290
|
*/
|
|
1306
1291
|
|
|
1307
1292
|
/**
|
|
1308
1293
|
* @typedef JobFailedResponse
|
|
1309
|
-
* @property {string} [file_name]
|
|
1310
|
-
* @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.
|
|
1311
1296
|
*/
|
|
1312
1297
|
|
|
1313
1298
|
/**
|
|
1314
1299
|
* @typedef ManifestPageInfo
|
|
1315
|
-
* @property {number} current
|
|
1316
|
-
* @property {number} total
|
|
1317
|
-
* @property {boolean} has_next
|
|
1318
|
-
* @property {number} size
|
|
1319
|
-
* @property {boolean} has_previous
|
|
1320
|
-
*
|
|
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.
|
|
1321
1307
|
*/
|
|
1322
1308
|
|
|
1323
1309
|
/**
|
|
1324
1310
|
* @typedef ManifestItemDetails
|
|
1325
|
-
* @property {number} [quantity]
|
|
1326
|
-
* @property {string} shipment_id
|
|
1327
|
-
* @property {string} order_id
|
|
1328
|
-
* @property {string} [awb_number]
|
|
1329
|
-
*
|
|
1330
|
-
* @property {string} [
|
|
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.
|
|
1331
1320
|
*/
|
|
1332
1321
|
|
|
1333
1322
|
/**
|
|
1334
1323
|
* @typedef ManifestShipmentListing
|
|
1335
|
-
* @property {number} total_count
|
|
1336
|
-
* @property {string}
|
|
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.
|
|
1337
1327
|
* @property {ManifestPageInfo} page
|
|
1338
|
-
* @property {boolean} success
|
|
1339
|
-
*
|
|
1340
|
-
* @property {
|
|
1341
|
-
* @property {
|
|
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.
|
|
1342
1335
|
*/
|
|
1343
1336
|
|
|
1344
1337
|
/**
|
|
1345
1338
|
* @typedef DateRange
|
|
1346
|
-
* @property {string} [from_date]
|
|
1347
|
-
* @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.
|
|
1348
1341
|
*/
|
|
1349
1342
|
|
|
1350
1343
|
/**
|
|
1351
1344
|
* @typedef Filters
|
|
1352
1345
|
* @property {DateRange} [date_range]
|
|
1353
1346
|
* @property {string} [logo] - CDN link of the logo displayed on the manifest page.
|
|
1354
|
-
* @property {string} [from_date] -
|
|
1355
|
-
*
|
|
1356
|
-
* @property {
|
|
1357
|
-
* @property {string} [
|
|
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.
|
|
1358
1353
|
* @property {string} [dp_ids] - Combination of courier partner ids separated by
|
|
1359
|
-
*
|
|
1360
|
-
* @property {string} [lane] -
|
|
1361
|
-
* @property {string} [selected_shipments] -
|
|
1362
|
-
*
|
|
1363
|
-
* @property {string} [
|
|
1364
|
-
*
|
|
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.
|
|
1365
1361
|
*/
|
|
1366
1362
|
|
|
1367
1363
|
/**
|
|
1368
1364
|
* @typedef ManifestFile
|
|
1369
|
-
* @property {string} [key]
|
|
1370
|
-
*
|
|
1371
|
-
* @property {string} [
|
|
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.
|
|
1372
1370
|
*/
|
|
1373
1371
|
|
|
1374
1372
|
/**
|
|
1375
1373
|
* @typedef ManifestMediaUpdate
|
|
1376
|
-
* @property {string} [entity]
|
|
1377
|
-
* @property {string} [link]
|
|
1378
|
-
* @property {number} [code]
|
|
1379
|
-
*
|
|
1380
|
-
* @property {
|
|
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.
|
|
1381
1380
|
* @property {ManifestFile} [file]
|
|
1382
1381
|
*/
|
|
1383
1382
|
|
|
1384
1383
|
/**
|
|
1385
1384
|
* @typedef PDFMeta
|
|
1386
|
-
* @property {string} [consent]
|
|
1387
|
-
* @property {ManifestMediaUpdate[]} [media_updates]
|
|
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.
|
|
1388
1388
|
*/
|
|
1389
1389
|
|
|
1390
1390
|
/**
|
|
1391
1391
|
* @typedef TotalShipmentPricesCount
|
|
1392
|
-
* @property {number} [total_price]
|
|
1393
|
-
*
|
|
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.
|
|
1394
1396
|
*/
|
|
1395
1397
|
|
|
1396
1398
|
/**
|
|
@@ -1401,88 +1403,69 @@ const Joi = require("joi");
|
|
|
1401
1403
|
|
|
1402
1404
|
/**
|
|
1403
1405
|
* @typedef Manifest
|
|
1404
|
-
* @property {number} company_id
|
|
1406
|
+
* @property {number} company_id - Unique identifier of a company on the platform.
|
|
1405
1407
|
* @property {Filters} [filters]
|
|
1406
1408
|
* @property {PDFMeta} [pdf_meta]
|
|
1407
1409
|
* @property {ManifestMeta} [meta]
|
|
1408
|
-
* @property {boolean} is_active
|
|
1409
|
-
*
|
|
1410
|
-
* @property {string}
|
|
1411
|
-
*
|
|
1412
|
-
* @property {string}
|
|
1413
|
-
* @property {string}
|
|
1414
|
-
*
|
|
1415
|
-
* @property {string}
|
|
1416
|
-
* @property {string}
|
|
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.
|
|
1417
1423
|
*/
|
|
1418
1424
|
|
|
1419
1425
|
/**
|
|
1420
1426
|
* @typedef ManifestList
|
|
1421
|
-
* @property {Manifest[]} [items]
|
|
1427
|
+
* @property {Manifest[]} [items] - A list of manifest records.
|
|
1422
1428
|
* @property {ManifestPageInfo} [page]
|
|
1423
1429
|
*/
|
|
1424
1430
|
|
|
1425
1431
|
/**
|
|
1426
1432
|
* @typedef ManifestDetails
|
|
1427
|
-
* @property {ManifestItemDetails[]} [items]
|
|
1433
|
+
* @property {ManifestItemDetails[]} [items] - An list of detailed information
|
|
1434
|
+
* about individual shipments within the manifest.
|
|
1428
1435
|
* @property {ManifestPageInfo} [page]
|
|
1429
|
-
* @property {number} [additional_shipment_count]
|
|
1430
|
-
*
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
/**
|
|
1434
|
-
* @typedef FiltersRequest
|
|
1435
|
-
* @property {DateRange} [date_range]
|
|
1436
|
-
* @property {string} [logo]
|
|
1437
|
-
* @property {number} stores
|
|
1438
|
-
* @property {string} dp_name
|
|
1439
|
-
* @property {number} dp_ids
|
|
1440
|
-
* @property {string} lane
|
|
1441
|
-
* @property {string} store_name
|
|
1442
|
-
*/
|
|
1443
|
-
|
|
1444
|
-
/**
|
|
1445
|
-
* @typedef ProcessManifest
|
|
1446
|
-
* @property {FiltersRequest} filters
|
|
1447
|
-
* @property {string} action
|
|
1448
|
-
* @property {string} unique_id
|
|
1449
|
-
* @property {string} [manifest_id]
|
|
1450
|
-
*/
|
|
1451
|
-
|
|
1452
|
-
/**
|
|
1453
|
-
* @typedef ProcessManifestResponse
|
|
1454
|
-
* @property {number} [company_id] - Id of the company.
|
|
1455
|
-
* @property {Filters} [filters]
|
|
1456
|
-
* @property {string} [user_id] - Id of the user.
|
|
1457
|
-
* @property {string} [manifest_id] - Id of the manifest.
|
|
1458
|
-
* @property {string} [action]
|
|
1459
|
-
* @property {string} [uid]
|
|
1460
|
-
* @property {string} [created_by]
|
|
1461
|
-
*/
|
|
1462
|
-
|
|
1463
|
-
/**
|
|
1464
|
-
* @typedef ProcessManifestItemResponse
|
|
1465
|
-
* @property {ProcessManifestResponse} [items]
|
|
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.
|
|
1466
1440
|
*/
|
|
1467
1441
|
|
|
1468
1442
|
/**
|
|
1469
1443
|
* @typedef FilterInfoOption
|
|
1470
|
-
* @property {string} [text]
|
|
1471
|
-
* @property {string} [name]
|
|
1472
|
-
*
|
|
1473
|
-
* @property {string} [
|
|
1474
|
-
*
|
|
1475
|
-
* @property {
|
|
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.
|
|
1476
1455
|
*/
|
|
1477
1456
|
|
|
1478
1457
|
/**
|
|
1479
1458
|
* @typedef FiltersInfo
|
|
1480
1459
|
* @property {FilterInfoOption[]} [options]
|
|
1481
|
-
* @property {string} text
|
|
1482
|
-
*
|
|
1483
|
-
* @property {string}
|
|
1484
|
-
*
|
|
1485
|
-
* @property {string}
|
|
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.
|
|
1486
1469
|
*/
|
|
1487
1470
|
|
|
1488
1471
|
/**
|
|
@@ -1576,22 +1559,28 @@ const Joi = require("joi");
|
|
|
1576
1559
|
|
|
1577
1560
|
/**
|
|
1578
1561
|
* @typedef CourierPartnerTrackingDetails
|
|
1579
|
-
* @property {string} awb - AWB
|
|
1580
|
-
*
|
|
1581
|
-
* @property {string}
|
|
1582
|
-
*
|
|
1583
|
-
* @property {string}
|
|
1584
|
-
*
|
|
1585
|
-
* @property {string}
|
|
1586
|
-
*
|
|
1587
|
-
* @property {
|
|
1588
|
-
*
|
|
1589
|
-
* @property {
|
|
1590
|
-
*
|
|
1591
|
-
* @property {
|
|
1592
|
-
*
|
|
1593
|
-
* @property {
|
|
1594
|
-
*
|
|
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.
|
|
1595
1584
|
*/
|
|
1596
1585
|
|
|
1597
1586
|
/**
|
|
@@ -1656,7 +1645,7 @@ const Joi = require("joi");
|
|
|
1656
1645
|
*/
|
|
1657
1646
|
|
|
1658
1647
|
/**
|
|
1659
|
-
* @typedef
|
|
1648
|
+
* @typedef GenerateInvoiceIDRequestSchema
|
|
1660
1649
|
* @property {string[]} shipment_ids
|
|
1661
1650
|
*/
|
|
1662
1651
|
|
|
@@ -1677,31 +1666,35 @@ const Joi = require("joi");
|
|
|
1677
1666
|
|
|
1678
1667
|
/**
|
|
1679
1668
|
* @typedef ProcessManifestRequest
|
|
1680
|
-
* @property {string}
|
|
1681
|
-
*
|
|
1682
|
-
* @property {
|
|
1683
|
-
* @property {
|
|
1684
|
-
*
|
|
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.
|
|
1685
1674
|
*/
|
|
1686
1675
|
|
|
1687
1676
|
/**
|
|
1688
1677
|
* @typedef ManifestItems
|
|
1689
1678
|
* @property {Filters} [filters]
|
|
1690
|
-
* @property {string} [manifest_id] -
|
|
1691
|
-
* @property {string} [unique_id] -
|
|
1692
|
-
*
|
|
1693
|
-
* @property {
|
|
1694
|
-
* @property {string} [
|
|
1695
|
-
* @property {string} [
|
|
1696
|
-
*
|
|
1697
|
-
* @property {string} [
|
|
1698
|
-
* @property {string} [
|
|
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.
|
|
1699
1691
|
*/
|
|
1700
1692
|
|
|
1701
1693
|
/**
|
|
1702
1694
|
* @typedef ManifestErrorResponse
|
|
1703
|
-
* @property {boolean} [success] -
|
|
1704
|
-
*
|
|
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.
|
|
1705
1698
|
*/
|
|
1706
1699
|
|
|
1707
1700
|
/**
|
|
@@ -1919,6 +1912,19 @@ const Joi = require("joi");
|
|
|
1919
1912
|
* @property {TransitionConfigData} [data]
|
|
1920
1913
|
*/
|
|
1921
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
|
+
|
|
1922
1928
|
/**
|
|
1923
1929
|
* @typedef Page
|
|
1924
1930
|
* @property {number} [item_total] - The total number of items on the page.
|
|
@@ -2618,6 +2624,11 @@ const Joi = require("joi");
|
|
|
2618
2624
|
* @property {string} [po_invoice]
|
|
2619
2625
|
*/
|
|
2620
2626
|
|
|
2627
|
+
/**
|
|
2628
|
+
* @typedef AffiliateConfig
|
|
2629
|
+
* @property {number} [app_company_id]
|
|
2630
|
+
*/
|
|
2631
|
+
|
|
2621
2632
|
/**
|
|
2622
2633
|
* @typedef AffiliateDetails
|
|
2623
2634
|
* @property {ShipmentMeta} shipment_meta
|
|
@@ -2806,6 +2817,7 @@ const Joi = require("joi");
|
|
|
2806
2817
|
* @property {InvoiceInfo} [invoice]
|
|
2807
2818
|
* @property {string} [shipment_status]
|
|
2808
2819
|
* @property {GSTDetailsData} [gst_details]
|
|
2820
|
+
* @property {OrderStatusData} [order_status]
|
|
2809
2821
|
* @property {Object} [delivery_slot]
|
|
2810
2822
|
* @property {OrderDetailsData} [order]
|
|
2811
2823
|
* @property {UserDataInfo} [user]
|
|
@@ -3270,6 +3282,14 @@ const Joi = require("joi");
|
|
|
3270
3282
|
* @property {string} [label_url]
|
|
3271
3283
|
*/
|
|
3272
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
|
+
|
|
3273
3293
|
/**
|
|
3274
3294
|
* @typedef UserDetails
|
|
3275
3295
|
* @property {string} [user_oid]
|
|
@@ -3301,7 +3321,7 @@ const Joi = require("joi");
|
|
|
3301
3321
|
* @property {Article} [article]
|
|
3302
3322
|
* @property {ArticleStatusDetails} [article_details]
|
|
3303
3323
|
* @property {BagStatusHistory[]} [bag_status]
|
|
3304
|
-
* @property {BagStatusHistory} [bag_status_history]
|
|
3324
|
+
* @property {BagStatusHistory[]} [bag_status_history]
|
|
3305
3325
|
* @property {Brand} [brand]
|
|
3306
3326
|
* @property {Company} [company]
|
|
3307
3327
|
* @property {BagStatusHistory} [current_operational_status]
|
|
@@ -3427,6 +3447,12 @@ const Joi = require("joi");
|
|
|
3427
3447
|
* @property {boolean} [success]
|
|
3428
3448
|
*/
|
|
3429
3449
|
|
|
3450
|
+
/**
|
|
3451
|
+
* @typedef BulkFailedResponse
|
|
3452
|
+
* @property {boolean} [status]
|
|
3453
|
+
* @property {string} [error]
|
|
3454
|
+
*/
|
|
3455
|
+
|
|
3430
3456
|
class OrderPlatformModel {
|
|
3431
3457
|
/** @returns {InvalidateShipmentCachePayload} */
|
|
3432
3458
|
static InvalidateShipmentCachePayload() {
|
|
@@ -3456,6 +3482,14 @@ class OrderPlatformModel {
|
|
|
3456
3482
|
});
|
|
3457
3483
|
}
|
|
3458
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
|
+
|
|
3459
3493
|
/** @returns {ErrorResponse} */
|
|
3460
3494
|
static ErrorResponse() {
|
|
3461
3495
|
return Joi.object({
|
|
@@ -3491,8 +3525,8 @@ class OrderPlatformModel {
|
|
|
3491
3525
|
});
|
|
3492
3526
|
}
|
|
3493
3527
|
|
|
3494
|
-
/** @returns {
|
|
3495
|
-
static
|
|
3528
|
+
/** @returns {LockManagerEntities} */
|
|
3529
|
+
static LockManagerEntities() {
|
|
3496
3530
|
return Joi.object({
|
|
3497
3531
|
id: Joi.string().allow(""),
|
|
3498
3532
|
affiliate_order_id: Joi.string().allow(""),
|
|
@@ -3509,7 +3543,9 @@ class OrderPlatformModel {
|
|
|
3509
3543
|
entity_type: Joi.string().allow("").required(),
|
|
3510
3544
|
action: Joi.string().allow("").required(),
|
|
3511
3545
|
action_type: Joi.string().allow("").required(),
|
|
3512
|
-
entities: Joi.array()
|
|
3546
|
+
entities: Joi.array()
|
|
3547
|
+
.items(OrderPlatformModel.LockManagerEntities())
|
|
3548
|
+
.required(),
|
|
3513
3549
|
resume_tasks_after_unlock: Joi.boolean().allow(null),
|
|
3514
3550
|
lock_after_transition: Joi.boolean(),
|
|
3515
3551
|
unlock_before_transition: Joi.boolean(),
|
|
@@ -3581,7 +3617,7 @@ class OrderPlatformModel {
|
|
|
3581
3617
|
OrderPlatformModel.AnnouncementResponse()
|
|
3582
3618
|
),
|
|
3583
3619
|
success: Joi.boolean(),
|
|
3584
|
-
|
|
3620
|
+
status: Joi.number(),
|
|
3585
3621
|
});
|
|
3586
3622
|
}
|
|
3587
3623
|
|
|
@@ -3593,14 +3629,6 @@ class OrderPlatformModel {
|
|
|
3593
3629
|
});
|
|
3594
3630
|
}
|
|
3595
3631
|
|
|
3596
|
-
/** @returns {Click2CallResponse} */
|
|
3597
|
-
static Click2CallResponse() {
|
|
3598
|
-
return Joi.object({
|
|
3599
|
-
call_id: Joi.string().allow("").required(),
|
|
3600
|
-
success: Joi.boolean().required(),
|
|
3601
|
-
});
|
|
3602
|
-
}
|
|
3603
|
-
|
|
3604
3632
|
/** @returns {ErrorDetail} */
|
|
3605
3633
|
static ErrorDetail() {
|
|
3606
3634
|
return Joi.object({
|
|
@@ -3703,338 +3731,71 @@ class OrderPlatformModel {
|
|
|
3703
3731
|
/** @returns {DataUpdates} */
|
|
3704
3732
|
static DataUpdates() {
|
|
3705
3733
|
return Joi.object({
|
|
3706
|
-
order_item_status: Joi.array().items(
|
|
3707
|
-
OrderPlatformModel.OrderItemDataUpdates()
|
|
3708
|
-
),
|
|
3709
|
-
products: Joi.array().items(OrderPlatformModel.ProductsDataUpdates()),
|
|
3710
|
-
entities: Joi.array().items(OrderPlatformModel.EntitiesDataUpdates()),
|
|
3711
|
-
});
|
|
3712
|
-
}
|
|
3713
|
-
|
|
3714
|
-
/** @returns {ShipmentsRequest} */
|
|
3715
|
-
static ShipmentsRequest() {
|
|
3716
|
-
return Joi.object({
|
|
3717
|
-
identifier: Joi.string().allow("").required(),
|
|
3718
|
-
reasons: OrderPlatformModel.ReasonsData(),
|
|
3719
|
-
products: Joi.array().items(OrderPlatformModel.Products()),
|
|
3720
|
-
data_updates: OrderPlatformModel.DataUpdates(),
|
|
3721
|
-
});
|
|
3722
|
-
}
|
|
3723
|
-
|
|
3724
|
-
/** @returns {StatuesRequest} */
|
|
3725
|
-
static StatuesRequest() {
|
|
3726
|
-
return Joi.object({
|
|
3727
|
-
status: Joi.string().allow(""),
|
|
3728
|
-
shipments: Joi.array().items(OrderPlatformModel.ShipmentsRequest()),
|
|
3729
|
-
exclude_bags_next_state: Joi.string().allow(""),
|
|
3730
|
-
split_shipment: Joi.boolean(),
|
|
3731
|
-
});
|
|
3732
|
-
}
|
|
3733
|
-
|
|
3734
|
-
/** @returns {UpdateShipmentStatusRequest} */
|
|
3735
|
-
static UpdateShipmentStatusRequest() {
|
|
3736
|
-
return Joi.object({
|
|
3737
|
-
force_transition: Joi.boolean(),
|
|
3738
|
-
statuses: Joi.array().items(OrderPlatformModel.StatuesRequest()),
|
|
3739
|
-
lock_after_transition: Joi.boolean(),
|
|
3740
|
-
unlock_before_transition: Joi.boolean(),
|
|
3741
|
-
task: Joi.boolean(),
|
|
3742
|
-
resume_tasks_after_unlock: Joi.boolean(),
|
|
3743
|
-
});
|
|
3744
|
-
}
|
|
3745
|
-
|
|
3746
|
-
/** @returns {ShipmentsResponse} */
|
|
3747
|
-
static ShipmentsResponse() {
|
|
3748
|
-
return Joi.object({
|
|
3749
|
-
status: Joi.number().allow(null),
|
|
3750
|
-
final_state: Joi.any().allow(null),
|
|
3751
|
-
identifier: Joi.string().allow("").allow(null),
|
|
3752
|
-
stack_trace: Joi.string().allow("").allow(null),
|
|
3753
|
-
code: Joi.string().allow("").allow(null),
|
|
3754
|
-
meta: Joi.any().allow(null),
|
|
3755
|
-
message: Joi.string().allow("").allow(null),
|
|
3756
|
-
exception: Joi.string().allow("").allow(null),
|
|
3757
|
-
});
|
|
3758
|
-
}
|
|
3759
|
-
|
|
3760
|
-
/** @returns {StatuesResponse} */
|
|
3761
|
-
static StatuesResponse() {
|
|
3762
|
-
return Joi.object({
|
|
3763
|
-
shipments: Joi.array().items(OrderPlatformModel.ShipmentsResponse()),
|
|
3764
|
-
});
|
|
3765
|
-
}
|
|
3766
|
-
|
|
3767
|
-
/** @returns {UpdateShipmentStatusResponseBody} */
|
|
3768
|
-
static UpdateShipmentStatusResponseBody() {
|
|
3769
|
-
return Joi.object({
|
|
3770
|
-
statuses: Joi.array().items(OrderPlatformModel.StatuesResponse()),
|
|
3771
|
-
});
|
|
3772
|
-
}
|
|
3773
|
-
|
|
3774
|
-
/** @returns {OrderUser} */
|
|
3775
|
-
static OrderUser() {
|
|
3776
|
-
return Joi.object({
|
|
3777
|
-
phone: Joi.number().required(),
|
|
3778
|
-
last_name: Joi.string().allow("").required(),
|
|
3779
|
-
address1: Joi.string().allow("").allow(null),
|
|
3780
|
-
state: Joi.string().allow("").required(),
|
|
3781
|
-
pincode: Joi.string().allow("").required(),
|
|
3782
|
-
first_name: Joi.string().allow("").required(),
|
|
3783
|
-
mobile: Joi.number().required(),
|
|
3784
|
-
address2: Joi.string().allow("").allow(null),
|
|
3785
|
-
email: Joi.string().allow("").required(),
|
|
3786
|
-
country: Joi.string().allow("").required(),
|
|
3787
|
-
city: Joi.string().allow("").required(),
|
|
3788
|
-
});
|
|
3789
|
-
}
|
|
3790
|
-
|
|
3791
|
-
/** @returns {OrderPriority} */
|
|
3792
|
-
static OrderPriority() {
|
|
3793
|
-
return Joi.object({
|
|
3794
|
-
fulfilment_priority_text: Joi.string().allow(""),
|
|
3795
|
-
affiliate_priority_code: Joi.string().allow("").allow(null),
|
|
3796
|
-
fulfilment_priority: Joi.number().allow(null),
|
|
3797
|
-
});
|
|
3798
|
-
}
|
|
3799
|
-
|
|
3800
|
-
/** @returns {ArticleDetails} */
|
|
3801
|
-
static ArticleDetails() {
|
|
3802
|
-
return Joi.object({
|
|
3803
|
-
_id: Joi.string().allow("").required(),
|
|
3804
|
-
brand_id: Joi.number().required(),
|
|
3805
|
-
dimension: Joi.any().required(),
|
|
3806
|
-
category: Joi.any().required(),
|
|
3807
|
-
weight: Joi.any().required(),
|
|
3808
|
-
attributes: Joi.any().required(),
|
|
3809
|
-
quantity: Joi.number().required(),
|
|
3810
|
-
});
|
|
3811
|
-
}
|
|
3812
|
-
|
|
3813
|
-
/** @returns {LocationDetails} */
|
|
3814
|
-
static LocationDetails() {
|
|
3815
|
-
return Joi.object({
|
|
3816
|
-
fulfillment_type: Joi.string().allow("").required(),
|
|
3817
|
-
articles: Joi.array()
|
|
3818
|
-
.items(OrderPlatformModel.ArticleDetails())
|
|
3819
|
-
.required(),
|
|
3820
|
-
fulfillment_id: Joi.number().required(),
|
|
3821
|
-
});
|
|
3822
|
-
}
|
|
3823
|
-
|
|
3824
|
-
/** @returns {ShipmentDetails} */
|
|
3825
|
-
static ShipmentDetails() {
|
|
3826
|
-
return Joi.object({
|
|
3827
|
-
box_type: Joi.string().allow("").allow(null),
|
|
3828
|
-
shipments: Joi.number().required(),
|
|
3829
|
-
fulfillment_id: Joi.number().required(),
|
|
3830
|
-
articles: Joi.array()
|
|
3831
|
-
.items(OrderPlatformModel.ArticleDetails())
|
|
3832
|
-
.required(),
|
|
3833
|
-
dp_id: Joi.string().allow("").allow(null),
|
|
3834
|
-
meta: Joi.any(),
|
|
3835
|
-
affiliate_shipment_id: Joi.string().allow("").required(),
|
|
3836
|
-
dp_options: Joi.any().allow(null),
|
|
3837
|
-
lock_status: Joi.boolean().allow(null),
|
|
3838
|
-
action_to_status: Joi.any().allow(null),
|
|
3839
|
-
}).allow(null);
|
|
3840
|
-
}
|
|
3841
|
-
|
|
3842
|
-
/** @returns {ShipmentConfig} */
|
|
3843
|
-
static ShipmentConfig() {
|
|
3844
|
-
return Joi.object({
|
|
3845
|
-
location_details: OrderPlatformModel.LocationDetails(),
|
|
3846
|
-
source: Joi.string().allow("").required(),
|
|
3847
|
-
to_pincode: Joi.string().allow("").required(),
|
|
3848
|
-
shipment: Joi.array()
|
|
3849
|
-
.items(OrderPlatformModel.ShipmentDetails())
|
|
3850
|
-
.required(),
|
|
3851
|
-
identifier: Joi.string().allow("").required(),
|
|
3852
|
-
payment_mode: Joi.string().allow("").required(),
|
|
3853
|
-
action: Joi.string().allow("").required(),
|
|
3854
|
-
journey: Joi.string().allow("").required(),
|
|
3855
|
-
});
|
|
3856
|
-
}
|
|
3857
|
-
|
|
3858
|
-
/** @returns {ShipmentData} */
|
|
3859
|
-
static ShipmentData() {
|
|
3860
|
-
return Joi.object({
|
|
3861
|
-
shipment_data: OrderPlatformModel.ShipmentConfig().required(),
|
|
3862
|
-
});
|
|
3863
|
-
}
|
|
3864
|
-
|
|
3865
|
-
/** @returns {MarketPlacePdf} */
|
|
3866
|
-
static MarketPlacePdf() {
|
|
3867
|
-
return Joi.object({
|
|
3868
|
-
invoice: Joi.string().allow("").allow(null),
|
|
3869
|
-
label: Joi.string().allow("").allow(null),
|
|
3870
|
-
});
|
|
3871
|
-
}
|
|
3872
|
-
|
|
3873
|
-
/** @returns {AffiliateBag} */
|
|
3874
|
-
static AffiliateBag() {
|
|
3875
|
-
return Joi.object({
|
|
3876
|
-
pdf_links: OrderPlatformModel.MarketPlacePdf(),
|
|
3877
|
-
store_id: Joi.number().required(),
|
|
3878
|
-
sku: Joi.string().allow("").required(),
|
|
3879
|
-
discount: Joi.number().required(),
|
|
3880
|
-
unit_price: Joi.number().required(),
|
|
3881
|
-
price_effective: Joi.number().required(),
|
|
3882
|
-
affiliate_store_id: Joi.string().allow("").required(),
|
|
3883
|
-
identifier: Joi.any().required(),
|
|
3884
|
-
seller_identifier: Joi.string().allow("").required(),
|
|
3885
|
-
item_size: Joi.string().allow("").required(),
|
|
3886
|
-
amount_paid: Joi.number().required(),
|
|
3887
|
-
fynd_store_id: Joi.string().allow("").required(),
|
|
3888
|
-
item_id: Joi.number().required(),
|
|
3889
|
-
delivery_charge: Joi.number().required(),
|
|
3890
|
-
avl_qty: Joi.number().required(),
|
|
3891
|
-
price_marked: Joi.number().required(),
|
|
3892
|
-
quantity: Joi.number().required(),
|
|
3893
|
-
company_id: Joi.number().required(),
|
|
3894
|
-
hsn_code_id: Joi.string().allow("").required(),
|
|
3895
|
-
_id: Joi.string().allow("").required(),
|
|
3896
|
-
affiliate_meta: Joi.any().required(),
|
|
3897
|
-
modified_on: Joi.string().allow("").required(),
|
|
3898
|
-
transfer_price: Joi.number().required(),
|
|
3899
|
-
});
|
|
3900
|
-
}
|
|
3901
|
-
|
|
3902
|
-
/** @returns {UserData} */
|
|
3903
|
-
static UserData() {
|
|
3904
|
-
return Joi.object({
|
|
3905
|
-
shipping_user: OrderPlatformModel.OrderUser(),
|
|
3906
|
-
billing_user: OrderPlatformModel.OrderUser(),
|
|
3907
|
-
});
|
|
3908
|
-
}
|
|
3909
|
-
|
|
3910
|
-
/** @returns {OrderInfo} */
|
|
3911
|
-
static OrderInfo() {
|
|
3912
|
-
return Joi.object({
|
|
3913
|
-
affiliate_order_id: Joi.string().allow(""),
|
|
3914
|
-
cod_charges: Joi.number().required(),
|
|
3915
|
-
items: Joi.any().required(),
|
|
3916
|
-
discount: Joi.number().required(),
|
|
3917
|
-
billing_address: OrderPlatformModel.OrderUser().required(),
|
|
3918
|
-
payment: Joi.any(),
|
|
3919
|
-
order_priority: OrderPlatformModel.OrderPriority(),
|
|
3920
|
-
shipment: OrderPlatformModel.ShipmentData(),
|
|
3921
|
-
delivery_charges: Joi.number().required(),
|
|
3922
|
-
shipping_address: OrderPlatformModel.OrderUser().required(),
|
|
3923
|
-
order_value: Joi.number().required(),
|
|
3924
|
-
payment_mode: Joi.string().allow("").required(),
|
|
3925
|
-
bags: Joi.array().items(OrderPlatformModel.AffiliateBag()).required(),
|
|
3926
|
-
user: OrderPlatformModel.UserData().required(),
|
|
3927
|
-
coupon: Joi.string().allow("").allow(null),
|
|
3928
|
-
});
|
|
3929
|
-
}
|
|
3930
|
-
|
|
3931
|
-
/** @returns {AffiliateAppConfigMeta} */
|
|
3932
|
-
static AffiliateAppConfigMeta() {
|
|
3933
|
-
return Joi.object({
|
|
3934
|
-
value: Joi.string().allow("").required(),
|
|
3935
|
-
name: Joi.string().allow("").required(),
|
|
3936
|
-
});
|
|
3937
|
-
}
|
|
3938
|
-
|
|
3939
|
-
/** @returns {AffiliateAppConfig} */
|
|
3940
|
-
static AffiliateAppConfig() {
|
|
3941
|
-
return Joi.object({
|
|
3942
|
-
id: Joi.string().allow("").required(),
|
|
3943
|
-
description: Joi.string().allow(""),
|
|
3944
|
-
updated_at: Joi.string().allow("").required(),
|
|
3945
|
-
name: Joi.string().allow("").required(),
|
|
3946
|
-
token: Joi.string().allow("").required(),
|
|
3947
|
-
meta: Joi.array().items(OrderPlatformModel.AffiliateAppConfigMeta()),
|
|
3948
|
-
owner: Joi.string().allow("").required(),
|
|
3949
|
-
secret: Joi.string().allow("").required(),
|
|
3950
|
-
created_at: Joi.string().allow("").required(),
|
|
3951
|
-
});
|
|
3952
|
-
}
|
|
3953
|
-
|
|
3954
|
-
/** @returns {AffiliateInventoryArticleAssignmentConfig} */
|
|
3955
|
-
static AffiliateInventoryArticleAssignmentConfig() {
|
|
3956
|
-
return Joi.object({
|
|
3957
|
-
post_order_reassignment: Joi.boolean(),
|
|
3958
|
-
});
|
|
3959
|
-
}
|
|
3960
|
-
|
|
3961
|
-
/** @returns {AffiliateInventoryPaymentConfig} */
|
|
3962
|
-
static AffiliateInventoryPaymentConfig() {
|
|
3963
|
-
return Joi.object({
|
|
3964
|
-
source: Joi.string().allow(""),
|
|
3965
|
-
mode_of_payment: Joi.string().allow(""),
|
|
3966
|
-
});
|
|
3967
|
-
}
|
|
3968
|
-
|
|
3969
|
-
/** @returns {AffiliateInventoryStoreConfig} */
|
|
3970
|
-
static AffiliateInventoryStoreConfig() {
|
|
3971
|
-
return Joi.object({
|
|
3972
|
-
store: Joi.any(),
|
|
3973
|
-
});
|
|
3974
|
-
}
|
|
3975
|
-
|
|
3976
|
-
/** @returns {AffiliateInventoryOrderConfig} */
|
|
3977
|
-
static AffiliateInventoryOrderConfig() {
|
|
3978
|
-
return Joi.object({
|
|
3979
|
-
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()),
|
|
3980
3739
|
});
|
|
3981
3740
|
}
|
|
3982
3741
|
|
|
3983
|
-
/** @returns {
|
|
3984
|
-
static
|
|
3742
|
+
/** @returns {ShipmentsRequest} */
|
|
3743
|
+
static ShipmentsRequest() {
|
|
3985
3744
|
return Joi.object({
|
|
3986
|
-
|
|
3745
|
+
identifier: Joi.string().allow("").required(),
|
|
3746
|
+
reasons: OrderPlatformModel.ReasonsData(),
|
|
3747
|
+
products: Joi.array().items(OrderPlatformModel.Products()),
|
|
3748
|
+
data_updates: OrderPlatformModel.DataUpdates(),
|
|
3987
3749
|
});
|
|
3988
3750
|
}
|
|
3989
3751
|
|
|
3990
|
-
/** @returns {
|
|
3991
|
-
static
|
|
3752
|
+
/** @returns {StatuesRequest} */
|
|
3753
|
+
static StatuesRequest() {
|
|
3992
3754
|
return Joi.object({
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
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(),
|
|
3998
3759
|
});
|
|
3999
3760
|
}
|
|
4000
3761
|
|
|
4001
|
-
/** @returns {
|
|
4002
|
-
static
|
|
3762
|
+
/** @returns {UpdateShipmentStatusRequestSchema} */
|
|
3763
|
+
static UpdateShipmentStatusRequestSchema() {
|
|
4003
3764
|
return Joi.object({
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
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(),
|
|
4007
3771
|
});
|
|
4008
3772
|
}
|
|
4009
3773
|
|
|
4010
|
-
/** @returns {
|
|
4011
|
-
static
|
|
3774
|
+
/** @returns {ShipmentsResponse} */
|
|
3775
|
+
static ShipmentsResponse() {
|
|
4012
3776
|
return Joi.object({
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
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),
|
|
4016
3785
|
});
|
|
4017
3786
|
}
|
|
4018
3787
|
|
|
4019
|
-
/** @returns {
|
|
4020
|
-
static
|
|
3788
|
+
/** @returns {StatuesResponse} */
|
|
3789
|
+
static StatuesResponse() {
|
|
4021
3790
|
return Joi.object({
|
|
4022
|
-
|
|
4023
|
-
marketplace_store_id: Joi.string().allow("").required(),
|
|
3791
|
+
shipments: Joi.array().items(OrderPlatformModel.ShipmentsResponse()),
|
|
4024
3792
|
});
|
|
4025
3793
|
}
|
|
4026
3794
|
|
|
4027
|
-
/** @returns {
|
|
4028
|
-
static
|
|
3795
|
+
/** @returns {UpdateShipmentStatusResponseBody} */
|
|
3796
|
+
static UpdateShipmentStatusResponseBody() {
|
|
4029
3797
|
return Joi.object({
|
|
4030
|
-
|
|
4031
|
-
article_lookup: Joi.string().allow(""),
|
|
4032
|
-
bag_end_state: Joi.string().allow(""),
|
|
4033
|
-
affiliate: OrderPlatformModel.Affiliate().required(),
|
|
4034
|
-
store_lookup: Joi.string().allow(""),
|
|
4035
|
-
affiliate_store_id_mapping: Joi.array()
|
|
4036
|
-
.items(OrderPlatformModel.AffiliateStoreIdMapping())
|
|
4037
|
-
.required(),
|
|
3798
|
+
statuses: Joi.array().items(OrderPlatformModel.StatuesResponse()),
|
|
4038
3799
|
});
|
|
4039
3800
|
}
|
|
4040
3801
|
|
|
@@ -4056,7 +3817,7 @@ class OrderPlatformModel {
|
|
|
4056
3817
|
/** @returns {CreateOrderConfig} */
|
|
4057
3818
|
static CreateOrderConfig() {
|
|
4058
3819
|
return Joi.object({
|
|
4059
|
-
dp_configuration: OrderPlatformModel.DPConfiguration(),
|
|
3820
|
+
dp_configuration: OrderPlatformModel.DPConfiguration().required(),
|
|
4060
3821
|
integration_type: Joi.string().allow(""),
|
|
4061
3822
|
location_reassignment: Joi.boolean(),
|
|
4062
3823
|
payment: OrderPlatformModel.PaymentConfig(),
|
|
@@ -4064,15 +3825,6 @@ class OrderPlatformModel {
|
|
|
4064
3825
|
});
|
|
4065
3826
|
}
|
|
4066
3827
|
|
|
4067
|
-
/** @returns {CreateOrderPayload} */
|
|
4068
|
-
static CreateOrderPayload() {
|
|
4069
|
-
return Joi.object({
|
|
4070
|
-
affiliate_id: Joi.string().allow("").required(),
|
|
4071
|
-
order_info: OrderPlatformModel.OrderInfo().required(),
|
|
4072
|
-
order_config: OrderPlatformModel.OrderConfig().required(),
|
|
4073
|
-
});
|
|
4074
|
-
}
|
|
4075
|
-
|
|
4076
3828
|
/** @returns {CreateOrderResponse} */
|
|
4077
3829
|
static CreateOrderResponse() {
|
|
4078
3830
|
return Joi.object({
|
|
@@ -4161,6 +3913,7 @@ class OrderPlatformModel {
|
|
|
4161
3913
|
ticket_url: Joi.string().allow(""),
|
|
4162
3914
|
l3_detail: Joi.string().allow(""),
|
|
4163
3915
|
createdat: Joi.string().allow("").required(),
|
|
3916
|
+
created_ts: Joi.string().allow(""),
|
|
4164
3917
|
ticket_id: Joi.string().allow(""),
|
|
4165
3918
|
type: Joi.string().allow("").required(),
|
|
4166
3919
|
l2_detail: Joi.string().allow(""),
|
|
@@ -4303,6 +4056,10 @@ class OrderPlatformModel {
|
|
|
4303
4056
|
order_details: OrderPlatformModel.OrderDetails().required(),
|
|
4304
4057
|
errors: Joi.array().items(Joi.string().allow("")),
|
|
4305
4058
|
shipment_details: Joi.array().items(OrderPlatformModel.ShipmentDetail()),
|
|
4059
|
+
text: Joi.string().allow(""),
|
|
4060
|
+
value: Joi.string().allow(""),
|
|
4061
|
+
color_code: Joi.string().allow(""),
|
|
4062
|
+
expected_delivery_date: Joi.string().allow(""),
|
|
4306
4063
|
});
|
|
4307
4064
|
}
|
|
4308
4065
|
|
|
@@ -4318,8 +4075,8 @@ class OrderPlatformModel {
|
|
|
4318
4075
|
static Dimension() {
|
|
4319
4076
|
return Joi.object({
|
|
4320
4077
|
packaging_type: Joi.string().allow(""),
|
|
4321
|
-
weight: Joi.
|
|
4322
|
-
height: Joi.
|
|
4078
|
+
weight: Joi.number(),
|
|
4079
|
+
height: Joi.number(),
|
|
4323
4080
|
length: Joi.number(),
|
|
4324
4081
|
width: Joi.number(),
|
|
4325
4082
|
});
|
|
@@ -4351,11 +4108,19 @@ class OrderPlatformModel {
|
|
|
4351
4108
|
});
|
|
4352
4109
|
}
|
|
4353
4110
|
|
|
4111
|
+
/** @returns {AmountSchema} */
|
|
4112
|
+
static AmountSchema() {
|
|
4113
|
+
return Joi.object({
|
|
4114
|
+
currency: Joi.string().allow(""),
|
|
4115
|
+
value: Joi.number(),
|
|
4116
|
+
});
|
|
4117
|
+
}
|
|
4118
|
+
|
|
4354
4119
|
/** @returns {Charge} */
|
|
4355
4120
|
static Charge() {
|
|
4356
4121
|
return Joi.object({
|
|
4357
4122
|
name: Joi.string().allow("").required(),
|
|
4358
|
-
amount:
|
|
4123
|
+
amount: OrderPlatformModel.AmountSchema().required(),
|
|
4359
4124
|
tax: OrderPlatformModel.Tax(),
|
|
4360
4125
|
code: Joi.string().allow(""),
|
|
4361
4126
|
type: Joi.string().allow("").required(),
|
|
@@ -4426,6 +4191,14 @@ class OrderPlatformModel {
|
|
|
4426
4191
|
});
|
|
4427
4192
|
}
|
|
4428
4193
|
|
|
4194
|
+
/** @returns {GeoLocationSchema} */
|
|
4195
|
+
static GeoLocationSchema() {
|
|
4196
|
+
return Joi.object({
|
|
4197
|
+
latitude: Joi.number(),
|
|
4198
|
+
longitude: Joi.number(),
|
|
4199
|
+
});
|
|
4200
|
+
}
|
|
4201
|
+
|
|
4429
4202
|
/** @returns {ShippingInfo} */
|
|
4430
4203
|
static ShippingInfo() {
|
|
4431
4204
|
return Joi.object({
|
|
@@ -4436,7 +4209,7 @@ class OrderPlatformModel {
|
|
|
4436
4209
|
middle_name: Joi.string().allow(""),
|
|
4437
4210
|
primary_mobile_number: Joi.string().allow(""),
|
|
4438
4211
|
last_name: Joi.string().allow(""),
|
|
4439
|
-
geo_location:
|
|
4212
|
+
geo_location: OrderPlatformModel.GeoLocationSchema(),
|
|
4440
4213
|
gender: Joi.string().allow(""),
|
|
4441
4214
|
house_no: Joi.string().allow(""),
|
|
4442
4215
|
first_name: Joi.string().allow(""),
|
|
@@ -4461,37 +4234,6 @@ class OrderPlatformModel {
|
|
|
4461
4234
|
});
|
|
4462
4235
|
}
|
|
4463
4236
|
|
|
4464
|
-
/** @returns {BillingInfo} */
|
|
4465
|
-
static BillingInfo() {
|
|
4466
|
-
return Joi.object({
|
|
4467
|
-
alternate_mobile_number: Joi.string().allow(""),
|
|
4468
|
-
state: Joi.string().allow(""),
|
|
4469
|
-
customer_code: Joi.string().allow(""),
|
|
4470
|
-
middle_name: Joi.string().allow(""),
|
|
4471
|
-
primary_mobile_number: Joi.string().allow(""),
|
|
4472
|
-
last_name: Joi.string().allow(""),
|
|
4473
|
-
gender: Joi.string().allow(""),
|
|
4474
|
-
house_no: Joi.string().allow(""),
|
|
4475
|
-
first_name: Joi.string().allow(""),
|
|
4476
|
-
title: Joi.string().allow(""),
|
|
4477
|
-
country: Joi.string().allow(""),
|
|
4478
|
-
state_code: Joi.string().allow(""),
|
|
4479
|
-
city: Joi.string().allow(""),
|
|
4480
|
-
external_customer_code: Joi.string().allow(""),
|
|
4481
|
-
floor_no: Joi.string().allow(""),
|
|
4482
|
-
alternate_email: Joi.string().allow(""),
|
|
4483
|
-
address: Joi.string().allow(""),
|
|
4484
|
-
area: Joi.string().allow(""),
|
|
4485
|
-
address1: Joi.string().allow(""),
|
|
4486
|
-
pincode: Joi.string().allow(""),
|
|
4487
|
-
primary_email: Joi.string().allow(""),
|
|
4488
|
-
address2: Joi.string().allow(""),
|
|
4489
|
-
landmark: Joi.string().allow(""),
|
|
4490
|
-
country_code: Joi.string().allow(""),
|
|
4491
|
-
country_iso_code: Joi.string().allow(""),
|
|
4492
|
-
});
|
|
4493
|
-
}
|
|
4494
|
-
|
|
4495
4237
|
/** @returns {UserInfo} */
|
|
4496
4238
|
static UserInfo() {
|
|
4497
4239
|
return Joi.object({
|
|
@@ -4531,6 +4273,7 @@ class OrderPlatformModel {
|
|
|
4531
4273
|
static PaymentInfo() {
|
|
4532
4274
|
return Joi.object({
|
|
4533
4275
|
primary_mode: Joi.string().allow("").required(),
|
|
4276
|
+
payment_mode: Joi.string().allow(""),
|
|
4534
4277
|
payment_methods: Joi.array().items(OrderPlatformModel.PaymentMethod()),
|
|
4535
4278
|
});
|
|
4536
4279
|
}
|
|
@@ -4540,97 +4283,37 @@ class OrderPlatformModel {
|
|
|
4540
4283
|
return Joi.object({
|
|
4541
4284
|
shipments: Joi.array().items(OrderPlatformModel.Shipment()).required(),
|
|
4542
4285
|
shipping_info: OrderPlatformModel.ShippingInfo().required(),
|
|
4543
|
-
billing_info: OrderPlatformModel.
|
|
4286
|
+
billing_info: OrderPlatformModel.ShippingInfo().required(),
|
|
4544
4287
|
currency_info: Joi.any(),
|
|
4545
4288
|
external_order_id: Joi.string().allow(""),
|
|
4546
4289
|
charges: Joi.array().items(OrderPlatformModel.Charge()),
|
|
4547
4290
|
external_creation_date: Joi.string().allow(""),
|
|
4548
4291
|
meta: Joi.any(),
|
|
4549
4292
|
tax_info: OrderPlatformModel.TaxInfo(),
|
|
4550
|
-
config: OrderPlatformModel.CreateOrderConfig(),
|
|
4293
|
+
config: OrderPlatformModel.CreateOrderConfig().required(),
|
|
4551
4294
|
payment_info: OrderPlatformModel.PaymentInfo().required(),
|
|
4552
4295
|
user_info: OrderPlatformModel.UserInfo(),
|
|
4553
4296
|
ordering_store_id: Joi.number(),
|
|
4554
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(""),
|
|
4555
4302
|
});
|
|
4556
4303
|
}
|
|
4557
4304
|
|
|
4558
4305
|
/** @returns {CreateOrderErrorReponse} */
|
|
4559
4306
|
static CreateOrderErrorReponse() {
|
|
4560
4307
|
return Joi.object({
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
code: Joi.string().allow("").allow(null),
|
|
4566
|
-
meta: Joi.string().allow("").allow(null),
|
|
4567
|
-
message: Joi.string().allow("").required(),
|
|
4568
|
-
exception: Joi.string().allow("").allow(null),
|
|
4569
|
-
});
|
|
4570
|
-
}
|
|
4571
|
-
|
|
4572
|
-
/** @returns {DpConfiguration} */
|
|
4573
|
-
static DpConfiguration() {
|
|
4574
|
-
return Joi.object({
|
|
4575
|
-
shipping_by: Joi.string().allow(""),
|
|
4576
|
-
});
|
|
4577
|
-
}
|
|
4578
|
-
|
|
4579
|
-
/** @returns {PaymentMethods} */
|
|
4580
|
-
static PaymentMethods() {
|
|
4581
|
-
return Joi.object({
|
|
4582
|
-
collect_by: Joi.string().allow(""),
|
|
4583
|
-
refund_by: Joi.string().allow(""),
|
|
4584
|
-
mode: Joi.string().allow(""),
|
|
4585
|
-
});
|
|
4586
|
-
}
|
|
4587
|
-
|
|
4588
|
-
/** @returns {CreateChannelPaymentInfo} */
|
|
4589
|
-
static CreateChannelPaymentInfo() {
|
|
4590
|
-
return Joi.object({
|
|
4591
|
-
source: Joi.string().allow(""),
|
|
4592
|
-
payment_methods: Joi.array().items(OrderPlatformModel.PaymentMethods()),
|
|
4593
|
-
mode_of_payment: Joi.string().allow(""),
|
|
4594
|
-
});
|
|
4595
|
-
}
|
|
4596
|
-
|
|
4597
|
-
/** @returns {CreateChannelConfig} */
|
|
4598
|
-
static CreateChannelConfig() {
|
|
4599
|
-
return Joi.object({
|
|
4600
|
-
dp_configuration: OrderPlatformModel.DpConfiguration(),
|
|
4601
|
-
shipment_assignment: Joi.string().allow(""),
|
|
4602
|
-
location_reassignment: Joi.boolean(),
|
|
4603
|
-
logo_url: Joi.any(),
|
|
4604
|
-
payment_info: OrderPlatformModel.CreateChannelPaymentInfo(),
|
|
4605
|
-
lock_states: Joi.array().items(Joi.string().allow("")),
|
|
4606
|
-
});
|
|
4607
|
-
}
|
|
4608
|
-
|
|
4609
|
-
/** @returns {CreateChannelConfigData} */
|
|
4610
|
-
static CreateChannelConfigData() {
|
|
4611
|
-
return Joi.object({
|
|
4612
|
-
config_data: OrderPlatformModel.CreateChannelConfig(),
|
|
4613
|
-
});
|
|
4614
|
-
}
|
|
4615
|
-
|
|
4616
|
-
/** @returns {CreateChannelConifgErrorResponse} */
|
|
4617
|
-
static CreateChannelConifgErrorResponse() {
|
|
4618
|
-
return Joi.object({
|
|
4619
|
-
error: Joi.string().allow(""),
|
|
4620
|
-
});
|
|
4621
|
-
}
|
|
4622
|
-
|
|
4623
|
-
/** @returns {CreateChannelConfigResponse} */
|
|
4624
|
-
static CreateChannelConfigResponse() {
|
|
4625
|
-
return Joi.object({
|
|
4626
|
-
is_inserted: Joi.boolean(),
|
|
4627
|
-
is_upserted: Joi.boolean(),
|
|
4628
|
-
acknowledged: Joi.boolean(),
|
|
4308
|
+
success: Joi.boolean(),
|
|
4309
|
+
errors: Joi.string().allow(""),
|
|
4310
|
+
status_code: Joi.number(),
|
|
4311
|
+
fynd_order_id: Joi.string().allow(""),
|
|
4629
4312
|
});
|
|
4630
4313
|
}
|
|
4631
4314
|
|
|
4632
|
-
/** @returns {
|
|
4633
|
-
static
|
|
4315
|
+
/** @returns {UploadManifestConsent} */
|
|
4316
|
+
static UploadManifestConsent() {
|
|
4634
4317
|
return Joi.object({
|
|
4635
4318
|
consent_url: Joi.string().allow("").required(),
|
|
4636
4319
|
manifest_id: Joi.string().allow("").required(),
|
|
@@ -4648,7 +4331,8 @@ class OrderPlatformModel {
|
|
|
4648
4331
|
static ResponseDetail() {
|
|
4649
4332
|
return Joi.object({
|
|
4650
4333
|
success: Joi.boolean(),
|
|
4651
|
-
message: Joi.
|
|
4334
|
+
message: Joi.string().allow(""),
|
|
4335
|
+
status: Joi.number(),
|
|
4652
4336
|
});
|
|
4653
4337
|
}
|
|
4654
4338
|
|
|
@@ -4656,6 +4340,9 @@ class OrderPlatformModel {
|
|
|
4656
4340
|
static FyndOrderIdList() {
|
|
4657
4341
|
return Joi.object({
|
|
4658
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(),
|
|
4659
4346
|
});
|
|
4660
4347
|
}
|
|
4661
4348
|
|
|
@@ -4663,9 +4350,6 @@ class OrderPlatformModel {
|
|
|
4663
4350
|
static OrderStatus() {
|
|
4664
4351
|
return Joi.object({
|
|
4665
4352
|
order_details: Joi.array().items(OrderPlatformModel.FyndOrderIdList()),
|
|
4666
|
-
start_date: Joi.string().allow("").required(),
|
|
4667
|
-
end_date: Joi.string().allow("").required(),
|
|
4668
|
-
mobile: Joi.number().required(),
|
|
4669
4353
|
});
|
|
4670
4354
|
}
|
|
4671
4355
|
|
|
@@ -4685,39 +4369,13 @@ class OrderPlatformModel {
|
|
|
4685
4369
|
});
|
|
4686
4370
|
}
|
|
4687
4371
|
|
|
4688
|
-
/** @returns {FetchCreditBalanceRequestPayload} */
|
|
4689
|
-
static FetchCreditBalanceRequestPayload() {
|
|
4690
|
-
return Joi.object({
|
|
4691
|
-
affiliate_id: Joi.string().allow("").required(),
|
|
4692
|
-
seller_id: Joi.string().allow("").required(),
|
|
4693
|
-
customer_mobile_number: Joi.string().allow("").required(),
|
|
4694
|
-
});
|
|
4695
|
-
}
|
|
4696
|
-
|
|
4697
|
-
/** @returns {CreditBalanceInfo} */
|
|
4698
|
-
static CreditBalanceInfo() {
|
|
4699
|
-
return Joi.object({
|
|
4700
|
-
total_credited_balance: Joi.string().allow(""),
|
|
4701
|
-
reason: Joi.string().allow(""),
|
|
4702
|
-
customer_mobile_number: Joi.string().allow(""),
|
|
4703
|
-
});
|
|
4704
|
-
}
|
|
4705
|
-
|
|
4706
|
-
/** @returns {FetchCreditBalanceResponsePayload} */
|
|
4707
|
-
static FetchCreditBalanceResponsePayload() {
|
|
4708
|
-
return Joi.object({
|
|
4709
|
-
success: Joi.boolean().required(),
|
|
4710
|
-
data: OrderPlatformModel.CreditBalanceInfo().required(),
|
|
4711
|
-
});
|
|
4712
|
-
}
|
|
4713
|
-
|
|
4714
4372
|
/** @returns {RefundModeConfigRequestPayload} */
|
|
4715
4373
|
static RefundModeConfigRequestPayload() {
|
|
4716
4374
|
return Joi.object({
|
|
4717
4375
|
fynd_order_id: Joi.string().allow("").required(),
|
|
4718
4376
|
seller_id: Joi.number().required(),
|
|
4719
4377
|
affiliate_id: Joi.string().allow("").required(),
|
|
4720
|
-
customer_mobile_number: Joi.
|
|
4378
|
+
customer_mobile_number: Joi.number(),
|
|
4721
4379
|
});
|
|
4722
4380
|
}
|
|
4723
4381
|
|
|
@@ -4731,6 +4389,13 @@ class OrderPlatformModel {
|
|
|
4731
4389
|
});
|
|
4732
4390
|
}
|
|
4733
4391
|
|
|
4392
|
+
/** @returns {RefundModeFormat} */
|
|
4393
|
+
static RefundModeFormat() {
|
|
4394
|
+
return Joi.object({
|
|
4395
|
+
refund_to: Joi.string().allow(""),
|
|
4396
|
+
});
|
|
4397
|
+
}
|
|
4398
|
+
|
|
4734
4399
|
/** @returns {RefundModeInfo} */
|
|
4735
4400
|
static RefundModeInfo() {
|
|
4736
4401
|
return Joi.object({
|
|
@@ -4738,6 +4403,7 @@ class OrderPlatformModel {
|
|
|
4738
4403
|
slug: Joi.string().allow(""),
|
|
4739
4404
|
options: Joi.array().items(OrderPlatformModel.RefundOption()),
|
|
4740
4405
|
display_name: Joi.string().allow(""),
|
|
4406
|
+
format: OrderPlatformModel.RefundModeFormat(),
|
|
4741
4407
|
});
|
|
4742
4408
|
}
|
|
4743
4409
|
|
|
@@ -4746,6 +4412,8 @@ class OrderPlatformModel {
|
|
|
4746
4412
|
return Joi.object({
|
|
4747
4413
|
success: Joi.boolean().required(),
|
|
4748
4414
|
data: Joi.array().items(OrderPlatformModel.RefundModeInfo()).required(),
|
|
4415
|
+
status: Joi.number(),
|
|
4416
|
+
message: Joi.string().allow(""),
|
|
4749
4417
|
});
|
|
4750
4418
|
}
|
|
4751
4419
|
|
|
@@ -4786,7 +4454,7 @@ class OrderPlatformModel {
|
|
|
4786
4454
|
/** @returns {SendUserMobileOTP} */
|
|
4787
4455
|
static SendUserMobileOTP() {
|
|
4788
4456
|
return Joi.object({
|
|
4789
|
-
mobile: Joi.
|
|
4457
|
+
mobile: Joi.number().required(),
|
|
4790
4458
|
country_code: Joi.string().allow(""),
|
|
4791
4459
|
});
|
|
4792
4460
|
}
|
|
@@ -4805,6 +4473,7 @@ class OrderPlatformModel {
|
|
|
4805
4473
|
static SendUserMobileOtpResponse() {
|
|
4806
4474
|
return Joi.object({
|
|
4807
4475
|
success: Joi.boolean(),
|
|
4476
|
+
status: Joi.number(),
|
|
4808
4477
|
message: Joi.string().allow(""),
|
|
4809
4478
|
data: OrderPlatformModel.PointBlankOtpData(),
|
|
4810
4479
|
});
|
|
@@ -4852,7 +4521,7 @@ class OrderPlatformModel {
|
|
|
4852
4521
|
return Joi.object({
|
|
4853
4522
|
store_ids: Joi.array().items(Joi.string().allow("")),
|
|
4854
4523
|
lane_type: Joi.string().allow(""),
|
|
4855
|
-
custom_headers: Joi.string().allow(""),
|
|
4524
|
+
custom_headers: Joi.array().items(Joi.string().allow("")),
|
|
4856
4525
|
report_type: Joi.string().allow(""),
|
|
4857
4526
|
start_date: Joi.string().allow(""),
|
|
4858
4527
|
end_date: Joi.string().allow(""),
|
|
@@ -4871,16 +4540,16 @@ class OrderPlatformModel {
|
|
|
4871
4540
|
});
|
|
4872
4541
|
}
|
|
4873
4542
|
|
|
4874
|
-
/** @returns {
|
|
4875
|
-
static
|
|
4543
|
+
/** @returns {APIFailedResponse} */
|
|
4544
|
+
static APIFailedResponse() {
|
|
4876
4545
|
return Joi.object({
|
|
4877
4546
|
status: Joi.boolean(),
|
|
4878
4547
|
error: Joi.string().allow(""),
|
|
4879
4548
|
});
|
|
4880
4549
|
}
|
|
4881
4550
|
|
|
4882
|
-
/** @returns {
|
|
4883
|
-
static
|
|
4551
|
+
/** @returns {BulkStateTransistionRequestSchema} */
|
|
4552
|
+
static BulkStateTransistionRequestSchema() {
|
|
4884
4553
|
return Joi.object({
|
|
4885
4554
|
url: Joi.string().allow(""),
|
|
4886
4555
|
file_name: Joi.string().allow(""),
|
|
@@ -4943,6 +4612,14 @@ class OrderPlatformModel {
|
|
|
4943
4612
|
last_selected_invoice_label_type: Joi.string().allow(""),
|
|
4944
4613
|
batch_id: Joi.string().allow(""),
|
|
4945
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(),
|
|
4946
4623
|
});
|
|
4947
4624
|
}
|
|
4948
4625
|
|
|
@@ -5036,11 +4713,13 @@ class OrderPlatformModel {
|
|
|
5036
4713
|
static ManifestShipmentListing() {
|
|
5037
4714
|
return Joi.object({
|
|
5038
4715
|
total_count: Joi.number().required(),
|
|
5039
|
-
lane: Joi.string().allow(""),
|
|
4716
|
+
lane: Joi.string().allow("").required(),
|
|
5040
4717
|
page: OrderPlatformModel.ManifestPageInfo().required(),
|
|
5041
4718
|
success: Joi.boolean().required(),
|
|
5042
|
-
status: Joi.number()
|
|
5043
|
-
items: Joi.array()
|
|
4719
|
+
status: Joi.number(),
|
|
4720
|
+
items: Joi.array()
|
|
4721
|
+
.items(OrderPlatformModel.ManifestItemDetails())
|
|
4722
|
+
.required(),
|
|
5044
4723
|
message: Joi.string().allow(""),
|
|
5045
4724
|
});
|
|
5046
4725
|
}
|
|
@@ -5154,49 +4833,6 @@ class OrderPlatformModel {
|
|
|
5154
4833
|
});
|
|
5155
4834
|
}
|
|
5156
4835
|
|
|
5157
|
-
/** @returns {FiltersRequest} */
|
|
5158
|
-
static FiltersRequest() {
|
|
5159
|
-
return Joi.object({
|
|
5160
|
-
date_range: OrderPlatformModel.DateRange(),
|
|
5161
|
-
logo: Joi.string().allow(""),
|
|
5162
|
-
stores: Joi.number().required(),
|
|
5163
|
-
dp_name: Joi.string().allow("").required(),
|
|
5164
|
-
dp_ids: Joi.number().required(),
|
|
5165
|
-
lane: Joi.string().allow("").required(),
|
|
5166
|
-
store_name: Joi.string().allow("").required(),
|
|
5167
|
-
});
|
|
5168
|
-
}
|
|
5169
|
-
|
|
5170
|
-
/** @returns {ProcessManifest} */
|
|
5171
|
-
static ProcessManifest() {
|
|
5172
|
-
return Joi.object({
|
|
5173
|
-
filters: OrderPlatformModel.FiltersRequest().required(),
|
|
5174
|
-
action: Joi.string().allow("").required(),
|
|
5175
|
-
unique_id: Joi.string().allow("").required(),
|
|
5176
|
-
manifest_id: Joi.string().allow(""),
|
|
5177
|
-
});
|
|
5178
|
-
}
|
|
5179
|
-
|
|
5180
|
-
/** @returns {ProcessManifestResponse} */
|
|
5181
|
-
static ProcessManifestResponse() {
|
|
5182
|
-
return Joi.object({
|
|
5183
|
-
company_id: Joi.number(),
|
|
5184
|
-
filters: OrderPlatformModel.Filters(),
|
|
5185
|
-
user_id: Joi.string().allow(""),
|
|
5186
|
-
manifest_id: Joi.string().allow(""),
|
|
5187
|
-
action: Joi.string().allow(""),
|
|
5188
|
-
uid: Joi.string().allow(""),
|
|
5189
|
-
created_by: Joi.string().allow(""),
|
|
5190
|
-
});
|
|
5191
|
-
}
|
|
5192
|
-
|
|
5193
|
-
/** @returns {ProcessManifestItemResponse} */
|
|
5194
|
-
static ProcessManifestItemResponse() {
|
|
5195
|
-
return Joi.object({
|
|
5196
|
-
items: OrderPlatformModel.ProcessManifestResponse(),
|
|
5197
|
-
});
|
|
5198
|
-
}
|
|
5199
|
-
|
|
5200
4836
|
/** @returns {FilterInfoOption} */
|
|
5201
4837
|
static FilterInfoOption() {
|
|
5202
4838
|
return Joi.object({
|
|
@@ -5447,8 +5083,8 @@ class OrderPlatformModel {
|
|
|
5447
5083
|
});
|
|
5448
5084
|
}
|
|
5449
5085
|
|
|
5450
|
-
/** @returns {
|
|
5451
|
-
static
|
|
5086
|
+
/** @returns {GenerateInvoiceIDRequestSchema} */
|
|
5087
|
+
static GenerateInvoiceIDRequestSchema() {
|
|
5452
5088
|
return Joi.object({
|
|
5453
5089
|
shipment_ids: Joi.array().items(Joi.string().allow("")).required(),
|
|
5454
5090
|
});
|
|
@@ -5482,10 +5118,10 @@ class OrderPlatformModel {
|
|
|
5482
5118
|
/** @returns {ProcessManifestRequest} */
|
|
5483
5119
|
static ProcessManifestRequest() {
|
|
5484
5120
|
return Joi.object({
|
|
5485
|
-
action: Joi.string().allow(""),
|
|
5121
|
+
action: Joi.string().allow("").required(),
|
|
5486
5122
|
manifest_id: Joi.string().allow(""),
|
|
5487
|
-
filters: OrderPlatformModel.Filters(),
|
|
5488
|
-
unique_id: Joi.string().allow(""),
|
|
5123
|
+
filters: OrderPlatformModel.Filters().required(),
|
|
5124
|
+
unique_id: Joi.string().allow("").required(),
|
|
5489
5125
|
});
|
|
5490
5126
|
}
|
|
5491
5127
|
|
|
@@ -5642,6 +5278,23 @@ class OrderPlatformModel {
|
|
|
5642
5278
|
});
|
|
5643
5279
|
}
|
|
5644
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
|
+
|
|
5645
5298
|
/** @returns {Page} */
|
|
5646
5299
|
static Page() {
|
|
5647
5300
|
return Joi.object({
|
|
@@ -6451,6 +6104,13 @@ class OrderPlatformModel {
|
|
|
6451
6104
|
});
|
|
6452
6105
|
}
|
|
6453
6106
|
|
|
6107
|
+
/** @returns {AffiliateConfig} */
|
|
6108
|
+
static AffiliateConfig() {
|
|
6109
|
+
return Joi.object({
|
|
6110
|
+
app_company_id: Joi.number().allow(null),
|
|
6111
|
+
});
|
|
6112
|
+
}
|
|
6113
|
+
|
|
6454
6114
|
/** @returns {AffiliateDetails} */
|
|
6455
6115
|
static AffiliateDetails() {
|
|
6456
6116
|
return Joi.object({
|
|
@@ -6674,6 +6334,7 @@ class OrderPlatformModel {
|
|
|
6674
6334
|
invoice: OrderPlatformModel.InvoiceInfo(),
|
|
6675
6335
|
shipment_status: Joi.string().allow("").allow(null),
|
|
6676
6336
|
gst_details: OrderPlatformModel.GSTDetailsData(),
|
|
6337
|
+
order_status: OrderPlatformModel.OrderStatusData(),
|
|
6677
6338
|
delivery_slot: Joi.any().allow(null),
|
|
6678
6339
|
order: OrderPlatformModel.OrderDetailsData(),
|
|
6679
6340
|
user: OrderPlatformModel.UserDataInfo(),
|
|
@@ -7243,6 +6904,16 @@ class OrderPlatformModel {
|
|
|
7243
6904
|
}).allow(null);
|
|
7244
6905
|
}
|
|
7245
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
|
+
|
|
7246
6917
|
/** @returns {UserDetails} */
|
|
7247
6918
|
static UserDetails() {
|
|
7248
6919
|
return Joi.object({
|
|
@@ -7279,7 +6950,9 @@ class OrderPlatformModel {
|
|
|
7279
6950
|
article: OrderPlatformModel.Article(),
|
|
7280
6951
|
article_details: OrderPlatformModel.ArticleStatusDetails(),
|
|
7281
6952
|
bag_status: Joi.array().items(OrderPlatformModel.BagStatusHistory()),
|
|
7282
|
-
bag_status_history:
|
|
6953
|
+
bag_status_history: Joi.array().items(
|
|
6954
|
+
OrderPlatformModel.BagStatusHistory()
|
|
6955
|
+
),
|
|
7283
6956
|
brand: OrderPlatformModel.Brand(),
|
|
7284
6957
|
company: OrderPlatformModel.Company(),
|
|
7285
6958
|
current_operational_status: OrderPlatformModel.BagStatusHistory(),
|
|
@@ -7427,5 +7100,13 @@ class OrderPlatformModel {
|
|
|
7427
7100
|
success: Joi.boolean(),
|
|
7428
7101
|
});
|
|
7429
7102
|
}
|
|
7103
|
+
|
|
7104
|
+
/** @returns {BulkFailedResponse} */
|
|
7105
|
+
static BulkFailedResponse() {
|
|
7106
|
+
return Joi.object({
|
|
7107
|
+
status: Joi.boolean(),
|
|
7108
|
+
error: Joi.string().allow(""),
|
|
7109
|
+
});
|
|
7110
|
+
}
|
|
7430
7111
|
}
|
|
7431
7112
|
module.exports = OrderPlatformModel;
|