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.
Files changed (148) hide show
  1. package/dist/auth/index.d.ts +9 -0
  2. package/dist/auth/index.d.ts.map +1 -0
  3. package/dist/auth/signature.d.ts +67 -0
  4. package/dist/auth/signature.d.ts.map +1 -0
  5. package/dist/client.d.ts +209 -0
  6. package/dist/client.d.ts.map +1 -0
  7. package/dist/constants/error-codes.d.ts +134 -0
  8. package/dist/constants/error-codes.d.ts.map +1 -0
  9. package/dist/constants/index.d.ts +8 -0
  10. package/dist/constants/index.d.ts.map +1 -0
  11. package/dist/errors/index.d.ts +11 -0
  12. package/dist/errors/index.d.ts.map +1 -0
  13. package/dist/errors/polyv-api-error.d.ts +71 -0
  14. package/dist/errors/polyv-api-error.d.ts.map +1 -0
  15. package/dist/errors/polyv-error.d.ts +31 -0
  16. package/dist/errors/polyv-error.d.ts.map +1 -0
  17. package/dist/errors/polyv-validation-error.d.ts +72 -0
  18. package/dist/errors/polyv-validation-error.d.ts.map +1 -0
  19. package/dist/errors/type-guards.d.ts +19 -0
  20. package/dist/errors/type-guards.d.ts.map +1 -0
  21. package/dist/errors/types.d.ts +13 -0
  22. package/dist/errors/types.d.ts.map +1 -0
  23. package/dist/index.cjs +15295 -0
  24. package/dist/index.cjs.map +1 -0
  25. package/dist/index.d.cts +19501 -0
  26. package/dist/index.d.ts +18 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +15258 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/services/account.service.d.ts +402 -0
  31. package/dist/services/account.service.d.ts.map +1 -0
  32. package/dist/services/channel.service.d.ts +2033 -0
  33. package/dist/services/channel.service.d.ts.map +1 -0
  34. package/dist/services/chat.service.d.ts +592 -0
  35. package/dist/services/chat.service.d.ts.map +1 -0
  36. package/dist/services/finance.service.d.ts +160 -0
  37. package/dist/services/finance.service.d.ts.map +1 -0
  38. package/dist/services/group.service.d.ts +191 -0
  39. package/dist/services/group.service.d.ts.map +1 -0
  40. package/dist/services/index.d.ts +27 -0
  41. package/dist/services/index.d.ts.map +1 -0
  42. package/dist/services/live-interaction.service.d.ts +474 -0
  43. package/dist/services/live-interaction.service.d.ts.map +1 -0
  44. package/dist/services/other.service.d.ts +687 -0
  45. package/dist/services/other.service.d.ts.map +1 -0
  46. package/dist/services/platform.service.d.ts +190 -0
  47. package/dist/services/platform.service.d.ts.map +1 -0
  48. package/dist/services/player.service.d.ts +195 -0
  49. package/dist/services/player.service.d.ts.map +1 -0
  50. package/dist/services/v4/ai.service.d.ts +205 -0
  51. package/dist/services/v4/ai.service.d.ts.map +1 -0
  52. package/dist/services/v4/channel.service.d.ts +854 -0
  53. package/dist/services/v4/channel.service.d.ts.map +1 -0
  54. package/dist/services/v4/chat.service.d.ts +199 -0
  55. package/dist/services/v4/chat.service.d.ts.map +1 -0
  56. package/dist/services/v4/global.service.d.ts +86 -0
  57. package/dist/services/v4/global.service.d.ts.map +1 -0
  58. package/dist/services/v4/group.service.d.ts +132 -0
  59. package/dist/services/v4/group.service.d.ts.map +1 -0
  60. package/dist/services/v4/material.service.d.ts +85 -0
  61. package/dist/services/v4/material.service.d.ts.map +1 -0
  62. package/dist/services/v4/platform.service.d.ts +148 -0
  63. package/dist/services/v4/platform.service.d.ts.map +1 -0
  64. package/dist/services/v4/robot.service.d.ts +144 -0
  65. package/dist/services/v4/robot.service.d.ts.map +1 -0
  66. package/dist/services/v4/statistics.service.d.ts +61 -0
  67. package/dist/services/v4/statistics.service.d.ts.map +1 -0
  68. package/dist/services/v4/user.service.d.ts +1014 -0
  69. package/dist/services/v4/user.service.d.ts.map +1 -0
  70. package/dist/services/v4/webapp.service.d.ts +131 -0
  71. package/dist/services/v4/webapp.service.d.ts.map +1 -0
  72. package/dist/services/web.service.d.ts +758 -0
  73. package/dist/services/web.service.d.ts.map +1 -0
  74. package/dist/types/account.d.ts +287 -0
  75. package/dist/types/account.d.ts.map +1 -0
  76. package/dist/types/auth.d.ts +31 -0
  77. package/dist/types/auth.d.ts.map +1 -0
  78. package/dist/types/callback.d.ts +156 -0
  79. package/dist/types/callback.d.ts.map +1 -0
  80. package/dist/types/channel.d.ts +2263 -0
  81. package/dist/types/channel.d.ts.map +1 -0
  82. package/dist/types/chat-banned.d.ts +366 -0
  83. package/dist/types/chat-banned.d.ts.map +1 -0
  84. package/dist/types/chat-censor-role.d.ts +190 -0
  85. package/dist/types/chat-censor-role.d.ts.map +1 -0
  86. package/dist/types/chat.d.ts +142 -0
  87. package/dist/types/chat.d.ts.map +1 -0
  88. package/dist/types/client.d.ts +43 -0
  89. package/dist/types/client.d.ts.map +1 -0
  90. package/dist/types/common.d.ts +52 -0
  91. package/dist/types/common.d.ts.map +1 -0
  92. package/dist/types/finance.d.ts +252 -0
  93. package/dist/types/finance.d.ts.map +1 -0
  94. package/dist/types/group.d.ts +129 -0
  95. package/dist/types/group.d.ts.map +1 -0
  96. package/dist/types/index.d.ts +50 -0
  97. package/dist/types/index.d.ts.map +1 -0
  98. package/dist/types/live-interaction.d.ts +301 -0
  99. package/dist/types/live-interaction.d.ts.map +1 -0
  100. package/dist/types/pagination.d.ts +37 -0
  101. package/dist/types/pagination.d.ts.map +1 -0
  102. package/dist/types/platform.d.ts +178 -0
  103. package/dist/types/platform.d.ts.map +1 -0
  104. package/dist/types/player.d.ts +177 -0
  105. package/dist/types/player.d.ts.map +1 -0
  106. package/dist/types/request.d.ts +45 -0
  107. package/dist/types/request.d.ts.map +1 -0
  108. package/dist/types/response.d.ts +58 -0
  109. package/dist/types/response.d.ts.map +1 -0
  110. package/dist/types/signature.d.ts +50 -0
  111. package/dist/types/signature.d.ts.map +1 -0
  112. package/dist/types/upload.d.ts +32 -0
  113. package/dist/types/upload.d.ts.map +1 -0
  114. package/dist/types/v4-ai.d.ts +379 -0
  115. package/dist/types/v4-ai.d.ts.map +1 -0
  116. package/dist/types/v4-channel.d.ts +2400 -0
  117. package/dist/types/v4-channel.d.ts.map +1 -0
  118. package/dist/types/v4-chat.d.ts +190 -0
  119. package/dist/types/v4-chat.d.ts.map +1 -0
  120. package/dist/types/v4-global.d.ts +150 -0
  121. package/dist/types/v4-global.d.ts.map +1 -0
  122. package/dist/types/v4-group.d.ts +212 -0
  123. package/dist/types/v4-group.d.ts.map +1 -0
  124. package/dist/types/v4-material.d.ts +141 -0
  125. package/dist/types/v4-material.d.ts.map +1 -0
  126. package/dist/types/v4-platform.d.ts +223 -0
  127. package/dist/types/v4-platform.d.ts.map +1 -0
  128. package/dist/types/v4-robot.d.ts +149 -0
  129. package/dist/types/v4-robot.d.ts.map +1 -0
  130. package/dist/types/v4-statistics.d.ts +87 -0
  131. package/dist/types/v4-statistics.d.ts.map +1 -0
  132. package/dist/types/v4-user.d.ts +1021 -0
  133. package/dist/types/v4-user.d.ts.map +1 -0
  134. package/dist/types/v4-webapp.d.ts +161 -0
  135. package/dist/types/v4-webapp.d.ts.map +1 -0
  136. package/dist/types/version.d.ts +21 -0
  137. package/dist/types/version.d.ts.map +1 -0
  138. package/dist/types/web.d.ts +868 -0
  139. package/dist/types/web.d.ts.map +1 -0
  140. package/dist/utils/env.d.ts +54 -0
  141. package/dist/utils/env.d.ts.map +1 -0
  142. package/dist/utils/index.d.ts +11 -0
  143. package/dist/utils/index.d.ts.map +1 -0
  144. package/dist/utils/pagination.d.ts +62 -0
  145. package/dist/utils/pagination.d.ts.map +1 -0
  146. package/dist/utils/signature.d.ts +67 -0
  147. package/dist/utils/signature.d.ts.map +1 -0
  148. package/package.json +76 -0
