@gofynd/fdk-client-javascript 1.4.2-beta.2 → 1.4.2-beta.3

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 (106) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationModel.d.ts +1742 -1726
  4. package/sdk/application/Cart/CartApplicationModel.js +1497 -1481
  5. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
  6. package/sdk/application/Catalog/CatalogApplicationModel.js +1611 -1611
  7. package/sdk/application/Common/CommonApplicationModel.d.ts +235 -235
  8. package/sdk/application/Common/CommonApplicationModel.js +172 -172
  9. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +72 -72
  10. package/sdk/application/Communication/CommunicationApplicationModel.js +64 -64
  11. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1614 -1614
  12. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1151 -1151
  13. package/sdk/application/Content/ContentApplicationModel.d.ts +797 -797
  14. package/sdk/application/Content/ContentApplicationModel.js +757 -757
  15. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +79 -79
  16. package/sdk/application/FileStorage/FileStorageApplicationModel.js +84 -84
  17. package/sdk/application/Lead/LeadApplicationModel.d.ts +417 -417
  18. package/sdk/application/Lead/LeadApplicationModel.js +301 -301
  19. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +666 -666
  20. package/sdk/application/Logistic/LogisticApplicationModel.js +601 -601
  21. package/sdk/application/Order/OrderApplicationModel.d.ts +846 -846
  22. package/sdk/application/Order/OrderApplicationModel.js +822 -822
  23. package/sdk/application/Payment/PaymentApplicationClient.d.ts +5 -5
  24. package/sdk/application/Payment/PaymentApplicationClient.js +10 -10
  25. package/sdk/application/Payment/PaymentApplicationModel.d.ts +2155 -2150
  26. package/sdk/application/Payment/PaymentApplicationModel.js +1460 -1458
  27. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +5 -5
  28. package/sdk/application/Payment/PaymentApplicationValidator.js +3 -3
  29. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1462 -1462
  30. package/sdk/application/PosCart/PosCartApplicationModel.js +1260 -1260
  31. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +214 -214
  32. package/sdk/application/Rewards/RewardsApplicationModel.js +211 -211
  33. package/sdk/application/Share/ShareApplicationModel.d.ts +114 -114
  34. package/sdk/application/Share/ShareApplicationModel.js +121 -121
  35. package/sdk/application/Theme/ThemeApplicationModel.d.ts +895 -895
  36. package/sdk/application/Theme/ThemeApplicationModel.js +684 -684
  37. package/sdk/application/User/UserApplicationModel.d.ts +762 -762
  38. package/sdk/application/User/UserApplicationModel.js +738 -738
  39. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +63 -63
  40. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +65 -65
  41. package/sdk/partner/Lead/LeadPartnerModel.d.ts +661 -661
  42. package/sdk/partner/Lead/LeadPartnerModel.js +491 -491
  43. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +223 -223
  44. package/sdk/partner/Logistics/LogisticsPartnerModel.js +235 -235
  45. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1087 -1087
  46. package/sdk/partner/Theme/ThemePartnerModel.js +819 -819
  47. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +386 -386
  48. package/sdk/partner/Webhook/WebhookPartnerModel.js +342 -342
  49. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
  50. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
  51. package/sdk/platform/Billing/BillingPlatformModel.d.ts +801 -801
  52. package/sdk/platform/Billing/BillingPlatformModel.js +783 -783
  53. package/sdk/platform/Cart/CartPlatformModel.d.ts +3333 -3317
  54. package/sdk/platform/Cart/CartPlatformModel.js +2936 -2920
  55. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1013 -1013
  56. package/sdk/platform/Catalog/CatalogPlatformModel.js +923 -923
  57. package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
  58. package/sdk/platform/Common/CommonPlatformModel.js +187 -187
  59. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1238 -1238
  60. package/sdk/platform/Communication/CommunicationPlatformModel.js +1273 -1273
  61. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +661 -661
  62. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +692 -692
  63. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +3198 -3198
  64. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2247 -2247
  65. package/sdk/platform/Content/ContentPlatformModel.d.ts +1833 -1833
  66. package/sdk/platform/Content/ContentPlatformModel.js +1837 -1837
  67. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +245 -245
  68. package/sdk/platform/Discount/DiscountPlatformModel.js +248 -248
  69. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +865 -865
  70. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +877 -877
  71. package/sdk/platform/Finance/FinancePlatformModel.d.ts +1044 -1044
  72. package/sdk/platform/Finance/FinancePlatformModel.js +974 -974
  73. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
  74. package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
  75. package/sdk/platform/Lead/LeadPlatformModel.d.ts +608 -608
  76. package/sdk/platform/Lead/LeadPlatformModel.js +465 -465
  77. package/sdk/platform/Order/OrderPlatformModel.d.ts +5180 -5176
  78. package/sdk/platform/Order/OrderPlatformModel.js +4740 -4736
  79. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
  80. package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
  81. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2670 -2660
  82. package/sdk/platform/Payment/PaymentPlatformModel.js +1831 -1827
  83. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
  84. package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
  85. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1505 -1507
  86. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1532 -1536
  87. package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
  88. package/sdk/platform/Share/SharePlatformModel.js +139 -139
  89. package/sdk/platform/Theme/ThemePlatformModel.d.ts +1046 -1046
  90. package/sdk/platform/Theme/ThemePlatformModel.js +789 -789
  91. package/sdk/platform/User/UserPlatformModel.d.ts +758 -758
  92. package/sdk/platform/User/UserPlatformModel.js +643 -643
  93. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +439 -439
  94. package/sdk/platform/Webhook/WebhookPlatformModel.js +364 -364
  95. package/sdk/public/Billing/BillingPublicModel.d.ts +55 -55
  96. package/sdk/public/Billing/BillingPublicModel.js +51 -51
  97. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
  98. package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
  99. package/sdk/public/Content/ContentPublicModel.d.ts +26 -26
  100. package/sdk/public/Content/ContentPublicModel.js +28 -28
  101. package/sdk/public/Inventory/InventoryPublicModel.d.ts +237 -237
  102. package/sdk/public/Inventory/InventoryPublicModel.js +257 -257
  103. package/sdk/public/Partner/PartnerPublicModel.d.ts +104 -104
  104. package/sdk/public/Partner/PartnerPublicModel.js +113 -113
  105. package/sdk/public/Webhook/WebhookPublicModel.d.ts +87 -87
  106. package/sdk/public/Webhook/WebhookPublicModel.js +93 -93
@@ -1,212 +1,179 @@
1
1
  const Joi = require("joi");
2
2
 
3
3
  /**
4
- * @typedef ApefaceApiError
5
- * @property {string} [message]
6
- * @property {boolean} [success]
7
- */
8
-
9
- /**
10
- * @typedef AppliedFreeArticles
11
- * @property {string} [article_id]
12
- * @property {Object} [free_gift_item_details]
13
- * @property {string} [parent_item_identifier]
14
- * @property {number} [quantity]
15
- */
16
-
17
- /**
18
- * @typedef AppliedPromos
19
- * @property {number} [amount]
20
- * @property {AppliedFreeArticles[]} [applied_free_articles]
21
- * @property {number} [article_quantity]
22
- * @property {boolean} [mrp_promotion]
23
- * @property {string} [promo_id]
24
- * @property {string} [promotion_name]
25
- * @property {string} [promotion_type]
26
- */
27
-
28
- /**
29
- * @typedef BagReasonMeta
30
- * @property {boolean} [show_text_area]
4
+ * @typedef OrderPage
5
+ * @property {string} [type]
6
+ * @property {number} [item_total]
7
+ * @property {number} [current]
8
+ * @property {number} [size]
9
+ * @property {boolean} [has_next]
31
10
  */
32
11
 
33
12
  /**
34
- * @typedef BagReasons
35
- * @property {string} [display_name]
36
- * @property {number} [id]
37
- * @property {BagReasonMeta} [meta]
38
- * @property {string[]} [qc_type]
39
- * @property {QuestionSet[]} [question_set]
40
- * @property {BagReasons[]} [reasons]
13
+ * @typedef UserInfo
14
+ * @property {string} [first_name]
15
+ * @property {string} [gender]
16
+ * @property {string} [name]
17
+ * @property {string} [last_name]
18
+ * @property {string} [mobile]
19
+ * @property {string} [email]
41
20
  */
42
21
 
43
22
  /**
44
- * @typedef Bags
45
- * @property {AppliedPromos[]} [applied_promos]
46
- * @property {boolean} [can_cancel]
47
- * @property {boolean} [can_return]
48
- * @property {string} [currency_code]
23
+ * @typedef BreakupValues
24
+ * @property {number} [value]
49
25
  * @property {string} [currency_symbol]
50
- * @property {CurrentStatus} [current_status]
51
- * @property {string} [delivery_date]
52
- * @property {FinancialBreakup[]} [financial_breakup]
53
- * @property {number} [id]
54
- * @property {Item} [item]
55
- * @property {number} [line_number]
56
- * @property {Object} [meta]
57
- * @property {Object} [parent_promo_bags]
58
- * @property {Prices} [prices]
59
- * @property {number} [quantity]
60
- * @property {string} [returnable_date]
61
- * @property {string} [seller_identifier]
62
- */
63
-
64
- /**
65
- * @typedef BagsForReorder
66
- * @property {BagsForReorderArticleAssignment} [article_assignment]
67
- * @property {number} [item_id]
68
- * @property {string} [item_size]
69
- * @property {number} [quantity]
70
- * @property {number} [seller_id]
71
- * @property {number} [store_id]
26
+ * @property {string} [name]
27
+ * @property {string} [display]
28
+ * @property {string} [currency_code]
72
29
  */
73
30
 
74
31
  /**
75
- * @typedef BagsForReorderArticleAssignment
76
- * @property {string} [level]
77
- * @property {string} [strategy]
32
+ * @typedef ShipmentPayment
33
+ * @property {string} [mop]
34
+ * @property {string} [payment_mode]
35
+ * @property {string} [status]
36
+ * @property {string} [mode]
37
+ * @property {string} [logo]
38
+ * @property {string} [display_name]
78
39
  */
79
40
 
80
41
  /**
81
- * @typedef BreakupValues
82
- * @property {string} [currency_code]
83
- * @property {string} [currency_symbol]
84
- * @property {string} [display]
42
+ * @typedef ShipmentUserInfo
43
+ * @property {string} [first_name]
44
+ * @property {string} [gender]
85
45
  * @property {string} [name]
86
- * @property {number} [value]
46
+ * @property {string} [last_name]
47
+ * @property {string} [mobile]
48
+ * @property {string} [email]
87
49
  */
88
50
 
89
51
  /**
90
- * @typedef CurrentStatus
91
- * @property {string} [journey_type]
52
+ * @typedef FulfillingStore
53
+ * @property {number} [id]
54
+ * @property {string} [code]
92
55
  * @property {string} [name]
93
- * @property {string} [status]
94
- * @property {string} [updated_at]
56
+ * @property {string} [company_name]
57
+ * @property {number} [company_id]
95
58
  */
96
59
 
97
60
  /**
98
- * @typedef CustomerDetailsResponse
99
- * @property {string} [country]
100
- * @property {string} [name]
101
- * @property {string} [order_id]
102
- * @property {string} [phone]
103
- * @property {string} [shipment_id]
61
+ * @typedef ShipmentStatus
62
+ * @property {string} [value]
63
+ * @property {string} [title]
64
+ * @property {string} [hex_code]
104
65
  */
105
66
 
