@congminh1254/shopee-sdk 1.4.0 → 1.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,273 @@
1
+ import { BaseManager } from "./base.manager.js";
2
+ import { ShopeeFetch } from "../fetch.js";
3
+ export class VideoManager extends BaseManager {
4
+ constructor(config) {
5
+ super(config);
6
+ }
7
+ /**
8
+ * Delete video
9
+ *
10
+ * Use this API to delete videos. You can delete videos with draft status or post status.
11
+ *
12
+ * @param params - Parameters for deleting video
13
+ * @param params.videoUploadIdList - List of video_upload_ids to delete (for draft status)
14
+ * @param params.postIdList - List of post_ids to delete (for post status)
15
+ *
16
+ * @returns A promise that resolves to the delete response containing:
17
+ * - successList: List of videos deleted successfully
18
+ * - failureList: List of videos that failed to delete
19
+ */
20
+ async deleteVideo(params) {
21
+ const response = await ShopeeFetch.fetch(this.config, `/video/delete_video`, {
22
+ method: "POST",
23
+ auth: true,
24
+ body: params,
25
+ });
26
+ return response;
27
+ }
28
+ /**
29
+ * Edit video information
30
+ *
31
+ * Use this API to edit video information including caption, cover image, linked products, and schedule settings.
32
+ *
33
+ * @param params - Parameters for editing video info
34
+ * @param params.videoUploadList - List of videos to edit (max 5)
35
+ *
36
+ * @returns A promise that resolves to the edit response containing:
37
+ * - successList: List of video_upload_ids edited successfully
38
+ * - failureList: List of video_upload_ids that failed to edit
39
+ */
40
+ async editVideoInfo(params) {
41
+ const response = await ShopeeFetch.fetch(this.config, `/video/edit_video_info`, {
42
+ method: "POST",
43
+ auth: true,
44
+ body: params,
45
+ });
46
+ return response;
47
+ }
48
+ /**
49
+ * Get cover list
50
+ *
51
+ * Use this API to get available cover images for a video.
52
+ *
53
+ * @param params - Parameters for getting cover list
54
+ * @param params.videoUploadId - ID of uploaded video
55
+ *
56
+ * @returns A promise that resolves to the cover list response
57
+ */
58
+ async getCoverList(params) {
59
+ const response = await ShopeeFetch.fetch(this.config, `/video/get_cover_list`, {
60
+ method: "GET",
61
+ auth: true,
62
+ params: params,
63
+ });
64
+ return response;
65
+ }
66
+ /**
67
+ * Get metric trend
68
+ *
69
+ * Use this API to get metric trends for videos over a time period.
70
+ *
71
+ * @param params - Parameters for getting metric trend
72
+ *
73
+ * @returns A promise that resolves to the metric trend response
74
+ */
75
+ async getMetricTrend(params) {
76
+ const response = await ShopeeFetch.fetch(this.config, `/video/get_metric_trend`, {
77
+ method: "GET",
78
+ auth: true,
79
+ params: params,
80
+ });
81
+ return response;
82
+ }
83
+ /**
84
+ * Get overview performance
85
+ *
86
+ * Use this API to get overview performance metrics for videos.
87
+ *
88
+ * @param params - Parameters for getting overview performance
89
+ *
90
+ * @returns A promise that resolves to the overview performance response
91
+ */
92
+ async getOverviewPerformance(params) {
93
+ const response = await ShopeeFetch.fetch(this.config, `/video/get_overview_performance`, {
94
+ method: "GET",
95
+ auth: true,
96
+ params: params,
97
+ });
98
+ return response;
99
+ }
100
+ /**
101
+ * Get product performance list
102
+ *
103
+ * Use this API to get performance metrics for products linked to videos.
104
+ *
105
+ * @param params - Parameters for getting product performance list
106
+ *
107
+ * @returns A promise that resolves to the product performance list response
108
+ */
109
+ async getProductPerformanceList(params) {
110
+ const response = await ShopeeFetch.fetch(this.config, `/video/get_product_performance_list`, {
111
+ method: "GET",
112
+ auth: true,
113
+ params: params,
114
+ });
115
+ return response;
116
+ }
117
+ /**
118
+ * Get user demographics
119
+ *
120
+ * Use this API to get demographic information of video viewers.
121
+ *
122
+ * @param params - Optional parameters (currently no parameters required)
123
+ *
124
+ * @returns A promise that resolves to the user demographics response
125
+ */
126
+ async getUserDemographics(params) {
127
+ const response = await ShopeeFetch.fetch(this.config, `/video/get_user_demographics`, {
128
+ method: "GET",
129
+ auth: true,
130
+ params: (params || {}),
131
+ });
132
+ return response;
133
+ }
134
+ /**
135
+ * Get video detail
136
+ *
137
+ * Use this API to get detailed information about a video.
138
+ *
139
+ * @param params - Parameters for getting video detail
140
+ *
141
+ * @returns A promise that resolves to the video detail response
142
+ */
143
+ async getVideoDetail(params) {
144
+ const response = await ShopeeFetch.fetch(this.config, `/video/get_video_detail`, {
145
+ method: "GET",
146
+ auth: true,
147
+ params: params,
148
+ });
149
+ return response;
150
+ }
151
+ /**
152
+ * Get video detail audience distribution
153
+ *
154
+ * Use this API to get audience distribution for a specific video.
155
+ *
156
+ * @param params - Parameters for getting video detail audience distribution
157
+ *
158
+ * @returns A promise that resolves to the video detail audience distribution response
159
+ */
160
+ async getVideoDetailAudienceDistribution(params) {
161
+ const response = await ShopeeFetch.fetch(this.config, `/video/get_video_detail_audience_distribution`, {
162
+ method: "GET",
163
+ auth: true,
164
+ params: params,
165
+ });
166
+ return response;
167
+ }
168
+ /**
169
+ * Get video detail metric trend
170
+ *
171
+ * Use this API to get metric trends for a specific video.
172
+ *
173
+ * @param params - Parameters for getting video detail metric trend
174
+ *
175
+ * @returns A promise that resolves to the video detail metric trend response
176
+ */
177
+ async getVideoDetailMetricTrend(params) {
178
+ const response = await ShopeeFetch.fetch(this.config, `/video/get_video_detail_metric_trend`, {
179
+ method: "GET",
180
+ auth: true,
181
+ params: params,
182
+ });
183
+ return response;
184
+ }
185
+ /**
186
+ * Get video detail performance
187
+ *
188
+ * Use this API to get performance metrics for a specific video.
189
+ *
190
+ * @param params - Parameters for getting video detail performance
191
+ *
192
+ * @returns A promise that resolves to the video detail performance response
193
+ */
194
+ async getVideoDetailPerformance(params) {
195
+ const response = await ShopeeFetch.fetch(this.config, `/video/get_video_detail_performance`, {
196
+ method: "GET",
197
+ auth: true,
198
+ params: params,
199
+ });
200
+ return response;
201
+ }
202
+ /**
203
+ * Get video detail product performance
204
+ *
205
+ * Use this API to get performance metrics for products linked to a specific video.
206
+ *
207
+ * @param params - Parameters for getting video detail product performance
208
+ *
209
+ * @returns A promise that resolves to the video detail product performance response
210
+ */
211
+ async getVideoDetailProductPerformance(params) {
212
+ const response = await ShopeeFetch.fetch(this.config, `/video/get_video_detail_product_performance`, {
213
+ method: "GET",
214
+ auth: true,
215
+ params: params,
216
+ });
217
+ return response;
218
+ }
219
+ /**
220
+ * Get video list
221
+ *
222
+ * Use this API to get a list of videos.
223
+ *
224
+ * @param params - Parameters for getting video list
225
+ *
226
+ * @returns A promise that resolves to the video list response
227
+ */
228
+ async getVideoList(params) {
229
+ const response = await ShopeeFetch.fetch(this.config, `/video/get_video_list`, {
230
+ method: "GET",
231
+ auth: true,
232
+ params: params,
233
+ });
234
+ return response;
235
+ }
236
+ /**
237
+ * Get video performance list
238
+ *
239
+ * Use this API to get performance metrics for multiple videos.
240
+ *
241
+ * @param params - Parameters for getting video performance list
242
+ *
243
+ * @returns A promise that resolves to the video performance list response
244
+ */
245
+ async getVideoPerformanceList(params) {
246
+ const response = await ShopeeFetch.fetch(this.config, `/video/get_video_performance_list`, {
247
+ method: "GET",
248
+ auth: true,
249
+ params: params,
250
+ });
251
+ return response;
252
+ }
253
+ /**
254
+ * Post video
255
+ *
256
+ * Use this API to post videos to Shopee Video.
257
+ *
258
+ * @param params - Parameters for posting video
259
+ *
260
+ * @returns A promise that resolves to the post video response containing:
261
+ * - successList: List of videos posted successfully
262
+ * - failureList: List of videos that failed to post
263
+ */
264
+ async postVideo(params) {
265
+ const response = await ShopeeFetch.fetch(this.config, `/video/post_video`, {
266
+ method: "POST",
267
+ auth: true,
268
+ body: params,
269
+ });
270
+ return response;
271
+ }
272
+ }
273
+ //# sourceMappingURL=video.manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video.manager.js","sourceRoot":"","sources":["../../src/managers/video.manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAkC1C,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C,YAAY,MAAoB;QAC9B,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,WAAW,CAAC,M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YACb,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,MAGP;SACF,CACF,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,SAAS,CAAC,MAAuB;QACrC,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,KAAK,CAAoB,IAAI,CAAC,MAAM,EAAE,mBAAmB,EAAE;YAC5F,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,MAAM;SACb,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF"}
@@ -1134,3 +1134,70 @@ export type BatchUpdateTPFWarehouseTrackingStatusParams = {
1134
1134
  export interface BatchUpdateTPFWarehouseTrackingStatusResponse extends BaseResponse {
1135
1135
  response?: Record<string, never>;
1136
1136
  }
1137
+ /**
1138
+ * Parameters for check polygon update status
1139
+ */
1140
+ export type CheckPolygonUpdateStatusParams = {
1141
+ /** ID that needs to be checked. Please pass the task_id returned via the v2.logistics.upload_serviceable_polygon. */
1142
+ task_id: string;
1143
+ } & Record<string, string | number | boolean | object | null | undefined>;
1144
+ /**
1145
+ * Response for check polygon update status API
1146
+ */
1147
+ export interface CheckPolygonUpdateStatusResponse extends BaseResponse {
1148
+ response?: {
1149
+ /** Serviceable polygon file upload status. 0: Task completed, 1: Task in progress, 2: KML file related errors */
1150
+ status?: number;
1151
+ /** Details of the upload status, e.g "task in progress" */
1152
+ message?: string;
1153
+ };
1154
+ }
1155
+ /**
1156
+ * Parameters for update address
1157
+ */
1158
+ export type UpdateAddressParams = {
1159
+ /** Unique identifier for the address. You can get the address_id via v2.logistics.get_address_list. */
1160
+ address_id: number;
1161
+ /** The region of the address. Note: Do not allow to update the region of the address. */
1162
+ region?: string;
1163
+ /** The state of the address. */
1164
+ state?: string;
1165
+ /** The city of the address. */
1166
+ city?: string;
1167
+ /** The district of the address. */
1168
+ district?: string;
1169
+ /** The town of the address. */
1170
+ town?: string;
1171
+ /** The detailed address description of the address. */
1172
+ address?: string;
1173
+ /** The zipcode of the address. */
1174
+ zipcode?: string;
1175
+ /** Recipient's name at this address. */
1176
+ name?: string;
1177
+ /** Contact phone number for the recipient. */
1178
+ phone?: string;
1179
+ /** Geolocation information for the address. Type: JSON string. To clear existing geo info, pass "" or {}. To keep existing geo info, do not include this field. */
1180
+ geo_info?: string;
1181
+ } & Record<string, string | number | boolean | object | null | undefined>;
1182
+ /**
1183
+ * Response for update address API
1184
+ */
1185
+ export interface UpdateAddressResponse extends BaseResponse {
1186
+ response?: Record<string, never>;
1187
+ }
1188
+ /**
1189
+ * Parameters for upload serviceable polygon
1190
+ */
1191
+ export type UploadServiceablePolygonParams = {
1192
+ /** The .kml file to be uploaded to denote the serviceability area of the shops. */
1193
+ file: File | Blob;
1194
+ } & Record<string, string | number | boolean | object | null | undefined>;
1195
+ /**
1196
+ * Response for upload serviceable polygon API
1197
+ */
1198
+ export interface UploadServiceablePolygonResponse extends BaseResponse {
1199
+ response?: {
1200
+ /** Use the task_id to call v2.logistics.check_polygon_update_status to check if the upload job has been completed. */
1201
+ task_id?: string;
1202
+ };
1203
+ }
@@ -1912,3 +1912,142 @@ export interface SearchUnpackagedModelListResponse extends FetchResponse<{
1912
1912
  model_list: any[];
1913
1913
  }> {
1914
1914
  }
1915
+ /**
1916
+ * Parameters for get mart item mapping by id
1917
+ */
1918
+ export type GetMartItemMappingByIdParams = {
1919
+ /** The item ID of the item in the Mart shop */
1920
+ mart_item_id: number;
1921
+ /** A list of outlet shop IDs used to filter the mapping results */
1922
+ outlet_shop_id_list: number[];
1923
+ };
1924
+ /**
1925
+ * Model mapping information
1926
+ */
1927
+ export interface ModelMapping {
1928
+ /** The model ID of the product in the Mart shop */
1929
+ mart_model_id?: number;
1930
+ /** The model ID of the corresponding product in the outlet shop */
1931
+ outlet_model_id?: number;
1932
+ }
1933
+ /**
1934
+ * Item mapping information
1935
+ */
1936
+ export interface ItemMapping {
1937
+ /** The item ID of the item in the Mart shop */
1938
+ mart_item_id?: number;
1939
+ /** The item ID of the corresponding item in the outlet shop */
1940
+ outlet_item_id?: number;
1941
+ /** The mapping relationship between Mart models and outlet models under the mapped items */
1942
+ model_mapping?: ModelMapping[];
1943
+ }
1944
+ /**
1945
+ * Response for get mart item mapping by id API
1946
+ */
1947
+ export interface GetMartItemMappingByIdResponse extends BaseResponse {
1948
+ /** Warning details */
1949
+ warning?: string;
1950
+ response?: {
1951
+ /** A list of item mapping records between the Mart item and its corresponding outlet items */
1952
+ item_mapping_list?: ItemMapping[];
1953
+ };
1954
+ }
1955
+ /**
1956
+ * Seller stock information for publishing to outlet
1957
+ */
1958
+ export interface OutletSellerStock {
1959
+ /** The location ID where the stock is stored */
1960
+ location_id?: string;
1961
+ /** The available stock quantity for the model */
1962
+ stock: number;
1963
+ }
1964
+ /**
1965
+ * Pre-order configuration for publishing to outlet
1966
+ */
1967
+ export interface OutletPreOrder {
1968
+ /** Indicates whether the model is sold as a pre-order item */
1969
+ is_pre_order: boolean;
1970
+ /** The number of days required to ship the item after an order is placed */
1971
+ days_to_ship?: number;
1972
+ }
1973
+ /**
1974
+ * Model information for publishing
1975
+ */
1976
+ export interface PublishModel {
1977
+ /** The model ID in the Mart shop that this outlet model is associated with. model_id=0 for items with only the default model(no variations) */
1978
+ relate_mart_model_id: number;
1979
+ /** The status of model */
1980
+ model_status?: string;
1981
+ /** The original price of the model */
1982
+ original_price?: number;
1983
+ /** Stock information for the model, set in outlet sku level */
1984
+ seller_stock?: OutletSellerStock[];
1985
+ /** Pre-order configuration, set in outlet sku level */
1986
+ pre_order?: OutletPreOrder;
1987
+ }
1988
+ /**
1989
+ * Logistics channel configuration for outlet
1990
+ */
1991
+ export interface OutletLogisticInfo {
1992
+ /** The logistics channel ID used for shipping the item */
1993
+ logistic_id: number;
1994
+ /** Indicates whether the logistics channel is enabled for the item */
1995
+ enabled: boolean;
1996
+ /** The shipping fee charged to the buyer for this logistics channel */
1997
+ shipping_fee?: number;
1998
+ /** The parcel size ID used to calculate shipping fees */
1999
+ size_id?: number;
2000
+ /** Indicates whether free shipping is applied for this logistics channel */
2001
+ is_free?: boolean;
2002
+ }
2003
+ /**
2004
+ * Maximum purchase limit configuration
2005
+ */
2006
+ export interface MaxPurchaseLimit {
2007
+ /** The maximum quantity that a buyer is allowed to purchase per order */
2008
+ purchase_limit: number;
2009
+ }
2010
+ /**
2011
+ * Purchase limit information
2012
+ */
2013
+ export interface PurchaseLimitInfo {
2014
+ /** The minimum quantity that a buyer is allowed to purchase per order */
2015
+ min_purchase_limit: number;
2016
+ /** The maximum purchase quantity configuration for the item */
2017
+ max_purchase_limit: MaxPurchaseLimit;
2018
+ }
2019
+ /**
2020
+ * Item publishing configuration
2021
+ */
2022
+ export interface PublishItemConfig {
2023
+ /** The outlet item ID */
2024
+ outlet_item_id?: number;
2025
+ /** A list of models to be published to the outlet shop, mapped from the corresponding Mart shop models */
2026
+ model?: PublishModel[];
2027
+ /** Logistic channel setting; can set for each outlet shop */
2028
+ logistic_info?: OutletLogisticInfo[];
2029
+ /** Purchase quantity limits applied to the item in the outlet shop */
2030
+ purchase_limit_info?: PurchaseLimitInfo;
2031
+ }
2032
+ /**
2033
+ * Parameters for publish item to outlet shop
2034
+ */
2035
+ export type PublishItemToOutletShopParams = {
2036
+ /** The item ID of the product in the Mart shop to be published to the outlet shop */
2037
+ mart_item_id: number;
2038
+ /** The shop ID of the outlet shop where the product will be published */
2039
+ outlet_shop_id: number;
2040
+ /** Configuration details for publishing the product to the outlet shop, including model mapping, pricing, stock, logistics, and purchase limits */
2041
+ publish_item: PublishItemConfig;
2042
+ };
2043
+ /**
2044
+ * Response for publish item to outlet shop API
2045
+ */
2046
+ export interface PublishItemToOutletShopResponse extends BaseResponse {
2047
+ /** Warning message */
2048
+ warning?: string;
2049
+ response?: {
2050
+ /** The outlet item ID */
2051
+ item_id?: number;
2052
+ };
2053
+ }
@@ -248,3 +248,101 @@ export type GetAuthorisedResellerBrandResponse = BaseResponse & {
248
248
  /** Authorised reseller brand data */
249
249
  response: AuthorisedResellerBrandData;
250
250
  };
251
+ /**
252
+ * Parameters for getting BR shop onboarding info
253
+ */
254
+ export type GetBRShopOnboardingInfoParams = Record<string, never>;
255
+ /**
256
+ * Billing address information
257
+ */
258
+ export type BillingAddress = {
259
+ /** State of the billing address */
260
+ state?: string;
261
+ /** City of the billing address */
262
+ city?: string;
263
+ /** Specific detail of the billing address */
264
+ address?: string;
265
+ /** ZIP code of the billing address */
266
+ zipcode?: string;
267
+ /** Neighborhood of the billing address */
268
+ neighborhood?: string;
269
+ };
270
+ /**
271
+ * BR shop onboarding information
272
+ */
273
+ export type BRShopOnboardingInfo = {
274
+ /** Type of the shop's tax ID. 1: Personal seller (CPF), 2: Company seller (CNPJ) */
275
+ tax_id_type?: number;
276
+ /** The shop's tax ID. When tax_id_type = 1 (Personal seller), it is CPF. When tax_id_type = 2 (Company seller), it is CNPJ. */
277
+ tax_id?: string;
278
+ /** CPF number of the individual seller. Valid only when tax_id_type = 1. */
279
+ cpf_id?: string;
280
+ /** CNPJ number of the company seller. Valid only when tax_id_type = 2. */
281
+ cnpj_id?: string;
282
+ /** Full name of the individual seller. Valid only when tax_id_type = 1. */
283
+ name?: string;
284
+ /** Legal name of the company seller. Valid only when tax_id_type = 2. */
285
+ legal_entity_name?: string;
286
+ /** Birthday of the individual seller (stored as Unix timestamp). Valid only when tax_id_type = 1. */
287
+ birthday?: number;
288
+ /** Birthday of the individual seller (formatted as YYYY-MM-DD). Valid only when tax_id_type = 1. */
289
+ birthday_str?: string;
290
+ /** State registration number of the shop */
291
+ state_registration?: string;
292
+ /** Shop's billing address details */
293
+ billing_address?: BillingAddress;
294
+ /** Status of the shop's current KYC onboarding process. 0: None, 1: Regis Processing, 2: Regis Validated, 3: Regis Rejected, 4: KYC Pending, 5: KYC Processing, 6: KYC Processing Manually, 7: KYC Validated, 8: KYC Rejected */
295
+ onboarding_status?: number;
296
+ /** Timestamp when the onboarding information was submitted */
297
+ submission_time?: number;
298
+ /** Nationality of the individual seller. Valid only when tax_id_type=1. */
299
+ nationality?: string;
300
+ /** Main CNAE code */
301
+ cnae_main?: string;
302
+ /** Secondary CNAE code */
303
+ cnae_secondary?: string;
304
+ /** MEI verification result. 0: No, 1: Yes */
305
+ mei_check?: string;
306
+ /** Indicate if the shop has passed KYC verification */
307
+ onboarding_passed?: boolean;
308
+ };
309
+ /**
310
+ * Response for getting BR shop onboarding info
311
+ */
312
+ export type GetBRShopOnboardingInfoResponse = BaseResponse & {
313
+ /** Onboarding information of the Shop */
314
+ response?: BRShopOnboardingInfo;
315
+ };
316
+ /**
317
+ * Parameters for getting shop holiday mode
318
+ */
319
+ export type GetShopHolidayModeParams = Record<string, never>;
320
+ /**
321
+ * Response for getting shop holiday mode
322
+ */
323
+ export type GetShopHolidayModeResponse = BaseResponse & {
324
+ response?: {
325
+ /** Indicate whether the shop has enabled holiday mode. true means ON, false means OFF. */
326
+ holiday_mode_on?: boolean;
327
+ /** The last time the holiday mode was modified */
328
+ holiday_mode_mtime?: number;
329
+ /** Debug message */
330
+ debug_msg?: string;
331
+ };
332
+ };
333
+ /**
334
+ * Parameters for setting shop holiday mode
335
+ */
336
+ export type SetShopHolidayModeParams = {
337
+ /** Indicate whether to enable holiday mode for the shop. true means turn ON, false means turn OFF. */
338
+ holiday_mode_on: boolean;
339
+ };
340
+ /**
341
+ * Response for setting shop holiday mode
342
+ */
343
+ export type SetShopHolidayModeResponse = BaseResponse & {
344
+ response?: {
345
+ /** Debug message */
346
+ debug_msg?: string;
347
+ };
348
+ };