@congminh1254/shopee-sdk 0.4.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/LICENSE +21 -0
- package/README.md +85 -0
- package/lib/errors.d.ts +8 -0
- package/lib/errors.js +15 -0
- package/lib/errors.js.map +1 -0
- package/lib/fetch.d.ts +5 -0
- package/lib/fetch.js +105 -0
- package/lib/fetch.js.map +1 -0
- package/lib/managers/ads.manager.d.ts +53 -0
- package/lib/managers/ads.manager.js +74 -0
- package/lib/managers/ads.manager.js.map +1 -0
- package/lib/managers/auth.manager.d.ts +9 -0
- package/lib/managers/auth.manager.js +58 -0
- package/lib/managers/auth.manager.js.map +1 -0
- package/lib/managers/base.manager.d.ts +5 -0
- package/lib/managers/base.manager.js +7 -0
- package/lib/managers/base.manager.js.map +1 -0
- package/lib/managers/index.d.ts +10 -0
- package/lib/managers/index.js +11 -0
- package/lib/managers/index.js.map +1 -0
- package/lib/managers/logistics.manager.d.ts +33 -0
- package/lib/managers/logistics.manager.js +42 -0
- package/lib/managers/logistics.manager.js.map +1 -0
- package/lib/managers/order.manager.d.ts +105 -0
- package/lib/managers/order.manager.js +173 -0
- package/lib/managers/order.manager.js.map +1 -0
- package/lib/managers/payment.manager.d.ts +30 -0
- package/lib/managers/payment.manager.js +39 -0
- package/lib/managers/payment.manager.js.map +1 -0
- package/lib/managers/product.manager.d.ts +114 -0
- package/lib/managers/product.manager.js +147 -0
- package/lib/managers/product.manager.js.map +1 -0
- package/lib/managers/public.manager.d.ts +9 -0
- package/lib/managers/public.manager.js +34 -0
- package/lib/managers/public.manager.js.map +1 -0
- package/lib/managers/push.manager.d.ts +36 -0
- package/lib/managers/push.manager.js +60 -0
- package/lib/managers/push.manager.js.map +1 -0
- package/lib/managers/voucher.manager.d.ts +70 -0
- package/lib/managers/voucher.manager.js +114 -0
- package/lib/managers/voucher.manager.js.map +1 -0
- package/lib/schemas/access-token.d.ts +27 -0
- package/lib/schemas/access-token.js +2 -0
- package/lib/schemas/access-token.js.map +1 -0
- package/lib/schemas/ads.d.ts +62 -0
- package/lib/schemas/ads.js +2 -0
- package/lib/schemas/ads.js.map +1 -0
- package/lib/schemas/api-range.d.ts +1 -0
- package/lib/schemas/api-range.js +2 -0
- package/lib/schemas/api-range.js.map +1 -0
- package/lib/schemas/attribute.d.ts +33 -0
- package/lib/schemas/attribute.js +2 -0
- package/lib/schemas/attribute.js.map +1 -0
- package/lib/schemas/authed-merchant.d.ts +6 -0
- package/lib/schemas/authed-merchant.js +2 -0
- package/lib/schemas/authed-merchant.js.map +1 -0
- package/lib/schemas/authed-shop.d.ts +11 -0
- package/lib/schemas/authed-shop.js +2 -0
- package/lib/schemas/authed-shop.js.map +1 -0
- package/lib/schemas/base.d.ts +11 -0
- package/lib/schemas/base.js +2 -0
- package/lib/schemas/base.js.map +1 -0
- package/lib/schemas/category.d.ts +12 -0
- package/lib/schemas/category.js +2 -0
- package/lib/schemas/category.js.map +1 -0
- package/lib/schemas/fetch.d.ts +13 -0
- package/lib/schemas/fetch.js +2 -0
- package/lib/schemas/fetch.js.map +1 -0
- package/lib/schemas/index.d.ts +11 -0
- package/lib/schemas/index.js +12 -0
- package/lib/schemas/index.js.map +1 -0
- package/lib/schemas/logistics.d.ts +157 -0
- package/lib/schemas/logistics.js +115 -0
- package/lib/schemas/logistics.js.map +1 -0
- package/lib/schemas/order.d.ts +592 -0
- package/lib/schemas/order.js +2 -0
- package/lib/schemas/order.js.map +1 -0
- package/lib/schemas/payment.d.ts +298 -0
- package/lib/schemas/payment.js +2 -0
- package/lib/schemas/payment.js.map +1 -0
- package/lib/schemas/product.d.ts +604 -0
- package/lib/schemas/product.js +14 -0
- package/lib/schemas/product.js.map +1 -0
- package/lib/schemas/public.d.ts +25 -0
- package/lib/schemas/public.js +2 -0
- package/lib/schemas/public.js.map +1 -0
- package/lib/schemas/push.d.ts +64 -0
- package/lib/schemas/push.js +2 -0
- package/lib/schemas/push.js.map +1 -0
- package/lib/schemas/region.d.ts +14 -0
- package/lib/schemas/region.js +16 -0
- package/lib/schemas/region.js.map +1 -0
- package/lib/schemas/voucher.d.ts +241 -0
- package/lib/schemas/voucher.js +15 -0
- package/lib/schemas/voucher.js.map +1 -0
- package/lib/sdk.d.ts +42 -0
- package/lib/sdk.js +77 -0
- package/lib/sdk.js.map +1 -0
- package/lib/storage/custom-token-storage.d.ts +10 -0
- package/lib/storage/custom-token-storage.js +47 -0
- package/lib/storage/custom-token-storage.js.map +1 -0
- package/lib/storage/token-storage.interface.d.ts +6 -0
- package/lib/storage/token-storage.interface.js +2 -0
- package/lib/storage/token-storage.interface.js.map +1 -0
- package/lib/utils/signature.d.ts +1 -0
- package/lib/utils/signature.js +9 -0
- package/lib/utils/signature.js.map +1 -0
- package/package.json +84 -0
|
@@ -0,0 +1,604 @@
|
|
|
1
|
+
import { FetchResponse } from "./fetch.js";
|
|
2
|
+
import { BaseResponse } from './base.js';
|
|
3
|
+
import { Attribute } from "./attribute.js";
|
|
4
|
+
/**
|
|
5
|
+
* Enum for item status
|
|
6
|
+
*/
|
|
7
|
+
export declare enum ItemStatus {
|
|
8
|
+
NORMAL = "NORMAL",
|
|
9
|
+
BANNED = "BANNED",
|
|
10
|
+
UNLIST = "UNLIST",
|
|
11
|
+
REVIEWING = "REVIEWING",
|
|
12
|
+
SELLER_DELETE = "SELLER_DELETE",
|
|
13
|
+
SHOPEE_DELETE = "SHOPEE_DELETE"
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Parameters for getting product comments
|
|
17
|
+
* Use this API to get comments by shop_id, item_id, or comment_id, up to 1000 comments.
|
|
18
|
+
*/
|
|
19
|
+
export type GetCommentParams = {
|
|
20
|
+
/** The identity of product item */
|
|
21
|
+
item_id?: number;
|
|
22
|
+
/** The identity of comment */
|
|
23
|
+
comment_id?: number;
|
|
24
|
+
/** Specifies the starting entry of data to return in the current call. Default is empty string */
|
|
25
|
+
cursor: string;
|
|
26
|
+
/** Maximum number of entries to return per page (between 1 and 100) */
|
|
27
|
+
page_size: number;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Comment reply information
|
|
31
|
+
*/
|
|
32
|
+
export type CommentReply = {
|
|
33
|
+
/** The content of reply */
|
|
34
|
+
reply: string;
|
|
35
|
+
/** Whether the reply is hidden or not */
|
|
36
|
+
hidden: boolean;
|
|
37
|
+
/** The time the seller replied to the comment */
|
|
38
|
+
create_time: number;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Media information for a comment
|
|
42
|
+
*/
|
|
43
|
+
export type CommentMedia = {
|
|
44
|
+
/** List of image URLs uploaded by the buyer in the comment */
|
|
45
|
+
image_url_list: string[];
|
|
46
|
+
/** List of video URLs uploaded by the buyer in the comment */
|
|
47
|
+
video_url_list: string[];
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Individual comment information
|
|
51
|
+
*/
|
|
52
|
+
export type CommentItem = {
|
|
53
|
+
/** Shopee's unique identifier for an order */
|
|
54
|
+
order_sn: string;
|
|
55
|
+
/** The identity of comment */
|
|
56
|
+
comment_id: number;
|
|
57
|
+
/** The content of the comment */
|
|
58
|
+
comment: string;
|
|
59
|
+
/** The username of the buyer who posted the comment */
|
|
60
|
+
buyer_username: string;
|
|
61
|
+
/** The commented item's id */
|
|
62
|
+
item_id: number;
|
|
63
|
+
/** Shopee's unique identifier for a model of an item (will be offline on 2024-12-27) */
|
|
64
|
+
model_id: number;
|
|
65
|
+
/** List of model IDs of the buyer's purchase corresponding to the comment */
|
|
66
|
+
model_id_list: number[];
|
|
67
|
+
/** Buyer's rating for the item (1-5) */
|
|
68
|
+
rating_star: number;
|
|
69
|
+
/** The editable status of the comment (EXPIRED/EDITABLE/HAVE_EDIT_ONCE) */
|
|
70
|
+
editable: string;
|
|
71
|
+
/** Whether the comment is hidden or not */
|
|
72
|
+
hidden: boolean;
|
|
73
|
+
/** The create time of the comment */
|
|
74
|
+
create_time: number;
|
|
75
|
+
/** The reply information for the comment */
|
|
76
|
+
comment_reply?: CommentReply;
|
|
77
|
+
/** Media information for the comment */
|
|
78
|
+
media: CommentMedia;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Response for getting product comments
|
|
82
|
+
*/
|
|
83
|
+
export interface GetCommentResponse extends FetchResponse<{
|
|
84
|
+
/** List of comments */
|
|
85
|
+
item_comment_list: CommentItem[];
|
|
86
|
+
/** Indicates if there are more comments to fetch */
|
|
87
|
+
more: boolean;
|
|
88
|
+
/** Cursor for the next page of results */
|
|
89
|
+
next_cursor: string;
|
|
90
|
+
}> {
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Comment item for replying to comments
|
|
94
|
+
*/
|
|
95
|
+
export type ReplyCommentItem = {
|
|
96
|
+
/** The identity of comment to reply to */
|
|
97
|
+
comment_id: number;
|
|
98
|
+
/** The content of the reply (between 1 and 500 characters) */
|
|
99
|
+
comment: string;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Parameters for replying to comments in batch
|
|
103
|
+
*/
|
|
104
|
+
export type ReplyCommentParams = {
|
|
105
|
+
/** The list of comments to reply to (between 1 and 100 items) */
|
|
106
|
+
comment_list: ReplyCommentItem[];
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* Result item for a comment reply operation
|
|
110
|
+
*/
|
|
111
|
+
export type ReplyCommentResultItem = {
|
|
112
|
+
/** The identity of comment that was replied to */
|
|
113
|
+
comment_id: number;
|
|
114
|
+
/** Error type if the reply failed for this comment */
|
|
115
|
+
fail_error?: string;
|
|
116
|
+
/** Error message if the reply failed for this comment */
|
|
117
|
+
fail_message?: string;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Response for replying to comments
|
|
121
|
+
*/
|
|
122
|
+
export interface ReplyCommentResponse extends FetchResponse<{
|
|
123
|
+
/** The result list of the request comment list */
|
|
124
|
+
result_list: ReplyCommentResultItem[];
|
|
125
|
+
/** Warning messages to take care of */
|
|
126
|
+
warning?: string[];
|
|
127
|
+
}> {
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Parameters for getting item list
|
|
131
|
+
*/
|
|
132
|
+
export type GetItemListParams = {
|
|
133
|
+
/** Specifies the starting entry of data to return in the current call. Default is 0. */
|
|
134
|
+
offset: number;
|
|
135
|
+
/** The size of one page. Max=100 */
|
|
136
|
+
page_size: number;
|
|
137
|
+
/** The starting date range for retrieving orders (based on the item update time) */
|
|
138
|
+
update_time_from?: number;
|
|
139
|
+
/** The ending date range for retrieving orders (based on the item update time) */
|
|
140
|
+
update_time_to?: number;
|
|
141
|
+
/** Item status filter. If multiple, use separate parameters (e.g. item_status=NORMAL&item_status=BANNED) */
|
|
142
|
+
item_status: ItemStatus[];
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* Item tag details
|
|
146
|
+
*/
|
|
147
|
+
export interface ItemTag {
|
|
148
|
+
/** Indicate if the item is kit item. */
|
|
149
|
+
kit?: boolean;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Item details in the list for GetItemList API
|
|
153
|
+
*/
|
|
154
|
+
export interface ItemListItemInfo {
|
|
155
|
+
/** Shopee's unique identifier for an item. */
|
|
156
|
+
item_id: number;
|
|
157
|
+
/** Current status of the item. */
|
|
158
|
+
item_status: ItemStatus;
|
|
159
|
+
/** The update time of item. */
|
|
160
|
+
update_time: number;
|
|
161
|
+
/** Item tag information. */
|
|
162
|
+
tag?: ItemTag;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Response for get item list API
|
|
166
|
+
*/
|
|
167
|
+
export interface GetItemListResponse extends BaseResponse {
|
|
168
|
+
/** Warning details if any. */
|
|
169
|
+
warning?: string;
|
|
170
|
+
response: {
|
|
171
|
+
/** List of item info with item_id, item_status, update_time. */
|
|
172
|
+
item: ItemListItemInfo[];
|
|
173
|
+
/** Total count of all items. */
|
|
174
|
+
total_count: number;
|
|
175
|
+
/** Indicates whether there are more items to retrieve. */
|
|
176
|
+
has_next_page: boolean;
|
|
177
|
+
/** If has_next_page is true, use this value for the next request's offset. */
|
|
178
|
+
next_offset: number;
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Parameters for getting item base information
|
|
183
|
+
*/
|
|
184
|
+
export type GetItemBaseInfoParams = {
|
|
185
|
+
/** List of item IDs. Limit [0,50] */
|
|
186
|
+
item_id_list: number[];
|
|
187
|
+
/** If true, response will include tax_info */
|
|
188
|
+
need_tax_info?: boolean;
|
|
189
|
+
/** If true, response will include complaint_policy */
|
|
190
|
+
need_complaint_policy?: boolean;
|
|
191
|
+
};
|
|
192
|
+
/**
|
|
193
|
+
* Price information for an item
|
|
194
|
+
*/
|
|
195
|
+
export interface PriceInfo {
|
|
196
|
+
/** The three-digit code representing the currency unit used for the item in Shopee Listings. */
|
|
197
|
+
currency: string;
|
|
198
|
+
/** The original price of the item in the listing currency. */
|
|
199
|
+
original_price: number;
|
|
200
|
+
/** The current price of the item in the listing currency. */
|
|
201
|
+
current_price: number;
|
|
202
|
+
/** The After-tax original price of the item in the listing currency. */
|
|
203
|
+
inflated_price_of_original_price: number;
|
|
204
|
+
/** The After-tax current price of the item in the listing currency. */
|
|
205
|
+
inflated_price_of_current_price: number;
|
|
206
|
+
/** The price of the item in sip. If item is for CNSC primary shop, this field will not be returned */
|
|
207
|
+
sip_item_price?: number;
|
|
208
|
+
/** source of sip' price. ( auto or manual).If item is for CNSC SIP primary shop, this field will not be returned */
|
|
209
|
+
sip_item_price_source?: string;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Image information
|
|
213
|
+
*/
|
|
214
|
+
export interface ImageInfo {
|
|
215
|
+
/** List of image url. */
|
|
216
|
+
image_url_list: string[];
|
|
217
|
+
/** List of image id. */
|
|
218
|
+
image_id_list: string[];
|
|
219
|
+
/** Image ratio */
|
|
220
|
+
image_ratio?: string;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Dimension details
|
|
224
|
+
*/
|
|
225
|
+
export interface Dimension {
|
|
226
|
+
/** The length of package for this item, the unit is CM. */
|
|
227
|
+
package_length: number;
|
|
228
|
+
/** The width of package for this item, the unit is CM. */
|
|
229
|
+
package_width: number;
|
|
230
|
+
/** The height of package for this item, the unit is CM. */
|
|
231
|
+
package_height: number;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Logistic information for an item
|
|
235
|
+
*/
|
|
236
|
+
export interface LogisticInfo {
|
|
237
|
+
/** The identity of logistic channel. */
|
|
238
|
+
logistic_id: number;
|
|
239
|
+
/** The name of logistic. */
|
|
240
|
+
logistic_name: string;
|
|
241
|
+
/** Related to shopee.logistics.GetLogistics result.logistics.enabled only affect current item. */
|
|
242
|
+
enabled: boolean;
|
|
243
|
+
/** Only needed when logistics fee_type = CUSTOM_PRICE. */
|
|
244
|
+
shipping_fee?: number;
|
|
245
|
+
/** If specify logistic fee_type is SIZE_SELECTION size_id is required. */
|
|
246
|
+
size_id?: number;
|
|
247
|
+
/** when seller chooses this option, the shipping fee of this channel on item will be set to 0. Default value is False. */
|
|
248
|
+
is_free: boolean;
|
|
249
|
+
/** Estimated shipping fee calculated by weight. Don't exist if channel is no-integrated. */
|
|
250
|
+
estimated_shipping_fee?: number;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Pre-order details
|
|
254
|
+
*/
|
|
255
|
+
export interface PreOrder {
|
|
256
|
+
/** Pre-order will be set true. */
|
|
257
|
+
is_pre_order: boolean;
|
|
258
|
+
/** The days to ship. Only work for pre-orde. */
|
|
259
|
+
days_to_ship: number;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Wholesale tier details
|
|
263
|
+
*/
|
|
264
|
+
export interface Wholesale {
|
|
265
|
+
/** The min count of this tier wholesale. */
|
|
266
|
+
min_count: number;
|
|
267
|
+
/** The max count of this tier wholesale. */
|
|
268
|
+
max_count: number;
|
|
269
|
+
/** The current price of the wholesale in the listing currency.If item is in promotion, this price is useless. */
|
|
270
|
+
unit_price: number;
|
|
271
|
+
/** The After-tax Price of the wholesale show to buyer. */
|
|
272
|
+
inflated_price_of_unit_price: number;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Video information
|
|
276
|
+
*/
|
|
277
|
+
export interface VideoInfo {
|
|
278
|
+
/** Url of video. */
|
|
279
|
+
video_url: string;
|
|
280
|
+
/** Thumbnail of video. */
|
|
281
|
+
thumbnail_url: string;
|
|
282
|
+
/** Duration of video. */
|
|
283
|
+
duration: number;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Brand information
|
|
287
|
+
*/
|
|
288
|
+
export interface BrandInfo {
|
|
289
|
+
/** Id of brand. */
|
|
290
|
+
brand_id: number;
|
|
291
|
+
/** Original name of brand. */
|
|
292
|
+
original_brand_name: string;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Promotion image details
|
|
296
|
+
*/
|
|
297
|
+
export interface PromotionImage {
|
|
298
|
+
/** Promotion image id list */
|
|
299
|
+
image_id_list?: string[];
|
|
300
|
+
/** Promotion image url list */
|
|
301
|
+
image_url_list?: string[];
|
|
302
|
+
/** Promotion image ratio */
|
|
303
|
+
image_ratio?: string;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Vehicle information for compatibility
|
|
307
|
+
*/
|
|
308
|
+
export interface VehicleInfo {
|
|
309
|
+
/** ID of the brand. */
|
|
310
|
+
brand_id?: number;
|
|
311
|
+
/** ID of the model. */
|
|
312
|
+
model_id?: number;
|
|
313
|
+
/** ID of the year. */
|
|
314
|
+
year_id?: number;
|
|
315
|
+
/** ID of the version. */
|
|
316
|
+
version_id?: number;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Compatibility information
|
|
320
|
+
*/
|
|
321
|
+
export interface CompatibilityInfo {
|
|
322
|
+
/** List of vehicle information */
|
|
323
|
+
vehicle_info_list?: VehicleInfo[];
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Complaint policy details (PL region)
|
|
327
|
+
*/
|
|
328
|
+
export interface ComplaintPolicy {
|
|
329
|
+
/** Time for a warranty claim. Value should be in one of ONE_YEAR TWO_YEARS OVER_TWO_YEARS. */
|
|
330
|
+
warranty_time: string;
|
|
331
|
+
/** If True means "I exclude warranty complaints for entrepreneur" */
|
|
332
|
+
exclude_entrepreneur_warranty: boolean;
|
|
333
|
+
/** The identity of complaint address. */
|
|
334
|
+
complaint_address_id: number;
|
|
335
|
+
/** Additional information for complaint policy */
|
|
336
|
+
additional_information: string;
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Group item tax information (BR region)
|
|
340
|
+
*/
|
|
341
|
+
export interface GroupItemTaxInfo {
|
|
342
|
+
/** Example: The package contains 6 soda cans. Whether you are selling a pack of 6 cans (fardo) or a single can (unit), enter 6. */
|
|
343
|
+
group_qtd?: string;
|
|
344
|
+
/** Example: The package contains 6 soda cans. Whether you are selling a pack of 6 cans (fardo) or a single can (unit), enter UNI for the individual can. */
|
|
345
|
+
group_unit?: string;
|
|
346
|
+
/** Example: The package contains 6 soda cans. Whether you are selling a pack of 6 cans (fardo) or a single can (unity), enter the value of the individual can. */
|
|
347
|
+
group_unit_value?: string;
|
|
348
|
+
/** Example: The item is a package that contains 6 soda cans. Enter the price of the whole package. */
|
|
349
|
+
original_group_price?: string;
|
|
350
|
+
/** Example: The item is a package that contains 6 soda cans. Please inform the GTIN SSCC code for the package. */
|
|
351
|
+
group_gtin_sscc?: string;
|
|
352
|
+
/** Example: The item is box, that contain 6 packages. Each package contains 6 soda cans. Please inform the GRAI GTIN SSCC code for the Box. */
|
|
353
|
+
group_grai_gtin_sscc?: string;
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Tax information (region-specific)
|
|
357
|
+
*/
|
|
358
|
+
export interface TaxInfo {
|
|
359
|
+
/** Mercosur Common Nomenclature (BR region). Note: ncm = "00" means no NCM. */
|
|
360
|
+
ncm?: string;
|
|
361
|
+
/** Tax Code of Operations and Installments for orders that seller and buyer are in different states (BR region). */
|
|
362
|
+
diff_state_cfop?: string;
|
|
363
|
+
/** Code of Operation Status – Simples Nacional (BR region). */
|
|
364
|
+
csosn?: string;
|
|
365
|
+
/** Product source, domestic or foreign (BR region). */
|
|
366
|
+
origin?: string;
|
|
367
|
+
/** Tax Replacement Specifying Code (CEST) (BR region). Note: cest = "00" means no CEST. */
|
|
368
|
+
cest?: string;
|
|
369
|
+
/** Measure unit (BR region). */
|
|
370
|
+
measure_unit?: string;
|
|
371
|
+
/** Invoice option (PL region). Value should be one of NO_INVOICES VAT_MARGIN_SCHEME_INVOICES VAT_INVOICES NON_VAT_INVOICES. If NON_VAT_INVOICE, vat_rate is null. */
|
|
372
|
+
invoice_option?: string;
|
|
373
|
+
/** VAT rate (PL region). Value should be one of 0% 5% 8% 23% NO_VAT_RATE. */
|
|
374
|
+
vat_rate?: string;
|
|
375
|
+
/** HS Code (IN region). */
|
|
376
|
+
hs_code?: string;
|
|
377
|
+
/** Tax Code (IN region). */
|
|
378
|
+
tax_code?: string;
|
|
379
|
+
/** Tax type for TW whitelist shop (0: no tax, 1: taxable, 2: tax-free). */
|
|
380
|
+
tax_type?: number;
|
|
381
|
+
/** PIS - Social Integration Program percentage (BR region). */
|
|
382
|
+
pis?: string;
|
|
383
|
+
/** COFINS - Contribution for Social Security Funding percentage (BR region). */
|
|
384
|
+
cofins?: string;
|
|
385
|
+
/** ICMS CST - Tax Situation Code for ICMS (BR region). */
|
|
386
|
+
icms_cst?: string;
|
|
387
|
+
/** PIS/COFINS CST - Tax Situation Code for PIS/COFINS (BR region). */
|
|
388
|
+
pis_cofins_cst?: string;
|
|
389
|
+
/** Total percentage of federal, state, and municipal taxes (BR region). */
|
|
390
|
+
federal_state_taxes?: string;
|
|
391
|
+
/** Operation type (1: Retailer, 2: Manufacturer) (BR region). */
|
|
392
|
+
operation_type?: string;
|
|
393
|
+
/** EXTIPI - Exception to IPI tax rate (BR region). */
|
|
394
|
+
ex_tipi?: string;
|
|
395
|
+
/** FCI Control Number for import FCI (BR region). */
|
|
396
|
+
fci_num?: string;
|
|
397
|
+
/** RECOPI NACIONAL number for tax-exempt paper (BR region). */
|
|
398
|
+
recopi_num?: string;
|
|
399
|
+
/** Additional invoice information (BR region). */
|
|
400
|
+
additional_info?: string;
|
|
401
|
+
/** Group item tax information (BR region). Required if item is a group item. */
|
|
402
|
+
group_item_info?: GroupItemTaxInfo;
|
|
403
|
+
/** Export CFOP for goods exported to other countries (7101: self-produced, 7102: third-party resale) (BR region). */
|
|
404
|
+
export_cfop?: string;
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Extended description image details
|
|
408
|
+
*/
|
|
409
|
+
export interface ExtendedDescriptionImage {
|
|
410
|
+
/** Image id */
|
|
411
|
+
image_id: string;
|
|
412
|
+
/** Image url. */
|
|
413
|
+
image_url: string;
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Extended description field details
|
|
417
|
+
*/
|
|
418
|
+
export interface ExtendedDescriptionField {
|
|
419
|
+
/** Type of extended description field: text, image. */
|
|
420
|
+
field_type: string;
|
|
421
|
+
/** If field_type is text, text information will be returned through this field. */
|
|
422
|
+
text?: string;
|
|
423
|
+
/** If field_type is image, image url will be returned through this field. */
|
|
424
|
+
image_info?: ExtendedDescriptionImage;
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Extended description details
|
|
428
|
+
*/
|
|
429
|
+
export interface ExtendedDescription {
|
|
430
|
+
/** Field of extended description */
|
|
431
|
+
field_list: ExtendedDescriptionField[];
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Description information
|
|
435
|
+
*/
|
|
436
|
+
export interface DescriptionInfo {
|
|
437
|
+
/** If description_type is extended , Description information will be returned through this field. */
|
|
438
|
+
extended_description?: ExtendedDescription;
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* Stock summary information
|
|
442
|
+
*/
|
|
443
|
+
export interface StockSummaryInfo {
|
|
444
|
+
/** Stock reserved for promotion. For SIP P Item, total reserved stock for P Item and all A Items. */
|
|
445
|
+
total_reserved_stock?: number;
|
|
446
|
+
/** Total available stock */
|
|
447
|
+
total_available_stock?: number;
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* Seller stock details
|
|
451
|
+
*/
|
|
452
|
+
export interface SellerStock {
|
|
453
|
+
/** Location id */
|
|
454
|
+
location_id?: string;
|
|
455
|
+
/** Stock in the current warehouse */
|
|
456
|
+
stock?: number;
|
|
457
|
+
/** To return if the stock of the location id is saleable */
|
|
458
|
+
if_saleable?: boolean;
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* Shopee stock details
|
|
462
|
+
*/
|
|
463
|
+
export interface ShopeeStock {
|
|
464
|
+
/** Location id */
|
|
465
|
+
location_id?: string;
|
|
466
|
+
/** Stock */
|
|
467
|
+
stock?: number;
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* Advance stock details (PH/VN/ID/MY local selected shops)
|
|
471
|
+
*/
|
|
472
|
+
export interface AdvanceStock {
|
|
473
|
+
/** Advance Fulfillment stock that Seller has shipped out and is available to be used to fulfill an order. */
|
|
474
|
+
sellable_advance_stock?: number;
|
|
475
|
+
/** Advance Fulfillment stock that seller has shipped out and is still in transit and unavailable to be used to fulfill an order. */
|
|
476
|
+
in_transit_advance_stock?: number;
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* Stock information V2
|
|
480
|
+
*/
|
|
481
|
+
export interface StockInfoV2 {
|
|
482
|
+
/** Stock summary info */
|
|
483
|
+
summary_info?: StockSummaryInfo;
|
|
484
|
+
/** Seller stock */
|
|
485
|
+
seller_stock?: SellerStock[];
|
|
486
|
+
/** Shopee stock */
|
|
487
|
+
shopee_stock?: ShopeeStock[];
|
|
488
|
+
/** Advance stock details */
|
|
489
|
+
advance_stock?: AdvanceStock;
|
|
490
|
+
}
|
|
491
|
+
/**
|
|
492
|
+
* Certification proof details
|
|
493
|
+
*/
|
|
494
|
+
export interface CertificationProof {
|
|
495
|
+
image_id?: string;
|
|
496
|
+
image_url?: string;
|
|
497
|
+
name?: string;
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Certification information
|
|
501
|
+
*/
|
|
502
|
+
export interface CertificationInfo {
|
|
503
|
+
certification_type?: number;
|
|
504
|
+
certification_no?: string;
|
|
505
|
+
certification_proofs?: CertificationProof[];
|
|
506
|
+
expire_time?: number;
|
|
507
|
+
permit_id?: number;
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* Base information for an item
|
|
511
|
+
*/
|
|
512
|
+
export interface ItemBaseInfo {
|
|
513
|
+
/** Shopee's unique identifier for an item. */
|
|
514
|
+
item_id: number;
|
|
515
|
+
/** Shopee's unique identifier for a category. */
|
|
516
|
+
category_id: number;
|
|
517
|
+
/** Name of the item in local language. */
|
|
518
|
+
item_name: string;
|
|
519
|
+
/** if description_type is normal , Description information will be returned through this field,else description will be empty */
|
|
520
|
+
description?: string;
|
|
521
|
+
/** An item SKU (stock keeping unit) is an identifier defined by a seller, sometimes called parent SKU. */
|
|
522
|
+
item_sku?: string;
|
|
523
|
+
/** Timestamp that indicates the date and time that the item was created. */
|
|
524
|
+
create_time: number;
|
|
525
|
+
/** Timestamp that indicates the last time that there was a change in value of the item. */
|
|
526
|
+
update_time: number;
|
|
527
|
+
/** List of attributes */
|
|
528
|
+
attribute_list?: Attribute[];
|
|
529
|
+
/** Price information. If item has models, this is not returned. Use get_model_list instead. */
|
|
530
|
+
price_info?: PriceInfo[];
|
|
531
|
+
/** Image information */
|
|
532
|
+
image?: ImageInfo;
|
|
533
|
+
/** The weight of this item, the unit is KG. */
|
|
534
|
+
weight?: string;
|
|
535
|
+
/** The dimension of this item. */
|
|
536
|
+
dimension?: Dimension;
|
|
537
|
+
/** The logistics list. */
|
|
538
|
+
logistic_info?: LogisticInfo[];
|
|
539
|
+
/** Pre-order details. */
|
|
540
|
+
pre_order?: PreOrder;
|
|
541
|
+
/** The wholesales tier list. */
|
|
542
|
+
wholesales?: Wholesale[];
|
|
543
|
+
/** Is it second-hand. NEW/USED */
|
|
544
|
+
condition?: string;
|
|
545
|
+
/** Url of size chart image. */
|
|
546
|
+
size_chart?: string;
|
|
547
|
+
/** Current status of the item. */
|
|
548
|
+
item_status: ItemStatus;
|
|
549
|
+
/** If deboost is true, means that the item's search ranking is lowered. */
|
|
550
|
+
deboost?: boolean;
|
|
551
|
+
/** Does it contain model. */
|
|
552
|
+
has_model: boolean;
|
|
553
|
+
/** Promotion ID */
|
|
554
|
+
promotion_id?: number;
|
|
555
|
+
/** Info of video list. */
|
|
556
|
+
video_info?: VideoInfo[];
|
|
557
|
+
/** Brand information. */
|
|
558
|
+
brand?: BrandInfo;
|
|
559
|
+
/** Item dangerous status (0: non-dangerous, 1: dangerous). Indonesia and Malaysia local sellers only. */
|
|
560
|
+
item_dangerous?: number;
|
|
561
|
+
/** GTIN code for BR region. "00" means item without GTIN. */
|
|
562
|
+
gtin_code?: string;
|
|
563
|
+
/** ID of new size chart. */
|
|
564
|
+
size_chart_id?: number;
|
|
565
|
+
/** Promotion image details */
|
|
566
|
+
promotion_image?: PromotionImage;
|
|
567
|
+
/** Compatibility information */
|
|
568
|
+
compatibility_info?: CompatibilityInfo;
|
|
569
|
+
/** Scheduled publish time of this item. */
|
|
570
|
+
scheduled_publish_time?: number;
|
|
571
|
+
/** ID of authorised reseller brand. */
|
|
572
|
+
authorised_brand_id?: number;
|
|
573
|
+
/** Shopee's unique identifier for Shopee Standard Product. */
|
|
574
|
+
ssp_id?: number;
|
|
575
|
+
/** Return true if the item only has a default model and it is FBS model */
|
|
576
|
+
is_fulfillment_by_shopee?: boolean;
|
|
577
|
+
/** Complaint policy. Only returned for local PL sellers, and need_complaint_policy in request is true. */
|
|
578
|
+
complaint_policy?: ComplaintPolicy;
|
|
579
|
+
/** Tax information. Only returned if need_tax_info in request is true. */
|
|
580
|
+
tax_info?: TaxInfo;
|
|
581
|
+
/** Description information. Only whitelist sellers can use it. */
|
|
582
|
+
description_info?: DescriptionInfo;
|
|
583
|
+
/** Type of description: normal, extended. */
|
|
584
|
+
description_type?: string;
|
|
585
|
+
/** New stock object */
|
|
586
|
+
stock_info_v2?: StockInfoV2;
|
|
587
|
+
/** Certification information */
|
|
588
|
+
certification_info?: CertificationInfo[];
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* Response for get item base info API
|
|
592
|
+
*/
|
|
593
|
+
export interface GetItemBaseInfoResponse extends BaseResponse {
|
|
594
|
+
/** Warning details if any. */
|
|
595
|
+
warning?: string;
|
|
596
|
+
response: {
|
|
597
|
+
/** List of item base information. */
|
|
598
|
+
item_list: ItemBaseInfo[];
|
|
599
|
+
/** Complaint policy. Only returned for local PL sellers, and need_complaint_policy in request is true. */
|
|
600
|
+
complaint_policy?: ComplaintPolicy;
|
|
601
|
+
/** Tax information. Only returned if need_tax_info in request is true. */
|
|
602
|
+
tax_info?: TaxInfo;
|
|
603
|
+
};
|
|
604
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enum for item status
|
|
3
|
+
*/
|
|
4
|
+
export var ItemStatus;
|
|
5
|
+
(function (ItemStatus) {
|
|
6
|
+
ItemStatus["NORMAL"] = "NORMAL";
|
|
7
|
+
ItemStatus["BANNED"] = "BANNED";
|
|
8
|
+
ItemStatus["UNLIST"] = "UNLIST";
|
|
9
|
+
ItemStatus["REVIEWING"] = "REVIEWING";
|
|
10
|
+
ItemStatus["SELLER_DELETE"] = "SELLER_DELETE";
|
|
11
|
+
ItemStatus["SHOPEE_DELETE"] = "SHOPEE_DELETE";
|
|
12
|
+
})(ItemStatus || (ItemStatus = {}));
|
|
13
|
+
;
|
|
14
|
+
//# sourceMappingURL=product.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product.js","sourceRoot":"","sources":["../../src/schemas/product.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,CAAN,IAAY,UAOX;AAPD,WAAY,UAAU;IACpB,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;IACjB,qCAAuB,CAAA;IACvB,6CAA+B,CAAA;IAC/B,6CAA+B,CAAA;AACjC,CAAC,EAPW,UAAU,KAAV,UAAU,QAOrB;AAiFI,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FetchResponse } from "./fetch.js";
|
|
2
|
+
import { AuthedShop } from "./authed-shop.js";
|
|
3
|
+
import { AuthedMerchant } from "./authed-merchant.js";
|
|
4
|
+
export interface GetShopsByPartnerParams {
|
|
5
|
+
page_size?: number;
|
|
6
|
+
page_no?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface GetMerchantsByPartnerParams {
|
|
9
|
+
page_size?: number;
|
|
10
|
+
page_no?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface GetShopsByPartnerResponse extends FetchResponse<{
|
|
13
|
+
authed_shop_list: AuthedShop[];
|
|
14
|
+
more: boolean;
|
|
15
|
+
}> {
|
|
16
|
+
}
|
|
17
|
+
export interface GetMerchantsByPartnerResponse extends FetchResponse<{
|
|
18
|
+
authed_merchant_list: AuthedMerchant[];
|
|
19
|
+
more: boolean;
|
|
20
|
+
}> {
|
|
21
|
+
}
|
|
22
|
+
export interface GetShopeeIpRangeResponse extends FetchResponse<{
|
|
23
|
+
ip_list: string[];
|
|
24
|
+
}> {
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../src/schemas/public.ts"],"names":[],"mappings":""}
|