106
67
  /**
107
- * @typedef DataUpdates
108
- * @property {EntitiesDataUpdates[]} [entities]
109
- * @property {ProductsDataUpdates[]} [products]
68
+ * @typedef Invoice
69
+ * @property {string} [invoice_url]
70
+ * @property {string} [updated_date]
71
+ * @property {string} [label_url]
110
72
  */
111
73
 
112
74
  /**
113
- * @typedef DeliveryAddress
114
- * @property {string} [address]
115
- * @property {string} [address_category]
116
- * @property {string} [address_type]
117
- * @property {string} [address1]
118
- * @property {string} [address2]
119
- * @property {string} [area]
120
- * @property {string} [city]
121
- * @property {string} [contact_person]
122
- * @property {string} [country]
123
- * @property {string} [country_iso_code]
124
- * @property {string} [country_phone_code]
125
- * @property {string} [created_at]
126
- * @property {string} [display_address]
127
- * @property {string} [email]
128
- * @property {string} [landmark]
129
- * @property {number} [latitude]
130
- * @property {number} [longitude]
131
- * @property {string} [name]
132
- * @property {string} [phone]
133
- * @property {string} [pincode]
134
- * @property {string} [state]
135
- * @property {string} [updated_at]
136
- * @property {string} [version]
75
+ * @typedef NestedTrackingDetails
76
+ * @property {boolean} [is_passed]
77
+ * @property {string} [time]
78
+ * @property {boolean} [is_current]
79
+ * @property {string} [status]
137
80
  */
138
81
 
139
82
  /**
140
- * @typedef EntitiesDataUpdates
141
- * @property {Object} [data]
142
- * @property {Object[]} [filters]
83
+ * @typedef TrackingDetails
84
+ * @property {string} [value]
85
+ * @property {boolean} [is_current]
86
+ * @property {boolean} [is_passed]
87
+ * @property {string} [status]
88
+ * @property {string} [time]
89
+ * @property {string} [created_ts]
90
+ * @property {NestedTrackingDetails[]} [tracking_details]
143
91
  */
144
92
 
145
93
  /**
146
- * @typedef EntitiesReasons
147
- * @property {EntityReasonData} [data]
148
- * @property {Object[]} [filters]
94
+ * @typedef TimeStampData
95
+ * @property {string} [min]
96
+ * @property {string} [max]
149
97
  */
150
98
 
151
99
  /**
152
- * @typedef EntityReasonData
153
- * @property {number} [reason_id]
154
- * @property {string} [reason_text]
100
+ * @typedef Promise
101
+ * @property {boolean} [show_promise]
102
+ * @property {TimeStampData} [timestamp]
155
103
  */
156
104
 
157
105
  /**
158
- * @typedef ErrorResponse
159
- * @property {string} [code]
160
- * @property {string} [exception]
161
- * @property {string} [message]
162
- * @property {string} [stack_trace]
163
- * @property {number} [status]
106
+ * @typedef ShipmentTotalDetails
107
+ * @property {number} [pieces]
108
+ * @property {number} [total_price]
109
+ * @property {number} [sizes]
164
110
  */
165
111
 
166
112
  /**
167
- * @typedef FinancialBreakup
168
- * @property {boolean} [added_to_fynd_cash]
169
- * @property {number} [amount_paid]
170
- * @property {number} [amount_paid_roundoff]
113
+ * @typedef Prices
114
+ * @property {number} [delivery_charge]
115
+ * @property {number} [coupon_value]
171
116
  * @property {number} [brand_calculated_amount]
172
- * @property {number} [cashback]
173
- * @property {number} [cashback_applied]
174
- * @property {number} [cod_charges]
117
+ * @property {number} [value_of_good]
118
+ * @property {number} [price_marked]
175
119
  * @property {number} [coupon_effective_discount]
176
- * @property {number} [coupon_value]
177
- * @property {number} [delivery_charge]
120
+ * @property {string} [currency_symbol]
178
121
  * @property {number} [discount]
179
- * @property {number} [fynd_credits]
180
- * @property {number} [gst_fee]
181
- * @property {string} [gst_tag]
182
122
  * @property {number} [gst_tax_percentage]
183
- * @property {string} [hsn_code]
184
- * @property {Identifiers} [identifiers]
185
- * @property {string} [item_name]
123
+ * @property {number} [cod_charges]
124
+ * @property {number} [amount_paid]
125
+ * @property {boolean} [added_to_fynd_cash]
126
+ * @property {number} [transfer_price]
127
+ * @property {number} [cashback_applied]
186
128
  * @property {number} [price_effective]
187
- * @property {number} [price_marked]
129
+ * @property {number} [cashback]
130
+ * @property {number} [refund_credit]
131
+ * @property {number} [amount_paid_roundoff]
188
132
  * @property {number} [promotion_effective_discount]
189
133
  * @property {number} [refund_amount]
190
- * @property {number} [refund_credit]
191
- * @property {string} [size]
192
- * @property {number} [total_units]
193
- * @property {number} [transfer_price]
194
- * @property {number} [value_of_good]
134
+ * @property {string} [currency_code]
135
+ * @property {number} [fynd_credits]
195
136
  */
196
137
 
197
138
  /**
198
- * @typedef FulfillingCompany
199
- * @property {number} [id]
139
+ * @typedef ItemBrand
140
+ * @property {string} [logo]
200
141
  * @property {string} [name]
201
142
  */
202
143
 
203
144
  /**
204
- * @typedef FulfillingStore
145
+ * @typedef Item
146
+ * @property {string[]} [image]
147
+ * @property {string[]} [l1_categories]
148
+ * @property {ItemBrand} [brand]
149
+ * @property {string} [seller_identifier]
205
150
  * @property {string} [code]
206
- * @property {number} [company_id]
207
- * @property {string} [company_name]
208
151
  * @property {number} [id]
209
152
  * @property {string} [name]
153
+ * @property {string} [l3_category_name]
154
+ * @property {string} [slug_key]
155
+ * @property {string[]} [l2_categories]
156
+ * @property {string} [size]
157
+ * @property {Object} [attributes]
158
+ */
159
+
160
+ /**
161
+ * @typedef AppliedFreeArticles
162
+ * @property {string} [article_id]
163
+ * @property {Object} [free_gift_item_details]
164
+ * @property {string} [parent_item_identifier]
165
+ * @property {number} [quantity]
166
+ */
167
+
168
+ /**
169
+ * @typedef AppliedPromos
170
+ * @property {boolean} [mrp_promotion]
171
+ * @property {string} [promotion_name]
172
+ * @property {number} [article_quantity]
173
+ * @property {string} [promo_id]
174
+ * @property {number} [amount]
175
+ * @property {string} [promotion_type]
176
+ * @property {AppliedFreeArticles[]} [applied_free_articles]
210
177
  */
211
178
 
212
179
  /**
@@ -216,626 +183,622 @@ const Joi = require("joi");
216
183
  */
217
184
 
218
185
  /**
219
- * @typedef Invoice
220
- * @property {string} [invoice_url]
221
- * @property {string} [label_url]
222
- * @property {string} [updated_date]
186
+ * @typedef FinancialBreakup
187
+ * @property {number} [coupon_value]
188
+ * @property {number} [delivery_charge]
189
+ * @property {number} [brand_calculated_amount]
190
+ * @property {number} [value_of_good]
191
+ * @property {number} [price_marked]
192
+ * @property {number} [coupon_effective_discount]
193
+ * @property {string} [hsn_code]
194
+ * @property {number} [discount]
195
+ * @property {number} [gst_tax_percentage]
196
+ * @property {number} [cod_charges]
197
+ * @property {number} [amount_paid]
198
+ * @property {boolean} [added_to_fynd_cash]
199
+ * @property {string} [size]
200
+ * @property {number} [transfer_price]
201
+ * @property {number} [cashback_applied]
202
+ * @property {number} [price_effective]
203
+ * @property {number} [cashback]
204
+ * @property {number} [refund_credit]
205
+ * @property {number} [amount_paid_roundoff]
206
+ * @property {number} [total_units]
207
+ * @property {Identifiers} [identifiers]
208
+ * @property {string} [gst_tag]
209
+ * @property {string} [item_name]
210
+ * @property {number} [promotion_effective_discount]
211
+ * @property {number} [gst_fee]
212
+ * @property {number} [refund_amount]
213
+ * @property {number} [fynd_credits]
223
214
  */
224
215
 
225
216
  /**
226
- * @typedef Item
227
- * @property {Object} [attributes]
228
- * @property {ItemBrand} [brand]
229
- * @property {string} [code]
230
- * @property {number} [id]
231
- * @property {string[]} [image]
232
- * @property {string[]} [l1_categories]
233
- * @property {string[]} [l2_categories]
234
- * @property {string} [l3_category_name]
217
+ * @typedef CurrentStatus
218
+ * @property {string} [updated_at]
235
219
  * @property {string} [name]
236
- * @property {string} [seller_identifier]
237
- * @property {string} [size]
238
- * @property {string} [slug_key]
220
+ * @property {string} [status]
221
+ * @property {string} [journey_type]
239
222
  */
240
223
 
241
224
  /**
242
- * @typedef ItemBrand
243
- * @property {string} [logo]
244
- * @property {string} [name]
225
+ * @typedef Bags
226
+ * @property {string} [delivery_date]
227
+ * @property {number} [line_number]
228
+ * @property {string} [currency_symbol]
229
+ * @property {Item} [item]
230
+ * @property {AppliedPromos[]} [applied_promos]
231
+ * @property {number} [quantity]
232
+ * @property {Prices} [prices]
233
+ * @property {boolean} [can_cancel]
234
+ * @property {boolean} [can_return]
235
+ * @property {number} [id]
236
+ * @property {string} [returnable_date]
237
+ * @property {FinancialBreakup[]} [financial_breakup]
238
+ * @property {Object} [parent_promo_bags]
239
+ * @property {Object} [meta]
240
+ * @property {string} [currency_code]
241
+ * @property {string} [seller_identifier]
242
+ * @property {CurrentStatus} [current_status]
245
243
  */
246
244
 
247
245
  /**
248
- * @typedef NestedTrackingDetails
249
- * @property {boolean} [is_current]
250
- * @property {boolean} [is_passed]
251
- * @property {string} [status]
252
- * @property {string} [time]
246
+ * @typedef FulfillingCompany
247
+ * @property {number} [id]
248
+ * @property {string} [name]
253
249
  */
254
250
 
255
251
  /**
256
- * @typedef OrderById
257
- * @property {OrderSchema} [order]
252
+ * @typedef DeliveryAddress
253
+ * @property {string} [pincode]
254
+ * @property {string} [phone]
255
+ * @property {number} [latitude]
256
+ * @property {string} [address2]
257
+ * @property {string} [landmark]
258
+ * @property {string} [area]
259
+ * @property {string} [city]
260
+ * @property {string} [address]
261
+ * @property {string} [address_type]
262
+ * @property {number} [longitude]
263
+ * @property {string} [country_iso_code]
264
+ * @property {string} [state]
265
+ * @property {string} [created_at]
266
+ * @property {string} [address1]
267
+ * @property {string} [display_address]
268
+ * @property {string} [name]
269
+ * @property {string} [contact_person]
270
+ * @property {string} [address_category]
271
+ * @property {string} [email]
272
+ * @property {string} [country_phone_code]
273
+ * @property {string} [version]
274
+ * @property {string} [updated_at]
275
+ * @property {string} [country]
258
276
  */
259
277
 
