@congminh1254/shopee-sdk 0.10.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 +172 -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/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/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 +2 -4
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { ShopeeConfig } from "../sdk.js";
|
|
2
|
+
import { BaseManager } from "./base.manager.js";
|
|
3
|
+
import { GetReturnListParams, GetReturnListResponse, GetReturnDetailParams, GetReturnDetailResponse, ConfirmParams, ConfirmResponse, DisputeParams, DisputeResponse, OfferParams, OfferResponse, AcceptOfferParams, AcceptOfferResponse, GetAvailableSolutionsParams, GetAvailableSolutionsResponse, CancelDisputeParams, CancelDisputeResponse, GetReturnDisputeReasonParams, GetReturnDisputeReasonResponse, ConvertImageParams, ConvertImageResponse, UploadProofParams, UploadProofResponse, QueryProofParams, QueryProofResponse, GetShippingCarrierParams, GetShippingCarrierResponse, UploadShippingProofParams, UploadShippingProofResponse } from "../schemas/returns.js";
|
|
4
|
+
export declare class ReturnsManager extends BaseManager {
|
|
5
|
+
constructor(config: ShopeeConfig);
|
|
6
|
+
/**
|
|
7
|
+
* Use this API to get detail information of many returns by shop ID.
|
|
8
|
+
*
|
|
9
|
+
* @param params - Parameters for getting return list
|
|
10
|
+
* @param params.page_no - Page number (required)
|
|
11
|
+
* @param params.page_size - Page size, max 100 (required)
|
|
12
|
+
* @param params.create_time_from - Filter by create time from (timestamp)
|
|
13
|
+
* @param params.create_time_to - Filter by create time to (timestamp)
|
|
14
|
+
* @param params.update_time_from - Filter by update time from (timestamp)
|
|
15
|
+
* @param params.update_time_to - Filter by update time to (timestamp)
|
|
16
|
+
* @param params.status - Filter by return status
|
|
17
|
+
* @param params.negotiation_status - Filter by negotiation status
|
|
18
|
+
* @param params.seller_proof_status - Filter by seller proof status
|
|
19
|
+
* @param params.seller_compensation_status - Filter by seller compensation status
|
|
20
|
+
*
|
|
21
|
+
* @returns A promise that resolves to the return list response containing:
|
|
22
|
+
* - more: Whether there are more pages
|
|
23
|
+
* - return: List of return details
|
|
24
|
+
*
|
|
25
|
+
* @throws {Error} When the API request fails or returns an error
|
|
26
|
+
*/
|
|
27
|
+
getReturnList(params: GetReturnListParams): Promise<GetReturnListResponse>;
|
|
28
|
+
/**
|
|
29
|
+
* Use this API to get detail information of a return by return serial number.
|
|
30
|
+
*
|
|
31
|
+
* @param params - Parameters for getting return detail
|
|
32
|
+
* @param params.return_sn - Return serial number (required)
|
|
33
|
+
*
|
|
34
|
+
* @returns A promise that resolves to the return detail response containing:
|
|
35
|
+
* - Complete return information including items, user, status, etc.
|
|
36
|
+
*
|
|
37
|
+
* @throws {Error} When the API request fails or returns an error
|
|
38
|
+
*/
|
|
39
|
+
getReturnDetail(params: GetReturnDetailParams): Promise<GetReturnDetailResponse>;
|
|
40
|
+
/**
|
|
41
|
+
* Confirm refund for a return request.
|
|
42
|
+
*
|
|
43
|
+
* @param params - Parameters for confirming return
|
|
44
|
+
* @param params.return_sn - Return serial number (required)
|
|
45
|
+
*
|
|
46
|
+
* @returns A promise that resolves to the confirm response containing:
|
|
47
|
+
* - return_sn: The confirmed return serial number
|
|
48
|
+
*
|
|
49
|
+
* @throws {Error} When the API request fails or returns an error
|
|
50
|
+
*/
|
|
51
|
+
confirm(params: ConfirmParams): Promise<ConfirmResponse>;
|
|
52
|
+
/**
|
|
53
|
+
* Dispute a return request. Support raising dispute when return_status is REQUESTED/PROCESSING/ACCEPTED.
|
|
54
|
+
*
|
|
55
|
+
* @param params - Parameters for disputing return
|
|
56
|
+
* @param params.return_sn - Return serial number (required)
|
|
57
|
+
* @param params.email - Email for contact (required)
|
|
58
|
+
* @param params.dispute_reason - Dispute reason ID (required)
|
|
59
|
+
* @param params.dispute_text_reason - Text explanation for dispute
|
|
60
|
+
* @param params.images - Image URLs for dispute evidence
|
|
61
|
+
*
|
|
62
|
+
* @returns A promise that resolves to the dispute response containing:
|
|
63
|
+
* - return_sn: The disputed return serial number
|
|
64
|
+
*
|
|
65
|
+
* @throws {Error} When the API request fails or returns an error
|
|
66
|
+
*/
|
|
67
|
+
dispute(params: DisputeParams): Promise<DisputeResponse>;
|
|
68
|
+
/**
|
|
69
|
+
* Offer a solution to the buyer during negotiation.
|
|
70
|
+
*
|
|
71
|
+
* @param params - Parameters for offering solution
|
|
72
|
+
* @param params.return_sn - Return serial number (required)
|
|
73
|
+
* @param params.solution - Solution to offer (required)
|
|
74
|
+
* @param params.refund_amount - Refund amount (if applicable)
|
|
75
|
+
*
|
|
76
|
+
* @returns A promise that resolves to the offer response containing:
|
|
77
|
+
* - return_sn: The return serial number
|
|
78
|
+
*
|
|
79
|
+
* @throws {Error} When the API request fails or returns an error
|
|
80
|
+
*/
|
|
81
|
+
offer(params: OfferParams): Promise<OfferResponse>;
|
|
82
|
+
/**
|
|
83
|
+
* Accept an offer from the buyer.
|
|
84
|
+
*
|
|
85
|
+
* @param params - Parameters for accepting offer
|
|
86
|
+
* @param params.return_sn - Return serial number (required)
|
|
87
|
+
*
|
|
88
|
+
* @returns A promise that resolves to the accept offer response containing:
|
|
89
|
+
* - return_sn: The return serial number
|
|
90
|
+
*
|
|
91
|
+
* @throws {Error} When the API request fails or returns an error
|
|
92
|
+
*/
|
|
93
|
+
acceptOffer(params: AcceptOfferParams): Promise<AcceptOfferResponse>;
|
|
94
|
+
/**
|
|
95
|
+
* Get the available solutions offered to buyers.
|
|
96
|
+
*
|
|
97
|
+
* @param params - Parameters for getting available solutions
|
|
98
|
+
* @param params.return_sn - Return serial number (required)
|
|
99
|
+
*
|
|
100
|
+
* @returns A promise that resolves to the available solutions response containing:
|
|
101
|
+
* - solution: List of available solution options with max refund amounts
|
|
102
|
+
*
|
|
103
|
+
* @throws {Error} When the API request fails or returns an error
|
|
104
|
+
*/
|
|
105
|
+
getAvailableSolutions(params: GetAvailableSolutionsParams): Promise<GetAvailableSolutionsResponse>;
|
|
106
|
+
/**
|
|
107
|
+
* Cancel a compensation dispute. Sellers can only cancel compensation disputes, not normal disputes.
|
|
108
|
+
* This means sellers can only cancel disputes when return_status is ACCEPTED and compensation_status is COMPENSATION_REQUESTED.
|
|
109
|
+
*
|
|
110
|
+
* @param params - Parameters for cancelling dispute
|
|
111
|
+
* @param params.return_sn - Return serial number (required)
|
|
112
|
+
*
|
|
113
|
+
* @returns A promise that resolves to the cancel dispute response containing:
|
|
114
|
+
* - return_sn: The return serial number
|
|
115
|
+
*
|
|
116
|
+
* @throws {Error} When the API request fails or returns an error
|
|
117
|
+
*/
|
|
118
|
+
cancelDispute(params: CancelDisputeParams): Promise<CancelDisputeResponse>;
|
|
119
|
+
/**
|
|
120
|
+
* Get the dispute return reasons available for a return.
|
|
121
|
+
*
|
|
122
|
+
* @param params - Parameters for getting dispute reasons
|
|
123
|
+
* @param params.return_sn - Return serial number (required)
|
|
124
|
+
*
|
|
125
|
+
* @returns A promise that resolves to the dispute reason response containing:
|
|
126
|
+
* - dispute_reason: List of available dispute reasons with IDs and text
|
|
127
|
+
*
|
|
128
|
+
* @throws {Error} When the API request fails or returns an error
|
|
129
|
+
*/
|
|
130
|
+
getReturnDisputeReason(params: GetReturnDisputeReasonParams): Promise<GetReturnDisputeReasonResponse>;
|
|
131
|
+
/**
|
|
132
|
+
* Convert image files to URLs. Supports specific formats and pictures within 10MB.
|
|
133
|
+
*
|
|
134
|
+
* @param params - Parameters for converting images
|
|
135
|
+
* @param params.images - Array of images to convert (required)
|
|
136
|
+
*
|
|
137
|
+
* @returns A promise that resolves to the convert image response containing:
|
|
138
|
+
* - images: Array of converted image URLs
|
|
139
|
+
*
|
|
140
|
+
* @throws {Error} When the API request fails or returns an error
|
|
141
|
+
*/
|
|
142
|
+
convertImage(params: ConvertImageParams): Promise<ConvertImageResponse>;
|
|
143
|
+
/**
|
|
144
|
+
* Upload evidence for a return, including text, pictures, and videos.
|
|
145
|
+
*
|
|
146
|
+
* @param params - Parameters for uploading proof
|
|
147
|
+
* @param params.return_sn - Return serial number (required)
|
|
148
|
+
* @param params.proof_text - Array of text evidence
|
|
149
|
+
* @param params.proof_image - Array of image URLs as evidence
|
|
150
|
+
* @param params.proof_video - Array of video URLs as evidence
|
|
151
|
+
*
|
|
152
|
+
* @returns A promise that resolves to the upload proof response containing:
|
|
153
|
+
* - return_sn: The return serial number
|
|
154
|
+
*
|
|
155
|
+
* @throws {Error} When the API request fails or returns an error
|
|
156
|
+
*/
|
|
157
|
+
uploadProof(params: UploadProofParams): Promise<UploadProofResponse>;
|
|
158
|
+
/**
|
|
159
|
+
* Query the evidence uploaded through the upload evidence API.
|
|
160
|
+
*
|
|
161
|
+
* @param params - Parameters for querying proof
|
|
162
|
+
* @param params.return_sn - Return serial number (required)
|
|
163
|
+
*
|
|
164
|
+
* @returns A promise that resolves to the query proof response containing:
|
|
165
|
+
* - proof_text: Uploaded text evidence
|
|
166
|
+
* - proof_image: Uploaded image evidence
|
|
167
|
+
* - proof_video: Uploaded video evidence
|
|
168
|
+
*
|
|
169
|
+
* @throws {Error} When the API request fails or returns an error
|
|
170
|
+
*/
|
|
171
|
+
queryProof(params: QueryProofParams): Promise<QueryProofResponse>;
|
|
172
|
+
/**
|
|
173
|
+
* Get the list of shipping carriers and required parameters for uploading shipping proof.
|
|
174
|
+
* Only for TW and BR returns with is_seller_arrange = true.
|
|
175
|
+
*
|
|
176
|
+
* @param params - Parameters for getting shipping carriers
|
|
177
|
+
* @param params.return_sn - Return serial number (required)
|
|
178
|
+
*
|
|
179
|
+
* @returns A promise that resolves to the shipping carrier response containing:
|
|
180
|
+
* - carrier_list: List of available shipping carriers with required fields
|
|
181
|
+
*
|
|
182
|
+
* @throws {Error} When the API request fails or returns an error
|
|
183
|
+
*/
|
|
184
|
+
getShippingCarrier(params: GetShippingCarrierParams): Promise<GetShippingCarrierResponse>;
|
|
185
|
+
/**
|
|
186
|
+
* Upload shipping proof for seller-arranged returns.
|
|
187
|
+
* Only for TW and BR returns with is_seller_arrange = true. This is not to upload evidence for disputes.
|
|
188
|
+
*
|
|
189
|
+
* @param params - Parameters for uploading shipping proof
|
|
190
|
+
* @param params.return_sn - Return serial number (required)
|
|
191
|
+
* @param params.carrier_id - Carrier ID (required)
|
|
192
|
+
* @param params.tracking_number - Tracking number (required)
|
|
193
|
+
*
|
|
194
|
+
* @returns A promise that resolves to the upload shipping proof response containing:
|
|
195
|
+
* - return_sn: The return serial number
|
|
196
|
+
*
|
|
197
|
+
* @throws {Error} When the API request fails or returns an error
|
|
198
|
+
*/
|
|
199
|
+
uploadShippingProof(params: UploadShippingProofParams): Promise<UploadShippingProofResponse>;
|
|
200
|
+
}
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
import { BaseManager } from "./base.manager.js";
|
|
2
|
+
import { ShopeeFetch } from "../fetch.js";
|
|
3
|
+
export class ReturnsManager extends BaseManager {
|
|
4
|
+
constructor(config) {
|
|
5
|
+
super(config);
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Use this API to get detail information of many returns by shop ID.
|
|
9
|
+
*
|
|
10
|
+
* @param params - Parameters for getting return list
|
|
11
|
+
* @param params.page_no - Page number (required)
|
|
12
|
+
* @param params.page_size - Page size, max 100 (required)
|
|
13
|
+
* @param params.create_time_from - Filter by create time from (timestamp)
|
|
14
|
+
* @param params.create_time_to - Filter by create time to (timestamp)
|
|
15
|
+
* @param params.update_time_from - Filter by update time from (timestamp)
|
|
16
|
+
* @param params.update_time_to - Filter by update time to (timestamp)
|
|
17
|
+
* @param params.status - Filter by return status
|
|
18
|
+
* @param params.negotiation_status - Filter by negotiation status
|
|
19
|
+
* @param params.seller_proof_status - Filter by seller proof status
|
|
20
|
+
* @param params.seller_compensation_status - Filter by seller compensation status
|
|
21
|
+
*
|
|
22
|
+
* @returns A promise that resolves to the return list response containing:
|
|
23
|
+
* - more: Whether there are more pages
|
|
24
|
+
* - return: List of return details
|
|
25
|
+
*
|
|
26
|
+
* @throws {Error} When the API request fails or returns an error
|
|
27
|
+
*/
|
|
28
|
+
async getReturnList(params) {
|
|
29
|
+
const response = await ShopeeFetch.fetch(this.config, "/returns/get_return_list", {
|
|
30
|
+
method: "GET",
|
|
31
|
+
auth: true,
|
|
32
|
+
params,
|
|
33
|
+
});
|
|
34
|
+
return response;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Use this API to get detail information of a return by return serial number.
|
|
38
|
+
*
|
|
39
|
+
* @param params - Parameters for getting return detail
|
|
40
|
+
* @param params.return_sn - Return serial number (required)
|
|
41
|
+
*
|
|
42
|
+
* @returns A promise that resolves to the return detail response containing:
|
|
43
|
+
* - Complete return information including items, user, status, etc.
|
|
44
|
+
*
|
|
45
|
+
* @throws {Error} When the API request fails or returns an error
|
|
46
|
+
*/
|
|
47
|
+
async getReturnDetail(params) {
|
|
48
|
+
const response = await ShopeeFetch.fetch(this.config, "/returns/get_return_detail", {
|
|
49
|
+
method: "GET",
|
|
50
|
+
auth: true,
|
|
51
|
+
params,
|
|
52
|
+
});
|
|
53
|
+
return response;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Confirm refund for a return request.
|
|
57
|
+
*
|
|
58
|
+
* @param params - Parameters for confirming return
|
|
59
|
+
* @param params.return_sn - Return serial number (required)
|
|
60
|
+
*
|
|
61
|
+
* @returns A promise that resolves to the confirm response containing:
|
|
62
|
+
* - return_sn: The confirmed return serial number
|
|
63
|
+
*
|
|
64
|
+
* @throws {Error} When the API request fails or returns an error
|
|
65
|
+
*/
|
|
66
|
+
async confirm(params) {
|
|
67
|
+
const response = await ShopeeFetch.fetch(this.config, "/returns/confirm", {
|
|
68
|
+
method: "POST",
|
|
69
|
+
auth: true,
|
|
70
|
+
body: params,
|
|
71
|
+
});
|
|
72
|
+
return response;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Dispute a return request. Support raising dispute when return_status is REQUESTED/PROCESSING/ACCEPTED.
|
|
76
|
+
*
|
|
77
|
+
* @param params - Parameters for disputing return
|
|
78
|
+
* @param params.return_sn - Return serial number (required)
|
|
79
|
+
* @param params.email - Email for contact (required)
|
|
80
|
+
* @param params.dispute_reason - Dispute reason ID (required)
|
|
81
|
+
* @param params.dispute_text_reason - Text explanation for dispute
|
|
82
|
+
* @param params.images - Image URLs for dispute evidence
|
|
83
|
+
*
|
|
84
|
+
* @returns A promise that resolves to the dispute response containing:
|
|
85
|
+
* - return_sn: The disputed return serial number
|
|
86
|
+
*
|
|
87
|
+
* @throws {Error} When the API request fails or returns an error
|
|
88
|
+
*/
|
|
89
|
+
async dispute(params) {
|
|
90
|
+
const response = await ShopeeFetch.fetch(this.config, "/returns/dispute", {
|
|
91
|
+
method: "POST",
|
|
92
|
+
auth: true,
|
|
93
|
+
body: params,
|
|
94
|
+
});
|
|
95
|
+
return response;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Offer a solution to the buyer during negotiation.
|
|
99
|
+
*
|
|
100
|
+
* @param params - Parameters for offering solution
|
|
101
|
+
* @param params.return_sn - Return serial number (required)
|
|
102
|
+
* @param params.solution - Solution to offer (required)
|
|
103
|
+
* @param params.refund_amount - Refund amount (if applicable)
|
|
104
|
+
*
|
|
105
|
+
* @returns A promise that resolves to the offer response containing:
|
|
106
|
+
* - return_sn: The return serial number
|
|
107
|
+
*
|
|
108
|
+
* @throws {Error} When the API request fails or returns an error
|
|
109
|
+
*/
|
|
110
|
+
async offer(params) {
|
|
111
|
+
const response = await ShopeeFetch.fetch(this.config, "/returns/offer", {
|
|
112
|
+
method: "POST",
|
|
113
|
+
auth: true,
|
|
114
|
+
body: params,
|
|
115
|
+
});
|
|
116
|
+
return response;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Accept an offer from the buyer.
|
|
120
|
+
*
|
|
121
|
+
* @param params - Parameters for accepting offer
|
|
122
|
+
* @param params.return_sn - Return serial number (required)
|
|
123
|
+
*
|
|
124
|
+
* @returns A promise that resolves to the accept offer response containing:
|
|
125
|
+
* - return_sn: The return serial number
|
|
126
|
+
*
|
|
127
|
+
* @throws {Error} When the API request fails or returns an error
|
|
128
|
+
*/
|
|
129
|
+
async acceptOffer(params) {
|
|
130
|
+
const response = await ShopeeFetch.fetch(this.config, "/returns/accept_offer", {
|
|
131
|
+
method: "POST",
|
|
132
|
+
auth: true,
|
|
133
|
+
body: params,
|
|
134
|
+
});
|
|
135
|
+
return response;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Get the available solutions offered to buyers.
|
|
139
|
+
*
|
|
140
|
+
* @param params - Parameters for getting available solutions
|
|
141
|
+
* @param params.return_sn - Return serial number (required)
|
|
142
|
+
*
|
|
143
|
+
* @returns A promise that resolves to the available solutions response containing:
|
|
144
|
+
* - solution: List of available solution options with max refund amounts
|
|
145
|
+
*
|
|
146
|
+
* @throws {Error} When the API request fails or returns an error
|
|
147
|
+
*/
|
|
148
|
+
async getAvailableSolutions(params) {
|
|
149
|
+
const response = await ShopeeFetch.fetch(this.config, "/returns/get_available_solutions", {
|
|
150
|
+
method: "GET",
|
|
151
|
+
auth: true,
|
|
152
|
+
params,
|
|
153
|
+
});
|
|
154
|
+
return response;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Cancel a compensation dispute. Sellers can only cancel compensation disputes, not normal disputes.
|
|
158
|
+
* This means sellers can only cancel disputes when return_status is ACCEPTED and compensation_status is COMPENSATION_REQUESTED.
|
|
159
|
+
*
|
|
160
|
+
* @param params - Parameters for cancelling dispute
|
|
161
|
+
* @param params.return_sn - Return serial number (required)
|
|
162
|
+
*
|
|
163
|
+
* @returns A promise that resolves to the cancel dispute response containing:
|
|
164
|
+
* - return_sn: The return serial number
|
|
165
|
+
*
|
|
166
|
+
* @throws {Error} When the API request fails or returns an error
|
|
167
|
+
*/
|
|
168
|
+
async cancelDispute(params) {
|
|
169
|
+
const response = await ShopeeFetch.fetch(this.config, "/returns/cancel_dispute", {
|
|
170
|
+
method: "POST",
|
|
171
|
+
auth: true,
|
|
172
|
+
body: params,
|
|
173
|
+
});
|
|
174
|
+
return response;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Get the dispute return reasons available for a return.
|
|
178
|
+
*
|
|
179
|
+
* @param params - Parameters for getting dispute reasons
|
|
180
|
+
* @param params.return_sn - Return serial number (required)
|
|
181
|
+
*
|
|
182
|
+
* @returns A promise that resolves to the dispute reason response containing:
|
|
183
|
+
* - dispute_reason: List of available dispute reasons with IDs and text
|
|
184
|
+
*
|
|
185
|
+
* @throws {Error} When the API request fails or returns an error
|
|
186
|
+
*/
|
|
187
|
+
async getReturnDisputeReason(params) {
|
|
188
|
+
const response = await ShopeeFetch.fetch(this.config, "/returns/get_return_dispute_reason", {
|
|
189
|
+
method: "GET",
|
|
190
|
+
auth: true,
|
|
191
|
+
params,
|
|
192
|
+
});
|
|
193
|
+
return response;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Convert image files to URLs. Supports specific formats and pictures within 10MB.
|
|
197
|
+
*
|
|
198
|
+
* @param params - Parameters for converting images
|
|
199
|
+
* @param params.images - Array of images to convert (required)
|
|
200
|
+
*
|
|
201
|
+
* @returns A promise that resolves to the convert image response containing:
|
|
202
|
+
* - images: Array of converted image URLs
|
|
203
|
+
*
|
|
204
|
+
* @throws {Error} When the API request fails or returns an error
|
|
205
|
+
*/
|
|
206
|
+
async convertImage(params) {
|
|
207
|
+
const response = await ShopeeFetch.fetch(this.config, "/returns/convert_image", {
|
|
208
|
+
method: "POST",
|
|
209
|
+
auth: true,
|
|
210
|
+
body: params,
|
|
211
|
+
});
|
|
212
|
+
return response;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Upload evidence for a return, including text, pictures, and videos.
|
|
216
|
+
*
|
|
217
|
+
* @param params - Parameters for uploading proof
|
|
218
|
+
* @param params.return_sn - Return serial number (required)
|
|
219
|
+
* @param params.proof_text - Array of text evidence
|
|
220
|
+
* @param params.proof_image - Array of image URLs as evidence
|
|
221
|
+
* @param params.proof_video - Array of video URLs as evidence
|
|
222
|
+
*
|
|
223
|
+
* @returns A promise that resolves to the upload proof response containing:
|
|
224
|
+
* - return_sn: The return serial number
|
|
225
|
+
*
|
|
226
|
+
* @throws {Error} When the API request fails or returns an error
|
|
227
|
+
*/
|
|
228
|
+
async uploadProof(params) {
|
|
229
|
+
const response = await ShopeeFetch.fetch(this.config, "/returns/upload_proof", {
|
|
230
|
+
method: "POST",
|
|
231
|
+
auth: true,
|
|
232
|
+
body: params,
|
|
233
|
+
});
|
|
234
|
+
return response;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Query the evidence uploaded through the upload evidence API.
|
|
238
|
+
*
|
|
239
|
+
* @param params - Parameters for querying proof
|
|
240
|
+
* @param params.return_sn - Return serial number (required)
|
|
241
|
+
*
|
|
242
|
+
* @returns A promise that resolves to the query proof response containing:
|
|
243
|
+
* - proof_text: Uploaded text evidence
|
|
244
|
+
* - proof_image: Uploaded image evidence
|
|
245
|
+
* - proof_video: Uploaded video evidence
|
|
246
|
+
*
|
|
247
|
+
* @throws {Error} When the API request fails or returns an error
|
|
248
|
+
*/
|
|
249
|
+
async queryProof(params) {
|
|
250
|
+
const response = await ShopeeFetch.fetch(this.config, "/returns/query_proof", {
|
|
251
|
+
method: "GET",
|
|
252
|
+
auth: true,
|
|
253
|
+
params,
|
|
254
|
+
});
|
|
255
|
+
return response;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Get the list of shipping carriers and required parameters for uploading shipping proof.
|
|
259
|
+
* Only for TW and BR returns with is_seller_arrange = true.
|
|
260
|
+
*
|
|
261
|
+
* @param params - Parameters for getting shipping carriers
|
|
262
|
+
* @param params.return_sn - Return serial number (required)
|
|
263
|
+
*
|
|
264
|
+
* @returns A promise that resolves to the shipping carrier response containing:
|
|
265
|
+
* - carrier_list: List of available shipping carriers with required fields
|
|
266
|
+
*
|
|
267
|
+
* @throws {Error} When the API request fails or returns an error
|
|
268
|
+
*/
|
|
269
|
+
async getShippingCarrier(params) {
|
|
270
|
+
const response = await ShopeeFetch.fetch(this.config, "/returns/get_shipping_carrier", {
|
|
271
|
+
method: "GET",
|
|
272
|
+
auth: true,
|
|
273
|
+
params,
|
|
274
|
+
});
|
|
275
|
+
return response;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Upload shipping proof for seller-arranged returns.
|
|
279
|
+
* Only for TW and BR returns with is_seller_arrange = true. This is not to upload evidence for disputes.
|
|
280
|
+
*
|
|
281
|
+
* @param params - Parameters for uploading shipping proof
|
|
282
|
+
* @param params.return_sn - Return serial number (required)
|
|
283
|
+
* @param params.carrier_id - Carrier ID (required)
|
|
284
|
+
* @param params.tracking_number - Tracking number (required)
|
|
285
|
+
*
|
|
286
|
+
* @returns A promise that resolves to the upload shipping proof response containing:
|
|
287
|
+
* - return_sn: The return serial number
|
|
288
|
+
*
|
|
289
|
+
* @throws {Error} When the API request fails or returns an error
|
|
290
|
+
*/
|
|
291
|
+
async uploadShippingProof(params) {
|
|
292
|
+
const response = await ShopeeFetch.fetch(this.config, "/returns/upload_shipping_proof", {
|
|
293
|
+
method: "POST",
|
|
294
|
+
auth: true,
|
|
295
|
+
body: params,
|
|
296
|
+
});
|
|
297
|
+
return response;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
//# sourceMappingURL=returns.manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"returns.manager.js","sourceRoot":"","sources":["../../src/managers/returns.manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AA+BhD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C,YAAY,MAAoB;QAC9B,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,KAAK,CAAC,aAAa,CAAC,MAA2B;QAC7C,MAAM,QAAQ,GAAG,M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|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { ShopeeConfig } from "../sdk.js";
|
|
2
|
+
import { BaseManager } from "./base.manager.js";
|
|
3
|
+
import { GetBoundWhsInfoParams, GetBoundWhsInfoResponse, GetCurrentInventoryParams, GetCurrentInventoryResponse, GetExpiryReportParams, GetExpiryReportResponse, GetStockAgingParams, GetStockAgingResponse, GetStockMovementParams, GetStockMovementResponse } from "../schemas/sbs.js";
|
|
4
|
+
export declare class SbsManager extends BaseManager {
|
|
5
|
+
constructor(config: ShopeeConfig);
|
|
6
|
+
/**
|
|
7
|
+
* Get bound warehouse by shop id.
|
|
8
|
+
*
|
|
9
|
+
* @param params - Parameters for getting bound warehouse info (empty object)
|
|
10
|
+
*
|
|
11
|
+
* @returns A promise that resolves to the bound warehouse info response containing:
|
|
12
|
+
* - list: List of shops with bound warehouses
|
|
13
|
+
*
|
|
14
|
+
* @throws {Error} When the API request fails or returns an error
|
|
15
|
+
*/
|
|
16
|
+
getBoundWhsInfo(params?: GetBoundWhsInfoParams): Promise<GetBoundWhsInfoResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Get Seller Center Current Inventory Page Data.
|
|
19
|
+
* This API provides detailed inventory information including sellable, reserved,
|
|
20
|
+
* and unsellable quantities across different warehouses.
|
|
21
|
+
*
|
|
22
|
+
* @param params - Parameters for getting current inventory
|
|
23
|
+
* @param params.whs_region - Warehouse region (required): BR, CN, ID, MY, MX, TH, TW, PH, VN, SG
|
|
24
|
+
* @param params.page_no - Page number (default: 1)
|
|
25
|
+
* @param params.page_size - Page size, 1-100 (default: 10)
|
|
26
|
+
* @param params.search_type - Search type: 0=All data; 1=Product Name; 2=SKU ID; 3=Variations; 4=Item ID
|
|
27
|
+
* @param params.keyword - Search keyword
|
|
28
|
+
* @param params.whs_ids - Warehouse IDs, comma-separated
|
|
29
|
+
* @param params.not_moving_tag - Not moving tag: Blank=All; 0=No; 1=Yes
|
|
30
|
+
* @param params.inbound_pending_approval - Inbound pending approval: Blank=All; 0=No; 1=Yes
|
|
31
|
+
* @param params.products_with_inventory - Products with inventory: Blank=All; 0=No; 1=Yes
|
|
32
|
+
* @param params.category_id - Category id (first-tier)
|
|
33
|
+
* @param params.stock_levels - Stock levels (comma-separated): 1=Low Stock & No Sellable stock; 2=Low Stock & To replenish; 3=Low Stock & Replenished; 4=Excess
|
|
34
|
+
*
|
|
35
|
+
* @returns A promise that resolves to the current inventory response containing:
|
|
36
|
+
* - cursor: Pagination cursor
|
|
37
|
+
* - item_list: List of items with inventory details
|
|
38
|
+
*
|
|
39
|
+
* @throws {Error} When the API request fails or returns an error
|
|
40
|
+
*/
|
|
41
|
+
getCurrentInventory(params: GetCurrentInventoryParams): Promise<GetCurrentInventoryResponse>;
|
|
42
|
+
/**
|
|
43
|
+
* Get Seller Center Expiry Report page data.
|
|
44
|
+
* This API provides information about expiring, expired, and damaged stocks.
|
|
45
|
+
*
|
|
46
|
+
* @param params - Parameters for getting expiry report
|
|
47
|
+
* @param params.whs_region - Warehouse region (required): BR, CN, ID, MY, MX, TH, TW, PH, VN, SG
|
|
48
|
+
* @param params.page_no - Page number (default: 1)
|
|
49
|
+
* @param params.page_size - Page size, 1-40 (default: 10)
|
|
50
|
+
* @param params.whs_ids - Warehouse IDs, comma-separated
|
|
51
|
+
* @param params.expiry_status - Expiry status (comma-separated): 0=Expired, 2=Expiring, 4=expiry_blocked, 5=damaged, 6=normal
|
|
52
|
+
* @param params.category_id_l1 - Only Level 1 Category can be filtered
|
|
53
|
+
* @param params.sku_id - SKU ID
|
|
54
|
+
* @param params.item_id - Item ID
|
|
55
|
+
* @param params.variation - Variation
|
|
56
|
+
* @param params.item_name - Item name
|
|
57
|
+
*
|
|
58
|
+
* @returns A promise that resolves to the expiry report response containing:
|
|
59
|
+
* - item_list: List of items with expiry information
|
|
60
|
+
*
|
|
61
|
+
* @throws {Error} When the API request fails or returns an error
|
|
62
|
+
*/
|
|
63
|
+
getExpiryReport(params: GetExpiryReportParams): Promise<GetExpiryReportResponse>;
|
|
64
|
+
/**
|
|
65
|
+
* Get Seller Center Stock Aging page data.
|
|
66
|
+
* This API provides stock aging information showing how long items have been in stock.
|
|
67
|
+
*
|
|
68
|
+
* @param params - Parameters for getting stock aging
|
|
69
|
+
* @param params.whs_region - Warehouse region (required): BR, CN, ID, MY, MX, TH, TW, PH, VN, SG
|
|
70
|
+
* @param params.page_no - Page number (default: 1)
|
|
71
|
+
* @param params.page_size - Page size, 1-100 (default: 10)
|
|
72
|
+
* @param params.search_type - Search type: 1=Product Name; 2=SKU ID; 3=Variations; 4=Item ID
|
|
73
|
+
* @param params.keyword - Search keyword
|
|
74
|
+
* @param params.whs_ids - Warehouse IDs, comma-separated
|
|
75
|
+
* @param params.aging_storage_tag - Aging storage tag: 0=false; 1=true
|
|
76
|
+
* @param params.excess_storage_tag - Excess storage tag: 0=false; 1=true
|
|
77
|
+
* @param params.category_id - L1-level product category ID
|
|
78
|
+
*
|
|
79
|
+
* @returns A promise that resolves to the stock aging response containing:
|
|
80
|
+
* - item_list: List of items with stock aging details
|
|
81
|
+
*
|
|
82
|
+
* @throws {Error} When the API request fails or returns an error
|
|
83
|
+
*/
|
|
84
|
+
getStockAging(params: GetStockAgingParams): Promise<GetStockAgingResponse>;
|
|
85
|
+
/**
|
|
86
|
+
* Get Seller Center Stock Movement page data.
|
|
87
|
+
* This API provides stock movement information including inbound, outbound, and adjustments.
|
|
88
|
+
*
|
|
89
|
+
* @param params - Parameters for getting stock movement
|
|
90
|
+
* @param params.start_time - Start date in YYYY-MM-DD format (required)
|
|
91
|
+
* @param params.end_time - End date in YYYY-MM-DD format (required)
|
|
92
|
+
* @param params.whs_region - Warehouse region (required): BR, CN, ID, MY, MX, TH, TW, PH, VN, SG
|
|
93
|
+
* @param params.page_no - Page number (default: 1)
|
|
94
|
+
* @param params.page_size - Page size, 1-20 (default: 10)
|
|
95
|
+
* @param params.whs_ids - Warehouse IDs, comma-separated
|
|
96
|
+
* @param params.category_id_l1 - L1-level category_id
|
|
97
|
+
* @param params.sku_id - SKU ID
|
|
98
|
+
* @param params.item_id - Item ID
|
|
99
|
+
* @param params.item_name - Item name
|
|
100
|
+
* @param params.variation - Variation
|
|
101
|
+
*
|
|
102
|
+
* @returns A promise that resolves to the stock movement response containing:
|
|
103
|
+
* - total: Total number of items
|
|
104
|
+
* - start_time: Start time
|
|
105
|
+
* - end_time: End time
|
|
106
|
+
* - query_end_time: Query end time
|
|
107
|
+
* - item_list: List of items with stock movement details
|
|
108
|
+
*
|
|
109
|
+
* @throws {Error} When the API request fails or returns an error
|
|
110
|
+
*/
|
|
111
|
+
getStockMovement(params: GetStockMovementParams): Promise<GetStockMovementResponse>;
|
|
112
|
+
}
|