@alemonjs/qq-bot 0.0.7 → 0.0.9

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.
@@ -0,0 +1,65 @@
1
+ type MessageType = 0 | 1 | 2 | 3 | 4 | 7;
2
+ type FileType = 1 | 2 | 3 | 4;
3
+ interface ButtonType {
4
+ id: string;
5
+ render_data: {
6
+ label: string;
7
+ visited_label: string;
8
+ style: number;
9
+ };
10
+ action: {
11
+ type: number;
12
+ permission: {
13
+ type: number;
14
+ };
15
+ reply?: boolean;
16
+ enter?: boolean;
17
+ unsupport_tips: string;
18
+ data: string;
19
+ };
20
+ }
21
+ interface KeyboardType {
22
+ id?: string;
23
+ content?: {
24
+ rows: {
25
+ buttons: ButtonType[];
26
+ }[];
27
+ };
28
+ }
29
+ interface MarkdownType {
30
+ /** markdown 模版id,申请模版后获得 */
31
+ custom_template_id: string;
32
+ /** 原生 markdown 文本内容(内邀使用) */
33
+ content?: string;
34
+ /** 模版内变量与填充值的kv映射 */
35
+ params?: Array<{
36
+ key: string;
37
+ values: string[];
38
+ }>;
39
+ }
40
+ interface ApiRequestData {
41
+ content?: string;
42
+ msg_type: MessageType;
43
+ markdown?: MarkdownType;
44
+ keyboard?: KeyboardType;
45
+ media?: {
46
+ file_info: string;
47
+ };
48
+ ark?: any;
49
+ image?: any;
50
+ message_reference?: any;
51
+ event_id?: any;
52
+ msg_id?: string;
53
+ msg_seq?: number;
54
+ }
55
+ interface Options {
56
+ secret: string;
57
+ app_id: string;
58
+ token: string;
59
+ sandbox?: boolean;
60
+ route?: string;
61
+ port?: string;
62
+ ws?: string;
63
+ }
64
+
65
+ export type { ApiRequestData, ButtonType, FileType, KeyboardType, MarkdownType, MessageType, Options };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alemonjs/qq-bot",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "qq-bot",
5
5
  "author": "lemonade",
6
6
  "license": "MIT",
@@ -36,13 +36,33 @@
36
36
  ".": {
37
37
  "import": "./lib/index.js",
38
38
  "types": "./lib/index.d.ts"
39
+ },
40
+ "./package": "./package.json",
41
+ "./desktop": "./lib/desktop.js"
42
+ },
43
+ "alemonjs": {
44
+ "desktop": {
45
+ "platform": [
46
+ {
47
+ "name": "qq-bot"
48
+ }
49
+ ],
50
+ "commond": [
51
+ {
52
+ "name": "qq-bot",
53
+ "commond": "open.qq-bot"
54
+ }
55
+ ],
56
+ "sidebars": [
57
+ {
58
+ "name": "qq-bot",
59
+ "commond": "open.qq-bot"
60
+ }
61
+ ]
39
62
  }
40
63
  },
41
64
  "keywords": [
42
- "alemonjs",
43
- "qq-bot",
44
- "bot",
45
- "chat-bot"
65
+ "alemonjs"
46
66
  ],
47
67
  "publishConfig": {
48
68
  "registry": "https://registry.npmjs.org",