260
278
  /**
261
- * @typedef OrderFilters
262
- * @property {OrderStatuses[]} [statuses]
279
+ * @typedef Shipments
280
+ * @property {ShipmentPayment} [payment]
281
+ * @property {string} [order_type]
282
+ * @property {boolean} [show_download_invoice]
283
+ * @property {boolean} [can_cancel]
284
+ * @property {ShipmentUserInfo} [user_info]
285
+ * @property {string} [shipment_id]
286
+ * @property {FulfillingStore} [fulfilling_store]
287
+ * @property {Object[]} [custom_meta]
288
+ * @property {ShipmentStatus} [shipment_status]
289
+ * @property {string} [comment]
290
+ * @property {Invoice} [invoice]
291
+ * @property {boolean} [show_track_link]
292
+ * @property {Object} [refund_details]
293
+ * @property {BreakupValues[]} [breakup_values]
294
+ * @property {Object} [can_break]
295
+ * @property {string} [traking_no]
296
+ * @property {TrackingDetails[]} [tracking_details]
297
+ * @property {Promise} [promise]
298
+ * @property {number} [total_bags]
299
+ * @property {ShipmentTotalDetails} [total_details]
300
+ * @property {Prices} [prices]
301
+ * @property {string} [returnable_date]
302
+ * @property {string} [shipment_created_at]
303
+ * @property {string} [shipment_created_ts]
304
+ * @property {Object} [size_info]
305
+ * @property {Bags[]} [bags]
306
+ * @property {string} [dp_name]
307
+ * @property {string} [awb_no]
308
+ * @property {boolean} [beneficiary_details]
309
+ * @property {FulfillingCompany} [fulfilling_company]
310
+ * @property {boolean} [can_return]
311
+ * @property {DeliveryAddress} [delivery_address]
312
+ * @property {string} [track_url]
313
+ * @property {string} [order_id]
314
+ * @property {string} [need_help_url]
315
+ * @property {Object} [return_meta]
316
+ * @property {string} [delivery_date]
263
317
  */
264
318
 
265
319
  /**
266
- * @typedef OrderList
267
- * @property {OrderFilters} [filters]
268
- * @property {OrderSchema[]} [items]
269
- * @property {OrderPage} [page]
320
+ * @typedef BagsForReorderArticleAssignment
321
+ * @property {string} [strategy]
322
+ * @property {string} [level]
270
323
  */
271
324
 
272
325
  /**
273
- * @typedef OrderPage
274
- * @property {number} [current]
275
- * @property {boolean} [has_next]
276
- * @property {number} [item_total]
277
- * @property {number} [size]
278
- * @property {string} [type]
326
+ * @typedef BagsForReorder
327
+ * @property {string} [item_size]
328
+ * @property {number} [quantity]
329
+ * @property {number} [store_id]
330
+ * @property {BagsForReorderArticleAssignment} [article_assignment]
331
+ * @property {number} [seller_id]
332
+ * @property {number} [item_id]
279
333
  */
280
334
 
281
335
  /**
282
336
  * @typedef OrderSchema
283
- * @property {BagsForReorder[]} [bags_for_reorder]
337
+ * @property {number} [total_shipments_in_order]
338
+ * @property {UserInfo} [user_info]
284
339
  * @property {BreakupValues[]} [breakup_values]
285
340
  * @property {string} [order_created_time]
286
341
  * @property {string} [order_created_ts]
287
342
  * @property {string} [order_id]
288
343
  * @property {Shipments[]} [shipments]
289
- * @property {number} [total_shipments_in_order]
290
- * @property {UserInfo} [user_info]
344
+ * @property {BagsForReorder[]} [bags_for_reorder]
291
345
  */
292
346
 
293
347
  /**
294
348
  * @typedef OrderStatuses
295
- * @property {string} [display]
296
- * @property {boolean} [is_selected]
297
349
  * @property {number} [value]
350
+ * @property {boolean} [is_selected]
351
+ * @property {string} [display]
298
352
  */
299
353
 
300
354
  /**
301
- * @typedef Prices
302
- * @property {boolean} [added_to_fynd_cash]
303
- * @property {number} [amount_paid]
304
- * @property {number} [amount_paid_roundoff]
305
- * @property {number} [brand_calculated_amount]
306
- * @property {number} [cashback]
307
- * @property {number} [cashback_applied]
308
- * @property {number} [cod_charges]
309
- * @property {number} [coupon_effective_discount]
310
- * @property {number} [coupon_value]
311
- * @property {string} [currency_code]
312
- * @property {string} [currency_symbol]
313
- * @property {number} [delivery_charge]
314
- * @property {number} [discount]
315
- * @property {number} [fynd_credits]
316
- * @property {number} [gst_tax_percentage]
317
- * @property {number} [price_effective]
318
- * @property {number} [price_marked]
319
- * @property {number} [promotion_effective_discount]
320
- * @property {number} [refund_amount]
321
- * @property {number} [refund_credit]
322
- * @property {number} [transfer_price]
323
- * @property {number} [value_of_good]
324
- */
325
-
326
- /**
327
- * @typedef Products
328
- * @property {string} [identifier]
329
- * @property {number} [line_number]
330
- * @property {number} [quantity]
331
- */
332
-
333
- /**
334
- * @typedef ProductsDataUpdates
335
- * @property {Object} [data]
336
- * @property {ProductsDataUpdatesFilters[]} [filters]
355
+ * @typedef OrderFilters
356
+ * @property {OrderStatuses[]} [statuses]
337
357
  */
338
358
 
339
359
  /**
340
- * @typedef ProductsDataUpdatesFilters
341
- * @property {string} [identifier]
342
- * @property {number} [line_number]
360
+ * @typedef OrderList
361
+ * @property {OrderPage} [page]
362
+ * @property {OrderSchema[]} [items]
363
+ * @property {OrderFilters} [filters]
343
364
  */
344
365
 
345
366
  /**
346
- * @typedef ProductsReasons
347
- * @property {ProductsReasonsData} [data]
348
- * @property {ProductsReasonsFilters[]} [filters]
367
+ * @typedef ApefaceApiError
368
+ * @property {string} [message]
369
+ * @property {boolean} [success]
349
370
  */
350
371
 
351
372
  /**
352
- * @typedef ProductsReasonsData
353
- * @property {number} [reason_id]
354
- * @property {string} [reason_text]
373
+ * @typedef OrderById
374
+ * @property {OrderSchema} [order]
355
375
  */
356
376
 
357
377
  /**
358
- * @typedef ProductsReasonsFilters
359
- * @property {string} [identifier]
360
- * @property {number} [line_number]
361
- * @property {number} [quantity]
378
+ * @typedef ShipmentById
379
+ * @property {Shipments} [shipment]
362
380
  */
363
381
 
364
382
  /**
365
- * @typedef Promise
366
- * @property {boolean} [show_promise]
367
- * @property {TimeStampData} [timestamp]
383
+ * @typedef ResponseGetInvoiceShipment
384
+ * @property {string} presigned_type
385
+ * @property {boolean} success
386
+ * @property {string} shipment_id
387
+ * @property {string} presigned_url
368
388
  */
369
389
 
370
390
  /**
371
- * @typedef QuestionSet
372
- * @property {string} [display_name]
373
- * @property {number} [id]
391
+ * @typedef Track
392
+ * @property {string} [account_name]
393
+ * @property {string} [shipment_type]
394
+ * @property {string} [status]
395
+ * @property {string} [last_location_recieved_at]
396
+ * @property {string} [updated_time]
397
+ * @property {string} [updated_at]
398
+ * @property {string} [reason]
399
+ * @property {string} [awb]
374
400
  */
375
401
 
376
402
  /**
377
- * @typedef ReasonsData
378
- * @property {EntitiesReasons[]} [entities]
379
- * @property {ProductsReasons[]} [products]
403
+ * @typedef ShipmentTrack
404
+ * @property {Track[]} [results]
380
405
  */
381
406
 
382
407
  /**
383
- * @typedef ResponseGetInvoiceShipment
384
- * @property {string} presigned_type
385
- * @property {string} presigned_url
386
- * @property {string} shipment_id
387
- * @property {boolean} success
408
+ * @typedef CustomerDetailsResponse
409
+ * @property {string} [phone]
410
+ * @property {string} [shipment_id]
411
+ * @property {string} [name]
412
+ * @property {string} [order_id]
413
+ * @property {string} [country]
388
414
  */
389
415
 
390
416
  /**
391
417
  * @typedef SendOtpToCustomerResponse
392
- * @property {string} [message]
393
418
  * @property {string} [request_id]
394
- * @property {number} [resend_timer]
419
+ * @property {string} [message]
395
420
  * @property {boolean} [success]
421
+ * @property {number} [resend_timer]
396
422
  */
397
423
 
398
424
  /**
399
- * @typedef ShipmentApplicationStatusResponse
400
- * @property {StatusesBodyResponse[]} [statuses]
425
+ * @typedef VerifyOtp
426
+ * @property {string} [otp_code]
427
+ * @property {string} [request_id]
401
428
  */
402
429
 
403
430
  /**
404
- * @typedef ShipmentBagReasons
405
- * @property {BagReasons[]} [reasons]
431
+ * @typedef VerifyOtpResponse
406
432
  * @property {boolean} [success]
407
433
  */
408
434
 
409
435
  /**
410
- * @typedef ShipmentById
411
- * @property {Shipments} [shipment]
436
+ * @typedef BagReasonMeta
437
+ * @property {boolean} [show_text_area]
412
438
  */
413
439
 
414
440
  /**
415
- * @typedef ShipmentPayment
441
+ * @typedef QuestionSet
442
+ * @property {number} [id]
416
443
  * @property {string} [display_name]
417
- * @property {string} [logo]
418
- * @property {string} [mode]
419
- * @property {string} [mop]
420
- * @property {string} [payment_mode]
421
- * @property {string} [status]
422
444
  */
423
445
 
424
446
  /**
425
- * @typedef ShipmentReason
426
- * @property {string} [feedback_type]
427
- * @property {string} [flow]
428
- * @property {number} [priority]
429
- * @property {number} [reason_id]
430
- * @property {string} [reason_text]
431
- * @property {boolean} [show_text_area]
447
+ * @typedef BagReasons
448
+ * @property {string[]} [qc_type]
449
+ * @property {number} [id]
450
+ * @property {string} [display_name]
451
+ * @property {BagReasonMeta} [meta]
452
+ * @property {QuestionSet[]} [question_set]
453
+ * @property {BagReasons[]} [reasons]
432
454
  */
433
455
 
434
456
  /**
435
- * @typedef ShipmentReasons
436
- * @property {ShipmentReason[]} [reasons]
457
+ * @typedef ShipmentBagReasons
458
+ * @property {BagReasons[]} [reasons]
459
+ * @property {boolean} [success]
437
460
  */
438
461
 
