polyv-live-api-sdk 1.0.13 → 1.0.14

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 (66) hide show
  1. package/README.md +21 -0
  2. package/dist/client.d.ts.map +1 -1
  3. package/dist/index.cjs +8747 -5683
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.d.cts +12589 -9410
  6. package/dist/index.d.ts +1 -1
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +8727 -5684
  9. package/dist/index.js.map +1 -1
  10. package/dist/services/account.service.d.ts +34 -26
  11. package/dist/services/account.service.d.ts.map +1 -1
  12. package/dist/services/channel.service.d.ts +373 -8
  13. package/dist/services/channel.service.d.ts.map +1 -1
  14. package/dist/services/chat.service.d.ts +12 -1
  15. package/dist/services/chat.service.d.ts.map +1 -1
  16. package/dist/services/finance.service.d.ts +16 -1
  17. package/dist/services/finance.service.d.ts.map +1 -1
  18. package/dist/services/index.d.ts +1 -0
  19. package/dist/services/index.d.ts.map +1 -1
  20. package/dist/services/live-interaction.service.d.ts +66 -385
  21. package/dist/services/live-interaction.service.d.ts.map +1 -1
  22. package/dist/services/v4/ai.service.d.ts +14 -2
  23. package/dist/services/v4/ai.service.d.ts.map +1 -1
  24. package/dist/services/v4/channel.service.d.ts +323 -23
  25. package/dist/services/v4/channel.service.d.ts.map +1 -1
  26. package/dist/services/v4/chat.service.d.ts +25 -4
  27. package/dist/services/v4/chat.service.d.ts.map +1 -1
  28. package/dist/services/v4/group.service.d.ts +14 -1
  29. package/dist/services/v4/group.service.d.ts.map +1 -1
  30. package/dist/services/v4/material.service.d.ts +37 -1
  31. package/dist/services/v4/material.service.d.ts.map +1 -1
  32. package/dist/services/v4/user.service.d.ts +113 -68
  33. package/dist/services/v4/user.service.d.ts.map +1 -1
  34. package/dist/services/web.service.d.ts +5 -5
  35. package/dist/services/web.service.d.ts.map +1 -1
  36. package/dist/types/account.d.ts +205 -86
  37. package/dist/types/account.d.ts.map +1 -1
  38. package/dist/types/channel.d.ts +874 -18
  39. package/dist/types/channel.d.ts.map +1 -1
  40. package/dist/types/chat.d.ts +3 -0
  41. package/dist/types/chat.d.ts.map +1 -1
  42. package/dist/types/client.d.ts +6 -2
  43. package/dist/types/client.d.ts.map +1 -1
  44. package/dist/types/finance.d.ts +69 -0
  45. package/dist/types/finance.d.ts.map +1 -1
  46. package/dist/types/index.d.ts +20 -19
  47. package/dist/types/index.d.ts.map +1 -1
  48. package/dist/types/live-interaction.d.ts +170 -171
  49. package/dist/types/live-interaction.d.ts.map +1 -1
  50. package/dist/types/v4-ai.d.ts +39 -0
  51. package/dist/types/v4-ai.d.ts.map +1 -1
  52. package/dist/types/v4-channel.d.ts +900 -82
  53. package/dist/types/v4-channel.d.ts.map +1 -1
  54. package/dist/types/v4-chat.d.ts +15 -4
  55. package/dist/types/v4-chat.d.ts.map +1 -1
  56. package/dist/types/v4-group.d.ts +41 -0
  57. package/dist/types/v4-group.d.ts.map +1 -1
  58. package/dist/types/v4-material.d.ts +46 -0
  59. package/dist/types/v4-material.d.ts.map +1 -1
  60. package/dist/types/v4-robot.d.ts +28 -0
  61. package/dist/types/v4-robot.d.ts.map +1 -1
  62. package/dist/types/v4-user.d.ts +816 -207
  63. package/dist/types/v4-user.d.ts.map +1 -1
  64. package/dist/types/web.d.ts +55 -39
  65. package/dist/types/web.d.ts.map +1 -1
  66. package/package.json +1 -1
