@zhin.js/adapter-email 1.0.1 → 1.1.0
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.
- package/CHANGELOG.md +374 -0
- package/README.md +50 -102
- package/adapters/email.js +25 -0
- package/adapters/email.ts +35 -0
- package/lib/client.d.ts +23 -0
- package/lib/client.js +29 -0
- package/lib/endpoint.d.ts +27 -32
- package/lib/endpoint.js +284 -317
- package/lib/index.d.ts +4 -10
- package/lib/index.js +4 -23
- package/lib/protocol.d.ts +138 -0
- package/lib/protocol.js +245 -0
- package/lib/transport.d.ts +32 -0
- package/lib/transport.js +27 -0
- package/package.json +45 -12
- package/plugin.js +8 -0
- package/schema.json +169 -0
- package/src/client.ts +40 -0
- package/src/endpoint.ts +334 -390
- package/src/index.ts +35 -28
- package/src/protocol.ts +384 -0
- package/src/transport.ts +65 -0
- package/lib/adapter.d.ts +0 -12
- package/lib/adapter.d.ts.map +0 -1
- package/lib/adapter.js +0 -15
- package/lib/adapter.js.map +0 -1
- package/lib/endpoint.d.ts.map +0 -1
- package/lib/endpoint.js.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/types.d.ts +0 -49
- package/lib/types.d.ts.map +0 -1
- package/lib/types.js +0 -2
- package/lib/types.js.map +0 -1
- package/src/adapter.ts +0 -18
- package/src/types.ts +0 -52
- /package/{skills/email/SKILL.md → agent/skills/email.md} +0 -0
package/src/types.ts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Email 适配器类型定义
|
|
3
|
-
*/
|
|
4
|
-
import type { Attachment } from "mailparser";
|
|
5
|
-
|
|
6
|
-
export interface SmtpConfig {
|
|
7
|
-
host: string;
|
|
8
|
-
port: number;
|
|
9
|
-
secure: boolean;
|
|
10
|
-
auth: {
|
|
11
|
-
user: string;
|
|
12
|
-
pass: string;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface ImapConfig {
|
|
17
|
-
host: string;
|
|
18
|
-
port: number;
|
|
19
|
-
tls: boolean;
|
|
20
|
-
user: string;
|
|
21
|
-
password: string;
|
|
22
|
-
checkInterval?: number;
|
|
23
|
-
mailbox?: string;
|
|
24
|
-
markSeen?: boolean;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface EmailEndpointConfig {
|
|
28
|
-
context: "email";
|
|
29
|
-
name: string;
|
|
30
|
-
smtp: SmtpConfig;
|
|
31
|
-
imap: ImapConfig;
|
|
32
|
-
attachments?: {
|
|
33
|
-
enabled: boolean;
|
|
34
|
-
downloadPath?: string;
|
|
35
|
-
maxFileSize?: number;
|
|
36
|
-
allowedTypes?: string[];
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface EmailMessage {
|
|
41
|
-
messageId: string;
|
|
42
|
-
from: string;
|
|
43
|
-
to: string[];
|
|
44
|
-
cc?: string[];
|
|
45
|
-
bcc?: string[];
|
|
46
|
-
subject: string;
|
|
47
|
-
text?: string;
|
|
48
|
-
html?: string;
|
|
49
|
-
attachments: Attachment[];
|
|
50
|
-
date: Date;
|
|
51
|
-
uid: number;
|
|
52
|
-
}
|
|
File without changes
|