439
462
  /**
440
- * @typedef Shipments
441
- * @property {string} [awb_no]
442
- * @property {Bags[]} [bags]
443
- * @property {boolean} [beneficiary_details]
444
- * @property {BreakupValues[]} [breakup_values]
445
- * @property {Object} [can_break]
446
- * @property {boolean} [can_cancel]
447
- * @property {boolean} [can_return]
448
- * @property {string} [comment]
449
- * @property {Object[]} [custom_meta]
450
- * @property {DeliveryAddress} [delivery_address]
451
- * @property {string} [delivery_date]
452
- * @property {string} [dp_name]
453
- * @property {FulfillingCompany} [fulfilling_company]
454
- * @property {FulfillingStore} [fulfilling_store]
455
- * @property {Invoice} [invoice]
456
- * @property {string} [need_help_url]
457
- * @property {string} [order_id]
458
- * @property {string} [order_type]
459
- * @property {ShipmentPayment} [payment]
460
- * @property {Prices} [prices]
461
- * @property {Promise} [promise]
462
- * @property {Object} [refund_details]
463
- * @property {Object} [return_meta]
464
- * @property {string} [returnable_date]
465
- * @property {string} [shipment_created_at]
466
- * @property {string} [shipment_created_ts]
467
- * @property {string} [shipment_id]
468
- * @property {ShipmentStatus} [shipment_status]
469
- * @property {boolean} [show_download_invoice]
470
- * @property {boolean} [show_track_link]
471
- * @property {Object} [size_info]
472
- * @property {number} [total_bags]
473
- * @property {ShipmentTotalDetails} [total_details]
474
- * @property {string} [track_url]
475
- * @property {TrackingDetails[]} [tracking_details]
476
- * @property {string} [traking_no]
477
- * @property {ShipmentUserInfo} [user_info]
463
+ * @typedef ShipmentReason
464
+ * @property {number} [priority]
465
+ * @property {boolean} [show_text_area]
466
+ * @property {number} [reason_id]
467
+ * @property {string} [feedback_type]
468
+ * @property {string} [reason_text]
469
+ * @property {string} [flow]
478
470
  */
479
471
 
480
472
  /**
481
- * @typedef ShipmentsRequest
482
- * @property {DataUpdates} [data_updates]
483
- * @property {string} identifier
484
- * @property {Products[]} [products]
485
- * @property {ReasonsData} [reasons]
473
+ * @typedef ShipmentReasons
474
+ * @property {ShipmentReason[]} [reasons]
486
475
  */
487
476
 
488
477
  /**
489
- * @typedef ShipmentStatus
490
- * @property {string} [hex_code]
491
- * @property {string} [title]
492
- * @property {string} [value]
478
+ * @typedef ProductsReasonsData
479
+ * @property {number} [reason_id]
480
+ * @property {string} [reason_text]
493
481
  */
494
482
 
495
483
  /**
496
- * @typedef ShipmentTotalDetails
497
- * @property {number} [pieces]
498
- * @property {number} [sizes]
499
- * @property {number} [total_price]
484
+ * @typedef ProductsReasonsFilters
485
+ * @property {number} [line_number]
486
+ * @property {number} [quantity]
487
+ * @property {string} [identifier]
500
488
  */
501
489
 
502
490
  /**
503
- * @typedef ShipmentTrack
504
- * @property {Track[]} [results]
491
+ * @typedef ProductsReasons
492
+ * @property {ProductsReasonsData} [data]
493
+ * @property {ProductsReasonsFilters[]} [filters]
505
494
  */
506
495
 
507
496
  /**
508
- * @typedef ShipmentUserInfo
509
- * @property {string} [email]
510
- * @property {string} [first_name]
511
- * @property {string} [gender]
512
- * @property {string} [last_name]
513
- * @property {string} [mobile]
514
- * @property {string} [name]
497
+ * @typedef EntityReasonData
498
+ * @property {number} [reason_id]
499
+ * @property {string} [reason_text]
515
500
  */
516
501
 
517
502
  /**
518
- * @typedef StatuesRequest
519
- * @property {string} [exclude_bags_next_state]
520
- * @property {ShipmentsRequest[]} [shipments]
521
- * @property {string} [status]
503
+ * @typedef EntitiesReasons
504
+ * @property {EntityReasonData} [data]
505
+ * @property {Object[]} [filters]
522
506
  */
523
507
 
524
508
  /**
525
- * @typedef StatusesBodyResponse
526
- * @property {Object[]} [shipments]
509
+ * @typedef ReasonsData
510
+ * @property {ProductsReasons[]} [products]
511
+ * @property {EntitiesReasons[]} [entities]
527
512
  */
528
513
 
529
514
  /**
530
- * @typedef TimeStampData
531
- * @property {string} [max]
532
- * @property {string} [min]
515
+ * @typedef Products
516
+ * @property {number} [line_number]
517
+ * @property {number} [quantity]
518
+ * @property {string} [identifier]
533
519
  */
534
520
 
535
521
  /**
536
- * @typedef Track
537
- * @property {string} [account_name]
538
- * @property {string} [awb]
539
- * @property {string} [last_location_recieved_at]
540
- * @property {string} [reason]
541
- * @property {string} [shipment_type]
542
- * @property {string} [status]
543
- * @property {string} [updated_at]
544
- * @property {string} [updated_time]
522
+ * @typedef ProductsDataUpdatesFilters
523
+ * @property {number} [line_number]
524
+ * @property {string} [identifier]
545
525
  */
546
526
 
547
527
  /**
548
- * @typedef TrackingDetails
549
- * @property {string} [created_ts]
550
- * @property {boolean} [is_current]
551
- * @property {boolean} [is_passed]
528
+ * @typedef ProductsDataUpdates
529
+ * @property {Object} [data]
530
+ * @property {ProductsDataUpdatesFilters[]} [filters]
531
+ */
532
+
533
+ /**
534
+ * @typedef EntitiesDataUpdates
535
+ * @property {Object} [data]
536
+ * @property {Object[]} [filters]
537
+ */
538
+
539
+ /**
540
+ * @typedef DataUpdates
541
+ * @property {ProductsDataUpdates[]} [products]
542
+ * @property {EntitiesDataUpdates[]} [entities]
543
+ */
544
+
545
+ /**
546
+ * @typedef ShipmentsRequest
547
+ * @property {ReasonsData} [reasons]
548
+ * @property {Products[]} [products]
549
+ * @property {DataUpdates} [data_updates]
550
+ * @property {string} identifier
551
+ */
552
+
553
+ /**
554
+ * @typedef StatuesRequest
555
+ * @property {ShipmentsRequest[]} [shipments]
556
+ * @property {string} [exclude_bags_next_state]
552
557
  * @property {string} [status]
553
- * @property {string} [time]
554
- * @property {NestedTrackingDetails[]} [tracking_details]
555
- * @property {string} [value]
556
558
  */
557
559
 
558
560
  /**
559
561
  * @typedef UpdateShipmentStatusRequest
560
- * @property {boolean} [force_transition]
561
- * @property {boolean} [lock_after_transition]
562
562
  * @property {StatuesRequest[]} [statuses]
563
563
  * @property {boolean} [task]
564
+ * @property {boolean} [lock_after_transition]
565
+ * @property {boolean} [force_transition]
564
566
  * @property {boolean} [unlock_before_transition]
565
567
  */
566
568
 
567
569
  /**
568
- * @typedef UserInfo
569
- * @property {string} [email]
570
- * @property {string} [first_name]
571
- * @property {string} [gender]
572
- * @property {string} [last_name]
573
- * @property {string} [mobile]
574
- * @property {string} [name]
570
+ * @typedef StatusesBodyResponse
571
+ * @property {Object[]} [shipments]
575
572
  */
576
573
 
577
574
  /**
578
- * @typedef VerifyOtp
579
- * @property {string} [otp_code]
580
- * @property {string} [request_id]
575
+ * @typedef ShipmentApplicationStatusResponse
576
+ * @property {StatusesBodyResponse[]} [statuses]
581
577
  */
582
578
 
583
579
  /**
584
- * @typedef VerifyOtpResponse
585
- * @property {boolean} [success]
580
+ * @typedef ErrorResponse
581
+ * @property {string} [code]
582
+ * @property {string} [message]
583
+ * @property {number} [status]
584
+ * @property {string} [exception]
585
+ * @property {string} [stack_trace]
586
586
  */
587
587
 
