@gofynd/fdk-client-javascript 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/documentation/application/CATALOG.md +371 -371
  2. package/documentation/application/ORDER.md +272 -272
  3. package/documentation/application/PAYMENT.md +269 -269
  4. package/documentation/platform/CATALOG.md +1678 -1664
  5. package/documentation/platform/COMPANYPROFILE.md +201 -201
  6. package/documentation/platform/ORDER.md +1442 -1323
  7. package/documentation/platform/PAYMENT.md +88 -88
  8. package/index.js +7 -1
  9. package/package.json +1 -1
  10. package/sdk/application/Cart/CartApplicationClient.js +302 -0
  11. package/sdk/application/Cart/CartApplicationValidator.js +1 -0
  12. package/sdk/application/Catalog/CatalogApplicationClient.js +378 -0
  13. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +17 -17
  14. package/sdk/application/Catalog/CatalogApplicationModel.js +500 -500
  15. package/sdk/application/Catalog/CatalogApplicationValidator.js +1 -0
  16. package/sdk/application/Common/CommonApplicationClient.js +22 -0
  17. package/sdk/application/Common/CommonApplicationValidator.js +1 -0
  18. package/sdk/application/Communication/CommunicationApplicationClient.js +41 -0
  19. package/sdk/application/Communication/CommunicationApplicationValidator.js +1 -0
  20. package/sdk/application/Configuration/ConfigurationApplicationClient.js +200 -0
  21. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +1 -0
  22. package/sdk/application/Content/ContentApplicationClient.js +215 -0
  23. package/sdk/application/Content/ContentApplicationValidator.js +1 -0
  24. package/sdk/application/FileStorage/FileStorageApplicationClient.js +33 -0
  25. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +1 -0
  26. package/sdk/application/Lead/LeadApplicationClient.js +81 -0
  27. package/sdk/application/Lead/LeadApplicationValidator.js +1 -0
  28. package/sdk/application/Logistic/LogisticApplicationClient.js +44 -0
  29. package/sdk/application/Logistic/LogisticApplicationValidator.js +1 -0
  30. package/sdk/application/Order/OrderApplicationClient.js +146 -0
  31. package/sdk/application/Order/OrderApplicationModel.d.ts +20 -20
  32. package/sdk/application/Order/OrderApplicationModel.js +329 -329
  33. package/sdk/application/Order/OrderApplicationValidator.js +1 -0
  34. package/sdk/application/Payment/PaymentApplicationClient.js +528 -0
  35. package/sdk/application/Payment/PaymentApplicationModel.d.ts +5 -5
  36. package/sdk/application/Payment/PaymentApplicationModel.js +391 -391
  37. package/sdk/application/Payment/PaymentApplicationValidator.js +1 -0
  38. package/sdk/application/PosCart/PosCartApplicationClient.js +329 -0
  39. package/sdk/application/PosCart/PosCartApplicationValidator.js +1 -0
  40. package/sdk/application/Rewards/RewardsApplicationClient.js +81 -0
  41. package/sdk/application/Rewards/RewardsApplicationValidator.js +1 -0
  42. package/sdk/application/Share/ShareApplicationClient.js +87 -0
  43. package/sdk/application/Share/ShareApplicationValidator.js +1 -0
  44. package/sdk/application/Theme/ThemeApplicationClient.js +44 -0
  45. package/sdk/application/Theme/ThemeApplicationValidator.js +1 -0
  46. package/sdk/application/User/UserApplicationClient.js +405 -0
  47. package/sdk/application/User/UserApplicationValidator.js +1 -0
  48. package/sdk/common/AxiosHelper.js +1 -1
  49. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +114 -0
  50. package/sdk/platform/Analytics/AnalyticsPlatformClient.js +58 -0
  51. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +46 -0
  52. package/sdk/platform/Billing/BillingPlatformClient.js +160 -0
  53. package/sdk/platform/Cart/CartPlatformApplicationClient.js +246 -0
  54. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +29 -29
  55. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +839 -48
  56. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +3 -3
  57. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +9 -9
  58. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +54 -54
  59. package/sdk/platform/Catalog/CatalogPlatformClient.js +1149 -96
  60. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +58 -57
  61. package/sdk/platform/Catalog/CatalogPlatformModel.js +1626 -1614
  62. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +6 -6
  63. package/sdk/platform/Catalog/CatalogPlatformValidator.js +20 -20
  64. package/sdk/platform/Common/CommonPlatformClient.js +26 -0
  65. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +587 -0
  66. package/sdk/platform/Communication/CommunicationPlatformClient.js +15 -0
  67. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +179 -0
  68. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +11 -11
  69. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +269 -269
  70. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +382 -0
  71. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +282 -0
  72. package/sdk/platform/Content/ContentPlatformApplicationClient.js +866 -0
  73. package/sdk/platform/Discount/DiscountPlatformClient.js +152 -0
  74. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +54 -0
  75. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +76 -0
  76. package/sdk/platform/Inventory/InventoryPlatformClient.js +161 -0
  77. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +162 -0
  78. package/sdk/platform/Lead/LeadPlatformClient.js +140 -0
  79. package/sdk/platform/Order/OrderPlatformApplicationClient.js +55 -0
  80. package/sdk/platform/Order/OrderPlatformClient.d.ts +15 -6
  81. package/sdk/platform/Order/OrderPlatformClient.js +674 -15
  82. package/sdk/platform/Order/OrderPlatformModel.d.ts +67 -60
  83. package/sdk/platform/Order/OrderPlatformModel.js +1559 -1623
  84. package/sdk/platform/Order/OrderPlatformValidator.d.ts +2 -1
  85. package/sdk/platform/Order/OrderPlatformValidator.js +10 -4
  86. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +26 -0
  87. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +165 -0
  88. package/sdk/platform/Payment/PaymentPlatformClient.js +139 -0
  89. package/sdk/platform/Payment/PaymentPlatformModel.js +137 -137
  90. package/sdk/platform/PlatformApplicationClient.d.ts +2217 -2243
  91. package/sdk/platform/PlatformApplicationClient.js +2514 -2524
  92. package/sdk/platform/PlatformClient.d.ts +2217 -2243
  93. package/sdk/platform/PlatformClient.js +2514 -2524
  94. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +169 -0
  95. package/sdk/platform/Share/SharePlatformApplicationClient.js +53 -0
  96. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +293 -0
  97. package/sdk/platform/User/UserPlatformApplicationClient.js +145 -0
  98. package/sdk/platform/Webhook/WebhookPlatformClient.js +90 -0
  99. package/sdk/public/Configuration/ConfigurationPublicClient.js +25 -0
  100. package/sdk/public/Configuration/ConfigurationPublicValidator.js +3 -1
  101. package/sdk/public/Inventory/InventoryPublicClient.js +75 -0
  102. package/sdk/public/Inventory/InventoryPublicValidator.js +3 -1
  103. package/sdk/public/Webhook/WebhookPublicClient.js +29 -0
  104. package/sdk/public/Webhook/WebhookPublicValidator.js +3 -1
