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