floating-live 0.16.2 → 0.16.3

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.
@@ -5,5 +5,6 @@ export class AppError extends Error {
5
5
  this.id = id;
6
6
  this.source = options?.source;
7
7
  this.cause = options?.cause;
8
+ this.target = options?.target;
8
9
  }
9
10
  }
@@ -73,7 +73,7 @@ export declare namespace LiveMessage {
73
73
  name: string;
74
74
  /** 开通vip等级 */
75
75
  level?: number;
76
- /** 持续时间(天数) */
76
+ /** 持续时间(ms) */
77
77
  duration: number;
78
78
  };
79
79
  }
@@ -91,7 +91,7 @@ export declare namespace LiveMessage {
91
91
  color?: number | string;
92
92
  /** 礼物信息 */
93
93
  gift: GiftInfo;
94
- /** (SC)持续时间 */
94
+ /** (SC)持续时间(ms) */
95
95
  duration: number;
96
96
  };
97
97
  }
@@ -102,8 +102,8 @@ export declare namespace LiveMessage {
102
102
  /** 用户信息 */
103
103
  user: UserInfo;
104
104
  /** 操作者 */
105
- operator: UserInfo | {
106
- type: null | UserType;
105
+ operator?: UserInfo | {
106
+ type: UserType;
107
107
  };
108
108
  };
109
109
  }
@@ -48,16 +48,22 @@ export interface GiftInfo {
48
48
  id: number | string;
49
49
  /** 礼物数量 */
50
50
  num: number;
51
- /** 总价值 */
52
- value: number;
53
- /** 平台货币 */
54
- currency?: string | number;
51
+ /** 礼物价值(总价,按平台货币计算) */
52
+ value?: number;
53
+ /** 价值类型 */
54
+ valueType?: string | number;
55
+ /** 礼物显示价格(总价,按平台货币计算) */
56
+ price?: number;
57
+ /** 平台货币名称 */
58
+ currency?: string;
55
59
  /** 礼物连击数 */
56
60
  combo?: string;
57
61
  /** 礼物连击id */
58
62
  comboId?: string;
59
- /** 人民币价值 */
63
+ /** 礼物金额(总价,按消费现金计算) */
60
64
  money?: number;
65
+ /** 礼物金额货币 */
66
+ moneyCurrency?: string;
61
67
  /** 行为 */
62
68
  action?: string;
63
69
  /** 随机礼物信息 */
@@ -65,7 +71,7 @@ export interface GiftInfo {
65
71
  /** 图片信息 */
66
72
  image?: string;
67
73
  /** 单位 */
68
- unit?: string;
74
+ unit?: string | TimeUnit;
69
75
  }
70
76
  export declare const ImageSize: {
71
77
  /** 自定义大小 */
@@ -94,3 +100,4 @@ export declare const UserType: {
94
100
  readonly anchor: 2;
95
101
  };
96
102
  export type UserType = EnumValue<typeof UserType>;
103
+ export type TimeUnit = "second" | "minute" | "hour" | "day" | "week" | "month" | "year";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "floating-live",
3
- "version": "0.16.2",
3
+ "version": "0.16.3",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",