@@ -3,10 +3,10 @@ const Joi = require("joi");
3
3
  class OrderModel {
4
4
  static OrderStatuses() {
5
5
  return Joi.object({
6
- value: Joi.number(),
7
-
8
6
  display: Joi.string().allow(""),
9
7
 
8
+ value: Joi.number(),
9
+
10
10
  is_selected: Joi.boolean(),
11
11
  });
12
12
  }
@@ -17,175 +17,159 @@ class OrderModel {
17
17
  });
18
18
  }
19
19
 
20
- static BreakupValues() {
20
+ static OrderPage() {
21
21
  return Joi.object({
22
- name: Joi.string().allow(""),
23
-
24
- value: Joi.number(),
25
-
26
- display: Joi.string().allow(""),
27
- });
28
- }
22
+ size: Joi.number(),
29
23
 
30
- static UserInfo() {
31
- return Joi.object({
32
- name: Joi.string().allow(""),
24
+ type: Joi.string().allow(""),
33
25
 
34
- email: Joi.string().allow(""),
26
+ current: Joi.number(),
35
27
 
36
- mobile: Joi.string().allow(""),
28
+ item_total: Joi.number(),
37
29
 
38
- gender: Joi.string().allow(""),
30
+ has_next: Joi.boolean(),
39
31
  });
40
32
  }
41
33
 
42
34
  static BagsForReorderArticleAssignment() {
43
35
  return Joi.object({
44
- strategy: Joi.string().allow(""),
45
-
46
36
  level: Joi.string().allow(""),
37
+
38
+ strategy: Joi.string().allow(""),
47
39
  });
48
40
  }
49
41
 
50
42
  static BagsForReorder() {
51
43
  return Joi.object({
52
- seller_id: Joi.number(),
53
-
54
- item_id: Joi.number(),
55
-
56
44
  quantity: Joi.number(),
57
45
 
46
+ store_id: Joi.number(),
47
+
58
48
  article_assignment: OrderModel.BagsForReorderArticleAssignment(),
59
49
 
60
- item_size: Joi.string().allow(""),
50
+ seller_id: Joi.number(),
61
51
 
62
- store_id: Joi.number(),
52
+ item_id: Joi.number(),
53
+
54
+ item_size: Joi.string().allow(""),
63
55
  });
64
56
  }
65
57
 
66
- static TimeStampData() {
58
+ static UserInfo() {
67
59
  return Joi.object({
68
- min: Joi.string().allow(""),
60
+ mobile: Joi.string().allow(""),
69
61
 
70
- max: Joi.string().allow(""),
71
- });
72
- }
62
+ name: Joi.string().allow(""),
73
63
 
74
- static Promise() {
75
- return Joi.object({
76
- show_promise: Joi.boolean(),
64
+ gender: Joi.string().allow(""),
77
65
 
78
- timestamp: OrderModel.TimeStampData(),
66
+ email: Joi.string().allow(""),
79
67
  });
80
68
  }
81
69
 
82
- static ShipmentUserInfo() {
70
+ static NestedTrackingDetails() {
83
71
  return Joi.object({
84
- first_name: Joi.string().allow(""),
72
+ time: Joi.string().allow(""),
85
73
 
86
- mobile: Joi.string().allow(""),
74
+ is_passed: Joi.boolean(),
87
75
 
88
- last_name: Joi.string().allow(""),
76
+ is_current: Joi.boolean(),
89
77
 
90
- gender: Joi.string().allow(""),
78
+ status: Joi.string().allow(""),
91
79
  });
92
80
  }
93
81
 
94
- static ShipmentTotalDetails() {
82
+ static TrackingDetails() {
95
83
  return Joi.object({
96
- pieces: Joi.number(),
84
+ status: Joi.string().allow(""),
97
85
 
98
- total_price: Joi.number(),
86
+ is_passed: Joi.boolean(),
99
87
 
100
- sizes: Joi.number(),
88
+ tracking_details: Joi.array().items(OrderModel.NestedTrackingDetails()),
89
+
90
+ time: Joi.string().allow(""),
91
+
92
+ is_current: Joi.boolean(),
101
93
  });
102
94
  }
103
95
 
104
- static ShipmentPayment() {
96
+ static FulfillingCompany() {
105
97
  return Joi.object({
106
- logo: Joi.string().allow(""),
107
-
108
- payment_mode: Joi.string().allow(""),
109
-
110
- mode: Joi.string().allow(""),
98
+ id: Joi.number(),
111
99
 
112
- status: Joi.string().allow(""),
100
+ name: Joi.string().allow(""),
101
+ });
102
+ }
113
103
 
114
- mop: Joi.string().allow(""),
104
+ static TimeStampData() {
105
+ return Joi.object({
106
+ max: Joi.string().allow(""),
115
107
 
116
- display_name: Joi.string().allow(""),
108
+ min: Joi.string().allow(""),
117
109
  });
118
110
  }
119
111
 
120
- static ShipmentStatus() {
112
+ static Promise() {
121
113
  return Joi.object({
122
- title: Joi.string().allow(""),
114
+ timestamp: OrderModel.TimeStampData(),
123
115
 
124
- hex_code: Joi.string().allow(""),
116
+ show_promise: Joi.boolean(),
125
117
  });
126
118
  }
127
119
 
128
- static DeliveryAddress() {
120
+ static Prices() {
129
121
  return Joi.object({
130
- version: Joi.string().allow(""),
122
+ refund_amount: Joi.number(),
131
123
 
132
- address_type: Joi.string().allow(""),
124
+ amount_paid_roundoff: Joi.number(),
133
125
 
134
- state: Joi.string().allow(""),
126
+ coupon_effective_discount: Joi.number(),
135
127
 
136
- latitude: Joi.number(),
128
+ value_of_good: Joi.number(),
137
129
 
138
- pincode: Joi.string().allow(""),
130
+ gst_tax_percentage: Joi.number(),
139
131
 
140
- city: Joi.string().allow(""),
132
+ fynd_credits: Joi.number(),
141
133
 
142
- address1: Joi.string().allow(""),
134
+ delivery_charge: Joi.number(),
143
135
 
144
- name: Joi.string().allow(""),
136
+ price_marked: Joi.number(),
145
137
 
146
- area: Joi.string().allow(""),
138
+ cashback: Joi.number(),
147
139
 
148
- updated_at: Joi.string().allow(""),
140
+ discount: Joi.number(),
149
141
 
150
- address: Joi.string().allow(""),
142
+ cashback_applied: Joi.number(),
151
143
 
152
- address2: Joi.string().allow(""),
144
+ coupon_value: Joi.number(),
153
145
 
154
- landmark: Joi.string().allow(""),
146
+ price_effective: Joi.number(),
155
147
 
156
- email: Joi.string().allow(""),
148
+ refund_credit: Joi.number(),
157
149
 
158
- contact_person: Joi.string().allow(""),
150
+ cod_charges: Joi.number(),
159
151
 
160
- phone: Joi.string().allow(""),
152
+ brand_calculated_amount: Joi.number(),
161
153
 
162
- country: Joi.string().allow(""),
154
+ added_to_fynd_cash: Joi.boolean(),
163
155
 
164
- created_at: Joi.string().allow(""),
156
+ promotion_effective_discount: Joi.number(),
165
157
 
166
- address_category: Joi.string().allow(""),
158
+ transfer_price: Joi.number(),
167
159
 
168
- longitude: Joi.number(),
160
+ amount_paid: Joi.number(),
169
161
  });
170
162
  }
171
163
 
172
- static FulfillingCompany() {
164
+ static CurrentStatus() {
173
165
  return Joi.object({
174
- id: Joi.number(),
166
+ journey_type: Joi.string().allow(""),
175
167
 
176
- name: Joi.string().allow(""),
177
- });
178
- }
168
+ status: Joi.string().allow(""),
179
169
 
180
- static CurrentStatus() {
181
- return Joi.object({
182
170
  name: Joi.string().allow(""),
183
171
 
184
- journey_type: Joi.string().allow(""),
185
-
186
172
  updated_at: Joi.string().allow(""),
187
-
188
- status: Joi.string().allow(""),
189
173
  });
190
174
  }
191
175
 
@@ -199,97 +183,53 @@ class OrderModel {
199
183
 
200
184
  static Item() {
201
185
  return Joi.object({
202
- name: Joi.string().allow(""),
186
+ size: Joi.string().allow(""),
203
187
 
204
- seller_identifier: Joi.string().allow(""),
188
+ name: Joi.string().allow(""),
205
189
 
206
190
  code: Joi.string().allow(""),
207
191
 
208
- slug_key: Joi.string().allow(""),
209
-
210
- id: Joi.number(),
211
-
212
- brand: OrderModel.ItemBrand(),
213
-
214
- size: Joi.string().allow(""),
215
-
216
192
  image: Joi.array().items(Joi.string().allow("")),
217
- });
218
- }
219
-
220
- static Prices() {
221
- return Joi.object({
222
- discount: Joi.number(),
223
-
224
- refund_amount: Joi.number(),
225
-
226
- amount_paid: Joi.number(),
227
-
228
- gst_tax_percentage: Joi.number(),
229
-
230
- coupon_effective_discount: Joi.number(),
231
-
232
- value_of_good: Joi.number(),
233
-
234
- refund_credit: Joi.number(),
235
-
236
- added_to_fynd_cash: Joi.boolean(),
237
-
238
- cashback_applied: Joi.number(),
239
-
240
- fynd_credits: Joi.number(),
241
-
242
- amount_paid_roundoff: Joi.number(),
243
-
244
- delivery_charge: Joi.number(),
245
-
246
- promotion_effective_discount: Joi.number(),
247
-
248
- price_effective: Joi.number(),
249
-
250
- cod_charges: Joi.number(),
251
-
252
- brand_calculated_amount: Joi.number(),
253
193
 
254
- cashback: Joi.number(),
194
+ brand: OrderModel.ItemBrand(),
255
195
 
256
- coupon_value: Joi.number(),
196
+ slug_key: Joi.string().allow(""),
257
197
 
258
- price_marked: Joi.number(),
198
+ id: Joi.number(),
259
199
 
260
- transfer_price: Joi.number(),
200
+ seller_identifier: Joi.string().allow(""),
261
201
  });
262
202
  }
263
203
 
264
204
  static AppliedFreeArticles() {
265
205
  return Joi.object({
266
- free_gift_item_details: Joi.any(),
267
-
268
206
  article_id: Joi.string().allow(""),
269
207
 
270
208
  parent_item_identifier: Joi.string().allow(""),
271
209
 
210
+ free_gift_item_details: Joi.any(),
211
+
272
212
  quantity: Joi.number(),
273
213
  });
274
214
  }
275
215
 
276
216
  static AppliedPromos() {
277
217
  return Joi.object({
278
- amount: Joi.number(),
279
-
280
218
  promotion_type: Joi.string().allow(""),
281
219
 
282
- promotion_name: Joi.string().allow(""),
220
+ promo_id: Joi.string().allow(""),
283
221
 
284
222
  applied_free_articles: Joi.array().items(
285
223
  OrderModel.AppliedFreeArticles()
286
224
  ),
287
225
 
288
- promo_id: Joi.string().allow(""),
226
+ amount: Joi.number(),
227
+
228
+ mrp_promotion: Joi.boolean(),
289
229
 
290
230
  article_quantity: Joi.number(),
291
231
 
292
- mrp_promotion: Joi.boolean(),
232
+ promotion_name: Joi.string().allow(""),
293
233
  });
294
234
  }
295
235
 
@@ -303,247 +243,307 @@ class OrderModel {
303
243
 
304
244
  static FinancialBreakup() {
305
245
  return Joi.object({
306
- discount: Joi.number(),
307
-
308
246
  refund_amount: Joi.number(),
309
247
 
310
- amount_paid: Joi.number(),
248
+ size: Joi.string().allow(""),
311
249
 
312
- gst_tax_percentage: Joi.number(),
250
+ amount_paid_roundoff: Joi.number(),
313
251
 
314
252
  coupon_effective_discount: Joi.number(),
315
253
 
316
- total_units: Joi.number(),
254
+ gst_tag: Joi.string().allow(""),
317
255
 
318
256
  value_of_good: Joi.number(),
319
257
 
320
- refund_credit: Joi.number(),
258
+ gst_tax_percentage: Joi.number(),
321
259
 
322
- added_to_fynd_cash: Joi.boolean(),
260
+ gst_fee: Joi.number(),
323
261
 
324
- gst_tag: Joi.string().allow(""),
262
+ fynd_credits: Joi.number(),
325
263
 
326
- cashback_applied: Joi.number(),
264
+ delivery_charge: Joi.number(),
327
265
 
328
- fynd_credits: Joi.number(),
266
+ total_units: Joi.number(),
329
267
 
330
- amount_paid_roundoff: Joi.number(),
268
+ price_marked: Joi.number(),
331
269
 
332
- gst_fee: Joi.number(),
270
+ cashback: Joi.number(),
333
271
 
334
- delivery_charge: Joi.number(),
272
+ identifiers: OrderModel.Identifiers(),
335
273
 
336
- promotion_effective_discount: Joi.number(),
274
+ discount: Joi.number(),
337
275
 
338
- price_effective: Joi.number(),
276
+ item_name: Joi.string().allow(""),
339
277
 
340
- cod_charges: Joi.number(),
278
+ coupon_value: Joi.number(),
341
279
 
342
- hsn_code: Joi.string().allow(""),
280
+ cashback_applied: Joi.number(),
343
281
 
344
- brand_calculated_amount: Joi.number(),
282
+ refund_credit: Joi.number(),
345
283
 
346
- cashback: Joi.number(),
284
+ price_effective: Joi.number(),
347
285
 
348
- item_name: Joi.string().allow(""),
286
+ cod_charges: Joi.number(),
349
287
 
350
- coupon_value: Joi.number(),
288
+ brand_calculated_amount: Joi.number(),
351
289
 
352
- price_marked: Joi.number(),
290
+ added_to_fynd_cash: Joi.boolean(),
353
291
 
354
- identifiers: OrderModel.Identifiers(),
292
+ promotion_effective_discount: Joi.number(),
355
293
 
356
294
  transfer_price: Joi.number(),
357
295
 
358
- size: Joi.string().allow(""),
296
+ hsn_code: Joi.string().allow(""),
297
+
298
+ amount_paid: Joi.number(),
359
299
  });
360
300
  }
361
301
 
362
302
  static Bags() {
363
303
  return Joi.object({
364
- can_return: Joi.boolean(),
365
-
366
- current_status: OrderModel.CurrentStatus(),
304
+ prices: OrderModel.Prices(),
367
305
 
368
- quantity: Joi.number(),
306
+ can_cancel: Joi.boolean(),
369
307
 
370
- returnable_date: Joi.string().allow(""),
308
+ parent_promo_bags: Joi.any(),
371
309
 
372
- delivery_date: Joi.string().allow(""),
310
+ quantity: Joi.number(),
373
311
 
374
- seller_identifier: Joi.string().allow(""),
312
+ line_number: Joi.number(),
375
313
 
376
- item: OrderModel.Item(),
314
+ can_return: Joi.boolean(),
377
315
 
378
- line_number: Joi.number(),
316
+ current_status: OrderModel.CurrentStatus(),
379
317
 
380
- parent_promo_bags: Joi.any(),
318
+ returnable_date: Joi.string().allow(""),
381
319
 
382
- prices: OrderModel.Prices(),
320
+ item: OrderModel.Item(),
383
321
 
384
322
  applied_promos: Joi.array().items(OrderModel.AppliedPromos()),
385
323
 
386
324
  id: Joi.number(),
387
325
 
388
- can_cancel: Joi.boolean(),
326
+ seller_identifier: Joi.string().allow(""),
327
+
328
+ delivery_date: Joi.string().allow(""),
389
329
 
390
330
  financial_breakup: Joi.array().items(OrderModel.FinancialBreakup()),
391
331
  });
392
332
  }
393
333
 
334
+ static ShipmentUserInfo() {
335
+ return Joi.object({
336
+ last_name: Joi.string().allow(""),
337
+
338
+ mobile: Joi.string().allow(""),
339
+
340
+ gender: Joi.string().allow(""),
341
+
342
+ first_name: Joi.string().allow(""),
343
+ });
344
+ }
345
+
394
346
  static FulfillingStore() {
395
347
  return Joi.object({
396
- company_id: Joi.number(),
348
+ code: Joi.string().allow(""),
397
349
 
398
350
  name: Joi.string().allow(""),
399
351
 
400
- code: Joi.string().allow(""),
352
+ company_name: Joi.string().allow(""),
401
353
 
402
354
  id: Joi.number(),
403
355
 
404
- company_name: Joi.string().allow(""),
356
+ company_id: Joi.number(),
405
357
  });
406
358
  }
407
359
 
408
- static Invoice() {
360
+ static BreakupValues() {
409
361
  return Joi.object({
410
- updated_date: Joi.string().allow(""),
362
+ display: Joi.string().allow(""),
363
+
364
+ value: Joi.number(),
365
+
366
+ name: Joi.string().allow(""),
367
+ });
368
+ }
411
369
 
370
+ static Invoice() {
371
+ return Joi.object({
412
372
  label_url: Joi.string().allow(""),
413
373
 
414
374
  invoice_url: Joi.string().allow(""),
375
+
376
+ updated_date: Joi.string().allow(""),
415
377
  });
416
378
  }
417
379
 
418
- static NestedTrackingDetails() {
380
+ static DeliveryAddress() {
419
381
  return Joi.object({
420
- time: Joi.string().allow(""),
382
+ address_type: Joi.string().allow(""),
421
383
 
422
- is_passed: Joi.boolean(),
384
+ phone: Joi.string().allow(""),
423
385
 
424
- is_current: Joi.boolean(),
386
+ name: Joi.string().allow(""),
425
387
 
426
- status: Joi.string().allow(""),
388
+ version: Joi.string().allow(""),
389
+
390
+ contact_person: Joi.string().allow(""),
391
+
392
+ city: Joi.string().allow(""),
393
+
394
+ address: Joi.string().allow(""),
395
+
396
+ updated_at: Joi.string().allow(""),
397
+
398
+ address_category: Joi.string().allow(""),
399
+
400
+ pincode: Joi.string().allow(""),
401
+
402
+ address1: Joi.string().allow(""),
403
+
404
+ state: Joi.string().allow(""),
405
+
406
+ longitude: Joi.number(),
407
+
408
+ landmark: Joi.string().allow(""),
409
+
410
+ created_at: Joi.string().allow(""),
411
+
412
+ address2: Joi.string().allow(""),
413
+
414
+ email: Joi.string().allow(""),
415
+
416
+ latitude: Joi.number(),
417
+
418
+ country: Joi.string().allow(""),
419
+
420
+ area: Joi.string().allow(""),
427
421
  });
428
422
  }
429
423
 
430
- static TrackingDetails() {
424
+ static ShipmentStatus() {
431
425
  return Joi.object({
432
- time: Joi.string().allow(""),
426
+ hex_code: Joi.string().allow(""),
433
427
 
434
- is_current: Joi.boolean(),
428
+ title: Joi.string().allow(""),
429
+ });
430
+ }
431
+
432
+ static ShipmentPayment() {
433
+ return Joi.object({
434
+ mop: Joi.string().allow(""),
435
+
436
+ payment_mode: Joi.string().allow(""),
437
+
438
+ mode: Joi.string().allow(""),
435
439
 
436
440
  status: Joi.string().allow(""),
437
441
 
438
- tracking_details: Joi.array().items(OrderModel.NestedTrackingDetails()),
442
+ display_name: Joi.string().allow(""),
439
443
 
440
- is_passed: Joi.boolean(),
444
+ logo: Joi.string().allow(""),
445
+ });
446
+ }
447
+
448
+ static ShipmentTotalDetails() {
449
+ return Joi.object({
450
+ sizes: Joi.number(),
451
+
452
+ total_price: Joi.number(),
453
+
454
+ pieces: Joi.number(),
441
455
  });
442
456
  }
443
457
 
444
458
  static Shipments() {
445
459
  return Joi.object({
446
- returnable_date: Joi.string().allow(""),
460
+ order_type: Joi.string().allow(""),
447
461
 
448
- promise: OrderModel.Promise(),
462
+ refund_details: Joi.any(),
449
463
 
450
- need_help_url: Joi.string().allow(""),
464
+ comment: Joi.string().allow(""),
451
465
 
452
- custom_meta: Joi.array().items(Joi.any()),
466
+ shipment_id: Joi.string().allow(""),
453
467
 
454
- user_info: OrderModel.ShipmentUserInfo(),
468
+ tracking_details: Joi.array().items(OrderModel.TrackingDetails()),
455
469
 
456
- traking_no: Joi.string().allow(""),
470
+ show_download_invoice: Joi.boolean(),
457
471
 
458
- dp_name: Joi.string().allow(""),
472
+ fulfilling_company: OrderModel.FulfillingCompany(),
459
473
 
460
- size_info: Joi.any(),
474
+ show_track_link: Joi.boolean(),
461
475
 
462
- shipment_id: Joi.string().allow(""),
476
+ awb_no: Joi.string().allow(""),
463
477
 
464
- breakup_values: Joi.array().items(OrderModel.BreakupValues()),
478
+ promise: OrderModel.Promise(),
465
479
 
466
- total_bags: Joi.number(),
480
+ traking_no: Joi.string().allow(""),
467
481
 
468
- delivery_date: Joi.string().allow(""),
482
+ bags: Joi.array().items(OrderModel.Bags()),
469
483
 
470
- total_details: OrderModel.ShipmentTotalDetails(),
484
+ user_info: OrderModel.ShipmentUserInfo(),
471
485
 
472
- payment: OrderModel.ShipmentPayment(),
486
+ can_break: Joi.any(),
473
487
 
474
- can_cancel: Joi.boolean(),
488
+ returnable_date: Joi.string().allow(""),
475
489
 
476
- shipment_status: OrderModel.ShipmentStatus(),
490
+ need_help_url: Joi.string().allow(""),
477
491
 
478
- can_return: Joi.boolean(),
492
+ fulfilling_store: OrderModel.FulfillingStore(),
479
493
 
480
- refund_details: Joi.any(),
494
+ breakup_values: Joi.array().items(OrderModel.BreakupValues()),
481
495
 
482
- delivery_address: OrderModel.DeliveryAddress(),
496
+ invoice: OrderModel.Invoice(),
483
497
 
484
- comment: Joi.string().allow(""),
498
+ prices: OrderModel.Prices(),
485
499
 
486
- show_download_invoice: Joi.boolean(),
500
+ size_info: Joi.any(),
487
501
 
488
- fulfilling_company: OrderModel.FulfillingCompany(),
502
+ can_return: Joi.boolean(),
489
503
 
490
- bags: Joi.array().items(OrderModel.Bags()),
504
+ custom_meta: Joi.array().items(Joi.any()),
491
505
 
492
- awb_no: Joi.string().allow(""),
506
+ order_id: Joi.string().allow(""),
493
507
 
494
- order_type: Joi.string().allow(""),
508
+ track_url: Joi.string().allow(""),
495
509
 
496
- show_track_link: Joi.boolean(),
510
+ total_bags: Joi.number(),
497
511
 
498
- shipment_created_at: Joi.string().allow(""),
512
+ delivery_address: OrderModel.DeliveryAddress(),
499
513
 
500
- fulfilling_store: OrderModel.FulfillingStore(),
514
+ delivery_date: Joi.string().allow(""),
501
515
 
502
- invoice: OrderModel.Invoice(),
516
+ shipment_created_at: Joi.string().allow(""),
503
517
 
504
- tracking_details: Joi.array().items(OrderModel.TrackingDetails()),
518
+ shipment_status: OrderModel.ShipmentStatus(),
505
519
 
506
- prices: OrderModel.Prices(),
520
+ can_cancel: Joi.boolean(),
507
521
 
508
- beneficiary_details: Joi.boolean(),
522
+ payment: OrderModel.ShipmentPayment(),
509
523
 
510
- order_id: Joi.string().allow(""),
524
+ dp_name: Joi.string().allow(""),
511
525
 
512
- can_break: Joi.any(),
526
+ total_details: OrderModel.ShipmentTotalDetails(),
513
527
 
514
- track_url: Joi.string().allow(""),
528
+ beneficiary_details: Joi.boolean(),
515
529
  });
516
530
  }
517
531
 
518
532
  static OrderSchema() {
519
533
  return Joi.object({
520
- order_created_time: Joi.string().allow(""),
521
-
522
- breakup_values: Joi.array().items(OrderModel.BreakupValues()),
534
+ bags_for_reorder: Joi.array().items(OrderModel.BagsForReorder()),
523
535
 
524
- total_shipments_in_order: Joi.number(),
536
+ order_created_time: Joi.string().allow(""),
525
537
 
526
538
  user_info: OrderModel.UserInfo(),
527
539
 
528
- bags_for_reorder: Joi.array().items(OrderModel.BagsForReorder()),
529
-
530
540
  shipments: Joi.array().items(OrderModel.Shipments()),
531
541
 
532
542
  order_id: Joi.string().allow(""),
533
- });
534
- }
535
543
 
536
- static OrderPage() {
537
- return Joi.object({
538
- type: Joi.string().allow(""),
539
-
540
- item_total: Joi.number(),
541
-
542
- current: Joi.number(),
543
-
544
- has_next: Joi.boolean(),
544
+ total_shipments_in_order: Joi.number(),
545
545
 
546
- size: Joi.number(),
546
+ breakup_values: Joi.array().items(OrderModel.BreakupValues()),
547
547
  });
548
548
  }
549
549
 
@@ -551,9 +551,9 @@ class OrderModel {
551
551
  return Joi.object({
552
552
  filters: OrderModel.OrderFilters(),
553
553
 
554
- items: Joi.array().items(OrderModel.OrderSchema()),
555
-
556
554
  page: OrderModel.OrderPage(),
555
+
556
+ items: Joi.array().items(OrderModel.OrderSchema()),
557
557
  });
558
558
  }
559
559
 
@@ -581,30 +581,30 @@ class OrderModel {
581
581
  return Joi.object({
582
582
  success: Joi.boolean().required(),
583
583
 
584
- presigned_type: Joi.string().allow("").required(),
585
-
586
584
  presigned_url: Joi.string().allow("").required(),
587
585
 
586
+ presigned_type: Joi.string().allow("").required(),
587
+
588
588
  shipment_id: Joi.string().allow("").required(),
589
589
  });
590
590
  }
591
591
 
592
592
  static Track() {
593
593
  return Joi.object({
594
- shipment_type: Joi.string().allow(""),
595
-
596
- last_location_recieved_at: Joi.string().allow(""),
594
+ updated_time: Joi.string().allow(""),
597
595
 
598
596
  status: Joi.string().allow(""),
599
597
 
600
- awb: Joi.string().allow(""),
598
+ shipment_type: Joi.string().allow(""),
601
599
 
602
600
  updated_at: Joi.string().allow(""),
603
601
 
604
- updated_time: Joi.string().allow(""),
602
+ awb: Joi.string().allow(""),
605
603
 
606
604
  account_name: Joi.string().allow(""),
607
605
 
606
+ last_location_recieved_at: Joi.string().allow(""),
607
+
608
608
  reason: Joi.string().allow(""),
609
609
  });
610
610
  }
@@ -617,26 +617,26 @@ class OrderModel {
617
617
 
618
618
  static CustomerDetailsResponse() {
619
619
  return Joi.object({
620
- country: Joi.string().allow(""),
621
-
622
- shipment_id: Joi.string().allow(""),
623
-
624
620
  name: Joi.string().allow(""),
625
621
 
626
622
  phone: Joi.string().allow(""),
627
623
 
624
+ country: Joi.string().allow(""),
625
+
626
+ shipment_id: Joi.string().allow(""),
627
+
628
628
  order_id: Joi.string().allow(""),
629
629
  });
630
630
  }
631
631
 
632
632
  static SendOtpToCustomerResponse() {
633
633
  return Joi.object({
634
- request_id: Joi.string().allow(""),
635
-
636
634
  success: Joi.boolean(),
637
635
 
638
636
  resend_timer: Joi.number(),
639
637
 
638
+ request_id: Joi.string().allow(""),
639
+
640
640
  message: Joi.string().allow(""),
641
641
  });
642
642
  }
@@ -655,57 +655,57 @@ class OrderModel {
655
655
  });
656
656
  }
657
657
 
658
- static QuestionSet() {
658
+ static BagReasonMeta() {
659
659
  return Joi.object({
660
- id: Joi.number(),
661
-
662
- display_name: Joi.string().allow(""),
660
+ show_text_area: Joi.boolean(),
663
661
  });
664
662
  }
665
663
 
666
- static BagReasonMeta() {
664
+ static QuestionSet() {
667
665
  return Joi.object({
668
- show_text_area: Joi.boolean(),
666
+ id: Joi.number(),
667
+
668
+ display_name: Joi.string().allow(""),
669
669
  });
670
670
  }
671
671
 
672
672
  static BagReasons() {
673
673
  return Joi.object({
674
- question_set: Joi.array().items(OrderModel.QuestionSet()),
674
+ qc_type: Joi.array().items(Joi.string().allow("")),
675
675
 
676
- meta: OrderModel.BagReasonMeta(),
676
+ reasons: Joi.array().items(OrderModel.BagReasons()),
677
677
 
678
- display_name: Joi.string().allow(""),
678
+ meta: OrderModel.BagReasonMeta(),
679
679
 
680
680
  id: Joi.number(),
681
681
 
682
- reasons: Joi.array().items(OrderModel.BagReasons()),
682
+ display_name: Joi.string().allow(""),
683
683
 
684
- qc_type: Joi.array().items(Joi.string().allow("")),
684
+ question_set: Joi.array().items(OrderModel.QuestionSet()),
685
685
  });
686
686
  }
687
687
 
688
688
  static ShipmentBagReasons() {
689
689
  return Joi.object({
690
- reasons: Joi.array().items(OrderModel.BagReasons()),
691
-
692
690
  success: Joi.boolean(),
691
+
692
+ reasons: Joi.array().items(OrderModel.BagReasons()),
693
693
  });
694
694
  }
695
695
 
696
696
  static ShipmentReason() {
697
697
  return Joi.object({
698
- reason_text: Joi.string().allow(""),
699
-
700
- flow: Joi.string().allow(""),
701
-
702
698
  priority: Joi.number(),
703
699
 
704
700
  show_text_area: Joi.boolean(),
705
701
 
706
- reason_id: Joi.number(),
702
+ flow: Joi.string().allow(""),
707
703
 
708
704
  feedback_type: Joi.string().allow(""),
705
+
706
+ reason_text: Joi.string().allow(""),
707
+
708
+ reason_id: Joi.number(),
709
709
  });
710
710
  }
711
711
 
@@ -715,117 +715,117 @@ class OrderModel {
715
715
  });
716
716
  }
717
717
 
718
- static EntityReasonData() {
718
+ static ProductsDataUpdatesFilters() {
719
719
  return Joi.object({
720
- reason_text: Joi.string().allow(""),
720
+ identifier: Joi.string().allow(""),
721
721
 
722
- reason_id: Joi.number(),
722
+ line_number: Joi.number(),
723
723
  });
724
724
  }
725
725
 
726
- static EntitiesReasons() {
726
+ static ProductsDataUpdates() {
727
727
  return Joi.object({
728
- filters: Joi.array().items(Joi.any()),
728
+ filters: Joi.array().items(OrderModel.ProductsDataUpdatesFilters()),
729
729
 
730
- data: OrderModel.EntityReasonData(),
730
+ data: Joi.any(),
731
731
  });
732
732
  }
733
733
 
734
- static ProductsReasonsFilters() {
734
+ static EntitiesDataUpdates() {
735
735
  return Joi.object({
736
- line_number: Joi.number(),
737
-
738
- identifier: Joi.string().allow(""),
736
+ filters: Joi.array().items(Joi.any()),
739
737
 
740
- quantity: Joi.number(),
738
+ data: Joi.any(),
741
739
  });
742
740
  }
743
741
 
744
- static ProductsReasonsData() {
742
+ static DataUpdates() {
745
743
  return Joi.object({
746
- reason_text: Joi.string().allow(""),
744
+ products: Joi.array().items(OrderModel.ProductsDataUpdates()),
747
745
 
748
- reason_id: Joi.number(),
746
+ entities: Joi.array().items(OrderModel.EntitiesDataUpdates()),
749
747
  });
750
748
  }
751
749
 
752
- static ProductsReasons() {
750
+ static Products() {
753
751
  return Joi.object({
754
- filters: Joi.array().items(OrderModel.ProductsReasonsFilters()),
752
+ identifier: Joi.string().allow(""),
755
753
 
756
- data: OrderModel.ProductsReasonsData(),
754
+ line_number: Joi.number(),
755
+
756
+ quantity: Joi.number(),
757
757
  });
758
758
  }
759
759
 
760
- static ReasonsData() {
760
+ static ProductsReasonsFilters() {
761
761
  return Joi.object({
762
- entities: Joi.array().items(OrderModel.EntitiesReasons()),
762
+ identifier: Joi.string().allow(""),
763
763
 
764
- products: Joi.array().items(OrderModel.ProductsReasons()),
764
+ line_number: Joi.number(),
765
+
766
+ quantity: Joi.number(),
765
767
  });
766
768
  }
767
769
 
768
- static EntitiesDataUpdates() {
770
+ static ProductsReasonsData() {
769
771
  return Joi.object({
770
- filters: Joi.array().items(Joi.any()),
772
+ reason_text: Joi.string().allow(""),
771
773
 
772
- data: Joi.any(),
774
+ reason_id: Joi.number(),
773
775
  });
774
776
  }
775
777
 
776
- static ProductsDataUpdatesFilters() {
778
+ static ProductsReasons() {
777
779
  return Joi.object({
778
- line_number: Joi.number(),
780
+ filters: Joi.array().items(OrderModel.ProductsReasonsFilters()),
779
781
 
780
- identifier: Joi.string().allow(""),
782
+ data: OrderModel.ProductsReasonsData(),
781
783
  });
782
784
  }
783
785
 
784
- static ProductsDataUpdates() {
786
+ static EntityReasonData() {
785
787
  return Joi.object({
786
- filters: Joi.array().items(OrderModel.ProductsDataUpdatesFilters()),
788
+ reason_text: Joi.string().allow(""),
787
789
 
788
- data: Joi.any(),
790
+ reason_id: Joi.number(),
789
791
  });
790
792
  }
791
793
 
792
- static DataUpdates() {
794
+ static EntitiesReasons() {
793
795
  return Joi.object({
794
- entities: Joi.array().items(OrderModel.EntitiesDataUpdates()),
796
+ filters: Joi.array().items(Joi.any()),
795
797
 
796
- products: Joi.array().items(OrderModel.ProductsDataUpdates()),
798
+ data: OrderModel.EntityReasonData(),
797
799
  });
798
800
  }
799
801
 
800
- static Products() {
802
+ static ReasonsData() {
801
803
  return Joi.object({
802
- line_number: Joi.number(),
803
-
804
- identifier: Joi.string().allow(""),
804
+ products: Joi.array().items(OrderModel.ProductsReasons()),
805
805
 
806
- quantity: Joi.number(),
806
+ entities: Joi.array().items(OrderModel.EntitiesReasons()),
807
807
  });
808
808
  }
809
809
 
810
810
  static ShipmentsRequest() {
811
811
  return Joi.object({
812
- reasons: OrderModel.ReasonsData(),
813
-
814
- identifier: Joi.string().allow("").required(),
815
-
816
812
  data_updates: OrderModel.DataUpdates(),
817
813
 
818
814
  products: Joi.array().items(OrderModel.Products()),
815
+
816
+ identifier: Joi.string().allow("").required(),
817
+
818
+ reasons: OrderModel.ReasonsData(),
819
819
  });
820
820
  }
821
821
 
822
822
  static StatuesRequest() {
823
823
  return Joi.object({
824
- status: Joi.string().allow(""),
825
-
826
824
  exclude_bags_next_state: Joi.string().allow(""),
827
825
 
828
826
  shipments: Joi.array().items(OrderModel.ShipmentsRequest()),
827
+
828
+ status: Joi.string().allow(""),
829
829
  });
830
830
  }
831
831
 
@@ -835,11 +835,11 @@ class OrderModel {
835
835
 
836
836
  statuses: Joi.array().items(OrderModel.StatuesRequest()),
837
837
 
838
+ unlock_before_transition: Joi.boolean(),
839
+
838
840
  lock_after_transition: Joi.boolean(),
839
841
 
840
842
  force_transition: Joi.boolean(),
841
-
842
- unlock_before_transition: Joi.boolean(),
843
843
  });
844
844
  }
845
845
 
@@ -857,14 +857,14 @@ class OrderModel {
857
857
 
858
858
  static ErrorResponse() {
859
859
  return Joi.object({
860
- message: Joi.string().allow("").allow(null),
861
-
862
- status: Joi.number(),
863
-
864
860
  exception: Joi.string().allow("").allow(null),
865
861
 
866
862
  code: Joi.string().allow("").allow(null),
867
863
 
864
+ status: Joi.number(),
865
+
866
+ message: Joi.string().allow("").allow(null),
867
+
868
868
  stack_trace: Joi.string().allow("").allow(null),
869
869
  });
870
870
  }