@hyext/types-ext-sdk-hy 3.15.0 → 3.15.1-beta.10

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 +180 -0
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1688,6 +1688,30 @@ namespace advance {
1688
1688
  * @returns 调用结果
1689
1689
  */
1690
1690
  function sendBarrage(params: SendBarrageReq): Promise<void>;
1691
+ /**
1692
+ * 进入队列
1693
+ * @param params - 参数
1694
+ * @returns 调用结果
1695
+ */
1696
+ function commonEnQueue(params: CommonEnQueueReq): Promise<CommonEnQueueRsp>;
1697
+ /**
1698
+ * 退出队列
1699
+ * @param params - 参数
1700
+ * @returns 调用结果
1701
+ */
1702
+ function commonDeQueue(params: CommonDeQueueReq): Promise<void>;
1703
+ /**
1704
+ * 监听队列状态变化
1705
+ * @param params - 参数
1706
+ * @returns 调用结果
1707
+ */
1708
+ function onCommonQueueStatusChange(params: OnCommonQueueStatusChangeReq): Promise<void>;
1709
+ /**
1710
+ * 取消监听队列状态变化
1711
+ * @param params - 参数
1712
+ * @returns 调用结果
1713
+ */
1714
+ function offCommonQueueStatusChange(params: OffCommonQueueStatusChangeReq): Promise<void>;
1691
1715
  }
1692
1716
 
1693
1717
  /**
@@ -2300,6 +2324,73 @@ type SendBarrageReq = {
2300
2324
  content: string;
2301
2325
  };
2302
2326
 
2327
+ /**
2328
+ * 进入队列参数
2329
+ * @property type - 队列类型
2330
+ * @property param - 额外参数
2331
+ */
2332
+ type CommonEnQueueReq = {
2333
+ type: string;
2334
+ param: any;
2335
+ };
2336
+
2337
+ /**
2338
+ * 队列信息
2339
+ * @property isFirst - isFirst
2340
+ * @property key - 当前队列项目的唯一标识,调用onCommonQueueStatusChange监听入队消息
2341
+ * @property payload - 额外数据
2342
+ */
2343
+ type CommonEnQueueRsp = {
2344
+ isFirst: boolean;
2345
+ key: string;
2346
+ payload: any;
2347
+ };
2348
+
2349
+ /**
2350
+ * 退出队列参数
2351
+ * @property type - 队列类型
2352
+ * @property key - 调用commonEnQueue返回的key
2353
+ */
2354
+ type CommonDeQueueReq = {
2355
+ type: string;
2356
+ key: string;
2357
+ };
2358
+
2359
+ /**
2360
+ * 队列状态变化
2361
+ * @property key - 当前队列项目(如礼物横幅)的唯一标识
2362
+ * @property status - 状态 enqueue-入队, dequeue-出队
2363
+ * @property payload - 数据,根据类型有不同的结构
2364
+ */
2365
+ type QueueStatusNotice = {
2366
+ key: string;
2367
+ status: string;
2368
+ payload: any;
2369
+ };
2370
+
2371
+ /**
2372
+ * @param notice - 回调参数
2373
+ */
2374
+ type CommonQueueStatusChange = (notice: QueueStatusNotice) => void;
2375
+
2376
+ /**
2377
+ * 监听队列状态变化参数
2378
+ * @property type - 队列类型
2379
+ * @property callback - 队列状态变化回调
2380
+ */
2381
+ type OnCommonQueueStatusChangeReq = {
2382
+ type: string;
2383
+ callback: CommonQueueStatusChange;
2384
+ };
2385
+
2386
+ /**
2387
+ * 取消监听队列状态变化参数
2388
+ * @property type - 队列类型
2389
+ */
2390
+ type OffCommonQueueStatusChangeReq = {
2391
+ type: string;
2392
+ };
2393
+
2303
2394
  /**
2304
2395
  * app模块
2305
2396
  */
