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