@hyext/types-ext-sdk-hy 4.0.0 → 4.0.1

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 (2) hide show
  1. package/index.d.ts +346 -346
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -226,552 +226,552 @@ type SysConfig = {
226
226
  function getConfig(): SysConfig;
227
227
 
228
228
  /**
229
- * IEG上报
229
+ * AR特效
230
230
  */
231
- namespace ad {
231
+ namespace ar {
232
232
  /**
233
- * 构建下一页信息
234
- * @param params - 传入参数
235
- * @returns 调用结果
233
+ * 是否支持Unity
234
+ * @returns 查询结果
236
235
  */
237
- function ztAfterPage(params: ZtAfterPageReq): Promise<ZtAfterPageRsp>;
236
+ function isSupportUnity(): Promise<SupportResp>;
238
237
  /**
239
- * IEG点击不发生跳转上报
240
- * @param params - 传入参数
241
- * @returns 调用结果
238
+ * 是否支持AR
239
+ * @returns 查询结果
242
240
  */
243
- function ztReportAction(params: ZtReportActionReq): Promise<void>;
241
+ function isSupportAR(): Promise<SupportResp>;
244
242
  /**
245
- * IEG点击并跳转上报
246
- * @param params - 传入参数
243
+ * 获取特效列表数据
244
+ * @param params - 参数
247
245
  * @returns 调用结果
248
246
  */
249
- function ztReportClick(params: ZtReportClickReq): Promise<void>;
247
+ function getEffectList(params: SceneReq): Promise<SceneRespEffectInfo[]>;
250
248
  /**
251
- * IEG曝光上报
252
- * @param params - 传入参数
249
+ * 启动activity
250
+ * @param params - 启动参数
253
251
  * @returns 调用结果
254
252
  */
255
- function ztReportShow(params: ZtReportShowReq): Promise<void>;
253
+ function loadUnity(params: SceneReq): Promise<void>;
256
254
  /**
257
- * 设置页面类型
258
- * @param params - 传入参数
255
+ * 退出Unity
259
256
  * @returns 调用结果
260
257
  */
261
- function ztSetIegPageType(params: ZtSetIegPageTypeReq): Promise<void>;
258
+ function unloadUnity(): Promise<void>;
262
259
  /**
263
- * IEG点击打开appstore上报
264
- * @param params - 传入参数
260
+ * 切换AR特效
261
+ * @param params - 切换参数
265
262
  * @returns 调用结果
266
263
  */
267
- function ztPresentAppStore(params: ZtPresentAppStoreReq): Promise<void>;
264
+ function switchArEffect(params: SwitchReq): Promise<void>;
268
265
  /**
269
- * 创建广告实例
270
- * @param params - 传入参数
266
+ * 获取当前场景名
271
267
  * @returns 调用结果
272
268
  */
273
- function createAd(params: CreateAdReq): Promise<CreateAdRsp>;
269
+ function getCurrentScene(): Promise<SceneResp>;
274
270
  /**
275
- * 显示广告
276
- * @param params - 传入参数
271
+ * 重置AR平面
277
272
  * @returns 调用结果
278
273
  */
279
- function showAd(params: ShowAdReq): Promise<void>;
274
+ function resetPlane(): Promise<void>;
280
275
  /**
281
- * 加载广告
282
- * @param params - 传入参数
276
+ * 判断U3D是否正在运行
277
+ * @returns 查询结果
278
+ */
279
+ function isRunning(): Promise<RunningResp>;
280
+ /**
281
+ * 获取当前AR特效
283
282
  * @returns 调用结果
284
283
  */
285
- function loadAd(params: LoadAdReq): Promise<void>;
284
+ function getCurrentArEffect(): Promise<ArEffectInfo>;
286
285
  /**
287
- * 销毁广告实例
288
- * @param params - 传入参数
286
+ * 获取当前伴舞特效
289
287
  * @returns 调用结果
290
288
  */
291
- function destroyAd(params: DestroyAdReq): Promise<void>;
289
+ function getCurrentDanceEffect(): Promise<DanceEffect>;
292
290
  /**
293
- * 监听广告消息
294
- * @param params - 传入参数
291
+ * 获取伴舞特效列表数据
292
+ * @param params - 参数
295
293
  * @returns 调用结果
296
294
  */
297
- function onAdMessage(params: OnAdMessageReq): Promise<void>;
295
+ function getDanceEffectList(params: DanceEffectParams): Promise<DanceEffectInfo[]>;
298
296
  /**
299
- * 取消监听广告消息
297
+ * 切换伴舞特效
298
+ * @param params - 切换参数
300
299
  * @returns 调用结果
301
300
  */
302
- function offAdMessage(): Promise<void>;
301
+ function switchDanceEffect(params: SwitchDanceEffectParams): Promise<void>;
303
302
  }
304
303
 
305
304
  /**
306
- * 构建下一页信息
307
- * @property page - 页面名称
308
- */
309
- type ZtAfterPageRsp = {
310
- page: string;
311
- };
312
-
313
- /**
314
- * 构建下一页信息参数
315
- * @property url - 目标页为url时,只需要传url,非url时,需要构造下面的pageInfo参数,两者传一即可
316
- * @property pageName - 页面名称
317
- * @property pageType - 页面类型, 1-一般页, 2-详情页
318
- * @property tab1 - tab名称
319
- */
320
- type ZtAfterPageReq = {
321
- url: string;
322
- pageName: string;
323
- pageType: number;
324
- tab1: string;
325
- };
326
-
327
- /**
328
- * IEG点击不发生跳转上报参数
329
- * @property sceneId - 场景id
330
- * @property scene - 场景值
331
- * @property subScene - 子场景值
332
- * @property gameAppid - 腾讯游戏appid
333
- * @property adid - 广告banner位id或者内容id
334
- * @property sceneType - 资源类类型, 1-表示内容资源位, 2-表示banner位推广资源
335
- * @property dataMap - SDK上报关键内容
336
- * @property actionType - action类型
305
+ * @property isSupport - 是否支持
337
306
  */
338
- type ZtReportActionReq = {
339
- sceneId: number;
340
- scene: number;
341
- subScene: number;
342
- gameAppid: string;
343
- adid: string;
344
- sceneType: number;
345
- dataMap: any;
346
- actionType: number;
307
+ type SupportResp = {
308
+ isSupport: boolean;
347
309
  };
348
310
 
349
311
  /**
350
- * 下一页信息
351
- * @property url - 目标页为url时,只需要传url。非url时,需要构造下面的pageInfo参数,两者传一即可
352
- * @property pageName - 页面名称
353
- * @property pageType - 页面类型, 1-一般页, 2-详情页
354
- * @property tab1 - tab名称
312
+ * 场景参数
313
+ * @property sceneName - 场景名, U3D_SCENE_SPECTRUM2D_VALUE-动感舞台, U3D_SCENE_AR_VALUE-AR主播
355
314
  */
356
- type AfterPageInfo = {
357
- url: string;
358
- pageName: string;
359
- pageType: number;
360
- tab1: string;
315
+ type SceneReq = {
316
+ sceneName: string;
361
317
  };
362
318
 
363
319
  /**
364
- * IEG点击并跳转上报参数
365
- * @property sceneId - 场景id
366
- * @property scene - 场景值
367
- * @property subScene - 子场景值
368
- * @property gameAppid - 腾讯游戏appid
369
- * @property adid - 广告banner位id或者内容id
370
- * @property sceneType - 资源类类型, 1-表示内容资源位, 2-表示banner位推广资源
371
- * @property dataMap - SDK上报关键内容
372
- * @property afterPage - 下一页信息
320
+ * 特效信息
321
+ * @property type - 类型
322
+ * @property u3dResourceId - u3dResourceId
323
+ * @property u3dResourceType - u3dResourceType
324
+ * @property thumb - thumb
373
325
  */
374
- type ZtReportClickReq = {
375
- sceneId: number;
376
- scene: number;
377
- subScene: number;
378
- gameAppid: string;
379
- adid: string;
380
- sceneType: number;
381
- dataMap: any;
382
- afterPage: AfterPageInfo;
326
+ type SceneRespEffectInfo = {
327
+ type: number;
328
+ u3dResourceId: number;
329
+ u3dResourceType: number;
330
+ thumb: string;
383
331
  };
384
332
 
385
333
  /**
386
- * IEG曝光上报参数
387
- * @property sceneId - 场景id
388
- * @property scene - 场景值
389
- * @property subScene - 子场景值
390
- * @property gameAppid - 腾讯游戏appid
391
- * @property adid - 广告banner位id或者内容id
392
- * @property sceneType - 资源类类型, 1-表示内容资源位, 2-表示banner位推广资源
393
- * @property dataMap - SDK上报关键内容
334
+ * 切换参数
335
+ * @property resourceType - resourceType
336
+ * @property resourceId - resourceId
394
337
  */
395
- type ZtReportShowReq = {
396
- sceneId: number;
397
- scene: number;
398
- subScene: number;
399
- gameAppid: string;
400
- adid: string;
401
- sceneType: number;
402
- dataMap: any;
338
+ type SwitchReq = {
339
+ resourceType: number;
340
+ resourceId: number;
403
341
  };
404
342
 
405
343
  /**
406
- * 设置页面类型参数
407
- * @property pageType - 页面类型, 1-一般页, 2-详情页
344
+ * @property sceneName - 场景名
408
345
  */
409
- type ZtSetIegPageTypeReq = {
410
- pageType: number;
346
+ type SceneResp = {
347
+ sceneName: string;
411
348
  };
412
349
 
413
350
  /**
414
- * IEG点击打开appstore上报参数
415
- * @property sceneId - 场景id
416
- * @property scene - 场景值
417
- * @property subScene - 子场景值
418
- * @property gameAppid - 腾讯游戏appid
419
- * @property adid - 广告banner位id或者内容id
420
- * @property sceneType - 资源类类型, 1-表示内容资源位, 2-表示banner位推广资源
421
- * @property dataMap - SDK上报关键内容
422
- * @property appStoreLink - appstore链接
351
+ * @property isRunning - 是否在运行
423
352
  */
424
- type ZtPresentAppStoreReq = {
425
- sceneId: number;
426
- scene: number;
427
- subScene: number;
428
- gameAppid: string;
429
- adid: string;
430
- sceneType: number;
431
- dataMap: any;
432
- appStoreLink: string;
353
+ type RunningResp = {
354
+ isRunning: boolean;
433
355
  };
434
356
 
435
357
  /**
436
- * 广告实例信息
437
- * @property instanceId - 广告实例ID
358
+ * AR特效信息
359
+ * @property resourceType - resourceType
360
+ * @property resourceId - resourceId
438
361
  */
439
- type CreateAdRsp = {
440
- instanceId: string;
362
+ type ArEffectInfo = {
363
+ resourceType: number;
364
+ resourceId: number;
441
365
  };
442
366
 
443
367
  /**
444
- * 创建广告实例参数
445
- * @property adUnitId - 广告单元 id
368
+ * 伴舞特效信息
369
+ * @property danceId - 伴舞特效Id
446
370
  */
447
- type CreateAdReq = {
448
- adUnitId: string;
371
+ type DanceEffect = {
372
+ danceId: number;
449
373
  };
450
374
 
451
375
  /**
452
- * 展示广告参数
453
- * @property instanceId - 广告实例ID
376
+ * @property danceId - 伴舞特效ID
377
+ * @property thumb - thumb
454
378
  */
455
- type ShowAdReq = {
456
- instanceId: string;
379
+ type DanceEffectInfo = {
380
+ danceId: number;
381
+ thumb: string;
457
382
  };
458
383
 
459
384
  /**
460
- * 加载广告参数
461
- * @property instanceId - 广告实例ID
385
+ * 伴舞特效信息
386
+ * @property sceneName - 场景名, U3D_SCENE_SPECTRUM2D_VALUE-动感舞台, U3D_SCENE_AR_VALUE-AR主播
462
387
  */
463
- type LoadAdReq = {
464
- instanceId: string;
388
+ type DanceEffectParams = {
389
+ sceneName: string;
465
390
  };
466
391
 
467
392
  /**
468
- * 销毁广告实例参数
469
- * @property instanceId - 广告实例ID
393
+ * 切换伴舞特效参数
394
+ * @property danceId - 伴舞特效ID
470
395
  */
471
- type DestroyAdReq = {
472
- instanceId: string;
396
+ type SwitchDanceEffectParams = {
397
+ danceId: number;
473
398
  };
474
399
 
475
- /**
476
- * 关闭信息
477
- * @property isEnded - 是否看完, 1-看完, 0-未看完
400
+ namespace action {
401
+ /**
402
+ * 小程序入口控制
403
+ * @param params - 输入参数
404
+ */
405
+ function localControlEntrance(params: EntranceReq): Promise<any>;
406
+ /**
407
+ * 本地控制小程序面板加载
408
+ * @param params - 输入参数
409
+ */
410
+ function localControlPanelLoad(params: PanelLoadReq): Promise<any>;
411
+ /**
412
+ * 本地控制小程序面板可见
413
+ * @param params - 输入参数
414
+ * @returns 调用参数
415
+ */
416
+ function localControlPanelVisible(params: PanelVisibleReq): Promise<any>;
417
+ /**
418
+ * 显示客户端小程序入口
419
+ * @param params - 参数
420
+ * @returns 显示入口是否成功
421
+ */
422
+ function showEntrance(params: ShowEntranceReq): Promise<any>;
423
+ /**
424
+ * 隐藏客户端小程序入口
425
+ * @param params - 参数
426
+ * @returns 隐藏入口是否成功
427
+ */
428
+ function hideEntrance(params: HideEntranceReq): Promise<any>;
429
+ }
430
+
431
+ type Enum = any;
432
+
433
+ /**
434
+ * 小程序入口控制参数
435
+ * @property extType - 小程序类型, web_video_com-虎牙主站面板, web_popup-虎牙主站浮窗, app_panel-虎牙直播APP面板, app_popup-虎牙直播APP浮窗, zs_anchor_panel-虎牙助手面板, zs_anchor_popup-虎牙助手浮窗, pc_anchor_panel-PC主播端面板, pc_panel-PC观众端面板, pc_popup-PC观众端浮窗
436
+ * @property visible - 入口是否显示
437
+ * @property [param] - 自定义参数
478
438
  */
479
- type CloseInfo = {
480
- isEnded: boolean;
439
+ type EntranceReq = {
440
+ extType: string;
441
+ visible: boolean;
442
+ param?: any;
481
443
  };
482
444
 
483
445
  /**
484
- * 报错信息
485
- * @property errCode - 错误码
486
- * @property errMsg - 错误信息
446
+ * @property extType - 小程序类型, web_video_com-虎牙主站面板, web_popup-虎牙主站浮窗, app_panel-虎牙直播APP面板, app_popup-虎牙直播APP浮窗, zs_anchor_panel-虎牙助手面板, zs_anchor_popup-虎牙助手浮窗, pc_anchor_panel-PC主播端面板, pc_panel-PC观众端面板, pc_popup-PC观众端浮窗
447
+ * @property load - 是否加载(仅适用于浮窗类型的小程序,是否加载)
448
+ * @property [param] - 自定义参数
487
449
  */
488
- type AdErrInfo = {
489
- errCode: number;
490
- errMsg: string;
450
+ type PanelLoadReq = {
451
+ extType: string;
452
+ load: boolean;
453
+ param?: any;
491
454
  };
492
455
 
493
456
  /**
494
- * 广告消息
495
- * @property instanceId - 广告实例ID
496
- * @property eventName - 事件名, onLoad-加载完成, onError-广告报错, onClose-广告关闭
497
- * @property [res] - 回调数据
457
+ * 本地控制小程序面板可见 参数
458
+ * @property extType - 小程序类型, web_video_com-虎牙主站面板, app_panel-虎牙直播APP面板, zs_anchor_panel-虎牙助手面板, pc_anchor_panel-PC主播端面板, pc_panel-PC观众端面板
459
+ * @property visible - 是否可见
460
+ * @property [param] - 自定义参数
498
461
  */
499
- type AdMessage = {
500
- instanceId: string;
501
- eventName: string;
502
- res?: CloseInfo | AdErrInfo;
462
+ type PanelVisibleReq = {
463
+ extType: string;
464
+ visible: boolean;
465
+ param?: any;
503
466
  };
504
467
 
505
468
  /**
506
- * @param message - 广告消息
469
+ * @property extTypes - 要显示入口的小程序类型枚举值,以逗号分隔, web_video_com-虎牙主站面板(默认), app_panel-虎牙直播APP面板
470
+ * @property [countDown] - 入口显示的倒计时,单位是秒
471
+ * @property [cornerMarkId] - 入口显示的角标, -无, fire-火, new-新
507
472
  */
508
- type AdMessageCallback = (message: AdMessage) => void;
473
+ type ShowEntranceReq = {
474
+ extTypes: string;
475
+ countDown?: number;
476
+ cornerMarkId?: string;
477
+ };
509
478
 
510
479
  /**
511
- * 监听广告消息参数
512
- * @property callback - 广告消息回调
480
+ * 隐藏客户端小程序入口参数
481
+ * @property extTypes - 要隐藏入口的小程序类型枚举值,以逗号分隔, web_video_com-虎牙主站面板, app_panel-虎牙直播APP面板
513
482
  */
514
- type OnAdMessageReq = {
515
- callback: AdMessageCallback;
483
+ type HideEntranceReq = {
484
+ extTypes: string;
516
485
  };
517
486
 
518
487
  /**
519
- * AR特效
488
+ * IEG上报
520
489
  */
521
- namespace ar {
522
- /**
523
- * 是否支持Unity
524
- * @returns 查询结果
525
- */
526
- function isSupportUnity(): Promise<SupportResp>;
490
+ namespace ad {
527
491
  /**
528
- * 是否支持AR
529
- * @returns 查询结果
492
+ * 构建下一页信息
493
+ * @param params - 传入参数
494
+ * @returns 调用结果
530
495
  */
531
- function isSupportAR(): Promise<SupportResp>;
496
+ function ztAfterPage(params: ZtAfterPageReq): Promise<ZtAfterPageRsp>;
532
497
  /**
533
- * 获取特效列表数据
534
- * @param params - 参数
498
+ * IEG点击不发生跳转上报
499
+ * @param params - 传入参数
535
500
  * @returns 调用结果
536
501
  */
537
- function getEffectList(params: SceneReq): Promise<SceneRespEffectInfo[]>;
502
+ function ztReportAction(params: ZtReportActionReq): Promise<void>;
538
503
  /**
539
- * 启动activity
540
- * @param params - 启动参数
504
+ * IEG点击并跳转上报
505
+ * @param params - 传入参数
541
506
  * @returns 调用结果
542
507
  */
543
- function loadUnity(params: SceneReq): Promise<void>;
508
+ function ztReportClick(params: ZtReportClickReq): Promise<void>;
544
509
  /**
545
- * 退出Unity
510
+ * IEG曝光上报
511
+ * @param params - 传入参数
546
512
  * @returns 调用结果
547
513
  */
548
- function unloadUnity(): Promise<void>;
514
+ function ztReportShow(params: ZtReportShowReq): Promise<void>;
549
515
  /**
550
- * 切换AR特效
551
- * @param params - 切换参数
516
+ * 设置页面类型
517
+ * @param params - 传入参数
552
518
  * @returns 调用结果
553
519
  */
554
- function switchArEffect(params: SwitchReq): Promise<void>;
520
+ function ztSetIegPageType(params: ZtSetIegPageTypeReq): Promise<void>;
555
521
  /**
556
- * 获取当前场景名
522
+ * IEG点击打开appstore上报
523
+ * @param params - 传入参数
557
524
  * @returns 调用结果
558
525
  */
559
- function getCurrentScene(): Promise<SceneResp>;
526
+ function ztPresentAppStore(params: ZtPresentAppStoreReq): Promise<void>;
560
527
  /**
561
- * 重置AR平面
528
+ * 创建广告实例
529
+ * @param params - 传入参数
562
530
  * @returns 调用结果
563
531
  */
564
- function resetPlane(): Promise<void>;
532
+ function createAd(params: CreateAdReq): Promise<CreateAdRsp>;
565
533
  /**
566
- * 判断U3D是否正在运行
567
- * @returns 查询结果
534
+ * 显示广告
535
+ * @param params - 传入参数
536
+ * @returns 调用结果
568
537
  */
569
- function isRunning(): Promise<RunningResp>;
538
+ function showAd(params: ShowAdReq): Promise<void>;
570
539
  /**
571
- * 获取当前AR特效
540
+ * 加载广告
541
+ * @param params - 传入参数
572
542
  * @returns 调用结果
573
543
  */
574
- function getCurrentArEffect(): Promise<ArEffectInfo>;
544
+ function loadAd(params: LoadAdReq): Promise<void>;
575
545
  /**
576
- * 获取当前伴舞特效
546
+ * 销毁广告实例
547
+ * @param params - 传入参数
577
548
  * @returns 调用结果
578
549
  */
579
- function getCurrentDanceEffect(): Promise<DanceEffect>;
550
+ function destroyAd(params: DestroyAdReq): Promise<void>;
580
551
  /**
581
- * 获取伴舞特效列表数据
582
- * @param params - 参数
552
+ * 监听广告消息
553
+ * @param params - 传入参数
583
554
  * @returns 调用结果
584
555
  */
585
- function getDanceEffectList(params: DanceEffectParams): Promise<DanceEffectInfo[]>;
556
+ function onAdMessage(params: OnAdMessageReq): Promise<void>;
586
557
  /**
587
- * 切换伴舞特效
588
- * @param params - 切换参数
558
+ * 取消监听广告消息
589
559
  * @returns 调用结果
590
560
  */
591
- function switchDanceEffect(params: SwitchDanceEffectParams): Promise<void>;
561
+ function offAdMessage(): Promise<void>;
592
562
  }
593
563
 
594
564
  /**
595
- * @property isSupport - 是否支持
565
+ * 构建下一页信息
566
+ * @property page - 页面名称
596
567
  */
597
- type SupportResp = {
598
- isSupport: boolean;
568
+ type ZtAfterPageRsp = {
569
+ page: string;
599
570
  };
600
571
 
601
572
  /**
602
- * 场景参数
603
- * @property sceneName - 场景名, U3D_SCENE_SPECTRUM2D_VALUE-动感舞台, U3D_SCENE_AR_VALUE-AR主播
573
+ * 构建下一页信息参数
574
+ * @property url - 目标页为url时,只需要传url,非url时,需要构造下面的pageInfo参数,两者传一即可
575
+ * @property pageName - 页面名称
576
+ * @property pageType - 页面类型, 1-一般页, 2-详情页
577
+ * @property tab1 - tab名称
604
578
  */
605
- type SceneReq = {
606
- sceneName: string;
579
+ type ZtAfterPageReq = {
580
+ url: string;
581
+ pageName: string;
582
+ pageType: number;
583
+ tab1: string;
607
584
  };
608
585
 
609
586
  /**
610
- * 特效信息
611
- * @property type - 类型
612
- * @property u3dResourceId - u3dResourceId
613
- * @property u3dResourceType - u3dResourceType
614
- * @property thumb - thumb
587
+ * IEG点击不发生跳转上报参数
588
+ * @property sceneId - 场景id
589
+ * @property scene - 场景值
590
+ * @property subScene - 子场景值
591
+ * @property gameAppid - 腾讯游戏appid
592
+ * @property adid - 广告banner位id或者内容id
593
+ * @property sceneType - 资源类类型, 1-表示内容资源位, 2-表示banner位推广资源
594
+ * @property dataMap - SDK上报关键内容
595
+ * @property actionType - action类型
615
596
  */
616
- type SceneRespEffectInfo = {
617
- type: number;
618
- u3dResourceId: number;
619
- u3dResourceType: number;
620
- thumb: string;
597
+ type ZtReportActionReq = {
598
+ sceneId: number;
599
+ scene: number;
600
+ subScene: number;
601
+ gameAppid: string;
602
+ adid: string;
603
+ sceneType: number;
604
+ dataMap: any;
605
+ actionType: number;
621
606
  };
622
607
 
623
608
  /**
624
- * 切换参数
625
- * @property resourceType - resourceType
626
- * @property resourceId - resourceId
609
+ * 下一页信息
610
+ * @property url - 目标页为url时,只需要传url。非url时,需要构造下面的pageInfo参数,两者传一即可
611
+ * @property pageName - 页面名称
612
+ * @property pageType - 页面类型, 1-一般页, 2-详情页
613
+ * @property tab1 - tab名称
627
614
  */
628
- type SwitchReq = {
629
- resourceType: number;
630
- resourceId: number;
615
+ type AfterPageInfo = {
616
+ url: string;
617
+ pageName: string;
618
+ pageType: number;
619
+ tab1: string;
631
620
  };
632
621
 
633
622
  /**
634
- * @property sceneName - 场景名
623
+ * IEG点击并跳转上报参数
624
+ * @property sceneId - 场景id
625
+ * @property scene - 场景值
626
+ * @property subScene - 子场景值
627
+ * @property gameAppid - 腾讯游戏appid
628
+ * @property adid - 广告banner位id或者内容id
629
+ * @property sceneType - 资源类类型, 1-表示内容资源位, 2-表示banner位推广资源
630
+ * @property dataMap - SDK上报关键内容
631
+ * @property afterPage - 下一页信息
635
632
  */
636
- type SceneResp = {
637
- sceneName: string;
633
+ type ZtReportClickReq = {
634
+ sceneId: number;
635
+ scene: number;
636
+ subScene: number;
637
+ gameAppid: string;
638
+ adid: string;
639
+ sceneType: number;
640
+ dataMap: any;
641
+ afterPage: AfterPageInfo;
638
642
  };
639
643
 
640
644
  /**
641
- * @property isRunning - 是否在运行
645
+ * IEG曝光上报参数
646
+ * @property sceneId - 场景id
647
+ * @property scene - 场景值
648
+ * @property subScene - 子场景值
649
+ * @property gameAppid - 腾讯游戏appid
650
+ * @property adid - 广告banner位id或者内容id
651
+ * @property sceneType - 资源类类型, 1-表示内容资源位, 2-表示banner位推广资源
652
+ * @property dataMap - SDK上报关键内容
642
653
  */
643
- type RunningResp = {
644
- isRunning: boolean;
654
+ type ZtReportShowReq = {
655
+ sceneId: number;
656
+ scene: number;
657
+ subScene: number;
658
+ gameAppid: string;
659
+ adid: string;
660
+ sceneType: number;
661
+ dataMap: any;
645
662
  };
646
663
 
647
664
  /**
648
- * AR特效信息
649
- * @property resourceType - resourceType
650
- * @property resourceId - resourceId
665
+ * 设置页面类型参数
666
+ * @property pageType - 页面类型, 1-一般页, 2-详情页
651
667
  */
652
- type ArEffectInfo = {
653
- resourceType: number;
654
- resourceId: number;
668
+ type ZtSetIegPageTypeReq = {
669
+ pageType: number;
655
670
  };
656
671
 
657
672
  /**
658
- * 伴舞特效信息
659
- * @property danceId - 伴舞特效Id
673
+ * IEG点击打开appstore上报参数
674
+ * @property sceneId - 场景id
675
+ * @property scene - 场景值
676
+ * @property subScene - 子场景值
677
+ * @property gameAppid - 腾讯游戏appid
678
+ * @property adid - 广告banner位id或者内容id
679
+ * @property sceneType - 资源类类型, 1-表示内容资源位, 2-表示banner位推广资源
680
+ * @property dataMap - SDK上报关键内容
681
+ * @property appStoreLink - appstore链接
660
682
  */
661
- type DanceEffect = {
662
- danceId: number;
683
+ type ZtPresentAppStoreReq = {
684
+ sceneId: number;
685
+ scene: number;
686
+ subScene: number;
687
+ gameAppid: string;
688
+ adid: string;
689
+ sceneType: number;
690
+ dataMap: any;
691
+ appStoreLink: string;
663
692
  };
664
693
 
665
694
  /**
666
- * @property danceId - 伴舞特效ID
667
- * @property thumb - thumb
695
+ * 广告实例信息
696
+ * @property instanceId - 广告实例ID
668
697
  */
669
- type DanceEffectInfo = {
670
- danceId: number;
671
- thumb: string;
698
+ type CreateAdRsp = {
699
+ instanceId: string;
672
700
  };
673
701
 
674
702
  /**
675
- * 伴舞特效信息
676
- * @property sceneName - 场景名, U3D_SCENE_SPECTRUM2D_VALUE-动感舞台, U3D_SCENE_AR_VALUE-AR主播
703
+ * 创建广告实例参数
704
+ * @property adUnitId - 广告单元 id
677
705
  */
678
- type DanceEffectParams = {
679
- sceneName: string;
706
+ type CreateAdReq = {
707
+ adUnitId: string;
680
708
  };
681
709
 
682
710
  /**
683
- * 切换伴舞特效参数
684
- * @property danceId - 伴舞特效ID
711
+ * 展示广告参数
712
+ * @property instanceId - 广告实例ID
685
713
  */
686
- type SwitchDanceEffectParams = {
687
- danceId: number;
714
+ type ShowAdReq = {
715
+ instanceId: string;
688
716
  };
689
717
 
690
- namespace action {
691
- /**
692
- * 小程序入口控制
693
- * @param params - 输入参数
694
- */
695
- function localControlEntrance(params: EntranceReq): Promise<any>;
696
- /**
697
- * 本地控制小程序面板加载
698
- * @param params - 输入参数
699
- */
700
- function localControlPanelLoad(params: PanelLoadReq): Promise<any>;
701
- /**
702
- * 本地控制小程序面板可见
703
- * @param params - 输入参数
704
- * @returns 调用参数
705
- */
706
- function localControlPanelVisible(params: PanelVisibleReq): Promise<any>;
707
- /**
708
- * 显示客户端小程序入口
709
- * @param params - 参数
710
- * @returns 显示入口是否成功
711
- */
712
- function showEntrance(params: ShowEntranceReq): Promise<any>;
713
- /**
714
- * 隐藏客户端小程序入口
715
- * @param params - 参数
716
- * @returns 隐藏入口是否成功
717
- */
718
- function hideEntrance(params: HideEntranceReq): Promise<any>;
719
- }
720
-
721
- type Enum = any;
718
+ /**
719
+ * 加载广告参数
720
+ * @property instanceId - 广告实例ID
721
+ */
722
+ type LoadAdReq = {
723
+ instanceId: string;
724
+ };
722
725
 
723
726
  /**
724
- * 小程序入口控制参数
725
- * @property extType - 小程序类型, web_video_com-虎牙主站面板, web_popup-虎牙主站浮窗, app_panel-虎牙直播APP面板, app_popup-虎牙直播APP浮窗, zs_anchor_panel-虎牙助手面板, zs_anchor_popup-虎牙助手浮窗, pc_anchor_panel-PC主播端面板, pc_panel-PC观众端面板, pc_popup-PC观众端浮窗
726
- * @property visible - 入口是否显示
727
- * @property [param] - 自定义参数
727
+ * 销毁广告实例参数
728
+ * @property instanceId - 广告实例ID
728
729
  */
729
- type EntranceReq = {
730
- extType: string;
731
- visible: boolean;
732
- param?: any;
730
+ type DestroyAdReq = {
731
+ instanceId: string;
733
732
  };
734
733
 
735
734
  /**
736
- * @property extType - 小程序类型, web_video_com-虎牙主站面板, web_popup-虎牙主站浮窗, app_panel-虎牙直播APP面板, app_popup-虎牙直播APP浮窗, zs_anchor_panel-虎牙助手面板, zs_anchor_popup-虎牙助手浮窗, pc_anchor_panel-PC主播端面板, pc_panel-PC观众端面板, pc_popup-PC观众端浮窗
737
- * @property load - 是否加载(仅适用于浮窗类型的小程序,是否加载)
738
- * @property [param] - 自定义参数
735
+ * 关闭信息
736
+ * @property isEnded - 是否看完, 1-看完, 0-未看完
739
737
  */
740
- type PanelLoadReq = {
741
- extType: string;
742
- load: boolean;
743
- param?: any;
738
+ type CloseInfo = {
739
+ isEnded: boolean;
744
740
  };
745
741
 
746
742
  /**
747
- * 本地控制小程序面板可见 参数
748
- * @property extType - 小程序类型, web_video_com-虎牙主站面板, app_panel-虎牙直播APP面板, zs_anchor_panel-虎牙助手面板, pc_anchor_panel-PC主播端面板, pc_panel-PC观众端面板
749
- * @property visible - 是否可见
750
- * @property [param] - 自定义参数
743
+ * 报错信息
744
+ * @property errCode - 错误码
745
+ * @property errMsg - 错误信息
751
746
  */
752
- type PanelVisibleReq = {
753
- extType: string;
754
- visible: boolean;
755
- param?: any;
747
+ type AdErrInfo = {
748
+ errCode: number;
749
+ errMsg: string;
756
750
  };
757
751
 
758
752
  /**
759
- * @property extTypes - 要显示入口的小程序类型枚举值,以逗号分隔, web_video_com-虎牙主站面板(默认), app_panel-虎牙直播APP面板
760
- * @property [countDown] - 入口显示的倒计时,单位是秒
761
- * @property [cornerMarkId] - 入口显示的角标, -无, fire-火, new-新
753
+ * 广告消息
754
+ * @property instanceId - 广告实例ID
755
+ * @property eventName - 事件名, onLoad-加载完成, onError-广告报错, onClose-广告关闭
756
+ * @property [res] - 回调数据
762
757
  */
763
- type ShowEntranceReq = {
764
- extTypes: string;
765
- countDown?: number;
766
- cornerMarkId?: string;
758
+ type AdMessage = {
759
+ instanceId: string;
760
+ eventName: string;
761
+ res?: CloseInfo | AdErrInfo;
767
762
  };
768
763
 
769
764
  /**
770
- * 隐藏客户端小程序入口参数
771
- * @property extTypes - 要隐藏入口的小程序类型枚举值,以逗号分隔, web_video_com-虎牙主站面板, app_panel-虎牙直播APP面板
765
+ * @param message - 广告消息
772
766
  */
773
- type HideEntranceReq = {
774
- extTypes: string;
767
+ type AdMessageCallback = (message: AdMessage) => void;
768
+
769
+ /**
770
+ * 监听广告消息参数
771
+ * @property callback - 广告消息回调
772
+ */
773
+ type OnAdMessageReq = {
774
+ callback: AdMessageCallback;
775
775
  };
776
776
 
777
777
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyext/types-ext-sdk-hy",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "description": "TypeScript definitions for sdk",
5
5
  "types": "./index.d.ts",
6
6
  "main": "",