@@ -9397,5 +9488,94 @@ type GetJWTReq = {
9397
9488
  anonymous?: boolean;
9398
9489
  };
9399
9490
 
9491
+ /**
9492
+ * yyb
9493
+ */
9494
+ namespace yyb {
9495
+ /**
9496
+ * 加载云游戏
9497
+ * @param params - 调用参数
9498
+ * @returns 调用结果
9499
+ */
9500
+ function launchYYBCloudGame(params: LaunchYYBCloudGameReq): Promise<void>;
9501
+ /**
9502
+ * 启动云游戏服务
9503
+ * @param params - 调用参数
9504
+ * @returns 调用结果
9505
+ */
9506
+ function startYYBCloudGame(params: StartYYBCloudGameReq): Promise<void>;
9507
+ /**
9508
+ * 关闭云游戏服务
9509
+ * @returns 调用结果
9510
+ */
9511
+ function stopYYBCloudGame(): Promise<void>;
9512
+ /**
9513
+ * 监听云游戏事件
9514
+ * @param params - 调用参数
9515
+ * @returns 调用结果
9516
+ */
9517
+ function onCloudGameMsgFromYYB(params: OnYYBCloudGameMsgReq): Promise<void>;
9518
+ /**
9519
+ * 取消监听云游戏事件
9520
+ * @returns 调用结果
9521
+ */
9522
+ function offCloudGameMsgFromYYB(): Promise<void>;
9523
+ }
9524
+
9525
+ /**
9526
+ * 加载云游戏参数
9527
+ * @property openId - 唯一id
9528
+ * @property activityId - 残局信息回传关联字段
9529
+ * @property needShowBattleResultBtn - 是否需要显示结算页的按钮,默认true
9530
+ */
9531
+ type LaunchYYBCloudGameReq = {
9532
+ openId: string;
9533
+ activityId: string;
9534
+ needShowBattleResultBtn: boolean;
9535
+ };
9536
+
9537
+ /**
9538
+ * 启动云游戏服务参数
9539
+ * @property bizIdDev - 测试业务ID
9540
+ * @property bizIdOfficial - 正式业务ID
9541
+ * @property cloudGameSource - 游戏来源
9542
+ * @property cloudGamePackageName - 游戏包名
9543
+ * @property entranceId - 游戏ID
9544
+ * @property needShowFloatingWindow - 是否需要显示悬浮球
9545
+ * @property gameIconUrl - 游戏图标链接
9546
+ */
9547
+ type StartYYBCloudGameReq = {
9548
+ bizIdDev: string;
9549
+ bizIdOfficial: string;
9550
+ cloudGameSource: string;
9551
+ cloudGamePackageName: string;
9552
+ entranceId: string;
9553
+ needShowFloatingWindow: boolean;
9554
+ gameIconUrl: string;
9555
+ };
9556
+
9557
+ /**
9558
+ * 云游戏事件消息
9559
+ * @property cmd - 方法名
9560
+ * @property params - 回调参数json字符串
9561
+ */
9562
+ type YYBCloudGameMsg = {
9563
+ cmd: string;
9564
+ params: string;
9565
+ };
9566
+
9567
+ /**
9568
+ * @param notice - 云游戏事件消息
9569
+ */
9570
+ type YYBCloudGameMsgCallback = (notice: YYBCloudGameMsg) => void;
9571
+
9572
+ /**
9573
+ * 监听云游戏事件参数
9574
+ * @property callback - 监听云游戏事件回调
9575
+ */
9576
+ type OnYYBCloudGameMsgReq = {
9577
+ callback: YYBCloudGameMsgCallback;
9578
+ };
9579
+
9400
9580
 
9401
9581
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyext/types-ext-sdk-hy",
3
- "version": "3.15.0",
3
+ "version": "3.15.1-beta.10",
4
4
  "description": "TypeScript definitions for sdk",
5
5
  "types": "./index.d.ts",
6
6
  "main": "",