@@ -109,7 +109,7 @@ export interface CreateChannelRequest {
109
109
  * Parameters required for creating a new channel using V4 API.
110
110
  * V4 API uses JSON body for request parameters.
111
111
  *
112
- * @see docs/api/v4/channel/create.md
112
+ * @see v4/channel/create.md under POLYV_API_DOCS_DIR or ../document-center/docs/live/api relative to the repository root
113
113
  */
114
114
  export interface CreateChannelV4Request {
115
115
  /** 直播名称,最大长度100 - REQUIRED */
@@ -223,7 +223,7 @@ export interface AuthSetting {
223
223
  * Update Watch Condition Request
224
224
  * 修改频道观看条件请求
225
225
  *
226
- * @see docs/api/web/watch_condition/set_watch_condition.md
226
+ * @see web/watch_condition/set_watch_condition.md under POLYV_API_DOCS_DIR or ../document-center/docs/live/api relative to the repository root
227
227
  */
228
228
  export interface UpdateWatchConditionRequest {
229
229
  /** 频道号,不传为通用设置 */
@@ -737,33 +737,33 @@ export interface ChannelSession {
737
737
  duration: number;
738
738
  }
739
739
  /**
740
- * Record File Item
740
+ * Record File Response
741
741
  */
742
- export interface RecordFileItem {
742
+ export interface RecordFileResponse {
743
743
  fileId: string;
744
+ userId: string;
744
745
  channelId: string;
745
- sessionId: string;
746
746
  startTime: string;
747
747
  endTime: string;
748
- fileSize: number;
748
+ filename: string;
749
+ filesize: number;
750
+ createdTime: number;
751
+ width: number;
752
+ height: number;
749
753
  duration: number;
750
- url: string;
751
- }
752
- /**
753
- * Record File Response
754
- */
755
- export interface RecordFileResponse {
756
- contents: RecordFileItem[];
757
- total: number;
758
- pageSize: number;
759
- pageNumber: number;
754
+ bitrate: number;
755
+ mp4: string;
756
+ m3u8: string;
757
+ channelSessionId: string;
758
+ liveType: ChannelScene;
759
+ daysLeft: number;
760
+ originSessionId?: string;
760
761
  }
761
762
  /**
762
763
  * Record File Request
763
764
  */
764
765
  export interface RecordFileRequest {
765
- page?: number;
766
- pageSize?: number;
766
+ fileId: string;
767
767
  }
768
768
  /**
769
769
  * Record Info
@@ -1095,6 +1095,174 @@ export interface RecordAddBreakpointRequestOld {
1095
1095
  sessionId: string;
1096
1096
  time: number;
1097
1097
  }
1098
+ /**
1099
+ * Playback video move type.
1100
+ */
1101
+ export type PlaybackVideoMoveType = 'up' | 'down';
1102
+ /**
1103
+ * List channel sessions request.
1104
+ */
1105
+ export interface ListChannelSessionsParams extends ChannelSessionsRequest {
1106
+ /** Channel ID - REQUIRED */
1107
+ channelId: string;
1108
+ }
1109
+ /**
1110
+ * Historical record file subtitle item.
1111
+ */
1112
+ export interface HistoricalRecordFileSubtitle {
1113
+ id: number;
1114
+ name: string;
1115
+ srtUrl: string;
1116
+ language: string;
1117
+ status: string;
1118
+ }
1119
+ /**
1120
+ * Historical record file item from /live/v2/channels/{channelId}/recordFiles.
1121
+ */
1122
+ export interface HistoricalRecordFileItem {
1123
+ channelId: string;
1124
+ fileId: string;
1125
+ url: string;
1126
+ startTime: string;
1127
+ endTime: string;
1128
+ fileSize: number;
1129
+ duration: number;
1130
+ bitrate: number;
1131
+ resolution?: string;
1132
+ channelSessionId: string;
1133
+ fileName: string;
1134
+ daysLeft: number;
1135
+ origin?: 'manual' | 'auto' | 'merge' | 'clip' | 'smart-clip' | string;
1136
+ originSessionId?: string;
1137
+ recordFileType?: 'complete' | 'part' | 'merge' | 'clip' | string;
1138
+ subtitleList?: HistoricalRecordFileSubtitle[];
1139
+ }
1140
+ /**
1141
+ * List historical record files request.
1142
+ */
1143
+ export interface ListRecordFilesParams {
1144
+ /** Channel ID - REQUIRED */
1145
+ channelId: string;
1146
+ /** POLYV user ID - REQUIRED */
1147
+ userId: string;
1148
+ /** Start date, yyyy-MM-dd */
1149
+ startDate?: string;
1150
+ /** End date, yyyy-MM-dd */
1151
+ endDate?: string;
1152
+ /** Live session IDs, comma-separated */
1153
+ sessionIds?: string;
1154
+ }
1155
+ export type ListRecordFilesResponse = HistoricalRecordFileItem[];
1156
+ /**
1157
+ * Merge historical record files request.
1158
+ */
1159
+ export interface MergeRecordFilesParams {
1160
+ /** Channel ID - REQUIRED */
1161
+ channelId: string;
1162
+ /** Record file URLs, comma-separated or array. Takes precedence when both urls and fileIds are provided. */
1163
+ urls?: string | string[];
1164
+ /** Record file IDs, comma-separated or array */
1165
+ fileIds?: string | string[];
1166
+ /** Merged file name */
1167
+ fileName?: string;
1168
+ }
1169
+ export type MergeRecordFilesResponse = string;
1170
+ /**
1171
+ * Add VOD video to playback library request.
1172
+ */
1173
+ export interface AddVodPlaybackToLibraryParams {
1174
+ /** Channel ID - REQUIRED */
1175
+ channelId: string;
1176
+ /** VOD video ID - REQUIRED */
1177
+ vid: string;
1178
+ /** Whether to set as default playback video */
1179
+ setAsDefault?: YNFlag;
1180
+ /** Playback list type */
1181
+ listType?: PlaybackListType;
1182
+ }
1183
+ export type AddVodPlaybackToLibraryResponse = PlaybackVideoItem;
1184
+ /**
1185
+ * Delete historical record files request.
1186
+ */
1187
+ export interface DeleteRecordFileParams {
1188
+ /** Channel ID - REQUIRED */
1189
+ channelId: string;
1190
+ /** Live session ID */
1191
+ sessionId?: string;
1192
+ /** Record start time, yyyyMMddHHmmss */
1193
+ startTime?: string;
1194
+ }
1195
+ /**
1196
+ * Convert historical record file to VOD request.
1197
+ */
1198
+ export interface ConvertRecordFileToVodParams {
1199
+ /** Channel ID - REQUIRED */
1200
+ channelId: string;
1201
+ /** POLYV user ID - REQUIRED */
1202
+ userId: string;
1203
+ /** VOD video name after conversion - REQUIRED */
1204
+ fileName: string;
1205
+ /** Record file URL */
1206
+ fileUrl?: string;
1207
+ /** Live session ID */
1208
+ sessionId?: string;
1209
+ /** VOD category ID */
1210
+ cataid?: string;
1211
+ /** VOD category name */
1212
+ cataname?: string;
1213
+ /** Whether to put converted video into playback list */
1214
+ toPlayList?: YNFlag;
1215
+ /** Whether to set as default playback video */
1216
+ setAsDefault?: YNFlag;
1217
+ }
1218
+ export type ConvertRecordFileToVodResponse = string;
1219
+ /**
1220
+ * Set playback enabled by user scope request.
1221
+ */
1222
+ export interface SetUserPlaybackEnabledParams {
1223
+ /** POLYV user ID - REQUIRED */
1224
+ userId: string;
1225
+ /** Playback enabled flag - REQUIRED */
1226
+ playBackEnabled: YNFlag;
1227
+ /** Channel ID. Omit or pass -1 to update all channels under the user. */
1228
+ channelId?: string;
1229
+ }
1230
+ export type SetUserPlaybackEnabledResponse = string;
1231
+ /**
1232
+ * Move one playback or VOD video up/down request.
1233
+ */
1234
+ export interface MovePlaybackVideoParams {
1235
+ /** Channel ID - REQUIRED */
1236
+ channelId: string;
1237
+ /** Video ID - REQUIRED */
1238
+ videoId: string;
1239
+ /** Move direction - REQUIRED */
1240
+ type: PlaybackVideoMoveType;
1241
+ /** Playback list type */
1242
+ listType?: PlaybackListType;
1243
+ }
1244
+ /**
1245
+ * Set default playback or VOD video request.
1246
+ */
1247
+ export interface SetDefaultPlaybackVideoParams {
1248
+ /** Channel ID - REQUIRED */
1249
+ channelId: string;
1250
+ /** Video ID - REQUIRED */
1251
+ videoId: string;
1252
+ /** Playback list type */
1253
+ listType?: PlaybackListType;
1254
+ }
1255
+ /**
1256
+ * Sort playback or VOD videos request.
1257
+ */
1258
+ export interface SortPlaybackVideosParams {
1259
+ /** Channel ID - REQUIRED */
1260
+ channelId: string;
1261
+ /** Complete ordered video ID list - REQUIRED */
1262
+ videoIds: string[];
1263
+ /** Playback list type */
1264
+ listType?: PlaybackListType;
1265
+ }
1098
1266
  /**
1099
1267
  * Player Logo Settings
1100
1268
  */
@@ -2066,6 +2234,445 @@ export interface UpdateWarmupVideoRequest {
2066
2234
  /** Warmup FLV URL - REQUIRED */
2067
2235
  warmUpFlv: string;
2068
2236
  }
2237
+ /**
2238
+ * Channel advert item returned by /live/v3/channel/advert/list.
2239
+ */
2240
+ export interface ChannelAdvert {
2241
+ /** Text advert content */
2242
+ text?: string;
2243
+ /** Image advert URL */
2244
+ img?: string;
2245
+ /** Advert link URL */
2246
+ href?: string;
2247
+ }
2248
+ /**
2249
+ * Channel product library enabled status.
2250
+ */
2251
+ export interface ChannelProductEnabledResponse {
2252
+ /** Product library enabled flag */
2253
+ enabled: YNFlag;
2254
+ }
2255
+ /**
2256
+ * PPT record setting returned by /live/v3/channel/pptRecord/get-setting.
2257
+ */
2258
+ export interface PptRecordSettingResponse {
2259
+ /** Channel ID */
2260
+ channelId: string | number;
2261
+ /** PolyV user ID */
2262
+ userId: string;
2263
+ /** Video layout type: 0 three-screen, 1 document-only, 2 picture-in-picture */
2264
+ type: number;
2265
+ /** Whether global setting is enabled */
2266
+ globalSettingEnabled: YNFlag;
2267
+ /** Camera aspect ratio */
2268
+ videoRatio?: string | number;
2269
+ /** Display image URL used by older docs */
2270
+ brandImgFile?: string;
2271
+ /** Background image URL used by older docs */
2272
+ backgroundImgFile?: string;
2273
+ /** Display image URL */
2274
+ brandImg?: string;
2275
+ /** Background image URL */
2276
+ backgroundImg?: string;
2277
+ /** Created time */
2278
+ createdTime?: number;
2279
+ /** Last modified time */
2280
+ lastModified?: number;
2281
+ /** Camera position */
2282
+ actionPosition?: string;
2283
+ }
2284
+ /**
2285
+ * Query parameters for /live/v3/channel/pptRecord/list.
2286
+ */
2287
+ export interface ListPptRecordTasksParams {
2288
+ /** Channel ID - REQUIRED */
2289
+ channelId: string;
2290
+ /** PPT record session ID */
2291
+ sessionId?: string;
2292
+ /** Task status */
2293
+ status?: string;
2294
+ /** Live start time lower bound, yyyyMMddHHmmss */
2295
+ startTime?: string;
2296
+ /** Live start time upper bound, yyyyMMddHHmmss */
2297
+ endTime?: string;
2298
+ /** Page number */
2299
+ page?: number;
2300
+ /** Page size */
2301
+ pageSize?: number;
2302
+ }
2303
+ /**
2304
+ * PPT record task item.
2305
+ */
2306
+ export interface PptRecordTaskItem {
2307
+ /** Task ID */
2308
+ taskId: number;
2309
+ /** Channel ID */
2310
+ channelId: string | number;
2311
+ /** Playback title */
2312
+ title?: string;
2313
+ /** MP4 download URL */
2314
+ url?: string;
2315
+ /** PPT record session ID */
2316
+ sessionId?: string;
2317
+ /** Live start time, yyyyMMddHHmmss */
2318
+ startTime?: string;
2319
+ /** Task status */
2320
+ status?: string;
2321
+ /** Remaining days before expiry */
2322
+ remainDay?: number;
2323
+ /** Video duration in seconds */
2324
+ duration?: number;
2325
+ /** Live system video ID */
2326
+ videoId?: string;
2327
+ /** VOD VID after upload */
2328
+ vid?: string | null;
2329
+ }
2330
+ /**
2331
+ * PPT record task page response.
2332
+ */
2333
+ export interface ListPptRecordTasksResponse {
2334
+ pageNumber: number;
2335
+ totalPages: number;
2336
+ pageSize: number;
2337
+ contents: PptRecordTaskItem[];
2338
+ }
2339
+ /**
2340
+ * Query parameters for /live/v3/channel/transmit/get-associations.
2341
+ */
2342
+ export interface GetTransmitAssociationsParams {
2343
+ /** Source channel ID; omit to query all associations under the account */
2344
+ channelId?: string;
2345
+ }
2346
+ /**
2347
+ * Transmit association item.
2348
+ */
2349
+ export interface TransmitAssociation {
2350
+ /** Source channel ID; null when the receiver has no source channel association */
2351
+ channelId: string | number | null;
2352
+ /** Receiver channel ID */
2353
+ receiveChannelId: string | number;
2354
+ }
2355
+ /**
2356
+ * Query parameters for /live/v4/channel/channel-user-children/get-channels.
2357
+ */
2358
+ export interface GetUserChildrenChannelsParams {
2359
+ /** Child account user ID - REQUIRED */
2360
+ childUserId: string;
2361
+ /** Channel created time lower bound */
2362
+ startTime?: number;
2363
+ /** Channel created time upper bound */
2364
+ endTime?: number;
2365
+ /** Page number - REQUIRED */
2366
+ pageNumber: number;
2367
+ /** Page size - REQUIRED */
2368
+ pageSize: number;
2369
+ }
2370
+ /**
2371
+ * Child account channel item.
2372
+ */
2373
+ export interface UserChildrenChannel {
2374
+ /** Channel ID */
2375
+ channelId: number;
2376
+ /** Organization ID */
2377
+ organizationId?: string;
2378
+ /** Created time */
2379
+ createdTime?: number;
2380
+ }
2381
+ /**
2382
+ * Child account channel page response.
2383
+ */
2384
+ export interface GetUserChildrenChannelsResponse {
2385
+ pageSize: number;
2386
+ pageNumber: number;
2387
+ totalItems: number;
2388
+ totalPages: number;
2389
+ contents: UserChildrenChannel[];
2390
+ }
2391
+ /**
2392
+ * Query parameters for /live/v3/channel/promotion/list-channels-follow.
2393
+ */
2394
+ export interface ListChannelsFollowParams {
2395
+ /** Channel IDs, comma-separated or array - REQUIRED */
2396
+ channelIds: string | Array<string | number>;
2397
+ }
2398
+ /**
2399
+ * Channel follow-public-account settings.
2400
+ */
2401
+ export interface ChannelFollowSetting {
2402
+ /** Channel ID */
2403
+ channelId: string | number;
2404
+ /** Follow feature switch */
2405
+ enabled: YNFlag;
2406
+ /** Auto popup switch */
2407
+ autoShowEnabled: YNFlag;
2408
+ /** QR code image URL */
2409
+ qrCodeUrl?: string;
2410
+ /** Entry text */
2411
+ entranceText?: string;
2412
+ /** Popup tips */
2413
+ tips?: string;
2414
+ /** PC popup tips */
2415
+ pcFollowTips?: string;
2416
+ }
2417
+ /**
2418
+ * Channel follow settings response.
2419
+ */
2420
+ export interface ListChannelsFollowResponse {
2421
+ list: ChannelFollowSetting[];
2422
+ }
2423
+ export type ChannelIdListInput = string | Array<string | number>;
2424
+ export interface AddPptRecordTaskParams {
2425
+ /** Channel ID - REQUIRED */
2426
+ channelId: string;
2427
+ /** Playback video ID - REQUIRED */
2428
+ videoId: string;
2429
+ }
2430
+ export interface PptRecordMutationResponse {
2431
+ /** Operation result */
2432
+ result: boolean;
2433
+ }
2434
+ export interface UpdatePptRecordSettingParams {
2435
+ /** Channel ID - REQUIRED */
2436
+ channelId: string;
2437
+ /** Whether global setting is enabled */
2438
+ globalSettingEnabled?: YNFlag;
2439
+ /** Video layout type: 0 three-screen, 1 document-only, 2 picture-in-picture */
2440
+ type?: 0 | 1 | 2;
2441
+ /** Camera aspect ratio: 0 = 16:9, 1 = 4:3 */
2442
+ videoRatio?: 0 | 1;
2443
+ /** Display image file or URL */
2444
+ brandImgFile?: string | File | Blob | Buffer;
2445
+ /** Background image file or URL */
2446
+ backgroundImgFile?: string | File | Blob | Buffer;
2447
+ }
2448
+ export interface DeletePptRecordParams {
2449
+ /** Channel ID - REQUIRED */
2450
+ channelId: string;
2451
+ /** PPT record task IDs - REQUIRED */
2452
+ taskIds: ChannelIdListInput;
2453
+ }
2454
+ export interface ViewerApiTokenParams {
2455
+ /** Channel ID - REQUIRED */
2456
+ channelId: string;
2457
+ /** Viewer ID, 1-64 chars - REQUIRED */
2458
+ viewerId: string;
2459
+ /** Viewer nickname */
2460
+ nickname?: string;
2461
+ /** Viewer avatar URL */
2462
+ avatar?: string;
2463
+ /** WeChat OpenID */
2464
+ openid?: string;
2465
+ /** Viewer actor/title */
2466
+ actor?: string;
2467
+ }
2468
+ export interface ViewerApiTokenResponse {
2469
+ /** API token */
2470
+ token: string;
2471
+ }
2472
+ export interface ChatTokenParams {
2473
+ /** Channel ID - REQUIRED */
2474
+ channelId: string;
2475
+ /** Viewer/user ID - REQUIRED */
2476
+ userId: string;
2477
+ /** Role - REQUIRED */
2478
+ role: 'teacher' | 'admin' | 'guest' | 'assistant' | 'viewer';
2479
+ /** Watch origin */
2480
+ origin?: string;
2481
+ }
2482
+ export interface ChatTokenResponse {
2483
+ token: string;
2484
+ mediaChannelKey?: string;
2485
+ roomId?: string;
2486
+ childRoomEnabled?: YNFlag;
2487
+ chatApiDomain?: string;
2488
+ chatDomain?: string;
2489
+ }
2490
+ export interface TokenLoginUrlParams {
2491
+ /** Channel ID - REQUIRED */
2492
+ channelId: string;
2493
+ /** Role account ID */
2494
+ accountId?: string;
2495
+ }
2496
+ export type TokenLoginUrlResponse = string | {
2497
+ token: string;
2498
+ };
2499
+ export interface BatchAddTransmitParams {
2500
+ /** Source transmit channel ID - REQUIRED */
2501
+ channelId: string;
2502
+ /** Receiver channel names, max 100 - REQUIRED */
2503
+ names: string[];
2504
+ }
2505
+ export interface TransmitChannelInfo {
2506
+ channelId: number;
2507
+ name: string;
2508
+ channelPasswd?: string;
2509
+ authType?: string;
2510
+ playBackEnabled?: YNFlag;
2511
+ streamType?: string;
2512
+ debugEnabled?: YNFlag;
2513
+ stream?: string;
2514
+ status?: string;
2515
+ categoryId?: number;
2516
+ categoryName?: string;
2517
+ isSmallClass?: YNFlag;
2518
+ scene?: string | null;
2519
+ newScene?: string | null;
2520
+ template?: string | null;
2521
+ createdTime?: number;
2522
+ coverImage?: string;
2523
+ type?: string;
2524
+ startTime?: number | null;
2525
+ publisher?: string;
2526
+ splashImg?: string;
2527
+ splashEnabled?: YNFlag;
2528
+ pureRtcEnabled?: YNFlag;
2529
+ roomIds?: string | null;
2530
+ }
2531
+ export type BatchAddTransmitResponse = TransmitChannelInfo[];
2532
+ export interface SubmeetingChannelInput {
2533
+ /** Submeeting channel ID - REQUIRED */
2534
+ channelId: string | number;
2535
+ /** Submeeting name */
2536
+ name?: string;
2537
+ }
2538
+ export interface BatchAddSubmeetingParams {
2539
+ /** Main meeting channel ID - REQUIRED */
2540
+ channelId: string;
2541
+ /** Submeeting channel list, max 60 - REQUIRED */
2542
+ subChannels: SubmeetingChannelInput[];
2543
+ }
2544
+ export type BatchAddSubmeetingResponse = number[];
2545
+ export interface AssociationReceiveChannelsParams {
2546
+ /** Source transmit channel ID - REQUIRED */
2547
+ channelId: string;
2548
+ /** Receiver channel IDs - REQUIRED */
2549
+ receiveChannelIds: ChannelIdListInput;
2550
+ /** Operation type, defaults to add */
2551
+ type?: 'add' | 'cancel';
2552
+ }
2553
+ export type AssociationReceiveChannelsResponse = Array<string | number>;
2554
+ export interface RemoveChatContentsParams {
2555
+ /** Channel ID - REQUIRED */
2556
+ channelId: string;
2557
+ /** Chat message IDs - REQUIRED */
2558
+ ids: string | string[];
2559
+ }
2560
+ export interface BatchDeleteChannelProductParams {
2561
+ /** Channel ID - REQUIRED */
2562
+ channelId: string;
2563
+ /** Product IDs, max 100 - REQUIRED */
2564
+ productIds: number[];
2565
+ }
2566
+ export type BatchAddChannelProductItem = Omit<AddChannelProductParams, 'channelId'>;
2567
+ export interface BatchAddChannelProductsParams {
2568
+ /** Channel ID - REQUIRED */
2569
+ channelId: string;
2570
+ /** Products - REQUIRED */
2571
+ products: BatchAddChannelProductItem[];
2572
+ }
2573
+ export type BatchAddChannelProductsResponse = AddChannelProductResponse[];
2574
+ export interface BatchShelfChannelProductParams {
2575
+ /** Channel ID - REQUIRED */
2576
+ channelId: string;
2577
+ /** Product IDs, max 100 - REQUIRED */
2578
+ productIds: number[];
2579
+ /** Shelf status: 1 on shelf, 2 off shelf - REQUIRED */
2580
+ shelf: ProductStatus;
2581
+ }
2582
+ export interface ProductIdParams {
2583
+ /** Channel ID - REQUIRED */
2584
+ channelId: string;
2585
+ /** Product ID - REQUIRED */
2586
+ productId: number;
2587
+ }
2588
+ export interface ShelfChannelProductParams extends ProductIdParams {
2589
+ /** Shelf status: 1 on shelf, 2 off shelf - REQUIRED */
2590
+ shelf: ProductStatus;
2591
+ }
2592
+ export interface PushChannelProductParams extends ProductIdParams {
2593
+ /** Push card type */
2594
+ pushCardType?: 'smallCard' | 'bigCard';
2595
+ }
2596
+ export interface SortChannelProductOrderParams extends ProductIdParams {
2597
+ /** 10 up, 20 down, 50 move to explicit sort */
2598
+ type: 10 | 20 | 50;
2599
+ /** Required when type=50 */
2600
+ sort?: number;
2601
+ }
2602
+ export interface ReferenceProductParams {
2603
+ /** Channel ID - REQUIRED */
2604
+ channelId: string;
2605
+ /** Platform product origin ID - REQUIRED */
2606
+ originId: string;
2607
+ /** Shelf status: 1 on shelf, 2 off shelf - REQUIRED */
2608
+ status: ProductStatus;
2609
+ /** Whether to sync platform tags */
2610
+ withTags?: boolean;
2611
+ }
2612
+ export type ReferenceProductResponse = ChannelProductItem;
2613
+ export interface DeleteDiskVideosParams {
2614
+ /** Channel ID - REQUIRED */
2615
+ channelId: string;
2616
+ /** VOD/material video IDs */
2617
+ vids?: string | string[];
2618
+ /** Disk video IDs */
2619
+ videoIds?: string | string[];
2620
+ }
2621
+ export interface AddDiskVideosParams {
2622
+ /** Channel ID - REQUIRED */
2623
+ channelId: string;
2624
+ /** Video IDs or record file IDs - REQUIRED */
2625
+ vids: string | string[];
2626
+ /** Video origin, defaults to vod */
2627
+ origin?: 'vod' | 'material' | 'record';
2628
+ /** Start times in 13-digit ms timestamps */
2629
+ startTimes?: string | number | Array<string | number>;
2630
+ }
2631
+ export interface SetChannelTokenParams {
2632
+ /** Channel ID - REQUIRED */
2633
+ channelId: string;
2634
+ /** One-time login token - REQUIRED */
2635
+ token: string;
2636
+ }
2637
+ export interface StopQuestionnaireParams {
2638
+ /** Channel IDs - REQUIRED */
2639
+ channelIds: ChannelIdListInput;
2640
+ }
2641
+ export interface StopQuestionnaireResponse {
2642
+ result: boolean | string;
2643
+ }
2644
+ export interface BatchUpdateDanmuParams {
2645
+ /** Channel IDs - REQUIRED */
2646
+ channelIds: ChannelIdListInput;
2647
+ /** Y closes danmu, N opens danmu - REQUIRED */
2648
+ closeDanmu: YNFlag;
2649
+ /** Whether to show danmu info - REQUIRED */
2650
+ showDanmuInfoEnabled: YNFlag;
2651
+ }
2652
+ export interface UpdateChannelsFollowParams {
2653
+ /** Channel IDs - REQUIRED */
2654
+ channelIds: ChannelIdListInput;
2655
+ /** QR code image URL - REQUIRED */
2656
+ qrCodeUrl: string;
2657
+ enabled?: YNFlag;
2658
+ autoShowEnabled?: YNFlag;
2659
+ /** Entry text, max 8 chars */
2660
+ entranceText?: string;
2661
+ /** Popup tips, max 30 chars */
2662
+ tips?: string;
2663
+ /** PC popup tips, max 30 chars */
2664
+ pcFollowTips?: string;
2665
+ }
2666
+ export interface UpdateStreamTypeParams {
2667
+ /** Channel ID - REQUIRED */
2668
+ channelId: string;
2669
+ /** Stream type - REQUIRED */
2670
+ streamType: ChannelStreamType;
2671
+ /** Pull URL, required when streamType=pull */
2672
+ pullUrl?: string;
2673
+ /** Pull stream start time */
2674
+ pullStreamTime?: number;
2675
+ }
2069
2676
  /**
2070
2677
  * Product link type
2071
2678
  * - 10: Universal link (通用链接)
@@ -2398,4 +3005,253 @@ export interface ListChannelProductsResponse {
2398
3005
  /** Has more pages */
2399
3006
  hasMore?: boolean;
2400
3007
  }
3008
+ /**
3009
+ * Backend login-state endpoint scope for channel viewer APIs.
3010
+ */
3011
+ export type ChannelViewerApiScope = 'user' | 'teacher';
3012
+ /**
3013
+ * Common params for backend login-state channel viewer APIs.
3014
+ */
3015
+ export interface ChannelViewerScopedParams {
3016
+ /** Endpoint scope, defaults to user */
3017
+ scope?: ChannelViewerApiScope;
3018
+ }
3019
+ /**
3020
+ * Generic page response used by channel viewer backend APIs.
3021
+ */
3022
+ export interface ChannelViewerPageResponse<T> {
3023
+ /** Current page number */
3024
+ pageNumber: number;
3025
+ /** Page size */
3026
+ pageSize: number;
3027
+ /** Total pages */
3028
+ totalPages: number;
3029
+ /** Total item count */
3030
+ totalItems: number;
3031
+ /** Page items */
3032
+ contents: T[];
3033
+ }
3034
+ /**
3035
+ * Channel viewer group item.
3036
+ */
3037
+ export interface ChannelViewerGroup {
3038
+ /** Group ID */
3039
+ id: number;
3040
+ /** Channel ID */
3041
+ channelId: number;
3042
+ /** Group name */
3043
+ name: string;
3044
+ /** Number of viewers associated with this group */
3045
+ viewerCount: number;
3046
+ }
3047
+ export interface ListChannelViewerGroupsParams extends ChannelViewerScopedParams {
3048
+ /** Channel ID - REQUIRED */
3049
+ channelId: string | number;
3050
+ }
3051
+ export type ListChannelViewerGroupsResponse = ChannelViewerGroup[];
3052
+ export interface CreateChannelViewerGroupParams extends ChannelViewerScopedParams {
3053
+ /** Channel ID - REQUIRED */
3054
+ channelId: string | number;
3055
+ /** Group name, max 128 chars - REQUIRED */
3056
+ name: string;
3057
+ }
3058
+ export interface UpdateChannelViewerGroupParams extends ChannelViewerScopedParams {
3059
+ /** Channel ID - REQUIRED */
3060
+ channelId: string | number;
3061
+ /** Group ID - REQUIRED */
3062
+ id: string | number;
3063
+ /** New group name, max 128 chars - REQUIRED */
3064
+ name: string;
3065
+ }
3066
+ export interface DeleteChannelViewerGroupParams extends ChannelViewerScopedParams {
3067
+ /** Channel ID - REQUIRED */
3068
+ channelId: string | number;
3069
+ /** Group ID - REQUIRED */
3070
+ id: string | number;
3071
+ }
3072
+ export interface ChannelViewerGroupSetting {
3073
+ /** Channel viewer group switch */
3074
+ channelViewerGroupEnabled: YNFlag;
3075
+ /** Allow viewers outside groups to watch */
3076
+ notInGroupWatchEnabled: YNFlag;
3077
+ }
3078
+ export interface GetChannelViewerGroupSettingParams extends ChannelViewerScopedParams {
3079
+ /** Channel ID - REQUIRED */
3080
+ channelId: string | number;
3081
+ }
3082
+ export interface UpdateChannelViewerGroupSettingParams extends ChannelViewerScopedParams {
3083
+ /** Channel ID - REQUIRED */
3084
+ channelId: string | number;
3085
+ /** Channel viewer group switch */
3086
+ channelViewerGroupEnabled?: YNFlag;
3087
+ /** Allow viewers outside groups to watch */
3088
+ notInGroupWatchEnabled?: YNFlag;
3089
+ }
3090
+ /**
3091
+ * Channel-owned viewer item.
3092
+ */
3093
+ export interface ChannelViewerItem {
3094
+ /** Primary key */
3095
+ id: number;
3096
+ /** Channel ID */
3097
+ channelId: number;
3098
+ /** Viewer ID */
3099
+ viewerId: string;
3100
+ /** Group ID */
3101
+ groupId?: number;
3102
+ /** Group name */
3103
+ groupName?: string;
3104
+ /** Viewer nickname */
3105
+ nickname?: string;
3106
+ /** WeChat avatar */
3107
+ wxAvatar?: string;
3108
+ /** WeCom avatar */
3109
+ qwAvatar?: string;
3110
+ /** Mobile number */
3111
+ mobile?: string;
3112
+ }
3113
+ export interface ListChannelViewersParams extends ChannelViewerScopedParams {
3114
+ /** Channel ID - REQUIRED */
3115
+ channelId: string | number;
3116
+ /** Group ID */
3117
+ groupId?: string | number;
3118
+ /** Viewer ID, max 64 chars */
3119
+ viewerId?: string;
3120
+ /** Viewer nickname, max 128 chars */
3121
+ nickname?: string;
3122
+ /** Mobile number, max 32 chars */
3123
+ mobile?: string;
3124
+ /** Page number, default 1 */
3125
+ pageNumber?: number;
3126
+ /** Page size, default 10, max 1000 */
3127
+ pageSize?: number;
3128
+ }
3129
+ export type ListChannelViewersResponse = ChannelViewerPageResponse<ChannelViewerItem>;
3130
+ export interface ExportChannelViewersParams extends ChannelViewerScopedParams {
3131
+ /** Channel ID - REQUIRED */
3132
+ channelId: string | number;
3133
+ /** Group ID */
3134
+ groupId?: string | number;
3135
+ /** Viewer ID */
3136
+ viewerId?: string;
3137
+ /** Viewer nickname */
3138
+ nickname?: string;
3139
+ /** Mobile number */
3140
+ mobile?: string;
3141
+ }
3142
+ export type ExportChannelViewersResponse = string;
3143
+ export interface AddChannelViewersParams extends ChannelViewerScopedParams {
3144
+ /** Channel ID - REQUIRED */
3145
+ channelId: string | number;
3146
+ /** Target group ID */
3147
+ groupId?: string | number;
3148
+ /** Viewer IDs, max 1000 - REQUIRED */
3149
+ viewerIds: string[];
3150
+ }
3151
+ export interface DeleteChannelViewersParams extends ChannelViewerScopedParams {
3152
+ /** Channel ID - REQUIRED */
3153
+ channelId: string | number;
3154
+ /** Viewer IDs, max 1000 - REQUIRED */
3155
+ viewerIds: string[];
3156
+ }
3157
+ export interface TransferChannelViewersParams extends ChannelViewerScopedParams {
3158
+ /** Channel ID - REQUIRED */
3159
+ channelId: string | number;
3160
+ /** Target group ID; omit to clear group association */
3161
+ targetGroupId?: string | number;
3162
+ /** Viewer IDs, max 1000 - REQUIRED */
3163
+ viewerIds: string[];
3164
+ }
3165
+ export type ChannelViewerImportFile = File | Blob | Buffer;
3166
+ export interface ImportChannelViewersParams extends ChannelViewerScopedParams {
3167
+ /** Channel ID - REQUIRED */
3168
+ channelId: string | number;
3169
+ /** Target group ID */
3170
+ groupId?: string | number;
3171
+ /** Excel file - REQUIRED */
3172
+ file: ChannelViewerImportFile;
3173
+ }
3174
+ export interface ImportChannelViewersResponse {
3175
+ /** Successful import count */
3176
+ successCount: number;
3177
+ /** Failed import count */
3178
+ failCount: number;
3179
+ /** Failed detail file URL */
3180
+ failFileUrl?: string;
3181
+ }
3182
+ /**
3183
+ * Viewer not associated with any channel group.
3184
+ */
3185
+ export interface UnrelatedChannelViewerItem {
3186
+ /** Viewer unique ID */
3187
+ viewerUnionId: string;
3188
+ /** Viewer nickname */
3189
+ nickname?: string;
3190
+ /** WeChat nickname */
3191
+ wxNickName?: string;
3192
+ /** Mobile number */
3193
+ mobile?: string;
3194
+ /** External viewer ID */
3195
+ externalViewerId?: string;
3196
+ /** WeChat OpenID */
3197
+ wxOpenId?: string;
3198
+ /** WeChat UnionID */
3199
+ wxUnionId?: string;
3200
+ /** Viewer source */
3201
+ source?: string;
3202
+ /** Name */
3203
+ name?: string;
3204
+ /** Last collected mobile number */
3205
+ lastCollectMobile?: string;
3206
+ /** Email */
3207
+ email?: string;
3208
+ /** Area */
3209
+ area?: string;
3210
+ /** Latest access IP */
3211
+ latestAccessIp?: string;
3212
+ /** Device information */
3213
+ device?: string;
3214
+ /** Total watch duration in seconds */
3215
+ watchDuration?: number;
3216
+ /** Watched channel count */
3217
+ watchChannelCount?: number;
3218
+ /** Label IDs */
3219
+ labelIds?: Array<string | number>;
3220
+ /** Label names */
3221
+ labelNames?: string[];
3222
+ /** Viewer status */
3223
+ status?: string;
3224
+ /** Creation time */
3225
+ createTime?: string;
3226
+ }
3227
+ export interface ListUnrelatedChannelViewersParams extends ChannelViewerScopedParams {
3228
+ /** Channel ID - REQUIRED */
3229
+ channelId: string | number;
3230
+ name?: string;
3231
+ mobile?: string;
3232
+ externalViewerId?: string;
3233
+ wxOpenId?: string;
3234
+ wxUnionId?: string;
3235
+ nickname?: string;
3236
+ wxNickName?: string;
3237
+ source?: string;
3238
+ email?: string;
3239
+ area?: string;
3240
+ lastCollectMobile?: string;
3241
+ /** Search keyword matching nickname and wxNickName */
3242
+ searchKeyword?: string;
3243
+ viewerId?: string;
3244
+ status?: string;
3245
+ /** Registration start time, yyyy-MM-dd HH:mm:ss */
3246
+ startCreateTime?: string;
3247
+ /** Registration end time, yyyy-MM-dd HH:mm:ss */
3248
+ endCreateTime?: string;
3249
+ /** Label IDs, max 10 */
3250
+ labelIds?: Array<string | number>;
3251
+ /** Page number, default 1, max 1000 */
3252
+ pageNumber?: number;
3253
+ /** Page size, default 10, max 1000 */
3254
+ pageSize?: number;
3255
+ }
3256
+ export type ListUnrelatedChannelViewersResponse = ChannelViewerPageResponse<UnrelatedChannelViewerItem>;
2401
3257
  //# sourceMappingURL=channel.d.ts.map