@@ -0,0 +1,2033 @@
1
+ /**
2
+ * Channel Service
3
+ *
4
+ * Service for managing PolyV Live channels.
5
+ * Provides CRUD operations for channels including create, read, update, and delete.
6
+ *
7
+ * @module services/channel
8
+ */
9
+ import type { PolyVClient } from '../client.js';
10
+ import type { ChannelModel, ChannelDetail, CreateChannelRequest, CreateChannelV4Request, CreateChannelV4Response, UpdateChannelRequest, UpdateWatchConditionRequest, ChannelApiTokenResponse, GetChannelApiTokenRequest, GetTestModeTokenRequest, GetDocListRequest, DocListResponse, UploadDocRequest, UploadDocResponse, DocConvertStatusItem, MultimediaResourceVidListResponse, MultimediaResourceDetailResponse, PaginationParams, UserMultimediaResourceResponse, DocType, PlaybackListResponse, PlaybackListRequest, PlaybackSettingResponse, AddVodPlaybackRequest, ClipRecordFileRequest, RecordAddBreakpointRequest, PlayerLogoSettings, PlayerHeadSettings, PlayerStopSettings, GetProductClickStatsRequest, GetProductClickStatsResponse, GetProductListStatsRequest, GetProductListStatsResponse, GetRedpackStatsRequest, GetRedpackStatsResponse, ChannelSummaryItem, DailySummaryItem, ChannelPlaySummaryItem, ConcurrencyDataItem, RealtimeViewerDataItem, RealtimeViewerV1Item, SessionStatsResponse, GetViewlogPageResponse, UserViewlogItem, GetUserViewlogResponse, GetMicDetailListResponse, GetLinkMicDetailListResponse, ChannelStatisticData, RealviewersDataItem, ViewlogV2Item, GetViewlogPageV3Response, SetDiyUrlMarqueeRequest, GetSessionDataListRequest, GetSessionDataListResponse, ExportSessionStatsRequest, GetSessionByExternalRequest, GetSessionByExternalResponse, ListFileIdByExternalRequest, FileIdByExternalItem, RelevanceSessionRequest, LiveStatus, LiveStatusItem, GetStreamInfoResponse, GetStreamsItem, ListDiskVideoRequest, ListDiskVideoResponse, SetStatusRequest, BanPushRequest, EndDiskPushRequest, UpdateWarmupSwitchRequest, UpdateWarmupImageRequest, UpdateWarmupVideoRequest, AddChannelProductParams, AddChannelProductResponse, UpdateChannelProductParams, DeleteChannelProductParams } from '../types/channel.js';
11
+ /**
12
+ * ChannelService
13
+ *
14
+ * Provides methods to interact with PolyV Live Channel APIs.
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * const client = new PolyVClient({ appId: 'xxx', appSecret: 'yyy' });
19
+ * const channel = await client.channel.createChannel({
20
+ * name: 'My Channel',
21
+ * channelPasswd: 'password123',
22
+ * userId: 'user123',
23
+ * });
24
+ * ```
25
+ */
26
+ export declare class ChannelService {
27
+ private client;
28
+ /**
29
+ * Create a new ChannelService instance
30
+ *
31
+ * @param client - The PolyVClient instance to use for API calls
32
+ */
33
+ constructor(client: PolyVClient);
34
+ /**
35
+ * Validate create channel request parameters (V2 API - deprecated)
36
+ */
37
+ private validateCreateRequest;
38
+ /**
39
+ * Validate create channel V4 request parameters
40
+ */
41
+ private validateCreateV4Request;
42
+ /**
43
+ * Create a new channel (V4 API)
44
+ *
45
+ * Creates a new live streaming channel with the specified configuration.
46
+ * Uses the V4 API endpoint which requires JSON body for request parameters.
47
+ *
48
+ * @param request - Channel creation parameters (V4 format)
49
+ * @returns The created channel information
50
+ * @throws PolyVValidationError if request parameters are invalid
51
+ *
52
+ * @example
53
+ * ```typescript
54
+ * const channel = await channelService.createChannelV4({
55
+ * name: 'My Live Channel',
56
+ * newScene: 'alone',
57
+ * template: 'portrait_alone',
58
+ * channelPasswd: 'password123',
59
+ * pureRtcEnabled: 'N',
60
+ * linkMicLimit: 0,
61
+ * });
62
+ * ```
63
+ */
64
+ createChannelV4(request: CreateChannelV4Request): Promise<CreateChannelV4Response>;
65
+ /**
66
+ * Update channel watch condition
67
+ * 修改频道观看条件
68
+ *
69
+ * Sets the watch condition for a channel. Use this to configure access control.
70
+ * For public viewing, set authType to 'public' and enabled to 'Y'.
71
+ *
72
+ * @param request - Watch condition update parameters
73
+ * @returns true if update was successful
74
+ * @throws PolyVValidationError if request parameters are invalid
75
+ *
76
+ * @example
77
+ * ```typescript
78
+ * // Set to public viewing
79
+ * await channelService.updateWatchCondition({
80
+ * channelId: '123456',
81
+ * authSettings: [
82
+ * { rank: 1, enabled: 'Y', authType: 'public' },
83
+ * { rank: 2, enabled: 'N' }
84
+ * ]
85
+ * });
86
+ * ```
87
+ */
88
+ updateWatchCondition(request: UpdateWatchConditionRequest): Promise<boolean>;
89
+ /**
90
+ * Create a new channel (V2 API - deprecated)
91
+ *
92
+ * @deprecated Use createChannelV4 instead. This method uses the old V2 API.
93
+ * Creates a new live streaming channel with the specified configuration.
94
+ *
95
+ * @param request - Channel creation parameters
96
+ * @returns The created channel information
97
+ * @throws PolyVValidationError if request parameters are invalid
98
+ *
99
+ * @example
100
+ * ```typescript
101
+ * const channel = await channelService.createChannel({
102
+ * name: 'My Live Channel',
103
+ * channelPasswd: 'password123',
104
+ * userId: 'user123',
105
+ * scene: 'alone',
106
+ * });
107
+ * ```
108
+ */
109
+ createChannel(request: CreateChannelRequest): Promise<ChannelModel>;
110
+ /**
111
+ * Get channel details by ID
112
+ *
113
+ * Retrieves complete information about a specific channel.
114
+ *
115
+ * @param channelId - The channel ID to retrieve
116
+ * @returns Channel details including all configuration
117
+ *
118
+ * @example
119
+ * ```typescript
120
+ * const channel = await channelService.getChannel('ch123456');
121
+ * console.log(channel.name, channel.url);
122
+ * ```
123
+ */
124
+ getChannel(channelId: string): Promise<ChannelDetail>;
125
+ /**
126
+ * Update channel settings
127
+ *
128
+ * Performs a partial update on channel settings.
129
+ * Only provided fields will be updated.
130
+ *
131
+ * @param channelId - The channel ID to update
132
+ * @param request - Partial update parameters
133
+ * @returns Updated channel details
134
+ * @throws PolyVValidationError if request parameters are invalid
135
+ *
136
+ * @example
137
+ * ```typescript
138
+ * const updated = await channelService.updateChannel('ch123456', {
139
+ * name: 'New Channel Name',
140
+ * maxViewer: 2000,
141
+ * });
142
+ * ```
143
+ */
144
+ updateChannel(channelId: string, request: UpdateChannelRequest): Promise<ChannelDetail>;
145
+ /**
146
+ * Delete a channel
147
+ *
148
+ * Permanently deletes a channel. This action cannot be undone.
149
+ *
150
+ * @param channelId - The channel ID to delete
151
+ * @param userId - The user ID performing the deletion
152
+ * @returns true if deletion was successful
153
+ *
154
+ * @example
155
+ * ```typescript
156
+ * const success = await channelService.deleteChannel('ch123456', 'user123');
157
+ * if (success) {
158
+ * console.log('Channel deleted');
159
+ * }
160
+ * ```
161
+ */
162
+ deleteChannel(channelId: string, userId: string): Promise<boolean>;
163
+ /**
164
+ * Batch delete channels
165
+ *
166
+ * Permanently deletes multiple channels. This action cannot be undone.
167
+ * If the request fails, all channels fail (no partial success).
168
+ *
169
+ * @param channelIds - Array of channel IDs to delete (max 100 per request)
170
+ * @returns true if all deletions were successful
171
+ *
172
+ * @example
173
+ * ```typescript
174
+ * const success = await channelService.batchDeleteChannels(['ch123456', 'ch789012']);
175
+ * if (success) {
176
+ * console.log('All channels deleted');
177
+ * }
178
+ * ```
179
+ */
180
+ batchDeleteChannels(channelIds: string[]): Promise<boolean>;
181
+ /**
182
+ * Get channel API access token
183
+ *
184
+ * Generates a token for accessing channel-specific APIs.
185
+ * Note: Maximum 500 calls per hour per channel.
186
+ *
187
+ * @param channelId - The channel ID
188
+ * @param options - Optional token settings
189
+ * @returns Token with expiration time
190
+ * @throws PolyVValidationError if channelId is empty
191
+ *
192
+ * @example
193
+ * ```typescript
194
+ * const token = await channelService.getChannelApiAccessToken('ch123456');
195
+ * console.log(token.channelToken, token.expireTime);
196
+ * ```
197
+ */
198
+ getChannelApiAccessToken(channelId: string, options?: GetChannelApiTokenRequest): Promise<ChannelApiTokenResponse>;
199
+ /**
200
+ * Get test mode token
201
+ *
202
+ * Generates a token for testing the channel watch page.
203
+ * Default validity: 4 hours, maximum: 30 days.
204
+ *
205
+ * @param channelId - The channel ID
206
+ * @param options - Optional token settings
207
+ * @returns Test mode token string
208
+ * @throws PolyVValidationError if channelId is empty
209
+ *
210
+ * @example
211
+ * ```typescript
212
+ * const token = await channelService.getTestModeToken('ch123456');
213
+ * console.log(token);
214
+ * ```
215
+ */
216
+ getTestModeToken(channelId: string, options?: GetTestModeTokenRequest): Promise<string>;
217
+ /**
218
+ * Get document list
219
+ *
220
+ * Retrieves a paginated list of documents for a channel or teacher.
221
+ *
222
+ * @param options - Query options (channelId or teacherId required)
223
+ * @returns Paginated document list
224
+ *
225
+ * @example
226
+ * ```typescript
227
+ * const docs = await channelService.getDocList({ channelId: 'ch123456', page: 1, limit: 10 });
228
+ * console.log(docs.contents);
229
+ * ```
230
+ */
231
+ getDocList(options: GetDocListRequest): Promise<DocListResponse>;
232
+ /**
233
+ * Upload document
234
+ *
235
+ * Uploads a document to a channel from file or URL.
236
+ * Max file size: 200M. Supported formats: ppt, pdf, pptx, doc, docx, wps.
237
+ *
238
+ * @param channelId - The channel ID
239
+ * @param options - Upload options (file or url required)
240
+ * @returns Upload result with fileId and status
241
+ * @throws PolyVValidationError if channelId is empty or no file/url provided
242
+ *
243
+ * @example
244
+ * ```typescript
245
+ * const result = await channelService.uploadDoc('ch123456', {
246
+ * url: 'https://example.com/document.pdf',
247
+ * docName: 'My Document',
248
+ * });
249
+ * console.log(result.fileId);
250
+ * ```
251
+ */
252
+ uploadDoc(channelId: string, options: UploadDocRequest): Promise<UploadDocResponse>;
253
+ /**
254
+ * Delete document
255
+ *
256
+ * Deletes one or more documents from a channel.
257
+ *
258
+ * @param channelId - The channel ID
259
+ * @param fileId - File ID(s), comma-separated for multiple
260
+ * @param type - Document type (old or new)
261
+ * @returns true if deletion was successful
262
+ * @throws PolyVValidationError if required parameters are empty
263
+ *
264
+ * @example
265
+ * ```typescript
266
+ * const success = await channelService.deleteDocument('ch123456', 'file123', 'new');
267
+ * ```
268
+ */
269
+ deleteDocument(channelId: string, fileId: string, type: DocType): Promise<boolean>;
270
+ /**
271
+ * Get document convert status
272
+ *
273
+ * Retrieves the conversion status of one or more documents.
274
+ *
275
+ * @param channelId - The channel ID
276
+ * @param fileId - File ID(s), comma-separated for multiple
277
+ * @returns Array of document conversion status items
278
+ * @throws PolyVValidationError if required parameters are empty
279
+ *
280
+ * @example
281
+ * ```typescript
282
+ * const status = await channelService.getDocConvertStatus('ch123456', 'file123');
283
+ * console.log(status[0].convertStatus);
284
+ * ```
285
+ */
286
+ getDocConvertStatus(channelId: string, fileId: string): Promise<DocConvertStatusItem[]>;
287
+ /**
288
+ * Update teacher document relation
289
+ *
290
+ * Adds or removes the binding between a teacher and documents.
291
+ * Note: fileIds is passed in the body, other parameters in query string.
292
+ *
293
+ * @param teacherId - The teacher ID
294
+ * @param fileIds - File IDs, comma-separated
295
+ * @param operation - 1 to add binding, 2 to remove binding
296
+ * @returns true if operation was successful
297
+ * @throws PolyVValidationError if required parameters are empty
298
+ *
299
+ * @example
300
+ * ```typescript
301
+ * // Add binding
302
+ * await channelService.updateTeacherDocRelation('teacher123', 'file1,file2', 1);
303
+ * // Remove binding
304
+ * await channelService.updateTeacherDocRelation('teacher123', 'file1', 2);
305
+ * ```
306
+ */
307
+ updateTeacherDocRelation(teacherId: string, fileIds: string, operation: 1 | 2): Promise<boolean>;
308
+ /**
309
+ * Get channel multimedia resource VID list
310
+ *
311
+ * Retrieves the list of video IDs associated with a channel.
312
+ *
313
+ * @param channelId - The channel ID
314
+ * @param options - Pagination options
315
+ * @returns Paginated VID list
316
+ * @throws PolyVValidationError if channelId is empty
317
+ *
318
+ * @example
319
+ * ```typescript
320
+ * const vids = await channelService.getChannelMultimediaResourceList('ch123456');
321
+ * console.log(vids.contents);
322
+ * ```
323
+ */
324
+ getChannelMultimediaResourceList(channelId: string, options?: PaginationParams): Promise<MultimediaResourceVidListResponse>;
325
+ /**
326
+ * Get channel multimedia resource details
327
+ *
328
+ * Retrieves detailed information about videos associated with a channel.
329
+ *
330
+ * @param channelId - The channel ID
331
+ * @param options - Pagination options
332
+ * @returns Paginated resource details
333
+ *
334
+ * @example
335
+ * ```typescript
336
+ * const details = await channelService.getChannelMultimediaResourceDetail('ch123456');
337
+ * console.log(details.contents[0].title);
338
+ * ```
339
+ */
340
+ getChannelMultimediaResourceDetail(channelId: string, options?: PaginationParams): Promise<MultimediaResourceDetailResponse>;
341
+ /**
342
+ * Link multimedia resources to channel
343
+ *
344
+ * Associates one or more videos with a channel.
345
+ *
346
+ * @param channelId - The channel ID
347
+ * @param vids - Video IDs, comma-separated
348
+ * @returns true if operation was successful
349
+ * @throws PolyVValidationError if required parameters are empty
350
+ *
351
+ * @example
352
+ * ```typescript
353
+ * await channelService.linkChannelMultimediaResource('ch123456', 'vid1,vid2');
354
+ * ```
355
+ */
356
+ linkChannelMultimediaResource(channelId: string, vids: string): Promise<boolean>;
357
+ /**
358
+ * Unlink multimedia resources from channel
359
+ *
360
+ * Removes the association between videos and a channel.
361
+ *
362
+ * @param channelId - The channel ID
363
+ * @param vids - Video IDs, comma-separated
364
+ * @returns true if operation was successful
365
+ * @throws PolyVValidationError if required parameters are empty
366
+ *
367
+ * @example
368
+ * ```typescript
369
+ * await channelService.unlinkChannelMultimediaResource('ch123456', 'vid1');
370
+ * ```
371
+ */
372
+ unlinkChannelMultimediaResource(channelId: string, vids: string): Promise<boolean>;
373
+ /**
374
+ * Get user multimedia resource details
375
+ *
376
+ * Retrieves detailed information about user's videos.
377
+ * Maximum 100 VIDs per request.
378
+ *
379
+ * @param vids - Video IDs, comma-separated (max 100)
380
+ * @returns User multimedia resource details
381
+ * @throws PolyVValidationError if vids is empty
382
+ *
383
+ * @example
384
+ * ```typescript
385
+ * const details = await channelService.getUserMultimediaResourceDetail('vid1,vid2');
386
+ * console.log(details.contents[0].title);
387
+ * ```
388
+ */
389
+ getUserMultimediaResourceDetail(vids: string): Promise<UserMultimediaResourceResponse>;
390
+ /**
391
+ * Delete user multimedia resources
392
+ *
393
+ * Deletes one or more videos from the user's account.
394
+ * Maximum 100 VIDs per request.
395
+ *
396
+ * @param vids - Video IDs, comma-separated (max 100)
397
+ * @returns true if deletion was successful
398
+ * @throws PolyVValidationError if vids is empty
399
+ *
400
+ * @example
401
+ * ```typescript
402
+ * await channelService.deleteUserMultimediaResource('vid1,vid2');
403
+ * ```
404
+ */
405
+ deleteUserMultimediaResource(vids: string): Promise<boolean>;
406
+ /**
407
+ * Get HLS pull URL
408
+ *
409
+ * Gets the HLS pull URL for monitoring the channel stream.
410
+ *
411
+ * @param channelId - The channel ID
412
+ * @returns HLS pull URL string
413
+ * @throws PolyVValidationError if channelId is empty
414
+ *
415
+ * @example
416
+ * ```typescript
417
+ * const url = await channelService.getHlsPullUrl('ch123456');
418
+ * console.log(url);
419
+ * ```
420
+ */
421
+ getHlsPullUrl(channelId: string): Promise<string>;
422
+ /**
423
+ * Get push URL
424
+ *
425
+ * Gets the RTMP push URL for streaming to the channel.
426
+ *
427
+ * @param channelId - The channel ID
428
+ * @returns Push URL string
429
+ * @throws PolyVValidationError if channelId is empty
430
+ *
431
+ * @example
432
+ * ```typescript
433
+ * const url = await channelService.getPushUrl('ch123456');
434
+ * console.log(url);
435
+ * ```
436
+ */
437
+ getPushUrl(channelId: string): Promise<string>;
438
+ /**
439
+ * Create channel (v3)
440
+ *
441
+ * Creates a new channel with full configuration support including auth, playback, teacher, and roles.
442
+ *
443
+ * @param request - Channel creation parameters
444
+ * @returns Created channel information
445
+ * @throws PolyVValidationError if required parameters are missing
446
+ *
447
+ * @example
448
+ * ```typescript
449
+ * const channel = await channelService.createChannelV3({
450
+ * name: 'My Channel',
451
+ * channelPasswd: 'password123',
452
+ * userId: 'user123',
453
+ * });
454
+ * console.log(channel.channelId);
455
+ * ```
456
+ */
457
+ createChannelV3(request: import('../types/channel.js').CreateChannelV3Request): Promise<import('../types/channel.js').CreateChannelV3Response>;
458
+ /**
459
+ * Copy channel
460
+ *
461
+ * Creates a copy of an existing channel.
462
+ *
463
+ * @param channelId - The channel ID to copy
464
+ * @param options - Optional copy settings (name, categoryId, startTime, subAccount)
465
+ * @returns New channel ID
466
+ * @throws PolyVValidationError if channelId is empty
467
+ *
468
+ * @example
469
+ * ```typescript
470
+ * const newChannelId = await channelService.copyChannel('ch123456', { name: 'Copy of My Channel' });
471
+ * console.log(newChannelId);
472
+ * ```
473
+ */
474
+ copyChannel(channelId: string, options?: import('../types/channel.js').CopyChannelOptions): Promise<number>;
475
+ /**
476
+ * Set max viewer
477
+ *
478
+ * Sets the maximum number of concurrent viewers for a channel.
479
+ *
480
+ * @param channelId - The channel ID
481
+ * @param userId - The user ID
482
+ * @param maxViewer - Maximum viewer count
483
+ * @returns Success message
484
+ * @throws PolyVValidationError if required parameters are missing
485
+ *
486
+ * @example
487
+ * ```typescript
488
+ * const result = await channelService.setMaxViewer('ch123456', 'user123', 1000);
489
+ * console.log(result);
490
+ * ```
491
+ */
492
+ setMaxViewer(channelId: string, userId: string, maxViewer: number): Promise<string>;
493
+ /**
494
+ * Update channel password
495
+ *
496
+ * Updates the password for a specific channel or all channels.
497
+ *
498
+ * @param userId - The user ID
499
+ * @param passwd - New password
500
+ * @param channelId - Optional channel ID (if not provided, updates all channels)
501
+ * @returns true if update was successful
502
+ * @throws PolyVValidationError if required parameters are missing
503
+ *
504
+ * @example
505
+ * ```typescript
506
+ * // Update specific channel password
507
+ * await channelService.updateChannelPassword('user123', 'newpass', 'ch123456');
508
+ * // Update all channels password
509
+ * await channelService.updateChannelPassword('user123', 'newpass');
510
+ * ```
511
+ */
512
+ updateChannelPassword(userId: string, passwd: string, channelId?: string): Promise<boolean>;
513
+ /**
514
+ * Update callback setting
515
+ *
516
+ * Updates callback URLs for various channel events.
517
+ *
518
+ * @param channelId - The channel ID
519
+ * @param options - Callback URL settings
520
+ * @returns null on success
521
+ * @throws PolyVValidationError if channelId is empty
522
+ *
523
+ * @example
524
+ * ```typescript
525
+ * await channelService.updateCallbackSetting('ch123456', {
526
+ * recordCallbackUrl: 'https://example.com/callback',
527
+ * });
528
+ * ```
529
+ */
530
+ updateCallbackSetting(channelId: string, options: Omit<import('../types/channel.js').UpdateCallbackSettingRequest, 'channelId'>): Promise<null>;
531
+ /**
532
+ * Get callback setting
533
+ *
534
+ * Retrieves the callback URL settings for a channel.
535
+ *
536
+ * @param channelId - The channel ID
537
+ * @returns Callback settings
538
+ * @throws PolyVValidationError if channelId is empty
539
+ *
540
+ * @example
541
+ * ```typescript
542
+ * const settings = await channelService.getCallbackSetting('ch123456');
543
+ * console.log(settings.recordCallbackUrl);
544
+ * ```
545
+ */
546
+ getCallbackSetting(channelId: string): Promise<import('../types/channel.js').CallbackSettingResponse>;
547
+ /**
548
+ * Add account (role)
549
+ *
550
+ * Creates a new assistant or guest account for a channel.
551
+ *
552
+ * @param channelId - The channel ID
553
+ * @param options - Account creation options
554
+ * @returns Created account information
555
+ * @throws PolyVValidationError if channelId is empty
556
+ *
557
+ * @example
558
+ * ```typescript
559
+ * const account = await channelService.addAccount('ch123456', {
560
+ * role: 'Assistant',
561
+ * nickname: 'My Assistant',
562
+ * password: 'password123',
563
+ * });
564
+ * console.log(account.account);
565
+ * ```
566
+ */
567
+ addAccount(channelId: string, options?: import('../types/channel.js').AddAccountRequest): Promise<import('../types/channel.js').AccountModel>;
568
+ /**
569
+ * Get account
570
+ *
571
+ * Retrieves a specific account by account ID.
572
+ *
573
+ * @param channelId - The channel ID
574
+ * @param account - The account identifier
575
+ * @returns Account information
576
+ * @throws PolyVValidationError if required parameters are empty
577
+ *
578
+ * @example
579
+ * ```typescript
580
+ * const account = await channelService.getAccount('ch123456', 'account123');
581
+ * console.log(account.nickname);
582
+ * ```
583
+ */
584
+ getAccount(channelId: string, account: string): Promise<import('../types/channel.js').AccountModel>;
585
+ /**
586
+ * Get accounts
587
+ *
588
+ * Retrieves all accounts for a channel.
589
+ *
590
+ * @param channelId - The channel ID
591
+ * @returns Array of accounts
592
+ * @throws PolyVValidationError if channelId is empty
593
+ *
594
+ * @example
595
+ * ```typescript
596
+ * const accounts = await channelService.getAccounts('ch123456');
597
+ * console.log(accounts.length);
598
+ * ```
599
+ */
600
+ getAccounts(channelId: string): Promise<import('../types/channel.js').AccountModel[]>;
601
+ /**
602
+ * Update account
603
+ *
604
+ * Updates an existing account's information.
605
+ *
606
+ * @param channelId - The channel ID
607
+ * @param account - The account identifier
608
+ * @param options - Update options
609
+ * @returns Updated account information
610
+ * @throws PolyVValidationError if channelId is empty
611
+ *
612
+ * @example
613
+ * ```typescript
614
+ * const updated = await channelService.updateAccount('ch123456', 'account123', {
615
+ * nickname: 'New Nickname',
616
+ * });
617
+ * console.log(updated.nickname);
618
+ * ```
619
+ */
620
+ updateAccount(channelId: string, account: string, options?: import('../types/channel.js').UpdateAccountRequest): Promise<import('../types/channel.js').AccountModel>;
621
+ /**
622
+ * Delete account
623
+ *
624
+ * Deletes an account from a channel.
625
+ *
626
+ * @param channelId - The channel ID
627
+ * @param account - The account identifier
628
+ * @returns true if deletion was successful
629
+ * @throws PolyVValidationError if required parameters are empty
630
+ *
631
+ * @example
632
+ * ```typescript
633
+ * const success = await channelService.deleteAccount('ch123456', 'account123');
634
+ * console.log(success);
635
+ * ```
636
+ */
637
+ deleteAccount(channelId: string, account: string): Promise<boolean>;
638
+ /**
639
+ * Batch create accounts
640
+ *
641
+ * Creates multiple accounts for a channel at once.
642
+ *
643
+ * @param channelId - The channel ID
644
+ * @param accounts - Array of account creation items
645
+ * @returns Array of created accounts
646
+ * @throws PolyVValidationError if channelId is empty
647
+ *
648
+ * @example
649
+ * ```typescript
650
+ * const accounts = await channelService.batchCreateAccounts('ch123456', [
651
+ * { role: 'Assistant', nickname: 'Assistant 1', passwd: 'pass1' },
652
+ * { role: 'Guest', nickname: 'Guest 1', passwd: 'pass2' },
653
+ * ]);
654
+ * console.log(accounts.length);
655
+ * ```
656
+ */
657
+ batchCreateAccounts(channelId: string, accounts: import('../types/channel.js').BatchCreateAccountItem[]): Promise<import('../types/channel.js').AccountModel[]>;
658
+ /**
659
+ * Get playback list
660
+ *
661
+ * Retrieves the list of playback videos in the channel's video library.
662
+ *
663
+ * @param channelId - The channel ID
664
+ * @param options - Query options
665
+ * @returns Paginated playback video list
666
+ * @throws PolyVValidationError if channelId is empty
667
+ *
668
+ * @example
669
+ * ```typescript
670
+ * const list = await channelService.getPlaybackList('ch123456', { listType: 'playback', pageSize: 10 });
671
+ * console.log(list.contents);
672
+ * ```
673
+ */
674
+ getPlaybackList(channelId: string, options?: PlaybackListRequest): Promise<PlaybackListResponse>;
675
+ /**
676
+ * Delete playback
677
+ *
678
+ * Deletes a video from the channel's playback video library.
679
+ * Note: This only removes from the channel list, the video still exists in the VOD backend.
680
+ *
681
+ * @param channelId - The channel ID
682
+ * @param videoId - The video ID to delete
683
+ * @param listType - The list type (playback or vod)
684
+ * @returns true if deletion was successful
685
+ * @throws PolyVValidationError if required parameters are empty
686
+ *
687
+ * @example
688
+ * ```typescript
689
+ * await channelService.deletePlayback('ch123456', 'video123', 'playback');
690
+ * ```
691
+ */
692
+ deletePlayback(channelId: string, videoId: string, listType?: import('../types/channel.js').PlaybackListType): Promise<boolean>;
693
+ /**
694
+ * Get channel sessions
695
+ *
696
+ * Retrieves the list of live session information for a channel.
697
+ *
698
+ * @param channelId - The channel ID
699
+ * @returns Array of channel sessions
700
+ * @throws PolyVValidationError if channelId is empty
701
+ *
702
+ * @example
703
+ * ```typescript
704
+ * const sessions = await channelService.getChannelSessions('ch123456');
705
+ * console.log(sessions[0].sessionId);
706
+ * ```
707
+ */
708
+ getChannelSessions(channelId: string): Promise<import('../types/channel.js').ChannelSession[]>;
709
+ /**
710
+ * Get record file
711
+ *
712
+ * Retrieves paginated list of recording files for a channel.
713
+ *
714
+ * @param channelId - The channel ID
715
+ * @param options - Pagination options
716
+ * @returns Paginated record file list
717
+ * @throws PolyVValidationError if channelId is empty
718
+ *
719
+ * @example
720
+ * ```typescript
721
+ * const result = await channelService.getRecordFile('ch123456', { page: 1, pageSize: 10 });
722
+ * console.log(result.contents);
723
+ * ```
724
+ */
725
+ getRecordFile(channelId: string, options?: import('../types/channel.js').RecordFileRequest): Promise<import('../types/channel.js').RecordFileResponse>;
726
+ /**
727
+ * Get record info
728
+ *
729
+ * Retrieves information about a specific recording by session ID.
730
+ *
731
+ * @param channelId - The channel ID
732
+ * @param sessionId - The session ID
733
+ * @returns Record information
734
+ * @throws PolyVValidationError if required parameters are empty
735
+ *
736
+ * @example
737
+ * ```typescript
738
+ * const info = await channelService.getRecordInfo('ch123456', 'session123');
739
+ * console.log(info.fileId);
740
+ * ```
741
+ */
742
+ getRecordInfo(channelId: string, sessionId: string): Promise<import('../types/channel.js').RecordInfo>;
743
+ /**
744
+ * Delete record
745
+ *
746
+ * Deletes a recording from the channel's temporary storage.
747
+ *
748
+ * @param channelId - The channel ID
749
+ * @param fileId - The file ID
750
+ * @returns true if deletion was successful
751
+ * @throws PolyVValidationError if required parameters are empty
752
+ *
753
+ * @example
754
+ * ```typescript
755
+ * await channelService.deleteRecord('ch123456', 'file123');
756
+ * ```
757
+ */
758
+ deleteRecord(channelId: string, fileId: string): Promise<boolean>;
759
+ /**
760
+ * Set record default
761
+ *
762
+ * Sets a video as the default playback video in the video library.
763
+ *
764
+ * @param channelId - The channel ID
765
+ * @param fileId - The file ID
766
+ * @returns true if operation was successful
767
+ * @throws PolyVValidationError if required parameters are empty
768
+ *
769
+ * @example
770
+ * ```typescript
771
+ * await channelService.setRecordDefault('ch123456', 'file123');
772
+ * ```
773
+ */
774
+ setRecordDefault(channelId: string, fileId: string): Promise<boolean>;
775
+ /**
776
+ * Set record setting
777
+ *
778
+ * Updates the channel playback settings.
779
+ *
780
+ * @param channelId - The channel ID
781
+ * @param options - Playback setting options
782
+ * @returns true if operation was successful
783
+ * @throws PolyVValidationError if channelId is empty
784
+ *
785
+ * @example
786
+ * ```typescript
787
+ * await channelService.setRecordSetting('ch123456', {
788
+ * enabled: true,
789
+ * type: 'video',
790
+ * });
791
+ * ```
792
+ */
793
+ setRecordSetting(channelId: string, options: import('../types/channel.js').SetRecordSettingRequest): Promise<boolean>;
794
+ /**
795
+ * Get playback enabled
796
+ *
797
+ * Retrieves the playback enabled status for a channel.
798
+ *
799
+ * @param channelId - The channel ID
800
+ * @returns Playback enabled status
801
+ * @throws PolyVValidationError if channelId is empty
802
+ *
803
+ * @example
804
+ * ```typescript
805
+ * const result = await channelService.getPlaybackEnabled('ch123456');
806
+ * console.log(result.enabled);
807
+ * ```
808
+ */
809
+ getPlaybackEnabled(channelId: string): Promise<import('../types/channel.js').PlaybackEnabledResponse>;
810
+ /**
811
+ * Set playback enabled
812
+ *
813
+ * Enables or disables playback for a channel.
814
+ *
815
+ * @param channelId - The channel ID
816
+ * @param enabled - boolean to enable/disable
817
+ * @returns true if operation was successful
818
+ * @throws PolyVValidationError if required parameters are empty
819
+ *
820
+ * @example
821
+ * ```typescript
822
+ * await channelService.setPlaybackEnabled('ch123456', true);
823
+ * ```
824
+ */
825
+ setPlaybackEnabled(channelId: string, enabled: boolean): Promise<boolean>;
826
+ /**
827
+ * Get playback setting
828
+ *
829
+ * Retrieves the playback settings for a channel.
830
+ *
831
+ * @param channelId - The channel ID
832
+ * @returns Playback settings
833
+ * @throws PolyVValidationError if channelId is empty
834
+ *
835
+ * @example
836
+ * ```typescript
837
+ * const settings = await channelService.getPlaybackSetting('ch123456');
838
+ * console.log(settings.sortType, settings.autoPublish);
839
+ * ```
840
+ */
841
+ getPlaybackSetting(channelId: string): Promise<PlaybackSettingResponse>;
842
+ /**
843
+ * Set playback sort
844
+ *
845
+ * Sets the sort order for playback videos in the video library.
846
+ *
847
+ * @param channelId - The channel ID
848
+ * @param videoIds - Array of video IDs in desired order
849
+ * @returns true if operation was successful
850
+ * @throws PolyVValidationError if required parameters are empty
851
+ *
852
+ * @example
853
+ * ```typescript
854
+ * await channelService.setPlaybackSort('ch123456', ['video1', 'video2', 'video3']);
855
+ * ```
856
+ */
857
+ setPlaybackSort(channelId: string, videoIds: string[]): Promise<boolean>;
858
+ /**
859
+ * Set playback single sort
860
+ *
861
+ * Sets the sort rank for a single playback video.
862
+ *
863
+ * @param channelId - The channel ID
864
+ * @param videoId - The video ID
865
+ * @param rank - The sort rank (higher value = higher priority)
866
+ * @returns true if operation was successful
867
+ * @throws PolyVValidationError if required parameters are empty
868
+ *
869
+ * @example
870
+ * ```typescript
871
+ * await channelService.setPlaybackSingleSort('ch123456', 'video123', 10);
872
+ * ```
873
+ */
874
+ setPlaybackSingleSort(channelId: string, videoId: string, rank: number): Promise<boolean>;
875
+ /**
876
+ * Update playback title
877
+ *
878
+ * Updates the title of a playback video.
879
+ *
880
+ * @param channelId - The channel ID
881
+ * @param videoId - The video ID
882
+ * @param title - The new title
883
+ * @returns true if operation was successful
884
+ * @throws PolyVValidationError if required parameters are empty
885
+ *
886
+ * @example
887
+ * ```typescript
888
+ * await channelService.updatePlaybackTitle('ch123456', 'video123', 'New Title');
889
+ * ```
890
+ */
891
+ updatePlaybackTitle(channelId: string, videoId: string, title: string): Promise<boolean>;
892
+ /**
893
+ * Add VOD playback
894
+ *
895
+ * Adds a VOD video to the channel's video library.
896
+ *
897
+ * @param channelId - The channel ID
898
+ * @param options - VOD playback options
899
+ * @returns true if operation was successful
900
+ * @throws PolyVValidationError if required parameters are empty
901
+ *
902
+ * @example
903
+ * ```typescript
904
+ * await channelService.addVodPlayback('ch123456', {
905
+ * vid: 'vod123',
906
+ * title: 'My Video',
907
+ * });
908
+ * ```
909
+ */
910
+ addVodPlayback(channelId: string, options: AddVodPlaybackRequest): Promise<boolean>;
911
+ /**
912
+ * Clip record file
913
+ *
914
+ * Clips a recording file asynchronously.
915
+ *
916
+ * @param channelId - The channel ID
917
+ * @param options - Clip options
918
+ * @returns Clipped file information
919
+ * @throws PolyVValidationError if required parameters are empty
920
+ *
921
+ * @example
922
+ * ```typescript
923
+ * const result = await channelService.clipRecordFile('ch123456', {
924
+ * fileId: 'file123',
925
+ * startTime: 0,
926
+ * endTime: 1800,
927
+ * });
928
+ * ```
929
+ */
930
+ clipRecordFile(channelId: string, options: ClipRecordFileRequest): Promise<import('../types/channel.js').ClipRecordFileResponse>;
931
+ /**
932
+ * Record convert (synchronous)
933
+ *
934
+ * Converts a recording file to VOD synchronously.
935
+ *
936
+ * @param channelId - The channel ID
937
+ * @param options - Convert options
938
+ * @returns Converted file information
939
+ * @throws PolyVValidationError if required parameters are empty
940
+ *
941
+ * @example
942
+ * ```typescript
943
+ * const result = await channelService.recordConvert('ch123456', {
944
+ * fileId: 'file123',
945
+ * });
946
+ * ```
947
+ */
948
+ recordConvert(channelId: string, options: import('../types/channel.js').RecordConvertRequest): Promise<import('../types/channel.js').RecordConvertResponse>;
949
+ /**
950
+ * Record convert async
951
+ *
952
+ * Converts a recording file to VOD asynchronously.
953
+ *
954
+ * @param channelId - The channel ID
955
+ * @param options - Convert options
956
+ * @returns true if submitted successfully
957
+ * @throws PolyVValidationError if required parameters are empty
958
+ *
959
+ * @example
960
+ * ```typescript
961
+ * const result = await channelService.recordConvertAsync('ch123456', {
962
+ * fileId: 'file123',
963
+ * });
964
+ * ```
965
+ */
966
+ recordConvertAsync(channelId: string, options: import('../types/channel.js').RecordConvertRequest): Promise<boolean>;
967
+ /**
968
+ * Record file merge (synchronous)
969
+ *
970
+ * Merges multiple recording files synchronously.
971
+ *
972
+ * @param channelId - The channel ID
973
+ * @param options - Merge options
974
+ * @returns Merged file information
975
+ * @throws PolyVValidationError if required parameters are empty
976
+ *
977
+ * @example
978
+ * ```typescript
979
+ * const result = await channelService.recordFileMerge('ch123456', {
980
+ * fileIds: ['file1', 'file2'],
981
+ * });
982
+ * ```
983
+ */
984
+ recordFileMerge(channelId: string, options: import('../types/channel.js').RecordMergeArrayRequest): Promise<import('../types/channel.js').RecordMergeResponse>;
985
+ /**
986
+ * Record file merge async
987
+ *
988
+ * Merges multiple recording files asynchronously.
989
+ *
990
+ * @param channelId - The channel ID
991
+ * @param options - Merge options
992
+ * @returns true if submitted successfully
993
+ * @throws PolyVValidationError if required parameters are empty
994
+ *
995
+ * @example
996
+ * ```typescript
997
+ * const result = await channelService.recordFileMergeAsync('ch123456', {
998
+ * fileIds: ['file1', 'file2'],
999
+ * });
1000
+ * ```
1001
+ */
1002
+ recordFileMergeAsync(channelId: string, options: import('../types/channel.js').RecordMergeArrayRequest): Promise<boolean>;
1003
+ /**
1004
+ * Record merge MP4
1005
+ *
1006
+ * Merges recording files to MP4 format.
1007
+ *
1008
+ * @param channelId - The channel ID
1009
+ * @param options - Merge options
1010
+ * @returns Merged MP4 URL
1011
+ * @throws PolyVValidationError if required parameters are empty
1012
+ *
1013
+ * @example
1014
+ * ```typescript
1015
+ * const result = await channelService.recordMergeMp4('ch123456', {
1016
+ * fileIds: ['file1', 'file2'],
1017
+ * });
1018
+ * ```
1019
+ */
1020
+ recordMergeMp4(channelId: string, options: import('../types/channel.js').RecordMergeArrayRequest): Promise<import('../types/channel.js').RecordMergeResponse>;
1021
+ /**
1022
+ * Record merge MP4 start
1023
+ *
1024
+ * Starts an asynchronous MP4 merge task.
1025
+ *
1026
+ * @param channelId - The channel ID
1027
+ * @param options - Merge options
1028
+ * @returns true if submitted successfully
1029
+ * @throws PolyVValidationError if required parameters are empty
1030
+ *
1031
+ * @example
1032
+ * ```typescript
1033
+ * const result = await channelService.recordMergeMp4Start('ch123456', {
1034
+ * fileIds: ['file1', 'file2'],
1035
+ * });
1036
+ * ```
1037
+ */
1038
+ recordMergeMp4Start(channelId: string, options: import('../types/channel.js').RecordMergeArrayRequest): Promise<boolean>;
1039
+ /**
1040
+ * Record add breakpoint
1041
+ *
1042
+ * Adds a breakpoint to a live session recording.
1043
+ *
1044
+ * @param channelId - The channel ID
1045
+ * @param options - Breakpoint options
1046
+ * @returns true if operation was successful
1047
+ * @throws PolyVValidationError if required parameters are empty
1048
+ *
1049
+ * @example
1050
+ * ```typescript
1051
+ * await channelService.recordAddBreakpoint('ch123456', {
1052
+ * fileId: 'file123',
1053
+ * time: 60,
1054
+ * });
1055
+ * ```
1056
+ */
1057
+ recordAddBreakpoint(channelId: string, options: RecordAddBreakpointRequest): Promise<boolean>;
1058
+ /**
1059
+ * Update player logo
1060
+ *
1061
+ * Updates the player logo settings for a channel.
1062
+ *
1063
+ * @param channelId - The channel ID
1064
+ * @param options - Logo settings
1065
+ * @returns true if operation was successful
1066
+ * @throws PolyVValidationError if channelId is empty
1067
+ *
1068
+ * @example
1069
+ * ```typescript
1070
+ * await channelService.updatePlayerLogo('ch123456', {
1071
+ * logoImage: 'https://example.com/logo.png',
1072
+ * logoOpacity: 80,
1073
+ * logoPosition: 'top-left',
1074
+ * });
1075
+ * ```
1076
+ */
1077
+ updatePlayerLogo(channelId: string, options: PlayerLogoSettings): Promise<boolean>;
1078
+ /**
1079
+ * Update player head
1080
+ *
1081
+ * Updates the player head image settings for a channel.
1082
+ *
1083
+ * @param channelId - The channel ID
1084
+ * @param options - Head image settings
1085
+ * @returns true if operation was successful
1086
+ * @throws PolyVValidationError if channelId is empty
1087
+ *
1088
+ * @example
1089
+ * ```typescript
1090
+ * await channelService.updatePlayerHead('ch123456', {
1091
+ * headImage: 'https://example.com/head.png',
1092
+ * });
1093
+ * ```
1094
+ */
1095
+ updatePlayerHead(channelId: string, options: PlayerHeadSettings): Promise<boolean>;
1096
+ /**
1097
+ * Update player stop
1098
+ *
1099
+ * Updates the player stop image settings for a channel.
1100
+ *
1101
+ * @param channelId - The channel ID
1102
+ * @param options - Stop image settings
1103
+ * @returns true if operation was successful
1104
+ * @throws PolyVValidationError if channelId is empty
1105
+ *
1106
+ * @example
1107
+ * ```typescript
1108
+ * await channelService.updatePlayerStop('ch123456', {
1109
+ * stopImage: 'https://example.com/stop.png',
1110
+ * });
1111
+ * ```
1112
+ */
1113
+ updatePlayerStop(channelId: string, options: PlayerStopSettings): Promise<boolean>;
1114
+ /**
1115
+ * Get product click statistics
1116
+ *
1117
+ * Queries product click statistics for a channel.
1118
+ *
1119
+ * @param options - Query options including channelId (required)
1120
+ * @returns Paginated list of product click statistics
1121
+ * @throws PolyVValidationError if channelId is empty
1122
+ *
1123
+ * @example
1124
+ * ```typescript
1125
+ * const result = await channelService.getProductClickStats({
1126
+ * channelId: 'ch123456',
1127
+ * startTime: Date.now() - 7 * 24 * 60 * 60 * 1000,
1128
+ * endTime: Date.now(),
1129
+ * });
1130
+ * ```
1131
+ */
1132
+ getProductClickStats(options: GetProductClickStatsRequest): Promise<GetProductClickStatsResponse>;
1133
+ /**
1134
+ * Get product list statistics
1135
+ *
1136
+ * Queries product list click statistics for a channel.
1137
+ *
1138
+ * @param options - Query options including channelId (required)
1139
+ * @returns Paginated list of product list statistics
1140
+ * @throws PolyVValidationError if channelId is empty
1141
+ *
1142
+ * @example
1143
+ * ```typescript
1144
+ * const result = await channelService.getProductListStats({
1145
+ * channelId: 'ch123456',
1146
+ * pageNumber: 1,
1147
+ * pageSize: 20,
1148
+ * });
1149
+ * ```
1150
+ */
1151
+ getProductListStats(options: GetProductListStatsRequest): Promise<GetProductListStatsResponse>;
1152
+ /**
1153
+ * Get red packet statistics
1154
+ *
1155
+ * Queries red packet distribution statistics for a channel.
1156
+ *
1157
+ * @param options - Query options including channelId (required)
1158
+ * @returns Paginated list of red packet statistics
1159
+ * @throws PolyVValidationError if channelId is empty
1160
+ *
1161
+ * @example
1162
+ * ```typescript
1163
+ * const result = await channelService.getRedpackStats({
1164
+ * channelId: 'ch123456',
1165
+ * sessionId: 'session123',
1166
+ * });
1167
+ * ```
1168
+ */
1169
+ getRedpackStats(options: GetRedpackStatsRequest): Promise<GetRedpackStatsResponse>;
1170
+ /**
1171
+ * Get channel summary statistics
1172
+ *
1173
+ * Queries live viewing statistics for a channel within a date range.
1174
+ *
1175
+ * @param channelId - The channel ID (required)
1176
+ * @param options - Query options including startDay and endDay (required)
1177
+ * @returns Array of daily summary statistics
1178
+ * @throws PolyVValidationError if channelId, startDay, or endDay is empty
1179
+ *
1180
+ * @example
1181
+ * ```typescript
1182
+ * const result = await channelService.getSummary('ch123456', {
1183
+ * startDay: '2024-01-01',
1184
+ * endDay: '2024-01-31',
1185
+ * });
1186
+ * ```
1187
+ */
1188
+ getSummary(channelId: string, options: {
1189
+ startDay: string;
1190
+ endDay: string;
1191
+ }): Promise<ChannelSummaryItem[]>;
1192
+ /**
1193
+ * Get daily summary statistics
1194
+ *
1195
+ * Queries daily viewing statistics for a channel within a date range.
1196
+ *
1197
+ * @param options - Query options including channelId, startDay, endDay (all required)
1198
+ * @returns Array of daily summary statistics
1199
+ * @throws PolyVValidationError if required parameters are empty
1200
+ *
1201
+ * @example
1202
+ * ```typescript
1203
+ * const result = await channelService.getDailySummary({
1204
+ * channelId: 'ch123456',
1205
+ * startDay: '2024-01-01',
1206
+ * endDay: '2024-01-31',
1207
+ * });
1208
+ * ```
1209
+ */
1210
+ getDailySummary(options: {
1211
+ channelId: string;
1212
+ startDay: string;
1213
+ endDay: string;
1214
+ }): Promise<DailySummaryItem[]>;
1215
+ /**
1216
+ * Get channel play summary statistics
1217
+ *
1218
+ * Queries overview statistics for multiple channels within a date range.
1219
+ *
1220
+ * @param userId - The user ID (required)
1221
+ * @param options - Query options including startDate and endDate (required)
1222
+ * @returns Array of channel play summary statistics
1223
+ * @throws PolyVValidationError if userId is empty
1224
+ *
1225
+ * @example
1226
+ * ```typescript
1227
+ * const result = await channelService.getChannelPlaySummary('user123', {
1228
+ * startDate: '2024-01-01',
1229
+ * endDate: '2024-01-31',
1230
+ * channelIds: 'ch123456,ch789012',
1231
+ * });
1232
+ * ```
1233
+ */
1234
+ getChannelPlaySummary(userId: string, options: {
1235
+ startDate: string;
1236
+ endDate: string;
1237
+ channelIds?: string;
1238
+ }): Promise<ChannelPlaySummaryItem[]>;
1239
+ /**
1240
+ * Get channel statistic data
1241
+ *
1242
+ * Queries backend channel statistics for a date range.
1243
+ *
1244
+ * @param options - Query options including channelId, startDate, endDate (all required)
1245
+ * @returns Channel statistic data
1246
+ * @throws PolyVValidationError if required parameters are empty
1247
+ *
1248
+ * @example
1249
+ * ```typescript
1250
+ * const result = await channelService.getChannelStatistic({
1251
+ * channelId: 'ch123456',
1252
+ * startDate: '2024-01-01',
1253
+ * endDate: '2024-01-31',
1254
+ * });
1255
+ * ```
1256
+ */
1257
+ getChannelStatistic(options: {
1258
+ channelId: string;
1259
+ startDate: string;
1260
+ endDate: string;
1261
+ }): Promise<ChannelStatisticData>;
1262
+ /**
1263
+ * Get concurrency data
1264
+ *
1265
+ * Queries historical concurrency data for a channel within a date range.
1266
+ *
1267
+ * @param options - Query options including channelId, startDate, endDate (all required)
1268
+ * @returns Array of concurrency data points
1269
+ * @throws PolyVValidationError if required parameters are empty
1270
+ *
1271
+ * @example
1272
+ * ```typescript
1273
+ * const result = await channelService.getConcurrency({
1274
+ * channelId: 'ch123456',
1275
+ * startDate: '2024-01-01',
1276
+ * endDate: '2024-01-31',
1277
+ * });
1278
+ * ```
1279
+ */
1280
+ getConcurrency(options: {
1281
+ channelId: string;
1282
+ startDate: string;
1283
+ endDate: string;
1284
+ }): Promise<ConcurrencyDataItem[]>;
1285
+ /**
1286
+ * Get max history concurrent viewers
1287
+ *
1288
+ * Queries the maximum historical concurrent viewers for a channel within a time range.
1289
+ *
1290
+ * @param options - Query options including channelId, startTime, endTime (all required)
1291
+ * @returns Maximum concurrent viewer count
1292
+ * @throws PolyVValidationError if required parameters are empty
1293
+ *
1294
+ * @example
1295
+ * ```typescript
1296
+ * const maxConcurrent = await channelService.getMaxHistoryConcurrent({
1297
+ * channelId: 'ch123456',
1298
+ * startTime: Date.now() - 90 * 24 * 60 * 60 * 1000,
1299
+ * endTime: Date.now(),
1300
+ * });
1301
+ * ```
1302
+ */
1303
+ getMaxHistoryConcurrent(options: {
1304
+ channelId: string;
1305
+ startTime: number;
1306
+ endTime: number;
1307
+ }): Promise<number>;
1308
+ /**
1309
+ * Get realtime viewers
1310
+ *
1311
+ * Queries realtime viewer count for multiple channels.
1312
+ *
1313
+ * @param options - Query options including channelIds (required, comma-separated)
1314
+ * @returns Array of realtime viewer data points
1315
+ * @throws PolyVValidationError if channelIds is empty
1316
+ *
1317
+ * @example
1318
+ * ```typescript
1319
+ * const result = await channelService.getRealtimeViewers({
1320
+ * channelIds: 'ch123456,ch789012',
1321
+ * });
1322
+ * ```
1323
+ */
1324
+ getRealtimeViewers(options: {
1325
+ channelIds: string;
1326
+ }): Promise<RealtimeViewerDataItem[]>;
1327
+ /**
1328
+ * Get session statistics
1329
+ *
1330
+ * Queries multi-session overview statistics for a channel.
1331
+ *
1332
+ * @param options - Query options including channelId (required), and either sessionIds or startTime/endTime
1333
+ * @returns Session statistics response with list of session data
1334
+ * @throws PolyVValidationError if channelId is empty
1335
+ *
1336
+ * @example
1337
+ * ```typescript
1338
+ * const result = await channelService.getSessionStats({
1339
+ * channelId: 'ch123456',
1340
+ * startTime: Date.now() - 30 * 24 * 60 * 60 * 1000,
1341
+ * endTime: Date.now(),
1342
+ * });
1343
+ * ```
1344
+ */
1345
+ getSessionStats(options: {
1346
+ channelId: string;
1347
+ sessionIds?: string;
1348
+ startTime?: number;
1349
+ endTime?: number;
1350
+ }): Promise<SessionStatsResponse>;
1351
+ /**
1352
+ * Get realtime viewers V1
1353
+ *
1354
+ * Queries realtime viewer count for a channel using V1 API.
1355
+ *
1356
+ * @param channelId - The channel ID (required)
1357
+ * @param userId - The user ID (required)
1358
+ * @returns Array of realtime viewer data points
1359
+ * @throws PolyVValidationError if channelId or userId is empty
1360
+ *
1361
+ * @example
1362
+ * ```typescript
1363
+ * const result = await channelService.getRealtimeViewersV1('ch123456', 'user123');
1364
+ * ```
1365
+ */
1366
+ getRealtimeViewersV1(channelId: string, userId: string): Promise<RealtimeViewerV1Item[]>;
1367
+ /**
1368
+ * Get viewlog page
1369
+ *
1370
+ * Queries paginated viewing log data for a channel.
1371
+ *
1372
+ * @param channelId - The channel ID (required)
1373
+ * @param options - Query options (currentDay or startTime/endTime required)
1374
+ * @returns Paginated viewlog response
1375
+ * @throws PolyVValidationError if channelId is empty
1376
+ *
1377
+ * @example
1378
+ * ```typescript
1379
+ * const result = await channelService.getViewlogPage('ch123456', {
1380
+ * currentDay: '2024-01-01',
1381
+ * page: 1,
1382
+ * pageSize: 100,
1383
+ * });
1384
+ * ```
1385
+ */
1386
+ getViewlogPage(channelId: string, options?: {
1387
+ currentDay?: string;
1388
+ page?: number;
1389
+ pageSize?: number;
1390
+ startTime?: number;
1391
+ endTime?: number;
1392
+ param1?: string;
1393
+ param2?: string;
1394
+ param3?: string;
1395
+ viewLogType?: string;
1396
+ sessionIds?: string;
1397
+ }): Promise<GetViewlogPageResponse>;
1398
+ /**
1399
+ * Get viewlog V1
1400
+ *
1401
+ * Queries viewing log data using V1 API.
1402
+ *
1403
+ * @param channelId - The channel ID (required)
1404
+ * @param options - Query options including currentDay and userId (required)
1405
+ * @returns Array of viewlog items
1406
+ * @throws PolyVValidationError if channelId, currentDay, or userId is empty
1407
+ *
1408
+ * @example
1409
+ * ```typescript
1410
+ * const result = await channelService.getViewlogV1('ch123456', {
1411
+ * currentDay: '2024-01-01',
1412
+ * userId: 'user123',
1413
+ * });
1414
+ * ```
1415
+ */
1416
+ getViewlogV1(channelId: string, options: {
1417
+ currentDay: string;
1418
+ userId: string;
1419
+ param1?: string;
1420
+ }): Promise<UserViewlogItem[]>;
1421
+ /**
1422
+ * Get user viewlog
1423
+ *
1424
+ * Queries paginated viewing log data for an account.
1425
+ *
1426
+ * @param options - Query options including startDate and endDate (required)
1427
+ * @returns Paginated user viewlog response
1428
+ * @throws PolyVValidationError if startDate or endDate is empty
1429
+ *
1430
+ * @example
1431
+ * ```typescript
1432
+ * const result = await channelService.getUserViewlog({
1433
+ * startDate: '2024-01-01 00:00:00',
1434
+ * endDate: '2024-01-31 23:59:59',
1435
+ * channelId: 'ch123456',
1436
+ * watchType: 'live',
1437
+ * });
1438
+ * ```
1439
+ */
1440
+ getUserViewlog(options: {
1441
+ startDate: string;
1442
+ endDate: string;
1443
+ channelId?: string;
1444
+ watchType?: string;
1445
+ page?: number;
1446
+ pageSize?: number;
1447
+ }): Promise<GetUserViewlogResponse>;
1448
+ /**
1449
+ * Get mic detail list
1450
+ *
1451
+ * Queries mic usage details for channels.
1452
+ *
1453
+ * @param options - Query options
1454
+ * @returns Paginated mic detail list
1455
+ *
1456
+ * @example
1457
+ * ```typescript
1458
+ * const result = await channelService.getMicDetailList({
1459
+ * channelIds: 'ch123456',
1460
+ * startDay: '2024-01-01',
1461
+ * endDay: '2024-01-31',
1462
+ * });
1463
+ * ```
1464
+ */
1465
+ getMicDetailList(options?: {
1466
+ page?: number;
1467
+ size?: number;
1468
+ channelIds?: string;
1469
+ startDay?: string;
1470
+ endDay?: string;
1471
+ }): Promise<GetMicDetailListResponse>;
1472
+ /**
1473
+ * Get link mic detail list
1474
+ *
1475
+ * Queries link mic detail data for a channel within a date range.
1476
+ *
1477
+ * @param options - Query options including channelId, startDate, endDate (all required)
1478
+ * @returns Link mic detail list response
1479
+ * @throws PolyVValidationError if required parameters are empty
1480
+ *
1481
+ * @example
1482
+ * ```typescript
1483
+ * const result = await channelService.getLinkMicDetailList({
1484
+ * channelId: 'ch123456',
1485
+ * startDate: '2024-01-01',
1486
+ * endDate: '2024-01-31',
1487
+ * });
1488
+ * ```
1489
+ */
1490
+ getLinkMicDetailList(options: {
1491
+ channelId: string;
1492
+ startDate: string;
1493
+ endDate: string;
1494
+ page?: number;
1495
+ pageSize?: number;
1496
+ }): Promise<GetLinkMicDetailListResponse>;
1497
+ /**
1498
+ * Get realviewers (AC13)
1499
+ *
1500
+ * Queries real viewers count for a channel.
1501
+ *
1502
+ * @param channelId - The channel ID (required)
1503
+ * @param options - Query options including currentDay (required)
1504
+ * @returns Array of realviewers data
1505
+ * @throws PolyVValidationError if channelId or currentDay is empty
1506
+ *
1507
+ * @example
1508
+ * ```typescript
1509
+ * const result = await channelService.getRealviewers('ch123456', {
1510
+ * currentDay: '2024-01-01',
1511
+ * });
1512
+ * ```
1513
+ */
1514
+ getRealviewers(channelId: string, options: {
1515
+ currentDay: string;
1516
+ }): Promise<RealviewersDataItem[]>;
1517
+ /**
1518
+ * Get view summary (AC14)
1519
+ *
1520
+ * Alias for getSummary method. Queries live viewing statistics for a channel within a date range.
1521
+ *
1522
+ * @param channelId - The channel ID (required)
1523
+ * @param options - Query options including startDay and endDay (required)
1524
+ * @returns Array of daily summary statistics
1525
+ * @throws PolyVValidationError if channelId, startDay, or endDay is empty
1526
+ *
1527
+ * @example
1528
+ * ```typescript
1529
+ * const result = await channelService.getViewSummary('ch123456', {
1530
+ * startDay: '2024-01-01',
1531
+ * endDay: '2024-01-31',
1532
+ * });
1533
+ * ```
1534
+ */
1535
+ getViewSummary(channelId: string, options: {
1536
+ startDay: string;
1537
+ endDay: string;
1538
+ }): Promise<ChannelSummaryItem[]>;
1539
+ /**
1540
+ * Get viewlog V2 (AC15)
1541
+ *
1542
+ * Queries viewing log data using V2 API.
1543
+ *
1544
+ * @param channelId - The channel ID (required)
1545
+ * @param options - Query options including currentDay (required)
1546
+ * @returns Array of viewlog items
1547
+ * @throws PolyVValidationError if channelId or currentDay is empty
1548
+ *
1549
+ * @example
1550
+ * ```typescript
1551
+ * const result = await channelService.getViewlog2('ch123456', {
1552
+ * currentDay: '2024-01-01',
1553
+ * page: 1,
1554
+ * pageSize: 100,
1555
+ * });
1556
+ * ```
1557
+ */
1558
+ getViewlog2(channelId: string, options: {
1559
+ currentDay: string;
1560
+ page?: number;
1561
+ pageSize?: number;
1562
+ }): Promise<ViewlogV2Item[]>;
1563
+ /**
1564
+ * Get viewlog page V3 (AC16)
1565
+ *
1566
+ * Queries paginated viewing log data using V3 API.
1567
+ *
1568
+ * @param channelId - The channel ID (required)
1569
+ * @param options - Query options
1570
+ * @returns Paginated viewlog response
1571
+ * @throws PolyVValidationError if channelId is empty
1572
+ *
1573
+ * @example
1574
+ * ```typescript
1575
+ * const result = await channelService.getViewlogPageV3('ch123456', {
1576
+ * currentDay: '2024-01-01',
1577
+ * page: 1,
1578
+ * pageSize: 100,
1579
+ * });
1580
+ * ```
1581
+ */
1582
+ getViewlogPageV3(channelId: string, options?: {
1583
+ currentDay?: string;
1584
+ page?: number;
1585
+ pageSize?: number;
1586
+ startTime?: number;
1587
+ endTime?: number;
1588
+ param1?: string;
1589
+ param2?: string;
1590
+ param3?: string;
1591
+ }): Promise<GetViewlogPageV3Response>;
1592
+ /**
1593
+ * Set DIY URL marquee (AC1)
1594
+ *
1595
+ * Sets or disables the DIY URL marquee for a channel.
1596
+ *
1597
+ * @param options - Marquee options including channelId, marqueeRestrict, and optional url
1598
+ * @returns The API response string
1599
+ * @throws PolyVValidationError if channelId or marqueeRestrict is empty, or if url is empty when marqueeRestrict is 'Y'
1600
+ *
1601
+ * @example
1602
+ * ```typescript
1603
+ * // Enable marquee
1604
+ * const result = await channelService.setDiyUrlMarquee({
1605
+ * channelId: 'ch123456',
1606
+ * marqueeRestrict: 'Y',
1607
+ * url: 'https://example.com/marquee',
1608
+ * });
1609
+ *
1610
+ * // Disable marquee
1611
+ * const result = await channelService.setDiyUrlMarquee({
1612
+ * channelId: 'ch123456',
1613
+ * marqueeRestrict: 'N',
1614
+ * });
1615
+ * ```
1616
+ */
1617
+ setDiyUrlMarquee(options: SetDiyUrlMarqueeRequest): Promise<string>;
1618
+ /**
1619
+ * Get session data list (AC2)
1620
+ *
1621
+ * Queries session data list for a channel with optional date range and pagination.
1622
+ *
1623
+ * @param options - Query options including channelId (required)
1624
+ * @returns Paginated list of session data
1625
+ * @throws PolyVValidationError if channelId is empty
1626
+ *
1627
+ * @example
1628
+ * ```typescript
1629
+ * const result = await channelService.getSessionDataList({
1630
+ * channelId: 'ch123456',
1631
+ * startDate: '2024-01-01',
1632
+ * endDate: '2024-01-31',
1633
+ * page: 1,
1634
+ * pageSize: 10,
1635
+ * });
1636
+ * ```
1637
+ */
1638
+ getSessionDataList(options: GetSessionDataListRequest): Promise<GetSessionDataListResponse>;
1639
+ /**
1640
+ * Export session stats (AC3)
1641
+ *
1642
+ * Exports statistics for a specific session.
1643
+ *
1644
+ * @param options - Export options including channelId and sessionId (both required)
1645
+ * @returns The export response (typically a URL or confirmation string)
1646
+ * @throws PolyVValidationError if channelId or sessionId is empty
1647
+ *
1648
+ * @example
1649
+ * ```typescript
1650
+ * const result = await channelService.exportSessionStats({
1651
+ * channelId: 'ch123456',
1652
+ * sessionId: 'session123',
1653
+ * });
1654
+ * ```
1655
+ */
1656
+ exportSessionStats(options: ExportSessionStatsRequest): Promise<string>;
1657
+ /**
1658
+ * Get session by external ID (AC4)
1659
+ *
1660
+ * Retrieves sessions associated with an external session ID.
1661
+ *
1662
+ * @param options - Query options including channelId and externalSessionId (both required)
1663
+ * @returns Response containing list of session IDs
1664
+ * @throws PolyVValidationError if channelId or externalSessionId is empty
1665
+ *
1666
+ * @example
1667
+ * ```typescript
1668
+ * const result = await channelService.getSessionByExternal({
1669
+ * channelId: 'ch123456',
1670
+ * externalSessionId: 'external-id-12345678901234567890',
1671
+ * });
1672
+ * console.log(result.list); // Array of session IDs
1673
+ * ```
1674
+ */
1675
+ getSessionByExternal(options: GetSessionByExternalRequest): Promise<GetSessionByExternalResponse>;
1676
+ /**
1677
+ * List file IDs by external session ID (AC5)
1678
+ *
1679
+ * Retrieves file IDs associated with an external session ID.
1680
+ *
1681
+ * @param options - Query options including channelId and externalSessionId (both required)
1682
+ * @returns Array of file ID items
1683
+ * @throws PolyVValidationError if channelId or externalSessionId is empty
1684
+ *
1685
+ * @example
1686
+ * ```typescript
1687
+ * const result = await channelService.listFileIdByExternal({
1688
+ * channelId: 'ch123456',
1689
+ * externalSessionId: 'external-id-12345678901234567890',
1690
+ * });
1691
+ * ```
1692
+ */
1693
+ listFileIdByExternal(options: ListFileIdByExternalRequest): Promise<FileIdByExternalItem[]>;
1694
+ /**
1695
+ * Relevance session (AC6)
1696
+ *
1697
+ * Associates an external session ID with the current channel session.
1698
+ *
1699
+ * @param options - Request options including channelId and externalSessionId (both required)
1700
+ * @returns The API response
1701
+ * @throws PolyVValidationError if channelId or externalSessionId is empty
1702
+ *
1703
+ * @example
1704
+ * ```typescript
1705
+ * const result = await channelService.relevanceSession({
1706
+ * channelId: 'ch123456',
1707
+ * externalSessionId: 'external-id-12345678901234567890',
1708
+ * });
1709
+ * ```
1710
+ */
1711
+ relevanceSession(options: RelevanceSessionRequest): Promise<string>;
1712
+ /**
1713
+ * Get live status (AC7)
1714
+ *
1715
+ * Queries the live status of a stream. This API does NOT require authentication.
1716
+ *
1717
+ * @param stream - The stream name (required)
1718
+ * @returns The live status: 'live' or 'end'
1719
+ * @throws PolyVValidationError if stream is empty
1720
+ *
1721
+ * @example
1722
+ * ```typescript
1723
+ * const status = await channelService.getLiveStatus('stream123');
1724
+ * console.log(status); // 'live' or 'end'
1725
+ * ```
1726
+ */
1727
+ getLiveStatus(stream: string): Promise<LiveStatus>;
1728
+ /**
1729
+ * Get live status list (AC8)
1730
+ *
1731
+ * Queries the live status for multiple channels. Note: This is a POST endpoint.
1732
+ *
1733
+ * @param options - Request options including channelIds array (required)
1734
+ * @returns Array of live status items
1735
+ * @throws PolyVValidationError if channelIds is empty
1736
+ *
1737
+ * @example
1738
+ * ```typescript
1739
+ * const result = await channelService.getLiveStatusList({
1740
+ * channelIds: ['ch123456', 'ch789012'],
1741
+ * });
1742
+ * ```
1743
+ */
1744
+ getLiveStatusList(options: {
1745
+ channelIds: string[];
1746
+ }): Promise<LiveStatusItem[]>;
1747
+ /**
1748
+ * Get stream info (AC9)
1749
+ *
1750
+ * Retrieves stream information for a channel.
1751
+ *
1752
+ * @param options - Request options including channelId (required)
1753
+ * @returns Stream information
1754
+ * @throws PolyVValidationError if channelId is empty
1755
+ *
1756
+ * @example
1757
+ * ```typescript
1758
+ * const result = await channelService.getStreamInfo({
1759
+ * channelId: 'ch123456',
1760
+ * });
1761
+ * ```
1762
+ */
1763
+ getStreamInfo(options: {
1764
+ channelId: string;
1765
+ }): Promise<GetStreamInfoResponse>;
1766
+ /**
1767
+ * Get streams (AC10)
1768
+ *
1769
+ * Retrieves stream information for multiple channels.
1770
+ *
1771
+ * @param options - Request options including channelIds array (required)
1772
+ * @returns Array of stream items
1773
+ * @throws PolyVValidationError if channelIds is empty
1774
+ *
1775
+ * @example
1776
+ * ```typescript
1777
+ * const result = await channelService.getStreams({
1778
+ * channelIds: ['ch123456', 'ch789012'],
1779
+ * });
1780
+ * ```
1781
+ */
1782
+ getStreams(options: {
1783
+ channelIds: string[];
1784
+ }): Promise<GetStreamsItem[]>;
1785
+ /**
1786
+ * List disk videos (AC11)
1787
+ *
1788
+ * Lists disk videos for a channel with pagination.
1789
+ *
1790
+ * @param options - Request options including channelId (required)
1791
+ * @returns Paginated list of disk videos
1792
+ * @throws PolyVValidationError if channelId is empty
1793
+ *
1794
+ * @example
1795
+ * ```typescript
1796
+ * const result = await channelService.listDiskVideo({
1797
+ * channelId: 'ch123456',
1798
+ * page: 1,
1799
+ * pageSize: 10,
1800
+ * });
1801
+ * ```
1802
+ */
1803
+ listDiskVideo(options: ListDiskVideoRequest): Promise<ListDiskVideoResponse>;
1804
+ /**
1805
+ * Set status to start/live (AC12)
1806
+ *
1807
+ * Sets the channel status to live.
1808
+ *
1809
+ * @param options - Request options including channelId and userId (both required)
1810
+ * @returns The API response
1811
+ * @throws PolyVValidationError if channelId or userId is empty
1812
+ *
1813
+ * @example
1814
+ * ```typescript
1815
+ * const result = await channelService.setStatusStart({
1816
+ * channelId: 'ch123456',
1817
+ * userId: 'user123',
1818
+ * });
1819
+ * ```
1820
+ */
1821
+ setStatusStart(options: SetStatusRequest): Promise<string>;
1822
+ /**
1823
+ * Set status to end (AC13)
1824
+ *
1825
+ * Sets the channel status to ended.
1826
+ *
1827
+ * @param options - Request options including channelId and userId (both required)
1828
+ * @returns The API response
1829
+ * @throws PolyVValidationError if channelId or userId is empty
1830
+ *
1831
+ * @example
1832
+ * ```typescript
1833
+ * const result = await channelService.setStatusEnd({
1834
+ * channelId: 'ch123456',
1835
+ * userId: 'user123',
1836
+ * });
1837
+ * ```
1838
+ */
1839
+ setStatusEnd(options: SetStatusRequest): Promise<string>;
1840
+ /**
1841
+ * Ban push stream (AC14)
1842
+ *
1843
+ * Bans the push stream for a channel.
1844
+ *
1845
+ * @param options - Request options including channelId and userId (both required)
1846
+ * @returns The API response
1847
+ * @throws PolyVValidationError if channelId or userId is empty
1848
+ *
1849
+ * @example
1850
+ * ```typescript
1851
+ * const result = await channelService.banPush({
1852
+ * channelId: 'ch123456',
1853
+ * userId: 'user123',
1854
+ * forbidTime: 60, // 60 minutes
1855
+ * playbackForbidden: 'Y',
1856
+ * });
1857
+ * ```
1858
+ */
1859
+ banPush(options: BanPushRequest): Promise<string>;
1860
+ /**
1861
+ * Resume push stream (AC15)
1862
+ *
1863
+ * Resumes the push stream for a channel.
1864
+ *
1865
+ * @param options - Request options including channelId and userId (both required)
1866
+ * @returns The API response
1867
+ * @throws PolyVValidationError if channelId or userId is empty
1868
+ *
1869
+ * @example
1870
+ * ```typescript
1871
+ * const result = await channelService.resume({
1872
+ * channelId: 'ch123456',
1873
+ * userId: 'user123',
1874
+ * });
1875
+ * ```
1876
+ */
1877
+ resume(options: {
1878
+ channelId: string;
1879
+ userId: string;
1880
+ }): Promise<string>;
1881
+ /**
1882
+ * End disk push (AC16)
1883
+ *
1884
+ * Ends the disk push stream for a channel.
1885
+ *
1886
+ * @param options - Request options including channelId and diskVideoId (both required)
1887
+ * @returns The API response
1888
+ * @throws PolyVValidationError if channelId or diskVideoId is empty
1889
+ *
1890
+ * @example
1891
+ * ```typescript
1892
+ * const result = await channelService.endDiskPush({
1893
+ * channelId: 'ch123456',
1894
+ * diskVideoId: 'video123',
1895
+ * });
1896
+ * ```
1897
+ */
1898
+ endDiskPush(options: EndDiskPushRequest): Promise<string>;
1899
+ /**
1900
+ * Update warmup switch (AC17)
1901
+ *
1902
+ * Enables or disables the warmup feature for a channel.
1903
+ *
1904
+ * @param options - Request options including channelId and warmUpEnabled (both required)
1905
+ * @returns The API response
1906
+ * @throws PolyVValidationError if channelId or warmUpEnabled is empty
1907
+ *
1908
+ * @example
1909
+ * ```typescript
1910
+ * // Enable warmup
1911
+ * const result = await channelService.updateWarmupSwitch({
1912
+ * channelId: 'ch123456',
1913
+ * warmUpEnabled: 'Y',
1914
+ * });
1915
+ *
1916
+ * // Disable warmup
1917
+ * const result = await channelService.updateWarmupSwitch({
1918
+ * channelId: 'ch123456',
1919
+ * warmUpEnabled: 'N',
1920
+ * });
1921
+ * ```
1922
+ */
1923
+ updateWarmupSwitch(options: UpdateWarmupSwitchRequest): Promise<string>;
1924
+ /**
1925
+ * Update warmup image (AC18)
1926
+ *
1927
+ * Updates the warmup image for a channel.
1928
+ *
1929
+ * @param options - Request options including channelId and coverImage (both required)
1930
+ * @returns The API response
1931
+ * @throws PolyVValidationError if channelId or coverImage is empty
1932
+ *
1933
+ * @example
1934
+ * ```typescript
1935
+ * const result = await channelService.updateWarmupImage({
1936
+ * channelId: 'ch123456',
1937
+ * coverImage: 'https://example.com/cover.jpg',
1938
+ * coverHref: 'https://example.com/target',
1939
+ * });
1940
+ * ```
1941
+ */
1942
+ updateWarmupImage(options: UpdateWarmupImageRequest): Promise<string>;
1943
+ /**
1944
+ * Update warmup video (AC19)
1945
+ *
1946
+ * Updates the warmup video for a channel.
1947
+ *
1948
+ * @param options - Request options including channelId and warmUpFlv (both required)
1949
+ * @returns The API response
1950
+ * @throws PolyVValidationError if channelId or warmUpFlv is empty
1951
+ *
1952
+ * @example
1953
+ * ```typescript
1954
+ * const result = await channelService.updateWarmupVideo({
1955
+ * channelId: 'ch123456',
1956
+ * warmUpFlv: 'https://example.com/warmup.flv',
1957
+ * });
1958
+ * ```
1959
+ */
1960
+ updateWarmupVideo(options: UpdateWarmupVideoRequest): Promise<string>;
1961
+ /**
1962
+ * Add channel product
1963
+ *
1964
+ * Adds a new product to the channel product library.
1965
+ * Note: Only (channelId, timestamp, appId) participate in signature,
1966
+ * body parameters do NOT participate in signature.
1967
+ *
1968
+ * @param params - Product parameters including channelId, name, status, linkType
1969
+ * @returns Created product information including productId
1970
+ * @throws PolyVValidationError if required parameters are missing
1971
+ *
1972
+ * @example
1973
+ * ```typescript
1974
+ * const product = await channelService.addChannelProduct({
1975
+ * channelId: 'ch123456',
1976
+ * name: 'My Product',
1977
+ * status: 1,
1978
+ * linkType: 10,
1979
+ * link: 'https://example.com/product',
1980
+ * cover: 'https://example.com/cover.jpg',
1981
+ * realPrice: 99.9,
1982
+ * });
1983
+ * console.log(product.productId);
1984
+ * ```
1985
+ */
1986
+ addChannelProduct(params: AddChannelProductParams): Promise<AddChannelProductResponse>;
1987
+ /**
1988
+ * Update channel product
1989
+ *
1990
+ * Updates an existing product in the channel product library.
1991
+ * Note: Only (channelId, timestamp, appId) participate in signature,
1992
+ * body parameters do NOT participate in signature.
1993
+ *
1994
+ * @param params - Product parameters including channelId, productId, name, status, linkType
1995
+ * @returns true if update was successful
1996
+ * @throws PolyVValidationError if required parameters are missing
1997
+ *
1998
+ * @examples
1999
+ * ```typescript
2000
+ * await channelService.updateChannelProduct({
2001
+ * channelId: 'ch123456',
2002
+ * productId: 12345,
2003
+ * name: 'Updated Product Name',
2004
+ * status: 2,
2005
+ * linkType: 10,
2006
+ * });
2007
+ * ```
2008
+ */
2009
+ updateChannelProduct(params: UpdateChannelProductParams): Promise<boolean>;
2010
+ /**
2011
+ * Delete channel product
2012
+ *
2013
+ * Deletes a product from the channel product library.
2014
+ * Note: All parameters (channelId, productId, appId, timestamp) participate in signature.
2015
+ *
2016
+ * @param params - Delete parameters including channelId and productId
2017
+ * @returns true if deletion was successful
2018
+ * @throws PolyVValidationError if required parameters are missing
2019
+ *
2020
+ * @example
2021
+ * ```typescript
2022
+ * const success = await channelService.deleteChannelProduct({
2023
+ * channelId: 'ch123456',
2024
+ * productId: 12345,
2025
+ * });
2026
+ * if (success) {
2027
+ * console.log('Product deleted');
2028
+ * }
2029
+ * ```
2030
+ */
2031
+ deleteChannelProduct(params: DeleteChannelProductParams): Promise<boolean>;
2032
+ }
2033
+ //# sourceMappingURL=channel.service.d.ts.map