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