polyv-live-api-sdk 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/dist/auth/index.d.ts +9 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/signature.d.ts +67 -0
- package/dist/auth/signature.d.ts.map +1 -0
- package/dist/client.d.ts +209 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/constants/error-codes.d.ts +134 -0
- package/dist/constants/error-codes.d.ts.map +1 -0
- package/dist/constants/index.d.ts +8 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/errors/index.d.ts +11 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/polyv-api-error.d.ts +71 -0
- package/dist/errors/polyv-api-error.d.ts.map +1 -0
- package/dist/errors/polyv-error.d.ts +31 -0
- package/dist/errors/polyv-error.d.ts.map +1 -0
- package/dist/errors/polyv-validation-error.d.ts +72 -0
- package/dist/errors/polyv-validation-error.d.ts.map +1 -0
- package/dist/errors/type-guards.d.ts +19 -0
- package/dist/errors/type-guards.d.ts.map +1 -0
- package/dist/errors/types.d.ts +13 -0
- package/dist/errors/types.d.ts.map +1 -0
- package/dist/index.cjs +15295 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +19501 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15258 -0
- package/dist/index.js.map +1 -0
- package/dist/services/account.service.d.ts +402 -0
- package/dist/services/account.service.d.ts.map +1 -0
- package/dist/services/channel.service.d.ts +2033 -0
- package/dist/services/channel.service.d.ts.map +1 -0
- package/dist/services/chat.service.d.ts +592 -0
- package/dist/services/chat.service.d.ts.map +1 -0
- package/dist/services/finance.service.d.ts +160 -0
- package/dist/services/finance.service.d.ts.map +1 -0
- package/dist/services/group.service.d.ts +191 -0
- package/dist/services/group.service.d.ts.map +1 -0
- package/dist/services/index.d.ts +27 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/live-interaction.service.d.ts +474 -0
- package/dist/services/live-interaction.service.d.ts.map +1 -0
- package/dist/services/other.service.d.ts +687 -0
- package/dist/services/other.service.d.ts.map +1 -0
- package/dist/services/platform.service.d.ts +190 -0
- package/dist/services/platform.service.d.ts.map +1 -0
- package/dist/services/player.service.d.ts +195 -0
- package/dist/services/player.service.d.ts.map +1 -0
- package/dist/services/v4/ai.service.d.ts +205 -0
- package/dist/services/v4/ai.service.d.ts.map +1 -0
- package/dist/services/v4/channel.service.d.ts +854 -0
- package/dist/services/v4/channel.service.d.ts.map +1 -0
- package/dist/services/v4/chat.service.d.ts +199 -0
- package/dist/services/v4/chat.service.d.ts.map +1 -0
- package/dist/services/v4/global.service.d.ts +86 -0
- package/dist/services/v4/global.service.d.ts.map +1 -0
- package/dist/services/v4/group.service.d.ts +132 -0
- package/dist/services/v4/group.service.d.ts.map +1 -0
- package/dist/services/v4/material.service.d.ts +85 -0
- package/dist/services/v4/material.service.d.ts.map +1 -0
- package/dist/services/v4/platform.service.d.ts +148 -0
- package/dist/services/v4/platform.service.d.ts.map +1 -0
- package/dist/services/v4/robot.service.d.ts +144 -0
- package/dist/services/v4/robot.service.d.ts.map +1 -0
- package/dist/services/v4/statistics.service.d.ts +61 -0
- package/dist/services/v4/statistics.service.d.ts.map +1 -0
- package/dist/services/v4/user.service.d.ts +1014 -0
- package/dist/services/v4/user.service.d.ts.map +1 -0
- package/dist/services/v4/webapp.service.d.ts +131 -0
- package/dist/services/v4/webapp.service.d.ts.map +1 -0
- package/dist/services/web.service.d.ts +758 -0
- package/dist/services/web.service.d.ts.map +1 -0
- package/dist/types/account.d.ts +287 -0
- package/dist/types/account.d.ts.map +1 -0
- package/dist/types/auth.d.ts +31 -0
- package/dist/types/auth.d.ts.map +1 -0
- package/dist/types/callback.d.ts +156 -0
- package/dist/types/callback.d.ts.map +1 -0
- package/dist/types/channel.d.ts +2263 -0
- package/dist/types/channel.d.ts.map +1 -0
- package/dist/types/chat-banned.d.ts +366 -0
- package/dist/types/chat-banned.d.ts.map +1 -0
- package/dist/types/chat-censor-role.d.ts +190 -0
- package/dist/types/chat-censor-role.d.ts.map +1 -0
- package/dist/types/chat.d.ts +142 -0
- package/dist/types/chat.d.ts.map +1 -0
- package/dist/types/client.d.ts +43 -0
- package/dist/types/client.d.ts.map +1 -0
- package/dist/types/common.d.ts +52 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/finance.d.ts +252 -0
- package/dist/types/finance.d.ts.map +1 -0
- package/dist/types/group.d.ts +129 -0
- package/dist/types/group.d.ts.map +1 -0
- package/dist/types/index.d.ts +50 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/live-interaction.d.ts +301 -0
- package/dist/types/live-interaction.d.ts.map +1 -0
- package/dist/types/pagination.d.ts +37 -0
- package/dist/types/pagination.d.ts.map +1 -0
- package/dist/types/platform.d.ts +178 -0
- package/dist/types/platform.d.ts.map +1 -0
- package/dist/types/player.d.ts +177 -0
- package/dist/types/player.d.ts.map +1 -0
- package/dist/types/request.d.ts +45 -0
- package/dist/types/request.d.ts.map +1 -0
- package/dist/types/response.d.ts +58 -0
- package/dist/types/response.d.ts.map +1 -0
- package/dist/types/signature.d.ts +50 -0
- package/dist/types/signature.d.ts.map +1 -0
- package/dist/types/upload.d.ts +32 -0
- package/dist/types/upload.d.ts.map +1 -0
- package/dist/types/v4-ai.d.ts +379 -0
- package/dist/types/v4-ai.d.ts.map +1 -0
- package/dist/types/v4-channel.d.ts +2400 -0
- package/dist/types/v4-channel.d.ts.map +1 -0
- package/dist/types/v4-chat.d.ts +190 -0
- package/dist/types/v4-chat.d.ts.map +1 -0
- package/dist/types/v4-global.d.ts +150 -0
- package/dist/types/v4-global.d.ts.map +1 -0
- package/dist/types/v4-group.d.ts +212 -0
- package/dist/types/v4-group.d.ts.map +1 -0
- package/dist/types/v4-material.d.ts +141 -0
- package/dist/types/v4-material.d.ts.map +1 -0
- package/dist/types/v4-platform.d.ts +223 -0
- package/dist/types/v4-platform.d.ts.map +1 -0
- package/dist/types/v4-robot.d.ts +149 -0
- package/dist/types/v4-robot.d.ts.map +1 -0
- package/dist/types/v4-statistics.d.ts +87 -0
- package/dist/types/v4-statistics.d.ts.map +1 -0
- package/dist/types/v4-user.d.ts +1021 -0
- package/dist/types/v4-user.d.ts.map +1 -0
- package/dist/types/v4-webapp.d.ts +161 -0
- package/dist/types/v4-webapp.d.ts.map +1 -0
- package/dist/types/version.d.ts +21 -0
- package/dist/types/version.d.ts.map +1 -0
- package/dist/types/web.d.ts +868 -0
- package/dist/types/web.d.ts.map +1 -0
- package/dist/utils/env.d.ts +54 -0
- package/dist/utils/env.d.ts.map +1 -0
- package/dist/utils/index.d.ts +11 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/pagination.d.ts +62 -0
- package/dist/utils/pagination.d.ts.map +1 -0
- package/dist/utils/signature.d.ts +67 -0
- package/dist/utils/signature.d.ts.map +1 -0
- package/package.json +76 -0
|
@@ -0,0 +1,758 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Web Service
|
|
3
|
+
*
|
|
4
|
+
* Service for managing PolyV web page-related operations.
|
|
5
|
+
* Provides methods for web info, menu management, and more.
|
|
6
|
+
*
|
|
7
|
+
* @module services/web
|
|
8
|
+
*/
|
|
9
|
+
import type { PolyVClient } from '../client.js';
|
|
10
|
+
import type { GetSplashResponse, SetSplashParams, SetPublisherParams, UpdateChannelNameParams, UpdateChannelLogoParams, UpdateLikesParams, LiveLikesResponse, GetCountdownResponse, SetCountdownParams, GetMenuListParams, GetMenuListResponse, AddMenuParams, AddMenuResponse, DeleteMenuParams, UpdateMenuParams, SetMenuParams, UpdateRankParams, UpdateConsultingEnabledParams, GetTuwenListParams, GetTuwenListResponse, GetDonateResponse, GetWeixinShareResponse, UpdateCashParams, UpdateGoodParams, UpdateWeixinShareParams, UpdateGlobalEnabledParams, UploadImageParams, UploadImageResponse, WatchConditionResponse, GetWatchConditionParams, SetWatchConditionParams, SetAuthTypeParams, GetWhiteListParams, GetWhiteListResponse, AddWhiteListParams, UpdateWhiteListParams, DeleteWhiteListParams, UploadWhiteListParams, DownloadWhiteListParams, SetExternalAuthParams, SetCustomAuthParams, SetDirectAuthParams, DirectAuthParams, DirectAuthResponse, GetRecordFieldParams, RecordFieldResponse, GetRecordInfoParams, RecordInfoResponse, EnrollListParams, EnrollListResponse, DownloadRecordInfoParams, UpdateAuthUrlParams, SetAuthorizedAddressParams, CustomAuthInfoResponse, PolyvUrlResponse } from '../types/web.js';
|
|
11
|
+
/**
|
|
12
|
+
* WebService
|
|
13
|
+
*
|
|
14
|
+
* Provides methods to interact with PolyV Live Web APIs.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* const client = new PolyVClient({ appId: 'xxx', appSecret: 'yyy' });
|
|
19
|
+
* const splash = await client.web.getSplash('123456');
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare class WebService {
|
|
23
|
+
private client;
|
|
24
|
+
/**
|
|
25
|
+
* Create a new WebService instance
|
|
26
|
+
*
|
|
27
|
+
* @param client - The PolyVClient instance to use for API calls
|
|
28
|
+
*/
|
|
29
|
+
constructor(client: PolyVClient);
|
|
30
|
+
/**
|
|
31
|
+
* Get splash screen settings
|
|
32
|
+
* Query splash screen status and image URL for a channel
|
|
33
|
+
*
|
|
34
|
+
* @param channelId - Channel ID
|
|
35
|
+
* @returns Splash screen settings
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```typescript
|
|
39
|
+
* const splash = await client.web.getSplash('123456');
|
|
40
|
+
* console.log(splash.splashEnabled, splash.splashImg);
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
getSplash(channelId: string): Promise<GetSplashResponse>;
|
|
44
|
+
/**
|
|
45
|
+
* Set splash screen settings
|
|
46
|
+
* Configure splash screen on/off and optionally upload an image
|
|
47
|
+
*
|
|
48
|
+
* @param params - Set splash parameters
|
|
49
|
+
* @returns Image URL if uploaded, or "success"
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```typescript
|
|
53
|
+
* const result = await client.web.setSplash({
|
|
54
|
+
* channelId: '123456',
|
|
55
|
+
* splashEnabled: 'Y',
|
|
56
|
+
* });
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
setSplash(params: SetSplashParams): Promise<string>;
|
|
60
|
+
/**
|
|
61
|
+
* Set publisher name
|
|
62
|
+
* Set the publisher/host name for a channel or all channels
|
|
63
|
+
*
|
|
64
|
+
* @param params - Set publisher parameters
|
|
65
|
+
* @returns Channel ID on success
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```typescript
|
|
69
|
+
* const result = await client.web.setPublisher({
|
|
70
|
+
* userId: 'user123',
|
|
71
|
+
* publisher: 'John Doe',
|
|
72
|
+
* channelId: '123456',
|
|
73
|
+
* });
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
setPublisher(params: SetPublisherParams): Promise<string>;
|
|
77
|
+
/**
|
|
78
|
+
* Update channel name
|
|
79
|
+
* Change the name of a channel
|
|
80
|
+
*
|
|
81
|
+
* @param params - Update parameters
|
|
82
|
+
* @returns true on success
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```typescript
|
|
86
|
+
* const result = await client.web.updateChannelName({
|
|
87
|
+
* channelId: '123456',
|
|
88
|
+
* name: 'New Channel Name',
|
|
89
|
+
* });
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
updateChannelName(params: UpdateChannelNameParams): Promise<boolean>;
|
|
93
|
+
/**
|
|
94
|
+
* Update channel logo
|
|
95
|
+
* Upload a new logo image for a channel
|
|
96
|
+
*
|
|
97
|
+
* @param params - Update parameters including image file
|
|
98
|
+
* @returns Image URL on success
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```typescript
|
|
102
|
+
* const result = await client.web.updateChannelLogo({
|
|
103
|
+
* channelId: '123456',
|
|
104
|
+
* imgfile: imageFile,
|
|
105
|
+
* });
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
updateChannelLogo(params: UpdateChannelLogoParams): Promise<string>;
|
|
109
|
+
/**
|
|
110
|
+
* Get live likes for channels
|
|
111
|
+
* Query likes and viewers count for one or more channels
|
|
112
|
+
*
|
|
113
|
+
* @param channelIds - Comma-separated channel IDs (max 20)
|
|
114
|
+
* @returns Array of channel likes info
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* ```typescript
|
|
118
|
+
* const likes = await client.web.liveLikes('123456,789012');
|
|
119
|
+
* console.log(likes[0].likes, likes[0].viewers);
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
liveLikes(channelIds: string): Promise<LiveLikesResponse>;
|
|
123
|
+
/**
|
|
124
|
+
* Update likes and viewers count
|
|
125
|
+
* Modify the likes and/or viewers count for a channel
|
|
126
|
+
*
|
|
127
|
+
* @param params - Update parameters
|
|
128
|
+
* @returns "success" on success
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* ```typescript
|
|
132
|
+
* const result = await client.web.updateLikes({
|
|
133
|
+
* channelId: '123456',
|
|
134
|
+
* likes: 99999,
|
|
135
|
+
* viewers: 1000000,
|
|
136
|
+
* });
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
139
|
+
updateLikes(params: UpdateLikesParams): Promise<string>;
|
|
140
|
+
/**
|
|
141
|
+
* Get countdown settings
|
|
142
|
+
* Query countdown configuration for a channel
|
|
143
|
+
*
|
|
144
|
+
* @param channelId - Channel ID
|
|
145
|
+
* @returns Countdown settings
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* ```typescript
|
|
149
|
+
* const countdown = await client.web.getCountdown('123456');
|
|
150
|
+
* console.log(countdown.startTime, countdown.bookingEnabled);
|
|
151
|
+
* ```
|
|
152
|
+
*/
|
|
153
|
+
getCountdown(channelId: string): Promise<GetCountdownResponse>;
|
|
154
|
+
/**
|
|
155
|
+
* Set countdown settings
|
|
156
|
+
* Configure countdown and booking settings for a channel
|
|
157
|
+
*
|
|
158
|
+
* @param params - Set countdown parameters
|
|
159
|
+
* @returns Empty string on success
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* ```typescript
|
|
163
|
+
* const result = await client.web.setCountdown({
|
|
164
|
+
* channelId: '123456',
|
|
165
|
+
* bookingEnabled: 'Y',
|
|
166
|
+
* startTime: '2024-03-15 15:00:00',
|
|
167
|
+
* });
|
|
168
|
+
* ```
|
|
169
|
+
*/
|
|
170
|
+
setCountdown(params: SetCountdownParams): Promise<string>;
|
|
171
|
+
/**
|
|
172
|
+
* Get menu list for a channel
|
|
173
|
+
* Query all menus for a channel
|
|
174
|
+
*
|
|
175
|
+
* @param params - Query parameters
|
|
176
|
+
* @returns Array of menu items
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* ```typescript
|
|
180
|
+
* const menus = await client.web.getMenuList({ channelId: '123456' });
|
|
181
|
+
* console.log(menus);
|
|
182
|
+
* ```
|
|
183
|
+
*/
|
|
184
|
+
getMenuList(params: GetMenuListParams): Promise<GetMenuListResponse>;
|
|
185
|
+
/**
|
|
186
|
+
* Add a new menu
|
|
187
|
+
* Create a new menu for a channel
|
|
188
|
+
*
|
|
189
|
+
* @param params - Add menu parameters
|
|
190
|
+
* @returns Created menu details
|
|
191
|
+
*
|
|
192
|
+
* @example
|
|
193
|
+
* ```typescript
|
|
194
|
+
* const menu = await client.web.addMenu({
|
|
195
|
+
* channelId: '123456',
|
|
196
|
+
* name: 'My Menu',
|
|
197
|
+
* type: 'text',
|
|
198
|
+
* content: 'Menu content',
|
|
199
|
+
* });
|
|
200
|
+
* ```
|
|
201
|
+
*/
|
|
202
|
+
addMenu(params: AddMenuParams): Promise<AddMenuResponse>;
|
|
203
|
+
/**
|
|
204
|
+
* Delete menus
|
|
205
|
+
* Remove one or more menus from a channel
|
|
206
|
+
*
|
|
207
|
+
* @param params - Delete parameters
|
|
208
|
+
* @returns 1 on success
|
|
209
|
+
*
|
|
210
|
+
* @example
|
|
211
|
+
* ```typescript
|
|
212
|
+
* const result = await client.web.deleteMenu({ menuIds: 'menu1,menu2' });
|
|
213
|
+
* ```
|
|
214
|
+
*/
|
|
215
|
+
deleteMenu(params: DeleteMenuParams): Promise<number>;
|
|
216
|
+
/**
|
|
217
|
+
* Update menu content
|
|
218
|
+
* Modify the content of an existing menu
|
|
219
|
+
*
|
|
220
|
+
* @param params - Update parameters
|
|
221
|
+
* @returns "success" on success
|
|
222
|
+
*
|
|
223
|
+
* @example
|
|
224
|
+
* ```typescript
|
|
225
|
+
* const result = await client.web.updateMenu({
|
|
226
|
+
* menuId: 'menu123',
|
|
227
|
+
* content: 'Updated content',
|
|
228
|
+
* });
|
|
229
|
+
* ```
|
|
230
|
+
*/
|
|
231
|
+
updateMenu(params: UpdateMenuParams): Promise<string>;
|
|
232
|
+
/**
|
|
233
|
+
* Set menu (live introduction)
|
|
234
|
+
* Set the live introduction menu content
|
|
235
|
+
*
|
|
236
|
+
* @param params - Set menu parameters
|
|
237
|
+
* @returns "success" on success
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* ```typescript
|
|
241
|
+
* const result = await client.web.setMenu({
|
|
242
|
+
* userId: 'user123',
|
|
243
|
+
* channelId: '123456',
|
|
244
|
+
* menuType: 'desc',
|
|
245
|
+
* content: '<p>Introduction content</p>',
|
|
246
|
+
* });
|
|
247
|
+
* ```
|
|
248
|
+
*/
|
|
249
|
+
setMenu(params: SetMenuParams): Promise<string>;
|
|
250
|
+
/**
|
|
251
|
+
* Update menu rank (order)
|
|
252
|
+
* Reorder menus by specifying their order
|
|
253
|
+
*
|
|
254
|
+
* @param params - Update rank parameters
|
|
255
|
+
* @returns "success" on success
|
|
256
|
+
*
|
|
257
|
+
* @example
|
|
258
|
+
* ```typescript
|
|
259
|
+
* const result = await client.web.updateRank({
|
|
260
|
+
* channelId: '123456',
|
|
261
|
+
* menuIds: 'menu1,menu2,menu3',
|
|
262
|
+
* });
|
|
263
|
+
* ```
|
|
264
|
+
*/
|
|
265
|
+
updateRank(params: UpdateRankParams): Promise<string>;
|
|
266
|
+
/**
|
|
267
|
+
* Update consulting enabled
|
|
268
|
+
* Toggle the consulting/quiz feature on/off
|
|
269
|
+
*
|
|
270
|
+
* @param params - Update parameters
|
|
271
|
+
* @returns Empty string on success
|
|
272
|
+
*
|
|
273
|
+
* @example
|
|
274
|
+
* ```typescript
|
|
275
|
+
* const result = await client.web.updateConsultingEnabled({
|
|
276
|
+
* channelId: '123456',
|
|
277
|
+
* enabled: 'Y',
|
|
278
|
+
* });
|
|
279
|
+
* ```
|
|
280
|
+
*/
|
|
281
|
+
updateConsultingEnabled(params: UpdateConsultingEnabledParams): Promise<string>;
|
|
282
|
+
/**
|
|
283
|
+
* Get tuwen (image-text) list
|
|
284
|
+
* Query image-text content for a channel
|
|
285
|
+
*
|
|
286
|
+
* @param params - Query parameters
|
|
287
|
+
* @returns Tuwen content list with pagination
|
|
288
|
+
*
|
|
289
|
+
* @example
|
|
290
|
+
* ```typescript
|
|
291
|
+
* const tuwen = await client.web.getTuwenList({
|
|
292
|
+
* channelId: '123456',
|
|
293
|
+
* });
|
|
294
|
+
* console.log(tuwen.contents);
|
|
295
|
+
* ```
|
|
296
|
+
*/
|
|
297
|
+
getTuwenList(params: GetTuwenListParams): Promise<GetTuwenListResponse>;
|
|
298
|
+
/**
|
|
299
|
+
* Get donate settings
|
|
300
|
+
* Query channel donation settings
|
|
301
|
+
*
|
|
302
|
+
* @param channelId - Channel ID (optional, omit for global settings)
|
|
303
|
+
* @returns Donate settings
|
|
304
|
+
*
|
|
305
|
+
* @example
|
|
306
|
+
* ```typescript
|
|
307
|
+
* // Get channel donate settings
|
|
308
|
+
* const donate = await client.web.getDonate('123456');
|
|
309
|
+
* // Get global donate settings
|
|
310
|
+
* const globalDonate = await client.web.getDonate();
|
|
311
|
+
* ```
|
|
312
|
+
*/
|
|
313
|
+
getDonate(channelId?: string): Promise<GetDonateResponse>;
|
|
314
|
+
/**
|
|
315
|
+
* Get weixin share settings
|
|
316
|
+
* Query channel WeChat share information
|
|
317
|
+
*
|
|
318
|
+
* @param channelId - Channel ID (required)
|
|
319
|
+
* @returns WeChat share settings
|
|
320
|
+
*
|
|
321
|
+
* @example
|
|
322
|
+
* ```typescript
|
|
323
|
+
* const share = await client.web.getWeixinShare('123456');
|
|
324
|
+
* console.log(share.weixinShareTitle, share.weixinShareDesc);
|
|
325
|
+
* ```
|
|
326
|
+
*/
|
|
327
|
+
getWeixinShare(channelId: string): Promise<GetWeixinShareResponse>;
|
|
328
|
+
/**
|
|
329
|
+
* Update cash donation settings
|
|
330
|
+
* Configure cash donation options for a channel
|
|
331
|
+
*
|
|
332
|
+
* @param params - Update cash parameters
|
|
333
|
+
* @returns "success" on success
|
|
334
|
+
*
|
|
335
|
+
* @example
|
|
336
|
+
* ```typescript
|
|
337
|
+
* const result = await client.web.updateCash({
|
|
338
|
+
* channelId: '123456',
|
|
339
|
+
* cashes: [1, 2, 5, 10, 50, 100],
|
|
340
|
+
* cashMin: 1,
|
|
341
|
+
* enabled: 'Y',
|
|
342
|
+
* });
|
|
343
|
+
* ```
|
|
344
|
+
*/
|
|
345
|
+
updateCash(params: UpdateCashParams): Promise<string>;
|
|
346
|
+
/**
|
|
347
|
+
* Update goods donation settings
|
|
348
|
+
* Configure goods/gifts donation options for a channel
|
|
349
|
+
*
|
|
350
|
+
* @param params - Update good parameters
|
|
351
|
+
* @returns "success" on success
|
|
352
|
+
*
|
|
353
|
+
* @example
|
|
354
|
+
* ```typescript
|
|
355
|
+
* const result = await client.web.updateGood({
|
|
356
|
+
* channelId: '123456',
|
|
357
|
+
* goods: [
|
|
358
|
+
* { goodName: 'Rose', goodImg: 'http://...', goodPrice: 10, goodEnabled: 'Y' },
|
|
359
|
+
* ],
|
|
360
|
+
* enabled: 'Y',
|
|
361
|
+
* });
|
|
362
|
+
* ```
|
|
363
|
+
*/
|
|
364
|
+
updateGood(params: UpdateGoodParams): Promise<string>;
|
|
365
|
+
/**
|
|
366
|
+
* Update weixin share settings
|
|
367
|
+
* Configure WeChat share title and description for a channel
|
|
368
|
+
*
|
|
369
|
+
* @param params - Update weixin share parameters
|
|
370
|
+
* @returns "success" on success
|
|
371
|
+
*
|
|
372
|
+
* @example
|
|
373
|
+
* ```typescript
|
|
374
|
+
* const result = await client.web.updateWeixinShare({
|
|
375
|
+
* channelId: '123456',
|
|
376
|
+
* weixinShareTitle: 'My Live Stream',
|
|
377
|
+
* weixinShareDesc: 'Join my live stream!',
|
|
378
|
+
* });
|
|
379
|
+
* ```
|
|
380
|
+
*/
|
|
381
|
+
updateWeixinShare(params: UpdateWeixinShareParams): Promise<string>;
|
|
382
|
+
/**
|
|
383
|
+
* Update global enabled setting
|
|
384
|
+
* Enable or disable a global setting type for a channel
|
|
385
|
+
*
|
|
386
|
+
* @param params - Update global enabled parameters
|
|
387
|
+
* @returns "success" on success
|
|
388
|
+
*
|
|
389
|
+
* @example
|
|
390
|
+
* ```typescript
|
|
391
|
+
* // Enable donation setting for channel
|
|
392
|
+
* await client.web.updateGlobalEnabled({
|
|
393
|
+
* channelId: '123456',
|
|
394
|
+
* globalEnabledType: 'donate',
|
|
395
|
+
* enabled: 'Y',
|
|
396
|
+
* });
|
|
397
|
+
* ```
|
|
398
|
+
*/
|
|
399
|
+
updateGlobalEnabled(params: UpdateGlobalEnabledParams): Promise<string>;
|
|
400
|
+
/**
|
|
401
|
+
* Upload image
|
|
402
|
+
* Upload channel decoration images
|
|
403
|
+
*
|
|
404
|
+
* @param params - Upload image parameters
|
|
405
|
+
* @returns Array of uploaded image URLs
|
|
406
|
+
*
|
|
407
|
+
* @example
|
|
408
|
+
* ```typescript
|
|
409
|
+
* const urls = await client.web.uploadImage({
|
|
410
|
+
* type: 'coverImage',
|
|
411
|
+
* files: [imageFile],
|
|
412
|
+
* });
|
|
413
|
+
* console.log(urls[0]); // First uploaded image URL
|
|
414
|
+
* ```
|
|
415
|
+
*/
|
|
416
|
+
uploadImage(params: UploadImageParams): Promise<UploadImageResponse>;
|
|
417
|
+
/**
|
|
418
|
+
* Validate channel ID
|
|
419
|
+
*/
|
|
420
|
+
private validateChannelId;
|
|
421
|
+
/**
|
|
422
|
+
* Get watch condition
|
|
423
|
+
* Query channel watch condition settings
|
|
424
|
+
*
|
|
425
|
+
* @param params - Get watch condition parameters
|
|
426
|
+
* @returns Watch condition settings
|
|
427
|
+
*
|
|
428
|
+
* @example
|
|
429
|
+
* ```typescript
|
|
430
|
+
* // Get channel watch condition
|
|
431
|
+
* const condition = await client.web.getWatchCondition({ channelId: '123456' });
|
|
432
|
+
* // Get global watch condition
|
|
433
|
+
* const globalCondition = await client.web.getWatchCondition({});
|
|
434
|
+
* ```
|
|
435
|
+
*/
|
|
436
|
+
getWatchCondition(params: GetWatchConditionParams): Promise<WatchConditionResponse>;
|
|
437
|
+
/**
|
|
438
|
+
* Set watch condition
|
|
439
|
+
* Update channel watch condition settings
|
|
440
|
+
*
|
|
441
|
+
* @param params - Set watch condition parameters
|
|
442
|
+
* @returns "success" on success
|
|
443
|
+
*
|
|
444
|
+
* @example
|
|
445
|
+
* ```typescript
|
|
446
|
+
* const result = await client.web.setWatchCondition({
|
|
447
|
+
* channelId: '123456',
|
|
448
|
+
* authSettings: [
|
|
449
|
+
* { rank: 1, enabled: 'Y', authType: 'code', code: '123456' },
|
|
450
|
+
* ],
|
|
451
|
+
* });
|
|
452
|
+
* ```
|
|
453
|
+
*/
|
|
454
|
+
setWatchCondition(params: SetWatchConditionParams): Promise<string>;
|
|
455
|
+
/**
|
|
456
|
+
* Set auth type (simple version)
|
|
457
|
+
* Set channel authentication type
|
|
458
|
+
*
|
|
459
|
+
* @param params - Set auth type parameters
|
|
460
|
+
* @returns "success" on success
|
|
461
|
+
*
|
|
462
|
+
* @example
|
|
463
|
+
* ```typescript
|
|
464
|
+
* const result = await client.web.setAuthType({
|
|
465
|
+
* channelId: '123456',
|
|
466
|
+
* authType: 'none',
|
|
467
|
+
* });
|
|
468
|
+
* ```
|
|
469
|
+
*/
|
|
470
|
+
setAuthType(params: SetAuthTypeParams): Promise<string>;
|
|
471
|
+
/**
|
|
472
|
+
* Get white list
|
|
473
|
+
* Query channel white list with pagination
|
|
474
|
+
*
|
|
475
|
+
* @param params - Get white list parameters
|
|
476
|
+
* @returns Paginated white list
|
|
477
|
+
*
|
|
478
|
+
* @example
|
|
479
|
+
* ```typescript
|
|
480
|
+
* const result = await client.web.getWhiteList({
|
|
481
|
+
* rank: 1,
|
|
482
|
+
* channelId: '123456',
|
|
483
|
+
* page: 1,
|
|
484
|
+
* pageSize: 10,
|
|
485
|
+
* });
|
|
486
|
+
* ```
|
|
487
|
+
*/
|
|
488
|
+
getWhiteList(params: GetWhiteListParams): Promise<GetWhiteListResponse>;
|
|
489
|
+
/**
|
|
490
|
+
* Add white list item
|
|
491
|
+
* Add a single item to channel white list
|
|
492
|
+
*
|
|
493
|
+
* @param params - Add white list parameters
|
|
494
|
+
* @returns "success" or "true" on success
|
|
495
|
+
*
|
|
496
|
+
* @example
|
|
497
|
+
* ```typescript
|
|
498
|
+
* const result = await client.web.addWhiteList({
|
|
499
|
+
* rank: 1,
|
|
500
|
+
* code: '13800138000',
|
|
501
|
+
* name: 'John Doe',
|
|
502
|
+
* channelId: '123456',
|
|
503
|
+
* });
|
|
504
|
+
* ```
|
|
505
|
+
*/
|
|
506
|
+
addWhiteList(params: AddWhiteListParams): Promise<string>;
|
|
507
|
+
/**
|
|
508
|
+
* Update white list item
|
|
509
|
+
* Update a single item in channel white list
|
|
510
|
+
*
|
|
511
|
+
* @param params - Update white list parameters
|
|
512
|
+
* @returns "success" or "true" on success
|
|
513
|
+
*
|
|
514
|
+
* @example
|
|
515
|
+
* ```typescript
|
|
516
|
+
* const result = await client.web.updateWhiteList({
|
|
517
|
+
* rank: 1,
|
|
518
|
+
* code: '13800138000',
|
|
519
|
+
* name: 'Updated Name',
|
|
520
|
+
* channelId: '123456',
|
|
521
|
+
* });
|
|
522
|
+
* ```
|
|
523
|
+
*/
|
|
524
|
+
updateWhiteList(params: UpdateWhiteListParams): Promise<string>;
|
|
525
|
+
/**
|
|
526
|
+
* Delete white list items
|
|
527
|
+
* Delete one or more items from channel white list
|
|
528
|
+
*
|
|
529
|
+
* @param params - Delete white list parameters
|
|
530
|
+
* @returns "success" or "true" on success
|
|
531
|
+
*
|
|
532
|
+
* @example
|
|
533
|
+
* ```typescript
|
|
534
|
+
* const result = await client.web.deleteWhiteList({
|
|
535
|
+
* rank: 1,
|
|
536
|
+
* codes: '13800138000,13800138001',
|
|
537
|
+
* channelId: '123456',
|
|
538
|
+
* });
|
|
539
|
+
* ```
|
|
540
|
+
*/
|
|
541
|
+
deleteWhiteList(params: DeleteWhiteListParams): Promise<string>;
|
|
542
|
+
/**
|
|
543
|
+
* Upload white list
|
|
544
|
+
* Batch upload white list from Excel file
|
|
545
|
+
*
|
|
546
|
+
* @param params - Upload white list parameters
|
|
547
|
+
* @returns "true" on success
|
|
548
|
+
*
|
|
549
|
+
* @example
|
|
550
|
+
* ```typescript
|
|
551
|
+
* const result = await client.web.uploadWhiteList({
|
|
552
|
+
* rank: 1,
|
|
553
|
+
* file: excelFile,
|
|
554
|
+
* channelId: '123456',
|
|
555
|
+
* });
|
|
556
|
+
* ```
|
|
557
|
+
*/
|
|
558
|
+
uploadWhiteList(params: UploadWhiteListParams): Promise<string>;
|
|
559
|
+
/**
|
|
560
|
+
* Download white list template
|
|
561
|
+
* Download the white list Excel template
|
|
562
|
+
*
|
|
563
|
+
* @param params - Download white list parameters
|
|
564
|
+
* @returns File stream (binary data)
|
|
565
|
+
*
|
|
566
|
+
* @example
|
|
567
|
+
* ```typescript
|
|
568
|
+
* const result = await client.web.downloadWhiteList({
|
|
569
|
+
* rank: 1,
|
|
570
|
+
* channelId: '123456',
|
|
571
|
+
* });
|
|
572
|
+
* ```
|
|
573
|
+
*/
|
|
574
|
+
downloadWhiteList(params: DownloadWhiteListParams): Promise<unknown>;
|
|
575
|
+
/**
|
|
576
|
+
* Set external auth
|
|
577
|
+
* Configure external authorization settings
|
|
578
|
+
*
|
|
579
|
+
* @param params - Set external auth parameters
|
|
580
|
+
* @returns "success" on success
|
|
581
|
+
*
|
|
582
|
+
* @example
|
|
583
|
+
* ```typescript
|
|
584
|
+
* const result = await client.web.setExternalAuth({
|
|
585
|
+
* channelId: '123456',
|
|
586
|
+
* externalKey: 'your-key',
|
|
587
|
+
* externalUri: 'https://your-auth-server.com/auth',
|
|
588
|
+
* });
|
|
589
|
+
* ```
|
|
590
|
+
*/
|
|
591
|
+
setExternalAuth(params: SetExternalAuthParams): Promise<string>;
|
|
592
|
+
/**
|
|
593
|
+
* Set custom auth
|
|
594
|
+
* Configure custom authorization settings
|
|
595
|
+
*
|
|
596
|
+
* @param params - Set custom auth parameters
|
|
597
|
+
* @returns "success" on success
|
|
598
|
+
*
|
|
599
|
+
* @example
|
|
600
|
+
* ```typescript
|
|
601
|
+
* const result = await client.web.setCustomAuth({
|
|
602
|
+
* channelId: '123456',
|
|
603
|
+
* customKey: 'your-key',
|
|
604
|
+
* customUri: 'https://your-auth-server.com/custom',
|
|
605
|
+
* });
|
|
606
|
+
* ```
|
|
607
|
+
*/
|
|
608
|
+
setCustomAuth(params: SetCustomAuthParams): Promise<string>;
|
|
609
|
+
/**
|
|
610
|
+
* Set direct auth
|
|
611
|
+
* Configure direct authorization settings
|
|
612
|
+
*
|
|
613
|
+
* @param params - Set direct auth parameters
|
|
614
|
+
* @returns "success" on success
|
|
615
|
+
*
|
|
616
|
+
* @example
|
|
617
|
+
* ```typescript
|
|
618
|
+
* const result = await client.web.setDirectAuth({
|
|
619
|
+
* channelId: '123456',
|
|
620
|
+
* directKey: 'your-direct-key',
|
|
621
|
+
* });
|
|
622
|
+
* ```
|
|
623
|
+
*/
|
|
624
|
+
setDirectAuth(params: SetDirectAuthParams): Promise<string>;
|
|
625
|
+
/**
|
|
626
|
+
* Get direct auth
|
|
627
|
+
* Query direct authorization settings
|
|
628
|
+
*
|
|
629
|
+
* @param params - Direct auth parameters
|
|
630
|
+
* @returns Direct auth settings
|
|
631
|
+
*
|
|
632
|
+
* @example
|
|
633
|
+
* ```typescript
|
|
634
|
+
* const result = await client.web.directAuth({ channelId: '123456' });
|
|
635
|
+
* console.log(result.directKey);
|
|
636
|
+
* ```
|
|
637
|
+
*/
|
|
638
|
+
directAuth(params: DirectAuthParams): Promise<DirectAuthResponse>;
|
|
639
|
+
/**
|
|
640
|
+
* Get record field
|
|
641
|
+
* Query registration watching field settings
|
|
642
|
+
*
|
|
643
|
+
* @param params - Get record field parameters
|
|
644
|
+
* @returns Record field settings
|
|
645
|
+
*
|
|
646
|
+
* @example
|
|
647
|
+
* ```typescript
|
|
648
|
+
* const result = await client.web.getRecordField({ channelId: '123456' });
|
|
649
|
+
* console.log(result.infoFields);
|
|
650
|
+
* ```
|
|
651
|
+
*/
|
|
652
|
+
getRecordField(params: GetRecordFieldParams): Promise<RecordFieldResponse>;
|
|
653
|
+
/**
|
|
654
|
+
* Get record info
|
|
655
|
+
* Query registration watching information
|
|
656
|
+
*
|
|
657
|
+
* @param params - Get record info parameters
|
|
658
|
+
* @returns Record info list
|
|
659
|
+
*
|
|
660
|
+
* @example
|
|
661
|
+
* ```typescript
|
|
662
|
+
* const result = await client.web.getRecordInfo({ channelId: '123456' });
|
|
663
|
+
* console.log(result.contents);
|
|
664
|
+
* ```
|
|
665
|
+
*/
|
|
666
|
+
getRecordInfo(params: GetRecordInfoParams): Promise<RecordInfoResponse>;
|
|
667
|
+
/**
|
|
668
|
+
* Get enroll list
|
|
669
|
+
* Query enrollment/registration list
|
|
670
|
+
*
|
|
671
|
+
* @param params - Enroll list parameters
|
|
672
|
+
* @returns Enroll list with pagination
|
|
673
|
+
*
|
|
674
|
+
* @example
|
|
675
|
+
* ```typescript
|
|
676
|
+
* const result = await client.web.enrollList({
|
|
677
|
+
* channelId: '123456',
|
|
678
|
+
* page: 1,
|
|
679
|
+
* pageSize: 10,
|
|
680
|
+
* });
|
|
681
|
+
* ```
|
|
682
|
+
*/
|
|
683
|
+
enrollList(params: EnrollListParams): Promise<EnrollListResponse>;
|
|
684
|
+
/**
|
|
685
|
+
* Download record info
|
|
686
|
+
* Download registration watching information as file
|
|
687
|
+
*
|
|
688
|
+
* @param params - Download record info parameters
|
|
689
|
+
* @returns File stream (binary data)
|
|
690
|
+
*
|
|
691
|
+
* @example
|
|
692
|
+
* ```typescript
|
|
693
|
+
* const result = await client.web.downloadRecordInfo({ channelId: '123456' });
|
|
694
|
+
* ```
|
|
695
|
+
*/
|
|
696
|
+
downloadRecordInfo(params: DownloadRecordInfoParams): Promise<unknown>;
|
|
697
|
+
/**
|
|
698
|
+
* Update auth URL
|
|
699
|
+
* Update authorization redirect URL
|
|
700
|
+
*
|
|
701
|
+
* @param params - Update auth URL parameters
|
|
702
|
+
* @returns "success" on success
|
|
703
|
+
*
|
|
704
|
+
* @example
|
|
705
|
+
* ```typescript
|
|
706
|
+
* const result = await client.web.updateAuthUrl({
|
|
707
|
+
* channelId: '123456',
|
|
708
|
+
* authUrl: 'https://example.com/auth-callback',
|
|
709
|
+
* });
|
|
710
|
+
* ```
|
|
711
|
+
*/
|
|
712
|
+
updateAuthUrl(params: UpdateAuthUrlParams): Promise<string>;
|
|
713
|
+
/**
|
|
714
|
+
* Set authorized address
|
|
715
|
+
* Configure authorized IP addresses
|
|
716
|
+
*
|
|
717
|
+
* @param params - Set authorized address parameters
|
|
718
|
+
* @returns "success" on success
|
|
719
|
+
*
|
|
720
|
+
* @example
|
|
721
|
+
* ```typescript
|
|
722
|
+
* const result = await client.web.setAuthorizedAddress({
|
|
723
|
+
* channelId: '123456',
|
|
724
|
+
* authAddresses: '192.168.1.1,192.168.1.2',
|
|
725
|
+
* });
|
|
726
|
+
* ```
|
|
727
|
+
*/
|
|
728
|
+
setAuthorizedAddress(params: SetAuthorizedAddressParams): Promise<string>;
|
|
729
|
+
/**
|
|
730
|
+
* Get custom auth info (customauth2)
|
|
731
|
+
* Query custom authorization information
|
|
732
|
+
*
|
|
733
|
+
* @param channelId - Channel ID (required)
|
|
734
|
+
* @returns Custom auth info
|
|
735
|
+
*
|
|
736
|
+
* @example
|
|
737
|
+
* ```typescript
|
|
738
|
+
* const result = await client.web.customauth2('123456');
|
|
739
|
+
* console.log(result.customKey, result.customUri);
|
|
740
|
+
* ```
|
|
741
|
+
*/
|
|
742
|
+
customauth2(channelId: string): Promise<CustomAuthInfoResponse>;
|
|
743
|
+
/**
|
|
744
|
+
* Get PolyV URL
|
|
745
|
+
* Get PolyV authorization URL
|
|
746
|
+
*
|
|
747
|
+
* @param channelId - Channel ID (required)
|
|
748
|
+
* @returns PolyV auth URL
|
|
749
|
+
*
|
|
750
|
+
* @example
|
|
751
|
+
* ```typescript
|
|
752
|
+
* const result = await client.web.polyvUrl('123456');
|
|
753
|
+
* console.log(result.url);
|
|
754
|
+
* ```
|
|
755
|
+
*/
|
|
756
|
+
polyvUrl(channelId: string): Promise<PolyvUrlResponse>;
|
|
757
|
+
}
|
|
758
|
+
//# sourceMappingURL=web.service.d.ts.map
|