@congminh1254/shopee-sdk 0.9.0 → 1.0.0
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 +178 -36
- package/lib/fetch.js +13 -0
- package/lib/fetch.js.map +1 -1
- package/lib/managers/add-on-deal.manager.d.ts +140 -0
- package/lib/managers/add-on-deal.manager.js +240 -0
- package/lib/managers/add-on-deal.manager.js.map +1 -0
- package/lib/managers/ads.manager.d.ts +217 -1
- package/lib/managers/ads.manager.js +312 -0
- package/lib/managers/ads.manager.js.map +1 -1
- package/lib/managers/bundle-deal.manager.d.ts +106 -0
- package/lib/managers/bundle-deal.manager.js +178 -0
- package/lib/managers/bundle-deal.manager.js.map +1 -0
- package/lib/managers/discount.manager.d.ts +102 -0
- package/lib/managers/discount.manager.js +167 -0
- package/lib/managers/discount.manager.js.map +1 -0
- package/lib/managers/fbs.manager.d.ts +115 -0
- package/lib/managers/fbs.manager.js +145 -0
- package/lib/managers/fbs.manager.js.map +1 -0
- package/lib/managers/first-mile.manager.d.ts +150 -0
- package/lib/managers/first-mile.manager.js +264 -0
- package/lib/managers/first-mile.manager.js.map +1 -0
- package/lib/managers/follow-prize.manager.d.ts +108 -0
- package/lib/managers/follow-prize.manager.js +152 -0
- package/lib/managers/follow-prize.manager.js.map +1 -0
- package/lib/managers/global-product.manager.d.ts +664 -0
- package/lib/managers/global-product.manager.js +904 -0
- package/lib/managers/global-product.manager.js.map +1 -0
- package/lib/managers/index.d.ts +17 -1
- package/lib/managers/index.js +17 -1
- package/lib/managers/index.js.map +1 -1
- package/lib/managers/livestream.manager.d.ts +377 -0
- package/lib/managers/livestream.manager.js +529 -0
- package/lib/managers/livestream.manager.js.map +1 -0
- package/lib/managers/logistics.manager.d.ts +267 -1
- package/lib/managers/logistics.manager.js +544 -0
- package/lib/managers/logistics.manager.js.map +1 -1
- package/lib/managers/media-space.manager.d.ts +179 -0
- package/lib/managers/media-space.manager.js +220 -0
- package/lib/managers/media-space.manager.js.map +1 -0
- package/lib/managers/media.manager.d.ts +226 -0
- package/lib/managers/media.manager.js +274 -0
- package/lib/managers/media.manager.js.map +1 -0
- package/lib/managers/merchant.manager.d.ts +100 -0
- package/lib/managers/merchant.manager.js +144 -0
- package/lib/managers/merchant.manager.js.map +1 -0
- package/lib/managers/order.manager.d.ts +213 -1
- package/lib/managers/order.manager.js +305 -0
- package/lib/managers/order.manager.js.map +1 -1
- package/lib/managers/payment.manager.d.ts +186 -1
- package/lib/managers/payment.manager.js +288 -0
- package/lib/managers/payment.manager.js.map +1 -1
- package/lib/managers/product.manager.d.ts +346 -1
- package/lib/managers/product.manager.js +718 -0
- package/lib/managers/product.manager.js.map +1 -1
- package/lib/managers/returns.manager.d.ts +200 -0
- package/lib/managers/returns.manager.js +300 -0
- package/lib/managers/returns.manager.js.map +1 -0
- package/lib/managers/sbs.manager.d.ts +112 -0
- package/lib/managers/sbs.manager.js +149 -0
- package/lib/managers/sbs.manager.js.map +1 -0
- package/lib/managers/shop-category.manager.d.ts +207 -0
- package/lib/managers/shop-category.manager.js +258 -0
- package/lib/managers/shop-category.manager.js.map +1 -0
- package/lib/managers/shop-flash-sale.manager.d.ts +242 -0
- package/lib/managers/shop-flash-sale.manager.js +321 -0
- package/lib/managers/shop-flash-sale.manager.js.map +1 -0
- package/lib/managers/shop.manager.d.ts +173 -0
- package/lib/managers/shop.manager.js +217 -0
- package/lib/managers/shop.manager.js.map +1 -0
- package/lib/managers/top-picks.manager.d.ts +62 -0
- package/lib/managers/top-picks.manager.js +91 -0
- package/lib/managers/top-picks.manager.js.map +1 -0
- package/lib/schemas/add-on-deal.d.ts +390 -0
- package/lib/schemas/add-on-deal.js +45 -0
- package/lib/schemas/add-on-deal.js.map +1 -0
- package/lib/schemas/ads.d.ts +437 -0
- package/lib/schemas/bundle-deal.d.ts +300 -0
- package/lib/schemas/bundle-deal.js +27 -0
- package/lib/schemas/bundle-deal.js.map +1 -0
- package/lib/schemas/discount.d.ts +334 -0
- package/lib/schemas/discount.js +15 -0
- package/lib/schemas/discount.js.map +1 -0
- package/lib/schemas/fbs.d.ts +117 -0
- package/lib/schemas/fbs.js +2 -0
- package/lib/schemas/fbs.js.map +1 -0
- package/lib/schemas/first-mile.d.ts +551 -0
- package/lib/schemas/first-mile.js +2 -0
- package/lib/schemas/first-mile.js.map +1 -0
- package/lib/schemas/follow-prize.d.ts +198 -0
- package/lib/schemas/follow-prize.js +27 -0
- package/lib/schemas/follow-prize.js.map +1 -0
- package/lib/schemas/global-product.d.ts +1127 -0
- package/lib/schemas/global-product.js +2 -0
- package/lib/schemas/global-product.js.map +1 -0
- package/lib/schemas/index.d.ts +13 -0
- package/lib/schemas/index.js +17 -0
- package/lib/schemas/index.js.map +1 -1
- package/lib/schemas/livestream.d.ts +649 -0
- package/lib/schemas/livestream.js +2 -0
- package/lib/schemas/livestream.js.map +1 -0
- package/lib/schemas/logistics.d.ts +979 -0
- package/lib/schemas/logistics.js +13 -0
- package/lib/schemas/logistics.js.map +1 -1
- package/lib/schemas/media-space.d.ts +189 -0
- package/lib/schemas/media-space.js +2 -0
- package/lib/schemas/media-space.js.map +1 -0
- package/lib/schemas/media.d.ts +230 -0
- package/lib/schemas/media.js +2 -0
- package/lib/schemas/media.js.map +1 -0
- package/lib/schemas/merchant.d.ts +236 -0
- package/lib/schemas/merchant.js +2 -0
- package/lib/schemas/merchant.js.map +1 -0
- package/lib/schemas/order.d.ts +431 -0
- package/lib/schemas/payment.d.ts +397 -0
- package/lib/schemas/product.d.ts +1157 -0
- package/lib/schemas/returns.d.ts +632 -0
- package/lib/schemas/returns.js +63 -0
- package/lib/schemas/returns.js.map +1 -0
- package/lib/schemas/sbs.d.ts +484 -0
- package/lib/schemas/sbs.js +2 -0
- package/lib/schemas/sbs.js.map +1 -0
- package/lib/schemas/shop-category.d.ts +176 -0
- package/lib/schemas/shop-category.js +2 -0
- package/lib/schemas/shop-category.js.map +1 -0
- package/lib/schemas/shop-flash-sale.d.ts +473 -0
- package/lib/schemas/shop-flash-sale.js +43 -0
- package/lib/schemas/shop-flash-sale.js.map +1 -0
- package/lib/schemas/shop.d.ts +250 -0
- package/lib/schemas/shop.js +2 -0
- package/lib/schemas/shop.js.map +1 -0
- package/lib/schemas/top-picks.d.ts +99 -0
- package/lib/schemas/top-picks.js +2 -0
- package/lib/schemas/top-picks.js.map +1 -0
- package/lib/sdk.d.ts +34 -0
- package/lib/sdk.js +34 -0
- package/lib/sdk.js.map +1 -1
- package/package.json +7 -4
|
@@ -0,0 +1,632 @@
|
|
|
1
|
+
import { BaseResponse } from "./base.js";
|
|
2
|
+
/**
|
|
3
|
+
* Return status enum
|
|
4
|
+
*/
|
|
5
|
+
export declare enum ReturnStatus {
|
|
6
|
+
/** Return request initiated */
|
|
7
|
+
REQUESTED = "REQUESTED",
|
|
8
|
+
/** Return is being processed */
|
|
9
|
+
PROCESSING = "PROCESSING",
|
|
10
|
+
/** Return has been accepted */
|
|
11
|
+
ACCEPTED = "ACCEPTED",
|
|
12
|
+
/** Return has been completed */
|
|
13
|
+
COMPLETED = "COMPLETED",
|
|
14
|
+
/** Return has been cancelled */
|
|
15
|
+
CANCELLED = "CANCELLED"
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Negotiation status enum
|
|
19
|
+
*/
|
|
20
|
+
export declare enum NegotiationStatus {
|
|
21
|
+
/** Pending seller response */
|
|
22
|
+
PENDING_RESPOND = "PENDING_RESPOND",
|
|
23
|
+
/** Negotiation ongoing */
|
|
24
|
+
ONGOING = "ONGOING",
|
|
25
|
+
/** Negotiation terminated */
|
|
26
|
+
TERMINATED = "TERMINATED"
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Seller proof status enum
|
|
30
|
+
*/
|
|
31
|
+
export declare enum SellerProofStatus {
|
|
32
|
+
/** Proof pending */
|
|
33
|
+
PENDING = "PENDING",
|
|
34
|
+
/** Proof uploaded */
|
|
35
|
+
UPLOADED = "UPLOADED",
|
|
36
|
+
/** Proof not needed */
|
|
37
|
+
NOT_NEEDED = "NOT_NEEDED"
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Seller compensation status enum
|
|
41
|
+
*/
|
|
42
|
+
export declare enum SellerCompensationStatus {
|
|
43
|
+
/** Compensation not required */
|
|
44
|
+
NOT_REQUIRED = "NOT_REQUIRED",
|
|
45
|
+
/** Compensation request pending */
|
|
46
|
+
PENDING_REQUEST = "PENDING_REQUEST",
|
|
47
|
+
/** Compensation requested */
|
|
48
|
+
COMPENSATION_REQUESTED = "COMPENSATION_REQUESTED"
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Return solution enum
|
|
52
|
+
*/
|
|
53
|
+
export declare enum ReturnSolution {
|
|
54
|
+
/** Return and refund */
|
|
55
|
+
RETURN_REFUND = "RETURN_REFUND",
|
|
56
|
+
/** Refund only */
|
|
57
|
+
REFUND_ONLY = "REFUND_ONLY"
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* User information for returns
|
|
61
|
+
*/
|
|
62
|
+
export interface ReturnUser {
|
|
63
|
+
/** Buyer's username */
|
|
64
|
+
username: string;
|
|
65
|
+
/** Buyer's email */
|
|
66
|
+
email: string;
|
|
67
|
+
/** Buyer's portrait URL */
|
|
68
|
+
portrait: string;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Item information in return
|
|
72
|
+
*/
|
|
73
|
+
export interface ReturnItem {
|
|
74
|
+
/** Model ID of the item */
|
|
75
|
+
model_id: number;
|
|
76
|
+
/** Item name */
|
|
77
|
+
name: string;
|
|
78
|
+
/** Item image URLs */
|
|
79
|
+
images: string[];
|
|
80
|
+
/** Quantity of item */
|
|
81
|
+
amount: number;
|
|
82
|
+
/** Item price */
|
|
83
|
+
item_price: number;
|
|
84
|
+
/** Whether item is part of add-on deal */
|
|
85
|
+
is_add_on_deal: boolean;
|
|
86
|
+
/** Whether item is main item */
|
|
87
|
+
is_main_item: boolean;
|
|
88
|
+
/** Add-on deal ID */
|
|
89
|
+
add_on_deal_id: number;
|
|
90
|
+
/** Item ID */
|
|
91
|
+
item_id: number;
|
|
92
|
+
/** Item SKU */
|
|
93
|
+
item_sku: string;
|
|
94
|
+
/** Variation SKU */
|
|
95
|
+
variation_sku: string;
|
|
96
|
+
/** Item's refund amount (for Partial Qty RR) */
|
|
97
|
+
refund_amount?: number;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Video information for returns
|
|
101
|
+
*/
|
|
102
|
+
export interface ReturnVideoInfo {
|
|
103
|
+
/** Thumbnail URL of video */
|
|
104
|
+
thumbnail_url: string;
|
|
105
|
+
/** URL of video */
|
|
106
|
+
video_url: string;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Seller proof information
|
|
110
|
+
*/
|
|
111
|
+
export interface SellerProof {
|
|
112
|
+
/** Seller proof status */
|
|
113
|
+
seller_proof_status: string;
|
|
114
|
+
/** Deadline for submitting evidence */
|
|
115
|
+
seller_evidence_deadline: number;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Seller compensation information
|
|
119
|
+
*/
|
|
120
|
+
export interface SellerCompensation {
|
|
121
|
+
/** Seller compensation status */
|
|
122
|
+
seller_compensation_status: string;
|
|
123
|
+
/** Deadline for requesting compensation */
|
|
124
|
+
seller_compensation_due_date: number;
|
|
125
|
+
/** Compensation amount */
|
|
126
|
+
compensation_amount: number;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Negotiation information
|
|
130
|
+
*/
|
|
131
|
+
export interface Negotiation {
|
|
132
|
+
/** Negotiation status */
|
|
133
|
+
negotiation_status: string;
|
|
134
|
+
/** Latest solution offered */
|
|
135
|
+
latest_solution: string;
|
|
136
|
+
/** Latest offer amount */
|
|
137
|
+
latest_offer_amount: number;
|
|
138
|
+
/** Creator of latest offer */
|
|
139
|
+
latest_offer_creator: string;
|
|
140
|
+
/** Remaining counter limit */
|
|
141
|
+
counter_limit: number;
|
|
142
|
+
/** Offer due date */
|
|
143
|
+
offer_due_date: number;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Return address information
|
|
147
|
+
*/
|
|
148
|
+
export interface ReturnAddress {
|
|
149
|
+
/** Warehouse ID */
|
|
150
|
+
whs_id?: string;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Pickup address information
|
|
154
|
+
*/
|
|
155
|
+
export interface PickupAddress {
|
|
156
|
+
/** Address */
|
|
157
|
+
address: string;
|
|
158
|
+
/** Name */
|
|
159
|
+
name: string;
|
|
160
|
+
/** Phone number */
|
|
161
|
+
phone: string;
|
|
162
|
+
/** Town */
|
|
163
|
+
town: string;
|
|
164
|
+
/** District */
|
|
165
|
+
district: string;
|
|
166
|
+
/** City */
|
|
167
|
+
city: string;
|
|
168
|
+
/** State */
|
|
169
|
+
state: string;
|
|
170
|
+
/** Region */
|
|
171
|
+
region: string;
|
|
172
|
+
/** Zipcode */
|
|
173
|
+
zipcode: string;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Activity item information
|
|
177
|
+
*/
|
|
178
|
+
export interface ActivityItem {
|
|
179
|
+
/** Item ID */
|
|
180
|
+
item_id: number;
|
|
181
|
+
/** Variation ID */
|
|
182
|
+
variation_id: number;
|
|
183
|
+
/** Quantity purchased */
|
|
184
|
+
quantity_purchased: number;
|
|
185
|
+
/** Original price */
|
|
186
|
+
original_price: string;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Activity information
|
|
190
|
+
*/
|
|
191
|
+
export interface Activity {
|
|
192
|
+
/** Activity ID */
|
|
193
|
+
activity_id: number;
|
|
194
|
+
/** Activity type */
|
|
195
|
+
activity_type: string;
|
|
196
|
+
/** Original price */
|
|
197
|
+
original_price: string;
|
|
198
|
+
/** Discounted price */
|
|
199
|
+
discounted_price: string;
|
|
200
|
+
/** Items in activity */
|
|
201
|
+
items: ActivityItem[];
|
|
202
|
+
/** Refund amount for bundle deal cases */
|
|
203
|
+
refund_amount?: number;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Return detail information
|
|
207
|
+
*/
|
|
208
|
+
export interface ReturnDetail {
|
|
209
|
+
/** Return images */
|
|
210
|
+
image: string[];
|
|
211
|
+
/** Buyer videos */
|
|
212
|
+
buyer_videos?: ReturnVideoInfo[];
|
|
213
|
+
/** Return reason */
|
|
214
|
+
reason: string;
|
|
215
|
+
/** Text reason provided by buyer */
|
|
216
|
+
text_reason: string;
|
|
217
|
+
/** Return serial number */
|
|
218
|
+
return_sn: string;
|
|
219
|
+
/** Refund amount */
|
|
220
|
+
refund_amount: number;
|
|
221
|
+
/** Currency */
|
|
222
|
+
currency: string;
|
|
223
|
+
/** Create time */
|
|
224
|
+
create_time: number;
|
|
225
|
+
/** Update time */
|
|
226
|
+
update_time: number;
|
|
227
|
+
/** Return status */
|
|
228
|
+
status: string;
|
|
229
|
+
/** Due date */
|
|
230
|
+
due_date: number;
|
|
231
|
+
/** Tracking number */
|
|
232
|
+
tracking_number: string;
|
|
233
|
+
/** Dispute reason */
|
|
234
|
+
dispute_reason?: number | string[];
|
|
235
|
+
/** Dispute text reason */
|
|
236
|
+
dispute_text_reason?: string | string[];
|
|
237
|
+
/** Needs logistics */
|
|
238
|
+
needs_logistics: boolean;
|
|
239
|
+
/** Amount before discount */
|
|
240
|
+
amount_before_discount: number;
|
|
241
|
+
/** User information */
|
|
242
|
+
user: ReturnUser;
|
|
243
|
+
/** Items in return */
|
|
244
|
+
item: ReturnItem[];
|
|
245
|
+
/** Order serial number */
|
|
246
|
+
order_sn: string;
|
|
247
|
+
/** Return ship due date */
|
|
248
|
+
return_ship_due_date: number;
|
|
249
|
+
/** Return seller due date */
|
|
250
|
+
return_seller_due_date: number;
|
|
251
|
+
/** Negotiation status */
|
|
252
|
+
negotiation_status?: string;
|
|
253
|
+
/** Seller proof status */
|
|
254
|
+
seller_proof_status?: string;
|
|
255
|
+
/** Seller compensation status */
|
|
256
|
+
seller_compensation_status?: string;
|
|
257
|
+
/** Seller proof */
|
|
258
|
+
seller_proof?: SellerProof;
|
|
259
|
+
/** Seller compensation */
|
|
260
|
+
seller_compensation?: SellerCompensation;
|
|
261
|
+
/** Negotiation */
|
|
262
|
+
negotiation?: Negotiation;
|
|
263
|
+
/** Logistics status */
|
|
264
|
+
logistics_status?: string;
|
|
265
|
+
/** Return pickup address */
|
|
266
|
+
return_pickup_address?: PickupAddress;
|
|
267
|
+
/** Virtual contact number */
|
|
268
|
+
virtual_contact_number?: string;
|
|
269
|
+
/** Package query number */
|
|
270
|
+
package_query_number?: string;
|
|
271
|
+
/** Return address */
|
|
272
|
+
return_address?: ReturnAddress;
|
|
273
|
+
/** Return refund type */
|
|
274
|
+
return_refund_type?: string;
|
|
275
|
+
/** Return solution */
|
|
276
|
+
return_solution?: number;
|
|
277
|
+
/** Is seller arrange */
|
|
278
|
+
is_seller_arrange?: boolean;
|
|
279
|
+
/** Is shipping proof mandatory */
|
|
280
|
+
is_shipping_proof_mandatory?: boolean;
|
|
281
|
+
/** Has uploaded shipping proof */
|
|
282
|
+
has_uploaded_shipping_proof?: boolean;
|
|
283
|
+
/** Is reverse logistics channel integrated */
|
|
284
|
+
is_reverse_logistics_channel_integrated?: boolean;
|
|
285
|
+
/** Reverse logistic channel name */
|
|
286
|
+
reverse_logistic_channel_name?: string;
|
|
287
|
+
/** Return refund request type */
|
|
288
|
+
return_refund_request_type?: number;
|
|
289
|
+
/** Validation type */
|
|
290
|
+
validation_type?: string;
|
|
291
|
+
/** Activities */
|
|
292
|
+
activity?: Activity[];
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Parameters for getting return list
|
|
296
|
+
*/
|
|
297
|
+
export type GetReturnListParams = {
|
|
298
|
+
/** Page number */
|
|
299
|
+
page_no: number;
|
|
300
|
+
/** Page size */
|
|
301
|
+
page_size: number;
|
|
302
|
+
/** Create time from */
|
|
303
|
+
create_time_from?: number;
|
|
304
|
+
/** Create time to */
|
|
305
|
+
create_time_to?: number;
|
|
306
|
+
/** Update time from */
|
|
307
|
+
update_time_from?: number;
|
|
308
|
+
/** Update time to */
|
|
309
|
+
update_time_to?: number;
|
|
310
|
+
/** Return status filter */
|
|
311
|
+
status?: string;
|
|
312
|
+
/** Negotiation status filter */
|
|
313
|
+
negotiation_status?: string;
|
|
314
|
+
/** Seller proof status filter */
|
|
315
|
+
seller_proof_status?: string;
|
|
316
|
+
/** Seller compensation status filter */
|
|
317
|
+
seller_compensation_status?: string;
|
|
318
|
+
};
|
|
319
|
+
/**
|
|
320
|
+
* Response for get return list API
|
|
321
|
+
*/
|
|
322
|
+
export interface GetReturnListResponse extends BaseResponse {
|
|
323
|
+
response: {
|
|
324
|
+
/** Whether there are more pages */
|
|
325
|
+
more: boolean;
|
|
326
|
+
/** List of returns */
|
|
327
|
+
return: ReturnDetail[];
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Parameters for getting return detail
|
|
332
|
+
*/
|
|
333
|
+
export type GetReturnDetailParams = {
|
|
334
|
+
/** Return serial number */
|
|
335
|
+
return_sn: string;
|
|
336
|
+
};
|
|
337
|
+
/**
|
|
338
|
+
* Response for get return detail API
|
|
339
|
+
*/
|
|
340
|
+
export interface GetReturnDetailResponse extends BaseResponse {
|
|
341
|
+
response: ReturnDetail;
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Parameters for confirming return
|
|
345
|
+
*/
|
|
346
|
+
export type ConfirmParams = {
|
|
347
|
+
/** Return serial number */
|
|
348
|
+
return_sn: string;
|
|
349
|
+
};
|
|
350
|
+
/**
|
|
351
|
+
* Response for confirm API
|
|
352
|
+
*/
|
|
353
|
+
export interface ConfirmResponse extends BaseResponse {
|
|
354
|
+
response: {
|
|
355
|
+
/** Return serial number */
|
|
356
|
+
return_sn: string;
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Parameters for disputing return
|
|
361
|
+
*/
|
|
362
|
+
export type DisputeParams = {
|
|
363
|
+
/** Return serial number */
|
|
364
|
+
return_sn: string;
|
|
365
|
+
/** Email for contact */
|
|
366
|
+
email: string;
|
|
367
|
+
/** Dispute reason */
|
|
368
|
+
dispute_reason: number;
|
|
369
|
+
/** Dispute text reason */
|
|
370
|
+
dispute_text_reason?: string;
|
|
371
|
+
/** Images for dispute */
|
|
372
|
+
images?: string[];
|
|
373
|
+
};
|
|
374
|
+
/**
|
|
375
|
+
* Response for dispute API
|
|
376
|
+
*/
|
|
377
|
+
export interface DisputeResponse extends BaseResponse {
|
|
378
|
+
response: {
|
|
379
|
+
/** Return serial number */
|
|
380
|
+
return_sn: string;
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* Parameters for offering solution
|
|
385
|
+
*/
|
|
386
|
+
export type OfferParams = {
|
|
387
|
+
/** Return serial number */
|
|
388
|
+
return_sn: string;
|
|
389
|
+
/** Solution to offer */
|
|
390
|
+
solution: number;
|
|
391
|
+
/** Refund amount */
|
|
392
|
+
refund_amount?: number;
|
|
393
|
+
};
|
|
394
|
+
/**
|
|
395
|
+
* Response for offer API
|
|
396
|
+
*/
|
|
397
|
+
export interface OfferResponse extends BaseResponse {
|
|
398
|
+
response: {
|
|
399
|
+
/** Return serial number */
|
|
400
|
+
return_sn: string;
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Parameters for accepting offer
|
|
405
|
+
*/
|
|
406
|
+
export type AcceptOfferParams = {
|
|
407
|
+
/** Return serial number */
|
|
408
|
+
return_sn: string;
|
|
409
|
+
};
|
|
410
|
+
/**
|
|
411
|
+
* Response for accept offer API
|
|
412
|
+
*/
|
|
413
|
+
export interface AcceptOfferResponse extends BaseResponse {
|
|
414
|
+
response: {
|
|
415
|
+
/** Return serial number */
|
|
416
|
+
return_sn: string;
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Parameters for getting available solutions
|
|
421
|
+
*/
|
|
422
|
+
export type GetAvailableSolutionsParams = {
|
|
423
|
+
/** Return serial number */
|
|
424
|
+
return_sn: string;
|
|
425
|
+
};
|
|
426
|
+
/**
|
|
427
|
+
* Solution information
|
|
428
|
+
*/
|
|
429
|
+
export interface SolutionInfo {
|
|
430
|
+
/** Solution option */
|
|
431
|
+
solution: number;
|
|
432
|
+
/** Maximum refund amount */
|
|
433
|
+
max_refund_amount: number;
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Response for get available solutions API
|
|
437
|
+
*/
|
|
438
|
+
export interface GetAvailableSolutionsResponse extends BaseResponse {
|
|
439
|
+
response: {
|
|
440
|
+
/** Available solutions */
|
|
441
|
+
solution: SolutionInfo[];
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Parameters for cancelling dispute
|
|
446
|
+
*/
|
|
447
|
+
export type CancelDisputeParams = {
|
|
448
|
+
/** Return serial number */
|
|
449
|
+
return_sn: string;
|
|
450
|
+
};
|
|
451
|
+
/**
|
|
452
|
+
* Response for cancel dispute API
|
|
453
|
+
*/
|
|
454
|
+
export interface CancelDisputeResponse extends BaseResponse {
|
|
455
|
+
response: {
|
|
456
|
+
/** Return serial number */
|
|
457
|
+
return_sn: string;
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* Dispute reason information
|
|
462
|
+
*/
|
|
463
|
+
export interface DisputeReason {
|
|
464
|
+
/** Reason ID */
|
|
465
|
+
reason_id: number;
|
|
466
|
+
/** Reason text */
|
|
467
|
+
reason_text: string;
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* Parameters for getting return dispute reason
|
|
471
|
+
*/
|
|
472
|
+
export type GetReturnDisputeReasonParams = {
|
|
473
|
+
/** Return serial number */
|
|
474
|
+
return_sn: string;
|
|
475
|
+
};
|
|
476
|
+
/**
|
|
477
|
+
* Response for get return dispute reason API
|
|
478
|
+
*/
|
|
479
|
+
export interface GetReturnDisputeReasonResponse extends BaseResponse {
|
|
480
|
+
response: {
|
|
481
|
+
/** List of dispute reasons */
|
|
482
|
+
dispute_reason: DisputeReason[];
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* Image to convert
|
|
487
|
+
*/
|
|
488
|
+
export interface ImageToConvert {
|
|
489
|
+
/** Image content */
|
|
490
|
+
image: string;
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* Parameters for converting image
|
|
494
|
+
*/
|
|
495
|
+
export type ConvertImageParams = {
|
|
496
|
+
/** Images to convert */
|
|
497
|
+
images: ImageToConvert[];
|
|
498
|
+
};
|
|
499
|
+
/**
|
|
500
|
+
* Converted image information
|
|
501
|
+
*/
|
|
502
|
+
export interface ConvertedImage {
|
|
503
|
+
/** Image URL */
|
|
504
|
+
url: string;
|
|
505
|
+
/** Thumbnail URL */
|
|
506
|
+
thumbnail_url?: string;
|
|
507
|
+
}
|
|
508
|
+
/**
|
|
509
|
+
* Response for convert image API
|
|
510
|
+
*/
|
|
511
|
+
export interface ConvertImageResponse extends BaseResponse {
|
|
512
|
+
response: {
|
|
513
|
+
/** Converted images */
|
|
514
|
+
images: ConvertedImage[];
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Proof text item
|
|
519
|
+
*/
|
|
520
|
+
export interface ProofTextItem {
|
|
521
|
+
/** Text content */
|
|
522
|
+
text: string;
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* Proof image item
|
|
526
|
+
*/
|
|
527
|
+
export interface ProofImageItem {
|
|
528
|
+
/** Image URL */
|
|
529
|
+
url: string;
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* Proof video item
|
|
533
|
+
*/
|
|
534
|
+
export interface ProofVideoItem {
|
|
535
|
+
/** Video URL */
|
|
536
|
+
url: string;
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* Parameters for uploading proof
|
|
540
|
+
*/
|
|
541
|
+
export type UploadProofParams = {
|
|
542
|
+
/** Return serial number */
|
|
543
|
+
return_sn: string;
|
|
544
|
+
/** Proof text */
|
|
545
|
+
proof_text?: ProofTextItem[];
|
|
546
|
+
/** Proof images */
|
|
547
|
+
proof_image?: ProofImageItem[];
|
|
548
|
+
/** Proof videos */
|
|
549
|
+
proof_video?: ProofVideoItem[];
|
|
550
|
+
};
|
|
551
|
+
/**
|
|
552
|
+
* Response for upload proof API
|
|
553
|
+
*/
|
|
554
|
+
export interface UploadProofResponse extends BaseResponse {
|
|
555
|
+
response: {
|
|
556
|
+
/** Return serial number */
|
|
557
|
+
return_sn: string;
|
|
558
|
+
};
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* Parameters for querying proof
|
|
562
|
+
*/
|
|
563
|
+
export type QueryProofParams = {
|
|
564
|
+
/** Return serial number */
|
|
565
|
+
return_sn: string;
|
|
566
|
+
};
|
|
567
|
+
/**
|
|
568
|
+
* Proof information
|
|
569
|
+
*/
|
|
570
|
+
export interface ProofInfo {
|
|
571
|
+
/** Proof text */
|
|
572
|
+
proof_text?: ProofTextItem[];
|
|
573
|
+
/** Proof images */
|
|
574
|
+
proof_image?: ProofImageItem[];
|
|
575
|
+
/** Proof videos */
|
|
576
|
+
proof_video?: ProofVideoItem[];
|
|
577
|
+
}
|
|
578
|
+
/**
|
|
579
|
+
* Response for query proof API
|
|
580
|
+
*/
|
|
581
|
+
export interface QueryProofResponse extends BaseResponse {
|
|
582
|
+
response: ProofInfo;
|
|
583
|
+
}
|
|
584
|
+
/**
|
|
585
|
+
* Shipping carrier information
|
|
586
|
+
*/
|
|
587
|
+
export interface ShippingCarrier {
|
|
588
|
+
/** Carrier ID */
|
|
589
|
+
carrier_id: number;
|
|
590
|
+
/** Carrier name */
|
|
591
|
+
carrier_name: string;
|
|
592
|
+
/** Required fields */
|
|
593
|
+
required_fields: string[];
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* Parameters for getting shipping carrier
|
|
597
|
+
*/
|
|
598
|
+
export type GetShippingCarrierParams = {
|
|
599
|
+
/** Return serial number */
|
|
600
|
+
return_sn: string;
|
|
601
|
+
};
|
|
602
|
+
/**
|
|
603
|
+
* Response for get shipping carrier API
|
|
604
|
+
*/
|
|
605
|
+
export interface GetShippingCarrierResponse extends BaseResponse {
|
|
606
|
+
response: {
|
|
607
|
+
/** List of shipping carriers */
|
|
608
|
+
carrier_list: ShippingCarrier[];
|
|
609
|
+
};
|
|
610
|
+
}
|
|
611
|
+
/**
|
|
612
|
+
* Parameters for uploading shipping proof
|
|
613
|
+
*/
|
|
614
|
+
export type UploadShippingProofParams = {
|
|
615
|
+
/** Return serial number */
|
|
616
|
+
return_sn: string;
|
|
617
|
+
/** Carrier ID */
|
|
618
|
+
carrier_id: number;
|
|
619
|
+
/** Tracking number */
|
|
620
|
+
tracking_number: string;
|
|
621
|
+
/** Additional fields as key-value pairs */
|
|
622
|
+
[key: string]: string | number;
|
|
623
|
+
};
|
|
624
|
+
/**
|
|
625
|
+
* Response for upload shipping proof API
|
|
626
|
+
*/
|
|
627
|
+
export interface UploadShippingProofResponse extends BaseResponse {
|
|
628
|
+
response: {
|
|
629
|
+
/** Return serial number */
|
|
630
|
+
return_sn: string;
|
|
631
|
+
};
|
|
632
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Return status enum
|
|
3
|
+
*/
|
|
4
|
+
export var ReturnStatus;
|
|
5
|
+
(function (ReturnStatus) {
|
|
6
|
+
/** Return request initiated */
|
|
7
|
+
ReturnStatus["REQUESTED"] = "REQUESTED";
|
|
8
|
+
/** Return is being processed */
|
|
9
|
+
ReturnStatus["PROCESSING"] = "PROCESSING";
|
|
10
|
+
/** Return has been accepted */
|
|
11
|
+
ReturnStatus["ACCEPTED"] = "ACCEPTED";
|
|
12
|
+
/** Return has been completed */
|
|
13
|
+
ReturnStatus["COMPLETED"] = "COMPLETED";
|
|
14
|
+
/** Return has been cancelled */
|
|
15
|
+
ReturnStatus["CANCELLED"] = "CANCELLED";
|
|
16
|
+
})(ReturnStatus || (ReturnStatus = {}));
|
|
17
|
+
/**
|
|
18
|
+
* Negotiation status enum
|
|
19
|
+
*/
|
|
20
|
+
export var NegotiationStatus;
|
|
21
|
+
(function (NegotiationStatus) {
|
|
22
|
+
/** Pending seller response */
|
|
23
|
+
NegotiationStatus["PENDING_RESPOND"] = "PENDING_RESPOND";
|
|
24
|
+
/** Negotiation ongoing */
|
|
25
|
+
NegotiationStatus["ONGOING"] = "ONGOING";
|
|
26
|
+
/** Negotiation terminated */
|
|
27
|
+
NegotiationStatus["TERMINATED"] = "TERMINATED";
|
|
28
|
+
})(NegotiationStatus || (NegotiationStatus = {}));
|
|
29
|
+
/**
|
|
30
|
+
* Seller proof status enum
|
|
31
|
+
*/
|
|
32
|
+
export var SellerProofStatus;
|
|
33
|
+
(function (SellerProofStatus) {
|
|
34
|
+
/** Proof pending */
|
|
35
|
+
SellerProofStatus["PENDING"] = "PENDING";
|
|
36
|
+
/** Proof uploaded */
|
|
37
|
+
SellerProofStatus["UPLOADED"] = "UPLOADED";
|
|
38
|
+
/** Proof not needed */
|
|
39
|
+
SellerProofStatus["NOT_NEEDED"] = "NOT_NEEDED";
|
|
40
|
+
})(SellerProofStatus || (SellerProofStatus = {}));
|
|
41
|
+
/**
|
|
42
|
+
* Seller compensation status enum
|
|
43
|
+
*/
|
|
44
|
+
export var SellerCompensationStatus;
|
|
45
|
+
(function (SellerCompensationStatus) {
|
|
46
|
+
/** Compensation not required */
|
|
47
|
+
SellerCompensationStatus["NOT_REQUIRED"] = "NOT_REQUIRED";
|
|
48
|
+
/** Compensation request pending */
|
|
49
|
+
SellerCompensationStatus["PENDING_REQUEST"] = "PENDING_REQUEST";
|
|
50
|
+
/** Compensation requested */
|
|
51
|
+
SellerCompensationStatus["COMPENSATION_REQUESTED"] = "COMPENSATION_REQUESTED";
|
|
52
|
+
})(SellerCompensationStatus || (SellerCompensationStatus = {}));
|
|
53
|
+
/**
|
|
54
|
+
* Return solution enum
|
|
55
|
+
*/
|
|
56
|
+
export var ReturnSolution;
|
|
57
|
+
(function (ReturnSolution) {
|
|
58
|
+
/** Return and refund */
|
|
59
|
+
ReturnSolution["RETURN_REFUND"] = "RETURN_REFUND";
|
|
60
|
+
/** Refund only */
|
|
61
|
+
ReturnSolution["REFUND_ONLY"] = "REFUND_ONLY";
|
|
62
|
+
})(ReturnSolution || (ReturnSolution = {}));
|
|
63
|
+
//# sourceMappingURL=returns.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"returns.js","sourceRoot":"","sources":["../../src/schemas/returns.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAN,IAAY,YAWX;AAXD,WAAY,YAAY;IACtB,+BAA+B;IAC/B,uCAAuB,CAAA;IACvB,gCAAgC;IAChC,yCAAyB,CAAA;IACzB,+BAA+B;IAC/B,qCAAqB,CAAA;IACrB,gCAAgC;IAChC,uCAAuB,CAAA;IACvB,gCAAgC;IAChC,uCAAuB,CAAA;AACzB,CAAC,EAXW,YAAY,KAAZ,YAAY,QAWvB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IAC3B,8BAA8B;IAC9B,wDAAmC,CAAA;IACnC,0BAA0B;IAC1B,wCAAmB,CAAA;IACnB,6BAA6B;IAC7B,8CAAyB,CAAA;AAC3B,CAAC,EAPW,iBAAiB,KAAjB,iBAAiB,QAO5B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IAC3B,oBAAoB;IACpB,wCAAmB,CAAA;IACnB,qBAAqB;IACrB,0CAAqB,CAAA;IACrB,uBAAuB;IACvB,8CAAyB,CAAA;AAC3B,CAAC,EAPW,iBAAiB,KAAjB,iBAAiB,QAO5B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,wBAOX;AAPD,WAAY,wBAAwB;IAClC,gCAAgC;IAChC,yDAA6B,CAAA;IAC7B,mCAAmC;IACnC,+DAAmC,CAAA;IACnC,6BAA6B;IAC7B,6EAAiD,CAAA;AACnD,CAAC,EAPW,wBAAwB,KAAxB,wBAAwB,QAOnC;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,wBAAwB;IACxB,iDAA+B,CAAA;IAC/B,kBAAkB;IAClB,6CAA2B,CAAA;AAC7B,CAAC,EALW,cAAc,KAAd,cAAc,QAKzB"}
|