@congminh1254/shopee-sdk 1.4.0 → 1.5.3
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/lib/fetch.js +5 -0
- package/lib/fetch.js.map +1 -1
- package/lib/managers/ads.manager.d.ts +7 -0
- package/lib/managers/ads.manager.js +7 -0
- package/lib/managers/ads.manager.js.map +1 -1
- package/lib/managers/index.d.ts +1 -0
- package/lib/managers/index.js +1 -0
- package/lib/managers/index.js.map +1 -1
- package/lib/managers/logistics.manager.d.ts +13 -1
- package/lib/managers/logistics.manager.js +33 -0
- package/lib/managers/logistics.manager.js.map +1 -1
- package/lib/managers/product.manager.d.ts +9 -1
- package/lib/managers/product.manager.js +25 -0
- package/lib/managers/product.manager.js.map +1 -1
- package/lib/managers/shop.manager.d.ts +13 -1
- package/lib/managers/shop.manager.js +33 -0
- package/lib/managers/shop.manager.js.map +1 -1
- package/lib/managers/video.manager.d.ts +166 -0
- package/lib/managers/video.manager.js +273 -0
- package/lib/managers/video.manager.js.map +1 -0
- package/lib/schemas/logistics.d.ts +79 -17
- package/lib/schemas/order.js.map +1 -1
- package/lib/schemas/payment.d.ts +49 -14
- package/lib/schemas/product.d.ts +139 -0
- package/lib/schemas/shop.d.ts +98 -0
- package/lib/schemas/video.d.ts +688 -0
- package/lib/schemas/video.js +2 -0
- package/lib/schemas/video.js.map +1 -0
- package/lib/sdk.d.ts +2 -0
- package/lib/sdk.js +2 -0
- package/lib/sdk.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { BaseManager } from "./base.manager.js";
|
|
2
|
+
import { ShopeeConfig } from "../sdk.js";
|
|
3
|
+
import { DeleteVideoParams, DeleteVideoResponse, EditVideoInfoParams, EditVideoInfoResponse, GetCoverListParams, GetCoverListResponse, GetMetricTrendParams, GetMetricTrendResponse, GetOverviewPerformanceParams, GetOverviewPerformanceResponse, GetProductPerformanceListParams, GetProductPerformanceListResponse, GetUserDemographicsParams, GetUserDemographicsResponse, GetVideoDetailParams, GetVideoDetailResponse, GetVideoDetailAudienceDistributionParams, GetVideoDetailAudienceDistributionResponse, GetVideoDetailMetricTrendParams, GetVideoDetailMetricTrendResponse, GetVideoDetailPerformanceParams, GetVideoDetailPerformanceResponse, GetVideoDetailProductPerformanceParams, GetVideoDetailProductPerformanceResponse, GetVideoListParams, GetVideoListResponse, GetVideoPerformanceListParams, GetVideoPerformanceListResponse, PostVideoParams, PostVideoResponse } from "../schemas/video.js";
|
|
4
|
+
export declare class VideoManager extends BaseManager {
|
|
5
|
+
constructor(config: ShopeeConfig);
|
|
6
|
+
/**
|
|
7
|
+
* Delete video
|
|
8
|
+
*
|
|
9
|
+
* Use this API to delete videos. You can delete videos with draft status or post status.
|
|
10
|
+
*
|
|
11
|
+
* @param params - Parameters for deleting video
|
|
12
|
+
* @param params.videoUploadIdList - List of video_upload_ids to delete (for draft status)
|
|
13
|
+
* @param params.postIdList - List of post_ids to delete (for post status)
|
|
14
|
+
*
|
|
15
|
+
* @returns A promise that resolves to the delete response containing:
|
|
16
|
+
* - successList: List of videos deleted successfully
|
|
17
|
+
* - failureList: List of videos that failed to delete
|
|
18
|
+
*/
|
|
19
|
+
deleteVideo(params: DeleteVideoParams): Promise<DeleteVideoResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* Edit video information
|
|
22
|
+
*
|
|
23
|
+
* Use this API to edit video information including caption, cover image, linked products, and schedule settings.
|
|
24
|
+
*
|
|
25
|
+
* @param params - Parameters for editing video info
|
|
26
|
+
* @param params.videoUploadList - List of videos to edit (max 5)
|
|
27
|
+
*
|
|
28
|
+
* @returns A promise that resolves to the edit response containing:
|
|
29
|
+
* - successList: List of video_upload_ids edited successfully
|
|
30
|
+
* - failureList: List of video_upload_ids that failed to edit
|
|
31
|
+
*/
|
|
32
|
+
editVideoInfo(params: EditVideoInfoParams): Promise<EditVideoInfoResponse>;
|
|
33
|
+
/**
|
|
34
|
+
* Get cover list
|
|
35
|
+
*
|
|
36
|
+
* Use this API to get available cover images for a video.
|
|
37
|
+
*
|
|
38
|
+
* @param params - Parameters for getting cover list
|
|
39
|
+
* @param params.videoUploadId - ID of uploaded video
|
|
40
|
+
*
|
|
41
|
+
* @returns A promise that resolves to the cover list response
|
|
42
|
+
*/
|
|
43
|
+
getCoverList(params: GetCoverListParams): Promise<GetCoverListResponse>;
|
|
44
|
+
/**
|
|
45
|
+
* Get metric trend
|
|
46
|
+
*
|
|
47
|
+
* Use this API to get metric trends for videos over a time period.
|
|
48
|
+
*
|
|
49
|
+
* @param params - Parameters for getting metric trend
|
|
50
|
+
*
|
|
51
|
+
* @returns A promise that resolves to the metric trend response
|
|
52
|
+
*/
|
|
53
|
+
getMetricTrend(params: GetMetricTrendParams): Promise<GetMetricTrendResponse>;
|
|
54
|
+
/**
|
|
55
|
+
* Get overview performance
|
|
56
|
+
*
|
|
57
|
+
* Use this API to get overview performance metrics for videos.
|
|
58
|
+
*
|
|
59
|
+
* @param params - Parameters for getting overview performance
|
|
60
|
+
*
|
|
61
|
+
* @returns A promise that resolves to the overview performance response
|
|
62
|
+
*/
|
|
63
|
+
getOverviewPerformance(params: GetOverviewPerformanceParams): Promise<GetOverviewPerformanceResponse>;
|
|
64
|
+
/**
|
|
65
|
+
* Get product performance list
|
|
66
|
+
*
|
|
67
|
+
* Use this API to get performance metrics for products linked to videos.
|
|
68
|
+
*
|
|
69
|
+
* @param params - Parameters for getting product performance list
|
|
70
|
+
*
|
|
71
|
+
* @returns A promise that resolves to the product performance list response
|
|
72
|
+
*/
|
|
73
|
+
getProductPerformanceList(params: GetProductPerformanceListParams): Promise<GetProductPerformanceListResponse>;
|
|
74
|
+
/**
|
|
75
|
+
* Get user demographics
|
|
76
|
+
*
|
|
77
|
+
* Use this API to get demographic information of video viewers.
|
|
78
|
+
*
|
|
79
|
+
* @param params - Optional parameters (currently no parameters required)
|
|
80
|
+
*
|
|
81
|
+
* @returns A promise that resolves to the user demographics response
|
|
82
|
+
*/
|
|
83
|
+
getUserDemographics(params?: GetUserDemographicsParams): Promise<GetUserDemographicsResponse>;
|
|
84
|
+
/**
|
|
85
|
+
* Get video detail
|
|
86
|
+
*
|
|
87
|
+
* Use this API to get detailed information about a video.
|
|
88
|
+
*
|
|
89
|
+
* @param params - Parameters for getting video detail
|
|
90
|
+
*
|
|
91
|
+
* @returns A promise that resolves to the video detail response
|
|
92
|
+
*/
|
|
93
|
+
getVideoDetail(params: GetVideoDetailParams): Promise<GetVideoDetailResponse>;
|
|
94
|
+
/**
|
|
95
|
+
* Get video detail audience distribution
|
|
96
|
+
*
|
|
97
|
+
* Use this API to get audience distribution for a specific video.
|
|
98
|
+
*
|
|
99
|
+
* @param params - Parameters for getting video detail audience distribution
|
|
100
|
+
*
|
|
101
|
+
* @returns A promise that resolves to the video detail audience distribution response
|
|
102
|
+
*/
|
|
103
|
+
getVideoDetailAudienceDistribution(params: GetVideoDetailAudienceDistributionParams): Promise<GetVideoDetailAudienceDistributionResponse>;
|
|
104
|
+
/**
|
|
105
|
+
* Get video detail metric trend
|
|
106
|
+
*
|
|
107
|
+
* Use this API to get metric trends for a specific video.
|
|
108
|
+
*
|
|
109
|
+
* @param params - Parameters for getting video detail metric trend
|
|
110
|
+
*
|
|
111
|
+
* @returns A promise that resolves to the video detail metric trend response
|
|
112
|
+
*/
|
|
113
|
+
getVideoDetailMetricTrend(params: GetVideoDetailMetricTrendParams): Promise<GetVideoDetailMetricTrendResponse>;
|
|
114
|
+
/**
|
|
115
|
+
* Get video detail performance
|
|
116
|
+
*
|
|
117
|
+
* Use this API to get performance metrics for a specific video.
|
|
118
|
+
*
|
|
119
|
+
* @param params - Parameters for getting video detail performance
|
|
120
|
+
*
|
|
121
|
+
* @returns A promise that resolves to the video detail performance response
|
|
122
|
+
*/
|
|
123
|
+
getVideoDetailPerformance(params: GetVideoDetailPerformanceParams): Promise<GetVideoDetailPerformanceResponse>;
|
|
124
|
+
/**
|
|
125
|
+
* Get video detail product performance
|
|
126
|
+
*
|
|
127
|
+
* Use this API to get performance metrics for products linked to a specific video.
|
|
128
|
+
*
|
|
129
|
+
* @param params - Parameters for getting video detail product performance
|
|
130
|
+
*
|
|
131
|
+
* @returns A promise that resolves to the video detail product performance response
|
|
132
|
+
*/
|
|
133
|
+
getVideoDetailProductPerformance(params: GetVideoDetailProductPerformanceParams): Promise<GetVideoDetailProductPerformanceResponse>;
|
|
134
|
+
/**
|
|
135
|
+
* Get video list
|
|
136
|
+
*
|
|
137
|
+
* Use this API to get a list of videos.
|
|
138
|
+
*
|
|
139
|
+
* @param params - Parameters for getting video list
|
|
140
|
+
*
|
|
141
|
+
* @returns A promise that resolves to the video list response
|
|
142
|
+
*/
|
|
143
|
+
getVideoList(params: GetVideoListParams): Promise<GetVideoListResponse>;
|
|
144
|
+
/**
|
|
145
|
+
* Get video performance list
|
|
146
|
+
*
|
|
147
|
+
* Use this API to get performance metrics for multiple videos.
|
|
148
|
+
*
|
|
149
|
+
* @param params - Parameters for getting video performance list
|
|
150
|
+
*
|
|
151
|
+
* @returns A promise that resolves to the video performance list response
|
|
152
|
+
*/
|
|
153
|
+
getVideoPerformanceList(params: GetVideoPerformanceListParams): Promise<GetVideoPerformanceListResponse>;
|
|
154
|
+
/**
|
|
155
|
+
* Post video
|
|
156
|
+
*
|
|
157
|
+
* Use this API to post videos to Shopee Video.
|
|
158
|
+
*
|
|
159
|
+
* @param params - Parameters for posting video
|
|
160
|
+
*
|
|
161
|
+
* @returns A promise that resolves to the post video response containing:
|
|
162
|
+
* - successList: List of videos posted successfully
|
|
163
|
+
* - failureList: List of videos that failed to post
|
|
164
|
+
*/
|
|
165
|
+
postVideo(params: PostVideoParams): Promise<PostVideoResponse>;
|
|
166
|
+
}
|
|
@@ -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,MAAyB;QACzC,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,KAAK,CACtC,IAAI,CAAC,MAAM,EACX,qBAAqB,EACrB;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,MAAM;SACb,CACF,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,aAAa,CAAC,MAA2B;QAC7C,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,KAAK,CACtC,IAAI,CAAC,MAAM,EACX,wBAAwB,EACxB;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,MAAM;SACb,CACF,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,YAAY,CAAC,MAA0B;QAC3C,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,KAAK,CACtC,IAAI,CAAC,MAAM,EACX,uBAAuB,EACvB;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,IAAI;YACV,MAAM,E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AE,IAAI;YACV,MAAM,EAAE,MAGP;SACF,CACF,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,YAAY,CAAC,MAA0B;QAC3C,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,KAAK,CACtC,IAAI,CAAC,MAAM,EACX,uBAAuB,EACvB;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,MAGP;SACF,CACF,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,uBAAuB,CAC3B,MAAqC;QAErC,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,KAAK,CACtC,IAAI,CAAC,MAAM,EACX,mCAAmC,EACnC;YACE,MAAM,EAAE,KAAK;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"}
|
|
@@ -733,20 +733,20 @@ export interface CreateShippingDocumentResponse extends BaseResponse {
|
|
|
733
733
|
* Parameters for download shipping document
|
|
734
734
|
*/
|
|
735
735
|
export type DownloadShippingDocumentParams = {
|
|
736
|
-
/** List of
|
|
737
|
-
|
|
736
|
+
/** List of orders to download documents for */
|
|
737
|
+
order_list: Array<{
|
|
738
|
+
/** Order SN */
|
|
739
|
+
order_sn: string;
|
|
740
|
+
/** Package number (optional) */
|
|
741
|
+
package_number?: string;
|
|
742
|
+
}>;
|
|
738
743
|
/** Document type */
|
|
739
744
|
shipping_document_type: string;
|
|
740
|
-
}
|
|
745
|
+
};
|
|
741
746
|
/**
|
|
742
|
-
* Response for download shipping document API
|
|
747
|
+
* Response for download shipping document API (returns raw binary PDF)
|
|
743
748
|
*/
|
|
744
|
-
export
|
|
745
|
-
response?: {
|
|
746
|
-
/** URL to download document */
|
|
747
|
-
result?: string;
|
|
748
|
-
};
|
|
749
|
-
}
|
|
749
|
+
export type DownloadShippingDocumentResponse = Buffer;
|
|
750
750
|
/**
|
|
751
751
|
* Parameters for get shipping document parameter
|
|
752
752
|
*/
|
|
@@ -835,14 +835,9 @@ export type DownloadBookingShippingDocumentParams = {
|
|
|
835
835
|
shipping_document_type: string;
|
|
836
836
|
} & Record<string, string | number | boolean | null | undefined>;
|
|
837
837
|
/**
|
|
838
|
-
* Response for download booking shipping document API
|
|
838
|
+
* Response for download booking shipping document API (returns raw binary PDF)
|
|
839
839
|
*/
|
|
840
|
-
export
|
|
841
|
-
response?: {
|
|
842
|
-
/** URL to download document */
|
|
843
|
-
result?: string;
|
|
844
|
-
};
|
|
845
|
-
}
|
|
840
|
+
export type DownloadBookingShippingDocumentResponse = Buffer;
|
|
846
841
|
/**
|
|
847
842
|
* Parameters for get booking shipping document parameter
|
|
848
843
|
*/
|
|
@@ -1134,3 +1129,70 @@ export type BatchUpdateTPFWarehouseTrackingStatusParams = {
|
|
|
1134
1129
|
export interface BatchUpdateTPFWarehouseTrackingStatusResponse extends BaseResponse {
|
|
1135
1130
|
response?: Record<string, never>;
|
|
1136
1131
|
}
|
|
1132
|
+
/**
|
|
1133
|
+
* Parameters for check polygon update status
|
|
1134
|
+
*/
|
|
1135
|
+
export type CheckPolygonUpdateStatusParams = {
|
|
1136
|
+
/** ID that needs to be checked. Please pass the task_id returned via the v2.logistics.upload_serviceable_polygon. */
|
|
1137
|
+
task_id: string;
|
|
1138
|
+
} & Record<string, string | number | boolean | object | null | undefined>;
|
|
1139
|
+
/**
|
|
1140
|
+
* Response for check polygon update status API
|
|
1141
|
+
*/
|
|
1142
|
+
export interface CheckPolygonUpdateStatusResponse extends BaseResponse {
|
|
1143
|
+
response?: {
|
|
1144
|
+
/** Serviceable polygon file upload status. 0: Task completed, 1: Task in progress, 2: KML file related errors */
|
|
1145
|
+
status?: number;
|
|
1146
|
+
/** Details of the upload status, e.g "task in progress" */
|
|
1147
|
+
message?: string;
|
|
1148
|
+
};
|
|
1149
|
+
}
|
|
1150
|
+
/**
|
|
1151
|
+
* Parameters for update address
|
|
1152
|
+
*/
|
|
1153
|
+
export type UpdateAddressParams = {
|
|
1154
|
+
/** Unique identifier for the address. You can get the address_id via v2.logistics.get_address_list. */
|
|
1155
|
+
address_id: number;
|
|
1156
|
+
/** The region of the address. Note: Do not allow to update the region of the address. */
|
|
1157
|
+
region?: string;
|
|
1158
|
+
/** The state of the address. */
|
|
1159
|
+
state?: string;
|
|
1160
|
+
/** The city of the address. */
|
|
1161
|
+
city?: string;
|
|
1162
|
+
/** The district of the address. */
|
|
1163
|
+
district?: string;
|
|
1164
|
+
/** The town of the address. */
|
|
1165
|
+
town?: string;
|
|
1166
|
+
/** The detailed address description of the address. */
|
|
1167
|
+
address?: string;
|
|
1168
|
+
/** The zipcode of the address. */
|
|
1169
|
+
zipcode?: string;
|
|
1170
|
+
/** Recipient's name at this address. */
|
|
1171
|
+
name?: string;
|
|
1172
|
+
/** Contact phone number for the recipient. */
|
|
1173
|
+
phone?: string;
|
|
1174
|
+
/** 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. */
|
|
1175
|
+
geo_info?: string;
|
|
1176
|
+
} & Record<string, string | number | boolean | object | null | undefined>;
|
|
1177
|
+
/**
|
|
1178
|
+
* Response for update address API
|
|
1179
|
+
*/
|
|
1180
|
+
export interface UpdateAddressResponse extends BaseResponse {
|
|
1181
|
+
response?: Record<string, never>;
|
|
1182
|
+
}
|
|
1183
|
+
/**
|
|
1184
|
+
* Parameters for upload serviceable polygon
|
|
1185
|
+
*/
|
|
1186
|
+
export type UploadServiceablePolygonParams = {
|
|
1187
|
+
/** The .kml file to be uploaded to denote the serviceability area of the shops. */
|
|
1188
|
+
file: File | Blob;
|
|
1189
|
+
} & Record<string, string | number | boolean | object | null | undefined>;
|
|
1190
|
+
/**
|
|
1191
|
+
* Response for upload serviceable polygon API
|
|
1192
|
+
*/
|
|
1193
|
+
export interface UploadServiceablePolygonResponse extends BaseResponse {
|
|
1194
|
+
response?: {
|
|
1195
|
+
/** Use the task_id to call v2.logistics.check_polygon_update_status to check if the upload job has been completed. */
|
|
1196
|
+
task_id?: string;
|
|
1197
|
+
};
|
|
1198
|
+
}
|
package/lib/schemas/order.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order.js","sourceRoot":"","sources":["../../src/schemas/order.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"order.js","sourceRoot":"","sources":["../../src/schemas/order.ts"],"names":[],"mappings":"AAmXA,MAAM,CAAC,MAAM,iBAAiB,GAC5B,qbAAqb,CAAC"}
|
package/lib/schemas/payment.d.ts
CHANGED
|
@@ -366,28 +366,41 @@ export interface GetEscrowDetailBatchResponse extends BaseResponse {
|
|
|
366
366
|
* Parameters for getting wallet transaction list
|
|
367
367
|
*/
|
|
368
368
|
export type GetWalletTransactionListParams = {
|
|
369
|
+
/** Specifies the starting entry of data to return in the current call. Default is 1 */
|
|
370
|
+
page_no: number;
|
|
371
|
+
/** The number of records returned per page, min 1, max 100, default 40 */
|
|
372
|
+
page_size: number;
|
|
369
373
|
/** The start time of the query, timestamp */
|
|
370
|
-
create_time_from
|
|
374
|
+
create_time_from?: number;
|
|
371
375
|
/** The end time of the query, timestamp */
|
|
372
|
-
create_time_to
|
|
373
|
-
/**
|
|
374
|
-
|
|
375
|
-
/**
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
|
|
376
|
+
create_time_to?: number;
|
|
377
|
+
/** This field indicates the wallet type */
|
|
378
|
+
wallet_type?: string;
|
|
379
|
+
/** Transaction type filter */
|
|
380
|
+
transaction_type?: string;
|
|
381
|
+
/** Indicates whether user wants to return only MONEY_IN or MONEY_OUT transactions */
|
|
382
|
+
money_flow?: string;
|
|
383
|
+
/** Transaction tab type filter. Only 1 value can be provided per request */
|
|
384
|
+
transaction_tab_type?: string;
|
|
379
385
|
};
|
|
386
|
+
/**
|
|
387
|
+
* Pay order item within a wallet transaction
|
|
388
|
+
*/
|
|
389
|
+
export interface WalletTransactionPayOrder {
|
|
390
|
+
/** Shopee's unique identifier for an order */
|
|
391
|
+
order_sn: string;
|
|
392
|
+
/** Name of the shop */
|
|
393
|
+
shop_name: string;
|
|
394
|
+
}
|
|
380
395
|
/**
|
|
381
396
|
* Wallet transaction item
|
|
382
397
|
*/
|
|
383
398
|
export interface WalletTransaction {
|
|
384
|
-
/** Transaction ID */
|
|
385
|
-
transaction_id: number;
|
|
386
|
-
/** Transaction type */
|
|
387
|
-
transaction_type: string;
|
|
388
399
|
/** Transaction status */
|
|
389
400
|
status: string;
|
|
390
|
-
/**
|
|
401
|
+
/** Transaction type */
|
|
402
|
+
transaction_type: string;
|
|
403
|
+
/** Transaction amount */
|
|
391
404
|
amount: number;
|
|
392
405
|
/** Current balance after this transaction */
|
|
393
406
|
current_balance: number;
|
|
@@ -395,10 +408,32 @@ export interface WalletTransaction {
|
|
|
395
408
|
create_time: number;
|
|
396
409
|
/** Order SN if related to order */
|
|
397
410
|
order_sn?: string;
|
|
411
|
+
/** The serial number of return */
|
|
412
|
+
refund_sn?: string;
|
|
413
|
+
/** The type of withdrawal */
|
|
414
|
+
withdrawal_type?: string;
|
|
415
|
+
/** Transaction fee */
|
|
416
|
+
transaction_fee?: number;
|
|
417
|
+
/** Detailed description of TOPUP SUCCESS and TOPUP FAILED */
|
|
418
|
+
description?: string;
|
|
419
|
+
/** The name of buyer */
|
|
420
|
+
buyer_name?: string;
|
|
421
|
+
/** List of pay orders associated with this transaction */
|
|
422
|
+
pay_order_list?: WalletTransactionPayOrder[];
|
|
423
|
+
/** Name of the shop */
|
|
424
|
+
shop_name?: string;
|
|
398
425
|
/** Withdrawal ID if related to withdrawal */
|
|
399
426
|
withdrawal_id?: number;
|
|
400
427
|
/** Reason for transaction */
|
|
401
|
-
reason
|
|
428
|
+
reason?: string;
|
|
429
|
+
/** Indicates the event where a withdrawal is split into several withdrawals due to withdrawal limit */
|
|
430
|
+
root_withdrawal_id?: number;
|
|
431
|
+
/** Updated transaction tab type */
|
|
432
|
+
transaction_tab_type?: string;
|
|
433
|
+
/** Money flow direction: MONEY_IN or MONEY_OUT */
|
|
434
|
+
money_flow?: string;
|
|
435
|
+
/** The outlet shop name where this outlet transaction came from */
|
|
436
|
+
outlet_shop_name?: string;
|
|
402
437
|
}
|
|
403
438
|
/**
|
|
404
439
|
* Response for get wallet transaction list API
|