588
588
  class OrderApplicationModel {
589
- /** @returns {ApefaceApiError} */
590
- static ApefaceApiError() {
591
- return Joi.object({
592
- message: Joi.string().allow(""),
593
- success: Joi.boolean(),
594
- });
595
- }
596
-
597
- /** @returns {AppliedFreeArticles} */
598
- static AppliedFreeArticles() {
599
- return Joi.object({
600
- article_id: Joi.string().allow(""),
601
- free_gift_item_details: Joi.any(),
602
- parent_item_identifier: Joi.string().allow(""),
603
- quantity: Joi.number(),
604
- });
605
- }
606
-
607
- /** @returns {AppliedPromos} */
608
- static AppliedPromos() {
589
+ /** @returns {OrderPage} */
590
+ static OrderPage() {
609
591
  return Joi.object({
610
- amount: Joi.number(),
611
- applied_free_articles: Joi.array().items(
612
- OrderApplicationModel.AppliedFreeArticles()
613
- ),
614
- article_quantity: Joi.number(),
615
- mrp_promotion: Joi.boolean(),
616
- promo_id: Joi.string().allow(""),
617
- promotion_name: Joi.string().allow(""),
618
- promotion_type: Joi.string().allow(""),
592
+ type: Joi.string().allow(""),
593
+ item_total: Joi.number(),
594
+ current: Joi.number(),
595
+ size: Joi.number(),
596
+ has_next: Joi.boolean(),
619
597
  });
620
598
  }
621
599
 
622
- /** @returns {BagReasonMeta} */
623
- static BagReasonMeta() {
600
+ /** @returns {UserInfo} */
601
+ static UserInfo() {
624
602
  return Joi.object({
625
- show_text_area: Joi.boolean(),
603
+ first_name: Joi.string().allow(""),
604
+ gender: Joi.string().allow(""),
605
+ name: Joi.string().allow(""),
606
+ last_name: Joi.string().allow(""),
607
+ mobile: Joi.string().allow(""),
608
+ email: Joi.string().allow(""),
626
609
  });
627
610
  }
628
611
 
629
- /** @returns {BagReasons} */
630
- static BagReasons() {
631
- return Joi.object({
632
- display_name: Joi.string().allow(""),
633
- id: Joi.number(),
634
- meta: OrderApplicationModel.BagReasonMeta(),
635
- qc_type: Joi.array().items(Joi.string().allow("")),
636
- question_set: Joi.array().items(OrderApplicationModel.QuestionSet()),
637
- reasons: Joi.array().items(Joi.link("#BagReasons")),
638
- }).id("BagReasons");
639
- }
640
-
641
- /** @returns {Bags} */
642
- static Bags() {
612
+ /** @returns {BreakupValues} */
613
+ static BreakupValues() {
643
614
  return Joi.object({
644
- applied_promos: Joi.array().items(OrderApplicationModel.AppliedPromos()),
645
- can_cancel: Joi.boolean(),
646
- can_return: Joi.boolean(),
647
- currency_code: Joi.string().allow(""),
615
+ value: Joi.number(),
648
616
  currency_symbol: Joi.string().allow(""),
649
- current_status: OrderApplicationModel.CurrentStatus(),
650
- delivery_date: Joi.string().allow("").allow(null),
651
- financial_breakup: Joi.array().items(
652
- OrderApplicationModel.FinancialBreakup()
653
- ),
654
- id: Joi.number(),
655
- item: OrderApplicationModel.Item(),
656
- line_number: Joi.number(),
657
- meta: Joi.any(),
658
- parent_promo_bags: Joi.any(),
659
- prices: OrderApplicationModel.Prices(),
660
- quantity: Joi.number(),
661
- returnable_date: Joi.string().allow("").allow(null),
662
- seller_identifier: Joi.string().allow(""),
663
- });
664
- }
665
-
666
- /** @returns {BagsForReorder} */
667
- static BagsForReorder() {
668
- return Joi.object({
669
- article_assignment: OrderApplicationModel.BagsForReorderArticleAssignment(),
670
- item_id: Joi.number(),
671
- item_size: Joi.string().allow(""),
672
- quantity: Joi.number(),
673
- seller_id: Joi.number(),
674
- store_id: Joi.number(),
617
+ name: Joi.string().allow(""),
618
+ display: Joi.string().allow(""),
619
+ currency_code: Joi.string().allow(""),
675
620
  });
676
621
  }
677
622
 
678
- /** @returns {BagsForReorderArticleAssignment} */
679
- static BagsForReorderArticleAssignment() {
623
+ /** @returns {ShipmentPayment} */
624
+ static ShipmentPayment() {
680
625
  return Joi.object({
681
- level: Joi.string().allow(""),
682
- strategy: Joi.string().allow(""),
626
+ mop: Joi.string().allow(""),
627
+ payment_mode: Joi.string().allow(""),
628
+ status: Joi.string().allow(""),
629
+ mode: Joi.string().allow(""),
630
+ logo: Joi.string().allow(""),
631
+ display_name: Joi.string().allow(""),
683
632
  });
684
633
  }
685
634
 
686
- /** @returns {BreakupValues} */
687
- static BreakupValues() {
635
+ /** @returns {ShipmentUserInfo} */
636
+ static ShipmentUserInfo() {
688
637
  return Joi.object({
689
- currency_code: Joi.string().allow(""),
690
- currency_symbol: Joi.string().allow(""),
691
- display: Joi.string().allow(""),
638
+ first_name: Joi.string().allow(""),
639
+ gender: Joi.string().allow(""),
692
640
  name: Joi.string().allow(""),
693
- value: Joi.number(),
641
+ last_name: Joi.string().allow(""),
642
+ mobile: Joi.string().allow(""),
643
+ email: Joi.string().allow(""),
694
644
  });
695
645
  }
696
646
 
697
- /** @returns {CurrentStatus} */
698
- static CurrentStatus() {
647
+ /** @returns {FulfillingStore} */
648
+ static FulfillingStore() {
699
649
  return Joi.object({
700
- journey_type: Joi.string().allow("").allow(null),
650
+ id: Joi.number(),
651
+ code: Joi.string().allow(""),
701
652
  name: Joi.string().allow(""),
702
- status: Joi.string().allow(""),
703
- updated_at: Joi.string().allow(""),
653
+ company_name: Joi.string().allow(""),
654
+ company_id: Joi.number(),
704
655
  });
705
656
  }
706
657
 
707
- /** @returns {CustomerDetailsResponse} */
708
- static CustomerDetailsResponse() {
658
+ /** @returns {ShipmentStatus} */
659
+ static ShipmentStatus() {
709
660
  return Joi.object({
710
- country: Joi.string().allow(""),
711
- name: Joi.string().allow(""),
712
- order_id: Joi.string().allow(""),
713
- phone: Joi.string().allow(""),
714
- shipment_id: Joi.string().allow(""),
661
+ value: Joi.string().allow("").allow(null),
662
+ title: Joi.string().allow(""),
663
+ hex_code: Joi.string().allow(""),
715
664
  });
716
665
  }
717
666
 
718
- /** @returns {DataUpdates} */
719
- static DataUpdates() {
667
+ /** @returns {Invoice} */
668
+ static Invoice() {
720
669
  return Joi.object({
721
- entities: Joi.array().items(OrderApplicationModel.EntitiesDataUpdates()),
722
- products: Joi.array().items(OrderApplicationModel.ProductsDataUpdates()),
670
+ invoice_url: Joi.string().allow(""),
671
+ updated_date: Joi.string().allow(""),
672
+ label_url: Joi.string().allow(""),
723
673
  });
724
674
  }
725
675
 
726
- /** @returns {DeliveryAddress} */
727
- static DeliveryAddress() {
676
+ /** @returns {NestedTrackingDetails} */
677
+ static NestedTrackingDetails() {
728
678
  return Joi.object({
729
- address: Joi.string().allow(""),
730
- address_category: Joi.string().allow(""),
731
- address_type: Joi.string().allow(""),
732
- address1: Joi.string().allow(""),
733
- address2: Joi.string().allow(""),
734
- area: Joi.string().allow(""),
735
- city: Joi.string().allow(""),
736
- contact_person: Joi.string().allow(""),
737
- country: Joi.string().allow(""),
738
- country_iso_code: Joi.string().allow(""),
739
- country_phone_code: Joi.string().allow(""),
740
- created_at: Joi.string().allow(""),
741
- display_address: Joi.string().allow(""),
742
- email: Joi.string().allow(""),
743
- landmark: Joi.string().allow(""),
744
- latitude: Joi.number().allow(null),
745
- longitude: Joi.number().allow(null),
746
- name: Joi.string().allow(""),
747
- phone: Joi.string().allow(""),
748
- pincode: Joi.string().allow(""),
749
- state: Joi.string().allow(""),
750
- updated_at: Joi.string().allow(""),
751
- version: Joi.string().allow(""),
679
+ is_passed: Joi.boolean(),
680
+ time: Joi.string().allow(""),
681
+ is_current: Joi.boolean(),
682
+ status: Joi.string().allow(""),
752
683
  });
753
684
  }
754
685
 
755
- /** @returns {EntitiesDataUpdates} */
756
- static EntitiesDataUpdates() {
686
+ /** @returns {TrackingDetails} */
687
+ static TrackingDetails() {
757
688
  return Joi.object({
758
- data: Joi.any(),
759
- filters: Joi.array().items(Joi.any()),
689
+ value: Joi.string().allow("").allow(null),
690
+ is_current: Joi.boolean(),
691
+ is_passed: Joi.boolean(),
692
+ status: Joi.string().allow(""),
693
+ time: Joi.string().allow(""),
694
+ created_ts: Joi.string().allow(""),
695
+ tracking_details: Joi.array().items(
696
+ OrderApplicationModel.NestedTrackingDetails()
697
+ ),
760
698
  });
761
699
  }
762
700
 
763
- /** @returns {EntitiesReasons} */
764
- static EntitiesReasons() {
701
+ /** @returns {TimeStampData} */
702
+ static TimeStampData() {
765
703
  return Joi.object({
766
- data: OrderApplicationModel.EntityReasonData(),
767
- filters: Joi.array().items(Joi.any()),
704
+ min: Joi.string().allow(""),
705
+ max: Joi.string().allow(""),
768
706
  });
769
707
  }
770
708
 
771
- /** @returns {EntityReasonData} */
772
- static EntityReasonData() {
709
+ /** @returns {Promise} */
710
+ static Promise() {
773
711
  return Joi.object({
774
- reason_id: Joi.number(),
775
- reason_text: Joi.string().allow(""),
712
+ show_promise: Joi.boolean(),
713
+ timestamp: OrderApplicationModel.TimeStampData(),
776
714
  });
777
715
  }
778
716
 
779
- /** @returns {ErrorResponse} */
780
- static ErrorResponse() {
717
+ /** @returns {ShipmentTotalDetails} */
718
+ static ShipmentTotalDetails() {
781
719
  return Joi.object({
782
- code: Joi.string().allow("").allow(null),
783
- exception: Joi.string().allow("").allow(null),
784
- message: Joi.string().allow("").allow(null),
785
- stack_trace: Joi.string().allow("").allow(null),
786
- status: Joi.number(),
720
+ pieces: Joi.number(),
721
+ total_price: Joi.number(),
722
+ sizes: Joi.number(),
787
723
  });
788
724
  }
789
725
 
790
- /** @returns {FinancialBreakup} */
791
- static FinancialBreakup() {
726
+ /** @returns {Prices} */
727
+ static Prices() {
792
728
  return Joi.object({
793
- added_to_fynd_cash: Joi.boolean(),
794
- amount_paid: Joi.number(),
795
- amount_paid_roundoff: Joi.number(),
729
+ delivery_charge: Joi.number(),
730
+ coupon_value: Joi.number(),
796
731
  brand_calculated_amount: Joi.number(),
797
- cashback: Joi.number(),
798
- cashback_applied: Joi.number(),
799
- cod_charges: Joi.number(),
732
+ value_of_good: Joi.number(),
733
+ price_marked: Joi.number(),
800
734
  coupon_effective_discount: Joi.number(),
801
- coupon_value: Joi.number(),
802
- delivery_charge: Joi.number(),
735
+ currency_symbol: Joi.string().allow(""),
803
736
  discount: Joi.number(),
804
- fynd_credits: Joi.number(),
805
- gst_fee: Joi.number(),
806
- gst_tag: Joi.string().allow(""),
807
737
  gst_tax_percentage: Joi.number(),
808
- hsn_code: Joi.string().allow(""),
809
- identifiers: OrderApplicationModel.Identifiers(),
810
- item_name: Joi.string().allow(""),
738
+ cod_charges: Joi.number(),
739
+ amount_paid: Joi.number(),
740
+ added_to_fynd_cash: Joi.boolean(),
741
+ transfer_price: Joi.number(),
742
+ cashback_applied: Joi.number(),
811
743
  price_effective: Joi.number(),
812
- price_marked: Joi.number(),
744
+ cashback: Joi.number(),
745
+ refund_credit: Joi.number(),
746
+ amount_paid_roundoff: Joi.number(),
813
747
  promotion_effective_discount: Joi.number(),
814
748
  refund_amount: Joi.number(),
815
- refund_credit: Joi.number(),
816
- size: Joi.string().allow(""),
817
- total_units: Joi.number(),
818
- transfer_price: Joi.number(),
819
- value_of_good: Joi.number(),
749
+ currency_code: Joi.string().allow(""),
750
+ fynd_credits: Joi.number(),
820
751
  });
821
752
  }
822
753
 
823
- /** @returns {FulfillingCompany} */
824
- static FulfillingCompany() {
754
+ /** @returns {ItemBrand} */
755
+ static ItemBrand() {
825
756
  return Joi.object({
826
- id: Joi.number(),
757
+ logo: Joi.string().allow(""),
827
758
  name: Joi.string().allow(""),
828
759
  });
829
760
  }
830
761
 
831
- /** @returns {FulfillingStore} */
832
- static FulfillingStore() {
762
+ /** @returns {Item} */
763
+ static Item() {
833
764
  return Joi.object({
765
+ image: Joi.array().items(Joi.string().allow("")),
766
+ l1_categories: Joi.array().items(Joi.string().allow("")),
767
+ brand: OrderApplicationModel.ItemBrand(),
768
+ seller_identifier: Joi.string().allow(""),
834
769
  code: Joi.string().allow(""),
835
- company_id: Joi.number(),
836
- company_name: Joi.string().allow(""),
837
770
  id: Joi.number(),
838
771
  name: Joi.string().allow(""),
772
+ l3_category_name: Joi.string().allow(""),
773
+ slug_key: Joi.string().allow(""),
774
+ l2_categories: Joi.array().items(Joi.string().allow("")),
775
+ size: Joi.string().allow(""),
776
+ attributes: Joi.object().pattern(/\S/, Joi.any()),
777
+ });
778
+ }
779
+
780
+ /** @returns {AppliedFreeArticles} */
781
+ static AppliedFreeArticles() {
782
+ return Joi.object({
783
+ article_id: Joi.string().allow(""),
784
+ free_gift_item_details: Joi.any(),
785
+ parent_item_identifier: Joi.string().allow(""),
786
+ quantity: Joi.number(),
787
+ });
788
+ }
789
+
790
+ /** @returns {AppliedPromos} */
791
+ static AppliedPromos() {
792
+ return Joi.object({
793
+ mrp_promotion: Joi.boolean(),
794
+ promotion_name: Joi.string().allow(""),
795
+ article_quantity: Joi.number(),
796
+ promo_id: Joi.string().allow(""),
797
+ amount: Joi.number(),
798
+ promotion_type: Joi.string().allow(""),
799
+ applied_free_articles: Joi.array().items(
800
+ OrderApplicationModel.AppliedFreeArticles()
801
+ ),
839
802
  });
840
803
  }
841
804
 
@@ -847,279 +810,350 @@ class OrderApplicationModel {
847
810
  });
848
811
  }
849
812
 
850
- /** @returns {Invoice} */
851
- static Invoice() {
813
+ /** @returns {FinancialBreakup} */
814
+ static FinancialBreakup() {
852
815
  return Joi.object({
853
- invoice_url: Joi.string().allow(""),
854
- label_url: Joi.string().allow(""),
855
- updated_date: Joi.string().allow(""),
816
+ coupon_value: Joi.number(),
817
+ delivery_charge: Joi.number(),
818
+ brand_calculated_amount: Joi.number(),
819
+ value_of_good: Joi.number(),
820
+ price_marked: Joi.number(),
821
+ coupon_effective_discount: Joi.number(),
822
+ hsn_code: Joi.string().allow(""),
823
+ discount: Joi.number(),
824
+ gst_tax_percentage: Joi.number(),
825
+ cod_charges: Joi.number(),
826
+ amount_paid: Joi.number(),
827
+ added_to_fynd_cash: Joi.boolean(),
828
+ size: Joi.string().allow(""),
829
+ transfer_price: Joi.number(),
830
+ cashback_applied: Joi.number(),
831
+ price_effective: Joi.number(),
832
+ cashback: Joi.number(),
833
+ refund_credit: Joi.number(),
834
+ amount_paid_roundoff: Joi.number(),
835
+ total_units: Joi.number(),
836
+ identifiers: OrderApplicationModel.Identifiers(),
837
+ gst_tag: Joi.string().allow(""),
838
+ item_name: Joi.string().allow(""),
839
+ promotion_effective_discount: Joi.number(),
840
+ gst_fee: Joi.number(),
841
+ refund_amount: Joi.number(),
842
+ fynd_credits: Joi.number(),
856
843
  });
857
844
  }
858
845
 
859
- /** @returns {Item} */
860
- static Item() {
846
+ /** @returns {CurrentStatus} */
847
+ static CurrentStatus() {
861
848
  return Joi.object({
862
- attributes: Joi.object().pattern(/\S/, Joi.any()),
863
- brand: OrderApplicationModel.ItemBrand(),
864
- code: Joi.string().allow(""),
865
- id: Joi.number(),
866
- image: Joi.array().items(Joi.string().allow("")),
867
- l1_categories: Joi.array().items(Joi.string().allow("")),
868
- l2_categories: Joi.array().items(Joi.string().allow("")),
869
- l3_category_name: Joi.string().allow(""),
849
+ updated_at: Joi.string().allow(""),
870
850
  name: Joi.string().allow(""),
851
+ status: Joi.string().allow(""),
852
+ journey_type: Joi.string().allow("").allow(null),
853
+ });
854
+ }
855
+
856
+ /** @returns {Bags} */
857
+ static Bags() {
858
+ return Joi.object({
859
+ delivery_date: Joi.string().allow("").allow(null),
860
+ line_number: Joi.number(),
861
+ currency_symbol: Joi.string().allow(""),
862
+ item: OrderApplicationModel.Item(),
863
+ applied_promos: Joi.array().items(OrderApplicationModel.AppliedPromos()),
864
+ quantity: Joi.number(),
865
+ prices: OrderApplicationModel.Prices(),
866
+ can_cancel: Joi.boolean(),
867
+ can_return: Joi.boolean(),
868
+ id: Joi.number(),
869
+ returnable_date: Joi.string().allow("").allow(null),
870
+ financial_breakup: Joi.array().items(
871
+ OrderApplicationModel.FinancialBreakup()
872
+ ),
873
+ parent_promo_bags: Joi.any(),
874
+ meta: Joi.any(),
875
+ currency_code: Joi.string().allow(""),
871
876
  seller_identifier: Joi.string().allow(""),
872
- size: Joi.string().allow(""),
873
- slug_key: Joi.string().allow(""),
877
+ current_status: OrderApplicationModel.CurrentStatus(),
874
878
  });
875
879
  }
876
880
 
877
- /** @returns {ItemBrand} */
878
- static ItemBrand() {
881
+ /** @returns {FulfillingCompany} */
882
+ static FulfillingCompany() {
879
883
  return Joi.object({
880
- logo: Joi.string().allow(""),
884
+ id: Joi.number(),
881
885
  name: Joi.string().allow(""),
882
886
  });
883
887
  }
884
888
 
885
- /** @returns {NestedTrackingDetails} */
886
- static NestedTrackingDetails() {
887
- return Joi.object({
888
- is_current: Joi.boolean(),
889
- is_passed: Joi.boolean(),
890
- status: Joi.string().allow(""),
891
- time: Joi.string().allow(""),
892
- });
893
- }
894
-
895
- /** @returns {OrderById} */
896
- static OrderById() {
889
+ /** @returns {DeliveryAddress} */
890
+ static DeliveryAddress() {
897
891
  return Joi.object({
898
- order: OrderApplicationModel.OrderSchema(),
892
+ pincode: Joi.string().allow(""),
893
+ phone: Joi.string().allow(""),
894
+ latitude: Joi.number().allow(null),
895
+ address2: Joi.string().allow(""),
896
+ landmark: Joi.string().allow(""),
897
+ area: Joi.string().allow(""),
898
+ city: Joi.string().allow(""),
899
+ address: Joi.string().allow(""),
900
+ address_type: Joi.string().allow(""),
901
+ longitude: Joi.number().allow(null),
902
+ country_iso_code: Joi.string().allow(""),
903
+ state: Joi.string().allow(""),
904
+ created_at: Joi.string().allow(""),
905
+ address1: Joi.string().allow(""),
906
+ display_address: Joi.string().allow(""),
907
+ name: Joi.string().allow(""),
908
+ contact_person: Joi.string().allow(""),
909
+ address_category: Joi.string().allow(""),
910
+ email: Joi.string().allow(""),
911
+ country_phone_code: Joi.string().allow(""),
912
+ version: Joi.string().allow(""),
913
+ updated_at: Joi.string().allow(""),
914
+ country: Joi.string().allow(""),
899
915
  });
900
916
  }
901
917
 
902
- /** @returns {OrderFilters} */
903
- static OrderFilters() {
918
+ /** @returns {Shipments} */
919
+ static Shipments() {
904
920
  return Joi.object({
905
- statuses: Joi.array().items(OrderApplicationModel.OrderStatuses()),
921
+ payment: OrderApplicationModel.ShipmentPayment(),
922
+ order_type: Joi.string().allow("").allow(null),
923
+ show_download_invoice: Joi.boolean(),
924
+ can_cancel: Joi.boolean(),
925
+ user_info: OrderApplicationModel.ShipmentUserInfo(),
926
+ shipment_id: Joi.string().allow(""),
927
+ fulfilling_store: OrderApplicationModel.FulfillingStore(),
928
+ custom_meta: Joi.array().items(Joi.any()),
929
+ shipment_status: OrderApplicationModel.ShipmentStatus(),
930
+ comment: Joi.string().allow(""),
931
+ invoice: OrderApplicationModel.Invoice(),
932
+ show_track_link: Joi.boolean(),
933
+ refund_details: Joi.any(),
934
+ breakup_values: Joi.array().items(OrderApplicationModel.BreakupValues()),
935
+ can_break: Joi.any(),
936
+ traking_no: Joi.string().allow(""),
937
+ tracking_details: Joi.array().items(
938
+ OrderApplicationModel.TrackingDetails()
939
+ ),
940
+ promise: OrderApplicationModel.Promise(),
941
+ total_bags: Joi.number(),
942
+ total_details: OrderApplicationModel.ShipmentTotalDetails(),
943
+ prices: OrderApplicationModel.Prices(),
944
+ returnable_date: Joi.string().allow("").allow(null),
945
+ shipment_created_at: Joi.string().allow(""),
946
+ shipment_created_ts: Joi.string().allow(""),
947
+ size_info: Joi.any(),
948
+ bags: Joi.array().items(OrderApplicationModel.Bags()),
949
+ dp_name: Joi.string().allow(""),
950
+ awb_no: Joi.string().allow(""),
951
+ beneficiary_details: Joi.boolean(),
952
+ fulfilling_company: OrderApplicationModel.FulfillingCompany(),
953
+ can_return: Joi.boolean(),
954
+ delivery_address: OrderApplicationModel.DeliveryAddress(),
955
+ track_url: Joi.string().allow(""),
956
+ order_id: Joi.string().allow(""),
957
+ need_help_url: Joi.string().allow(""),
958
+ return_meta: Joi.any(),
959
+ delivery_date: Joi.string().allow("").allow(null),
906
960
  });
907
961
  }
908
962
 
909
- /** @returns {OrderList} */
910
- static OrderList() {
963
+ /** @returns {BagsForReorderArticleAssignment} */
964
+ static BagsForReorderArticleAssignment() {
911
965
  return Joi.object({
912
- filters: OrderApplicationModel.OrderFilters(),
913
- items: Joi.array().items(OrderApplicationModel.OrderSchema()),
914
- page: OrderApplicationModel.OrderPage(),
966
+ strategy: Joi.string().allow(""),
967
+ level: Joi.string().allow(""),
915
968
  });
916
969
  }
917
970
 
918
- /** @returns {OrderPage} */
919
- static OrderPage() {
971
+ /** @returns {BagsForReorder} */
972
+ static BagsForReorder() {
920
973
  return Joi.object({
921
- current: Joi.number(),
922
- has_next: Joi.boolean(),
923
- item_total: Joi.number(),
924
- size: Joi.number(),
925
- type: Joi.string().allow(""),
974
+ item_size: Joi.string().allow(""),
975
+ quantity: Joi.number(),
976
+ store_id: Joi.number(),
977
+ article_assignment: OrderApplicationModel.BagsForReorderArticleAssignment(),
978
+ seller_id: Joi.number(),
979
+ item_id: Joi.number(),
926
980
  });
927
981
  }
928
982
 
929
983
  /** @returns {OrderSchema} */
930
984
  static OrderSchema() {
931
985
  return Joi.object({
932
- bags_for_reorder: Joi.array().items(
933
- OrderApplicationModel.BagsForReorder()
934
- ),
986
+ total_shipments_in_order: Joi.number(),
987
+ user_info: OrderApplicationModel.UserInfo(),
935
988
  breakup_values: Joi.array().items(OrderApplicationModel.BreakupValues()),
936
989
  order_created_time: Joi.string().allow(""),
937
990
  order_created_ts: Joi.string().allow(""),
938
991
  order_id: Joi.string().allow(""),
939
992
  shipments: Joi.array().items(OrderApplicationModel.Shipments()),
940
- total_shipments_in_order: Joi.number(),
941
- user_info: OrderApplicationModel.UserInfo(),
993
+ bags_for_reorder: Joi.array().items(
994
+ OrderApplicationModel.BagsForReorder()
995
+ ),
942
996
  });
943
997
  }
944
998
 
945
999
  /** @returns {OrderStatuses} */
946
1000
  static OrderStatuses() {
947
1001
  return Joi.object({
948
- display: Joi.string().allow(""),
949
- is_selected: Joi.boolean(),
950
1002
  value: Joi.number(),
1003
+ is_selected: Joi.boolean(),
1004
+ display: Joi.string().allow(""),
951
1005
  });
952
1006
  }
953
1007
 
954
- /** @returns {Prices} */
955
- static Prices() {
956
- return Joi.object({
957
- added_to_fynd_cash: Joi.boolean(),
958
- amount_paid: Joi.number(),
959
- amount_paid_roundoff: Joi.number(),
960
- brand_calculated_amount: Joi.number(),
961
- cashback: Joi.number(),
962
- cashback_applied: Joi.number(),
963
- cod_charges: Joi.number(),
964
- coupon_effective_discount: Joi.number(),
965
- coupon_value: Joi.number(),
966
- currency_code: Joi.string().allow(""),
967
- currency_symbol: Joi.string().allow(""),
968
- delivery_charge: Joi.number(),
969
- discount: Joi.number(),
970
- fynd_credits: Joi.number(),
971
- gst_tax_percentage: Joi.number(),
972
- price_effective: Joi.number(),
973
- price_marked: Joi.number(),
974
- promotion_effective_discount: Joi.number(),
975
- refund_amount: Joi.number(),
976
- refund_credit: Joi.number(),
977
- transfer_price: Joi.number(),
978
- value_of_good: Joi.number(),
979
- });
980
- }
981
-
982
- /** @returns {Products} */
983
- static Products() {
984
- return Joi.object({
985
- identifier: Joi.string().allow(""),
986
- line_number: Joi.number(),
987
- quantity: Joi.number(),
988
- });
989
- }
990
-
991
- /** @returns {ProductsDataUpdates} */
992
- static ProductsDataUpdates() {
1008
+ /** @returns {OrderFilters} */
1009
+ static OrderFilters() {
993
1010
  return Joi.object({
994
- data: Joi.any(),
995
- filters: Joi.array().items(
996
- OrderApplicationModel.ProductsDataUpdatesFilters()
997
- ),
1011
+ statuses: Joi.array().items(OrderApplicationModel.OrderStatuses()),
998
1012
  });
999
1013
  }
1000
1014
 
1001
- /** @returns {ProductsDataUpdatesFilters} */
1002
- static ProductsDataUpdatesFilters() {
1015
+ /** @returns {OrderList} */
1016
+ static OrderList() {
1003
1017
  return Joi.object({
1004
- identifier: Joi.string().allow(""),
1005
- line_number: Joi.number(),
1018
+ page: OrderApplicationModel.OrderPage(),
1019
+ items: Joi.array().items(OrderApplicationModel.OrderSchema()),
1020
+ filters: OrderApplicationModel.OrderFilters(),
1006
1021
  });
1007
1022
  }
1008
1023
 
1009
- /** @returns {ProductsReasons} */
1010
- static ProductsReasons() {
1024
+ /** @returns {ApefaceApiError} */
1025
+ static ApefaceApiError() {
1011
1026
  return Joi.object({
1012
- data: OrderApplicationModel.ProductsReasonsData(),
1013
- filters: Joi.array().items(
1014
- OrderApplicationModel.ProductsReasonsFilters()
1015
- ),
1027
+ message: Joi.string().allow(""),
1028
+ success: Joi.boolean(),
1016
1029
  });
1017
1030
  }
1018
1031
 
1019
- /** @returns {ProductsReasonsData} */
1020
- static ProductsReasonsData() {
1032
+ /** @returns {OrderById} */
1033
+ static OrderById() {
1021
1034
  return Joi.object({
1022
- reason_id: Joi.number(),
1023
- reason_text: Joi.string().allow(""),
1035
+ order: OrderApplicationModel.OrderSchema(),
1024
1036
  });
1025
1037
  }
1026
1038
 
1027
- /** @returns {ProductsReasonsFilters} */
1028
- static ProductsReasonsFilters() {
1039
+ /** @returns {ShipmentById} */
1040
+ static ShipmentById() {
1029
1041
  return Joi.object({
1030
- identifier: Joi.string().allow(""),
1031
- line_number: Joi.number(),
1032
- quantity: Joi.number(),
1042
+ shipment: OrderApplicationModel.Shipments(),
1033
1043
  });
1034
1044
  }
1035
1045
 
1036
- /** @returns {Promise} */
1037
- static Promise() {
1046
+ /** @returns {ResponseGetInvoiceShipment} */
1047
+ static ResponseGetInvoiceShipment() {
1038
1048
  return Joi.object({
1039
- show_promise: Joi.boolean(),
1040
- timestamp: OrderApplicationModel.TimeStampData(),
1049
+ presigned_type: Joi.string().allow("").required(),
1050
+ success: Joi.boolean().required(),
1051
+ shipment_id: Joi.string().allow("").required(),
1052
+ presigned_url: Joi.string().allow("").required(),
1041
1053
  });
1042
1054
  }
1043
1055
 
1044
- /** @returns {QuestionSet} */
1045
- static QuestionSet() {
1056
+ /** @returns {Track} */
1057
+ static Track() {
1046
1058
  return Joi.object({
1047
- display_name: Joi.string().allow(""),
1048
- id: Joi.number(),
1059
+ account_name: Joi.string().allow(""),
1060
+ shipment_type: Joi.string().allow(""),
1061
+ status: Joi.string().allow(""),
1062
+ last_location_recieved_at: Joi.string().allow(""),
1063
+ updated_time: Joi.string().allow(""),
1064
+ updated_at: Joi.string().allow(""),
1065
+ reason: Joi.string().allow(""),
1066
+ awb: Joi.string().allow(""),
1049
1067
  });
1050
1068
  }
1051
1069
 
1052
- /** @returns {ReasonsData} */
1053
- static ReasonsData() {
1070
+ /** @returns {ShipmentTrack} */
1071
+ static ShipmentTrack() {
1054
1072
  return Joi.object({
1055
- entities: Joi.array().items(OrderApplicationModel.EntitiesReasons()),
1056
- products: Joi.array().items(OrderApplicationModel.ProductsReasons()),
1073
+ results: Joi.array().items(OrderApplicationModel.Track()),
1057
1074
  });
1058
1075
  }
1059
1076
 
1060
- /** @returns {ResponseGetInvoiceShipment} */
1061
- static ResponseGetInvoiceShipment() {
1077
+ /** @returns {CustomerDetailsResponse} */
1078
+ static CustomerDetailsResponse() {
1062
1079
  return Joi.object({
1063
- presigned_type: Joi.string().allow("").required(),
1064
- presigned_url: Joi.string().allow("").required(),
1065
- shipment_id: Joi.string().allow("").required(),
1066
- success: Joi.boolean().required(),
1080
+ phone: Joi.string().allow(""),
1081
+ shipment_id: Joi.string().allow(""),
1082
+ name: Joi.string().allow(""),
1083
+ order_id: Joi.string().allow(""),
1084
+ country: Joi.string().allow(""),
1067
1085
  });
1068
1086
  }
1069
1087
 
1070
1088
  /** @returns {SendOtpToCustomerResponse} */
1071
1089
  static SendOtpToCustomerResponse() {
1072
1090
  return Joi.object({
1073
- message: Joi.string().allow(""),
1074
1091
  request_id: Joi.string().allow(""),
1075
- resend_timer: Joi.number(),
1092
+ message: Joi.string().allow(""),
1076
1093
  success: Joi.boolean(),
1094
+ resend_timer: Joi.number(),
1077
1095
  });
1078
1096
  }
1079
1097
 
1080
- /** @returns {ShipmentApplicationStatusResponse} */
1081
- static ShipmentApplicationStatusResponse() {
1098
+ /** @returns {VerifyOtp} */
1099
+ static VerifyOtp() {
1082
1100
  return Joi.object({
1083
- statuses: Joi.array().items(OrderApplicationModel.StatusesBodyResponse()),
1101
+ otp_code: Joi.string().allow(""),
1102
+ request_id: Joi.string().allow(""),
1084
1103
  });
1085
1104
  }
1086
1105
 
1087
- /** @returns {ShipmentBagReasons} */
1088
- static ShipmentBagReasons() {
1106
+ /** @returns {VerifyOtpResponse} */
1107
+ static VerifyOtpResponse() {
1089
1108
  return Joi.object({
1090
- reasons: Joi.array().items(OrderApplicationModel.BagReasons()),
1091
1109
  success: Joi.boolean(),
1092
1110
  });
1093
1111
  }
1094
1112
 
1095
- /** @returns {ShipmentById} */
1096
- static ShipmentById() {
1113
+ /** @returns {BagReasonMeta} */
1114
+ static BagReasonMeta() {
1097
1115
  return Joi.object({
1098
- shipment: OrderApplicationModel.Shipments(),
1116
+ show_text_area: Joi.boolean(),
1099
1117
  });
1100
1118
  }
1101
1119
 
1102
- /** @returns {ShipmentPayment} */
1103
- static ShipmentPayment() {
1120
+ /** @returns {QuestionSet} */
1121
+ static QuestionSet() {
1104
1122
  return Joi.object({
1123
+ id: Joi.number(),
1105
1124
  display_name: Joi.string().allow(""),
1106
- logo: Joi.string().allow(""),
1107
- mode: Joi.string().allow(""),
1108
- mop: Joi.string().allow(""),
1109
- payment_mode: Joi.string().allow(""),
1110
- status: Joi.string().allow(""),
1125
+ });
1126
+ }
1127
+
1128
+ /** @returns {BagReasons} */
1129
+ static BagReasons() {
1130
+ return Joi.object({
1131
+ qc_type: Joi.array().items(Joi.string().allow("")),
1132
+ id: Joi.number(),
1133
+ display_name: Joi.string().allow(""),
1134
+ meta: OrderApplicationModel.BagReasonMeta(),
1135
+ question_set: Joi.array().items(OrderApplicationModel.QuestionSet()),
1136
+ reasons: Joi.array().items(Joi.link("#BagReasons")),
1137
+ }).id("BagReasons");
1138
+ }
1139
+
1140
+ /** @returns {ShipmentBagReasons} */
1141
+ static ShipmentBagReasons() {
1142
+ return Joi.object({
1143
+ reasons: Joi.array().items(OrderApplicationModel.BagReasons()),
1144
+ success: Joi.boolean(),
1111
1145
  });
1112
1146
  }
1113
1147
 
1114
1148
  /** @returns {ShipmentReason} */
1115
1149
  static ShipmentReason() {
1116
1150
  return Joi.object({
1117
- feedback_type: Joi.string().allow(""),
1118
- flow: Joi.string().allow(""),
1119
1151
  priority: Joi.number(),
1152
+ show_text_area: Joi.boolean(),
1120
1153
  reason_id: Joi.number(),
1154
+ feedback_type: Joi.string().allow(""),
1121
1155
  reason_text: Joi.string().allow(""),
1122
- show_text_area: Joi.boolean(),
1156
+ flow: Joi.string().allow(""),
1123
1157
  });
1124
1158
  }
1125
1159
 
@@ -1130,186 +1164,152 @@ class OrderApplicationModel {
1130
1164
  });
1131
1165
  }
1132
1166
 
1133
- /** @returns {Shipments} */
1134
- static Shipments() {
1167
+ /** @returns {ProductsReasonsData} */
1168
+ static ProductsReasonsData() {
1135
1169
  return Joi.object({
1136
- awb_no: Joi.string().allow(""),
1137
- bags: Joi.array().items(OrderApplicationModel.Bags()),
1138
- beneficiary_details: Joi.boolean(),
1139
- breakup_values: Joi.array().items(OrderApplicationModel.BreakupValues()),
1140
- can_break: Joi.any(),
1141
- can_cancel: Joi.boolean(),
1142
- can_return: Joi.boolean(),
1143
- comment: Joi.string().allow(""),
1144
- custom_meta: Joi.array().items(Joi.any()),
1145
- delivery_address: OrderApplicationModel.DeliveryAddress(),
1146
- delivery_date: Joi.string().allow("").allow(null),
1147
- dp_name: Joi.string().allow(""),
1148
- fulfilling_company: OrderApplicationModel.FulfillingCompany(),
1149
- fulfilling_store: OrderApplicationModel.FulfillingStore(),
1150
- invoice: OrderApplicationModel.Invoice(),
1151
- need_help_url: Joi.string().allow(""),
1152
- order_id: Joi.string().allow(""),
1153
- order_type: Joi.string().allow("").allow(null),
1154
- payment: OrderApplicationModel.ShipmentPayment(),
1155
- prices: OrderApplicationModel.Prices(),
1156
- promise: OrderApplicationModel.Promise(),
1157
- refund_details: Joi.any(),
1158
- return_meta: Joi.any(),
1159
- returnable_date: Joi.string().allow("").allow(null),
1160
- shipment_created_at: Joi.string().allow(""),
1161
- shipment_created_ts: Joi.string().allow(""),
1162
- shipment_id: Joi.string().allow(""),
1163
- shipment_status: OrderApplicationModel.ShipmentStatus(),
1164
- show_download_invoice: Joi.boolean(),
1165
- show_track_link: Joi.boolean(),
1166
- size_info: Joi.any(),
1167
- total_bags: Joi.number(),
1168
- total_details: OrderApplicationModel.ShipmentTotalDetails(),
1169
- track_url: Joi.string().allow(""),
1170
- tracking_details: Joi.array().items(
1171
- OrderApplicationModel.TrackingDetails()
1170
+ reason_id: Joi.number(),
1171
+ reason_text: Joi.string().allow(""),
1172
+ });
1173
+ }
1174
+
1175
+ /** @returns {ProductsReasonsFilters} */
1176
+ static ProductsReasonsFilters() {
1177
+ return Joi.object({
1178
+ line_number: Joi.number(),
1179
+ quantity: Joi.number(),
1180
+ identifier: Joi.string().allow(""),
1181
+ });
1182
+ }
1183
+
1184
+ /** @returns {ProductsReasons} */
1185
+ static ProductsReasons() {
1186
+ return Joi.object({
1187
+ data: OrderApplicationModel.ProductsReasonsData(),
1188
+ filters: Joi.array().items(
1189
+ OrderApplicationModel.ProductsReasonsFilters()
1172
1190
  ),
1173
- traking_no: Joi.string().allow(""),
1174
- user_info: OrderApplicationModel.ShipmentUserInfo(),
1175
1191
  });
1176
1192
  }
1177
1193
 
1178
- /** @returns {ShipmentsRequest} */
1179
- static ShipmentsRequest() {
1194
+ /** @returns {EntityReasonData} */
1195
+ static EntityReasonData() {
1180
1196
  return Joi.object({
1181
- data_updates: OrderApplicationModel.DataUpdates(),
1182
- identifier: Joi.string().allow("").required(),
1183
- products: Joi.array().items(OrderApplicationModel.Products()),
1184
- reasons: OrderApplicationModel.ReasonsData(),
1197
+ reason_id: Joi.number(),
1198
+ reason_text: Joi.string().allow(""),
1185
1199
  });
1186
1200
  }
1187
1201
 
1188
- /** @returns {ShipmentStatus} */
1189
- static ShipmentStatus() {
1202
+ /** @returns {EntitiesReasons} */
1203
+ static EntitiesReasons() {
1190
1204
  return Joi.object({
1191
- hex_code: Joi.string().allow(""),
1192
- title: Joi.string().allow(""),
1193
- value: Joi.string().allow("").allow(null),
1205
+ data: OrderApplicationModel.EntityReasonData(),
1206
+ filters: Joi.array().items(Joi.any()),
1194
1207
  });
1195
1208
  }
1196
1209
 
1197
- /** @returns {ShipmentTotalDetails} */
1198
- static ShipmentTotalDetails() {
1210
+ /** @returns {ReasonsData} */
1211
+ static ReasonsData() {
1199
1212
  return Joi.object({
1200
- pieces: Joi.number(),
1201
- sizes: Joi.number(),
1202
- total_price: Joi.number(),
1213
+ products: Joi.array().items(OrderApplicationModel.ProductsReasons()),
1214
+ entities: Joi.array().items(OrderApplicationModel.EntitiesReasons()),
1203
1215
  });
1204
1216
  }
1205
1217
 
1206
- /** @returns {ShipmentTrack} */
1207
- static ShipmentTrack() {
1218
+ /** @returns {Products} */
1219
+ static Products() {
1208
1220
  return Joi.object({
1209
- results: Joi.array().items(OrderApplicationModel.Track()),
1221
+ line_number: Joi.number(),
1222
+ quantity: Joi.number(),
1223
+ identifier: Joi.string().allow(""),
1210
1224
  });
1211
1225
  }
1212
1226
 
1213
- /** @returns {ShipmentUserInfo} */
1214
- static ShipmentUserInfo() {
1227
+ /** @returns {ProductsDataUpdatesFilters} */
1228
+ static ProductsDataUpdatesFilters() {
1215
1229
  return Joi.object({
1216
- email: Joi.string().allow(""),
1217
- first_name: Joi.string().allow(""),
1218
- gender: Joi.string().allow(""),
1219
- last_name: Joi.string().allow(""),
1220
- mobile: Joi.string().allow(""),
1221
- name: Joi.string().allow(""),
1230
+ line_number: Joi.number(),
1231
+ identifier: Joi.string().allow(""),
1222
1232
  });
1223
1233
  }
1224
1234
 
1225
- /** @returns {StatuesRequest} */
1226
- static StatuesRequest() {
1235
+ /** @returns {ProductsDataUpdates} */
1236
+ static ProductsDataUpdates() {
1227
1237
  return Joi.object({
1228
- exclude_bags_next_state: Joi.string().allow(""),
1229
- shipments: Joi.array().items(OrderApplicationModel.ShipmentsRequest()),
1230
- status: Joi.string().allow(""),
1238
+ data: Joi.any(),
1239
+ filters: Joi.array().items(
1240
+ OrderApplicationModel.ProductsDataUpdatesFilters()
1241
+ ),
1231
1242
  });
1232
1243
  }
1233
1244
 
1234
- /** @returns {StatusesBodyResponse} */
1235
- static StatusesBodyResponse() {
1245
+ /** @returns {EntitiesDataUpdates} */
1246
+ static EntitiesDataUpdates() {
1236
1247
  return Joi.object({
1237
- shipments: Joi.array().items(Joi.any()),
1248
+ data: Joi.any(),
1249
+ filters: Joi.array().items(Joi.any()),
1238
1250
  });
1239
1251
  }
1240
1252
 
1241
- /** @returns {TimeStampData} */
1242
- static TimeStampData() {
1253
+ /** @returns {DataUpdates} */
1254
+ static DataUpdates() {
1243
1255
  return Joi.object({
1244
- max: Joi.string().allow(""),
1245
- min: Joi.string().allow(""),
1256
+ products: Joi.array().items(OrderApplicationModel.ProductsDataUpdates()),
1257
+ entities: Joi.array().items(OrderApplicationModel.EntitiesDataUpdates()),
1246
1258
  });
1247
1259
  }
1248
1260
 
1249
- /** @returns {Track} */
1250
- static Track() {
1261
+ /** @returns {ShipmentsRequest} */
1262
+ static ShipmentsRequest() {
1251
1263
  return Joi.object({
1252
- account_name: Joi.string().allow(""),
1253
- awb: Joi.string().allow(""),
1254
- last_location_recieved_at: Joi.string().allow(""),
1255
- reason: Joi.string().allow(""),
1256
- shipment_type: Joi.string().allow(""),
1257
- status: Joi.string().allow(""),
1258
- updated_at: Joi.string().allow(""),
1259
- updated_time: Joi.string().allow(""),
1264
+ reasons: OrderApplicationModel.ReasonsData(),
1265
+ products: Joi.array().items(OrderApplicationModel.Products()),
1266
+ data_updates: OrderApplicationModel.DataUpdates(),
1267
+ identifier: Joi.string().allow("").required(),
1260
1268
  });
1261
1269
  }
1262
1270
 
1263
- /** @returns {TrackingDetails} */
1264
- static TrackingDetails() {
1271
+ /** @returns {StatuesRequest} */
1272
+ static StatuesRequest() {
1265
1273
  return Joi.object({
1266
- created_ts: Joi.string().allow(""),
1267
- is_current: Joi.boolean(),
1268
- is_passed: Joi.boolean(),
1274
+ shipments: Joi.array().items(OrderApplicationModel.ShipmentsRequest()),
1275
+ exclude_bags_next_state: Joi.string().allow(""),
1269
1276
  status: Joi.string().allow(""),
1270
- time: Joi.string().allow(""),
1271
- tracking_details: Joi.array().items(
1272
- OrderApplicationModel.NestedTrackingDetails()
1273
- ),
1274
- value: Joi.string().allow("").allow(null),
1275
1277
  });
1276
1278
  }
1277
1279
 
1278
1280
  /** @returns {UpdateShipmentStatusRequest} */
1279
1281
  static UpdateShipmentStatusRequest() {
1280
1282
  return Joi.object({
1281
- force_transition: Joi.boolean(),
1282
- lock_after_transition: Joi.boolean(),
1283
1283
  statuses: Joi.array().items(OrderApplicationModel.StatuesRequest()),
1284
1284
  task: Joi.boolean(),
1285
+ lock_after_transition: Joi.boolean(),
1286
+ force_transition: Joi.boolean(),
1285
1287
  unlock_before_transition: Joi.boolean(),
1286
1288
  });
1287
1289
  }
1288
1290
 
1289
- /** @returns {UserInfo} */
1290
- static UserInfo() {
1291
+ /** @returns {StatusesBodyResponse} */
1292
+ static StatusesBodyResponse() {
1291
1293
  return Joi.object({
1292
- email: Joi.string().allow(""),
1293
- first_name: Joi.string().allow(""),
1294
- gender: Joi.string().allow(""),
1295
- last_name: Joi.string().allow(""),
1296
- mobile: Joi.string().allow(""),
1297
- name: Joi.string().allow(""),
1294
+ shipments: Joi.array().items(Joi.any()),
1298
1295
  });
1299
1296
  }
1300
1297
 
1301
- /** @returns {VerifyOtp} */
1302
- static VerifyOtp() {
1298
+ /** @returns {ShipmentApplicationStatusResponse} */
1299
+ static ShipmentApplicationStatusResponse() {
1303
1300
  return Joi.object({
1304
- otp_code: Joi.string().allow(""),
1305
- request_id: Joi.string().allow(""),
1301
+ statuses: Joi.array().items(OrderApplicationModel.StatusesBodyResponse()),
1306
1302
  });
1307
1303
  }
1308
1304
 
1309
- /** @returns {VerifyOtpResponse} */
1310
- static VerifyOtpResponse() {
1305
+ /** @returns {ErrorResponse} */
1306
+ static ErrorResponse() {
1311
1307
  return Joi.object({
1312
- success: Joi.boolean(),
1308
+ code: Joi.string().allow("").allow(null),
1309
+ message: Joi.string().allow("").allow(null),
1310
+ status: Joi.number(),
1311
+ exception: Joi.string().allow("").allow(null),
1312
+ stack_trace: Joi.string().allow("").allow(null),
1313
1313
  });
1314
1314
  }
1315
1315
  }