go-mokapi 0.18.0 → 0.19.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.
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -95,7 +95,7 @@ export function sleep(time: number | string): void;
|
|
|
95
95
|
|
|
96
96
|
/**
|
|
97
97
|
* Specifies the interval of a periodic job.
|
|
98
|
-
* Interval string is a possibly signed sequence of decimal numbers, each with optional
|
|
98
|
+
* Interval string is a possibly signed sequence of decimal numbers, each with an optional
|
|
99
99
|
* fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m".
|
|
100
100
|
* Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
|
|
101
101
|
*/
|
|
@@ -108,7 +108,7 @@ export interface EventHandler {
|
|
|
108
108
|
smtp: SmtpEventHandler;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
export type ChangeResult = boolean |
|
|
111
|
+
export type ChangeResult = boolean | undefined;
|
|
112
112
|
|
|
113
113
|
export type EventHandlerResult = ChangeResult | Promise<ChangeResult>;
|
|
114
114
|
|
package/types/mail.d.ts
CHANGED
|
@@ -1,35 +1,81 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Sends an email message to an SMTP server for delivery.
|
|
3
3
|
* @param server Host to which the message is to be sent.
|
|
4
|
-
* @param message a Message
|
|
4
|
+
* @param message a Message object containing email details
|
|
5
5
|
*/
|
|
6
|
-
export function send(server: string, message: Message)
|
|
6
|
+
export function send(server: string, message: Message): void
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Represents an email message.
|
|
10
|
+
*/
|
|
8
11
|
export interface Message {
|
|
12
|
+
/** SMTP server hostname */
|
|
9
13
|
server: string
|
|
14
|
+
|
|
15
|
+
/** The envelope sender address */
|
|
10
16
|
sender?: Address
|
|
17
|
+
|
|
18
|
+
/** The `From` header addresses */
|
|
11
19
|
from: Address[]
|
|
20
|
+
|
|
21
|
+
/** The primary recipients */
|
|
12
22
|
to: Address[]
|
|
23
|
+
|
|
24
|
+
/** The `Reply-To` header addresses */
|
|
13
25
|
replyTo?: Address[]
|
|
26
|
+
|
|
27
|
+
/** Carbon copy recipients */
|
|
14
28
|
cc?: Address[]
|
|
29
|
+
|
|
30
|
+
/** Blind carbon copy recipients */
|
|
15
31
|
bcc?: Address[]
|
|
32
|
+
|
|
33
|
+
/** Unique message ID */
|
|
16
34
|
messageId: string
|
|
35
|
+
|
|
36
|
+
/** Message ID of the email being replied to */
|
|
17
37
|
inReplyTo?: string
|
|
38
|
+
|
|
39
|
+
/** The date and time the message was created */
|
|
18
40
|
time?: Date
|
|
41
|
+
|
|
42
|
+
/** The subject line of the email */
|
|
19
43
|
subject: string
|
|
44
|
+
|
|
45
|
+
/** MIME type of the message body (e.g., `text/plain` or `text/html`) */
|
|
20
46
|
contentType: string
|
|
47
|
+
|
|
48
|
+
/** Content encoding (e.g., `utf-8`, `base64`) */
|
|
21
49
|
encoding: string
|
|
50
|
+
|
|
51
|
+
/** Main body text of the message */
|
|
22
52
|
body: string
|
|
53
|
+
|
|
54
|
+
/** List of file attachments */
|
|
23
55
|
attachments: Attachment[]
|
|
24
56
|
}
|
|
25
57
|
|
|
58
|
+
/**
|
|
59
|
+
* Represents an email address with an optional display name.
|
|
60
|
+
*/
|
|
26
61
|
export interface Address {
|
|
62
|
+
/** Optional display name (e.g., "John Doe") */
|
|
27
63
|
name?: string
|
|
64
|
+
|
|
65
|
+
/** Email address (e.g., "john@example.com") */
|
|
28
66
|
address: string
|
|
29
67
|
}
|
|
30
68
|
|
|
69
|
+
/**
|
|
70
|
+
* Represents an email attachment.
|
|
71
|
+
*/
|
|
31
72
|
export interface Attachment {
|
|
73
|
+
/** File name of the attachment */
|
|
32
74
|
name: string
|
|
75
|
+
|
|
76
|
+
/** MIME type of the attachment (e.g., `application/pdf`) */
|
|
33
77
|
contentType: string
|
|
78
|
+
|
|
79
|
+
/** File data as binary content */
|
|
34
80
|
data: Uint8Array
|
|
35
81
|
}
|