alemonjs 2.0.6 → 2.0.7
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.
|
@@ -29,12 +29,7 @@ declare const useMention: <T extends EventKeys>(event: Events[T]) => {
|
|
|
29
29
|
* @param {Object} event - 事件对象,包含触发发送的相关信息。
|
|
30
30
|
* @throws {Error} - 如果 event 无效,抛出错误。
|
|
31
31
|
*/
|
|
32
|
-
declare const useSend: <T extends EventKeys>(event: Events[T]) => (...val: DataEnums[]) => Promise<Result
|
|
33
|
-
data: {
|
|
34
|
-
[key: string]: any;
|
|
35
|
-
id: string;
|
|
36
|
-
};
|
|
37
|
-
})[]>;
|
|
32
|
+
declare const useSend: <T extends EventKeys>(event: Events[T]) => (...val: DataEnums[]) => Promise<Result>;
|
|
38
33
|
/**
|
|
39
34
|
* 卸载模块
|
|
40
35
|
* @param name
|
package/lib/app/message-api.d.ts
CHANGED
|
@@ -15,12 +15,12 @@ declare const createSendDataFormat: (...data: DataEnums[]) => DataEnums[];
|
|
|
15
15
|
* @param {DataEnums[]} data - 要发送的数据。
|
|
16
16
|
* @throws {Error} - 如果 channel_id 无效或发送失败,抛出错误。
|
|
17
17
|
*/
|
|
18
|
-
declare const sendToChannel: (channel_id: string, data: DataEnums[]) => Promise<Result & {
|
|
18
|
+
declare const sendToChannel: (channel_id: string, data: DataEnums[]) => Promise<(Result & {
|
|
19
19
|
data: {
|
|
20
20
|
[key: string]: any;
|
|
21
21
|
id: string;
|
|
22
22
|
};
|
|
23
|
-
}[]>;
|
|
23
|
+
})[]>;
|
|
24
24
|
/**
|
|
25
25
|
* 向指定用户发送消息。
|
|
26
26
|
* @param {string} user_id - 目标用户的 ID。
|
|
@@ -32,6 +32,6 @@ declare const sendToUser: (user_id: string, data: DataEnums[]) => Promise<Result
|
|
|
32
32
|
[key: string]: any;
|
|
33
33
|
id: string;
|
|
34
34
|
};
|
|
35
|
-
}
|
|
35
|
+
}>;
|
|
36
36
|
|
|
37
37
|
export { createSendDataFormat, sendToChannel, sendToUser };
|
package/lib/jsx.d.ts
CHANGED
|
@@ -102,24 +102,19 @@ declare function JSX(...arg: React.JSX.Element[]): DataEnums[];
|
|
|
102
102
|
* @param e
|
|
103
103
|
* @returns
|
|
104
104
|
*/
|
|
105
|
-
declare const useSend: <T extends EventKeys>(e: Events[T]) => (...arg: React.JSX.Element[]) => Promise<Result
|
|
106
|
-
data: {
|
|
107
|
-
[key: string]: any;
|
|
108
|
-
id: string;
|
|
109
|
-
};
|
|
110
|
-
})[]>;
|
|
105
|
+
declare const useSend: <T extends EventKeys>(e: Events[T]) => (...arg: React.JSX.Element[]) => Promise<Result>;
|
|
111
106
|
/**
|
|
112
107
|
*
|
|
113
108
|
* @param channel_id
|
|
114
109
|
* @param data
|
|
115
110
|
* @returns
|
|
116
111
|
*/
|
|
117
|
-
declare const sendToChannel: (channel_id: string, data: React.JSX.Element[]) => Promise<Result & {
|
|
112
|
+
declare const sendToChannel: (channel_id: string, data: React.JSX.Element[]) => Promise<(Result & {
|
|
118
113
|
data: {
|
|
119
114
|
[key: string]: any;
|
|
120
115
|
id: string;
|
|
121
116
|
};
|
|
122
|
-
}[]>;
|
|
117
|
+
})[]>;
|
|
123
118
|
/**
|
|
124
119
|
*
|
|
125
120
|
* @param user_id
|
|
@@ -131,6 +126,6 @@ declare const sendToUser: (user_id: string, data: React.JSX.Element[]) => Promis
|
|
|
131
126
|
[key: string]: any;
|
|
132
127
|
id: string;
|
|
133
128
|
};
|
|
134
|
-
}
|
|
129
|
+
}>;
|
|
135
130
|
|
|
136
131
|
export { BT, Image, ImageFile, ImageURL, JSX, Mention, Text, sendToChannel, sendToUser, useSend };
|
|
@@ -25,7 +25,7 @@ type ClientAPI = {
|
|
|
25
25
|
*/
|
|
26
26
|
send: <T extends EventKeys>(event: Events[T], val: DataEnums[]) => Promise<(Result & {
|
|
27
27
|
data: SendMessageRes;
|
|
28
|
-
})
|
|
28
|
+
})>;
|
|
29
29
|
/**
|
|
30
30
|
* 获取提及信息
|
|
31
31
|
* @param event
|
|
@@ -47,18 +47,18 @@ type ClientAPI = {
|
|
|
47
47
|
* @param data
|
|
48
48
|
* @returns
|
|
49
49
|
*/
|
|
50
|
-
channel: (channel_id: string, data: DataEnums[]) => Promise<Result & {
|
|
50
|
+
channel: (channel_id: string, data: DataEnums[]) => Promise<(Result & {
|
|
51
51
|
data: SendMessageRes;
|
|
52
|
-
}[]>;
|
|
52
|
+
})[]>;
|
|
53
53
|
/**
|
|
54
54
|
* 向指定用户发送消息
|
|
55
55
|
* @param user_id
|
|
56
56
|
* @param data
|
|
57
57
|
* @returns
|
|
58
58
|
*/
|
|
59
|
-
user: (user_id: string, data: DataEnums[]) => Promise<Result & {
|
|
59
|
+
user: (user_id: string, data: DataEnums[]) => Promise<(Result & {
|
|
60
60
|
data: SendMessageRes;
|
|
61
|
-
}
|
|
61
|
+
})>;
|
|
62
62
|
};
|
|
63
63
|
};
|
|
64
64
|
};
|