zupost 0.0.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/dist/index.d.mts +57 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.js +744 -0
- package/dist/index.mjs +720 -0
- package/package.json +44 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
interface CreateEmailContent {
|
|
2
|
+
/**
|
|
3
|
+
* HTML content of the email body.
|
|
4
|
+
*/
|
|
5
|
+
html: string;
|
|
6
|
+
/**
|
|
7
|
+
* Plain text content of the email body.
|
|
8
|
+
*/
|
|
9
|
+
text: string;
|
|
10
|
+
}
|
|
11
|
+
interface CreateEmailOptions {
|
|
12
|
+
/**
|
|
13
|
+
* Email address of the recipient. Use an array for multiple recipients (up to 50).
|
|
14
|
+
*/
|
|
15
|
+
to: string | string[];
|
|
16
|
+
/**
|
|
17
|
+
* Email address of the sender. To add a display name, use: "Name <email@domain.com>".
|
|
18
|
+
*/
|
|
19
|
+
from: string;
|
|
20
|
+
/**
|
|
21
|
+
* BCC recipient(s). Use a string or an array for multiple addresses.
|
|
22
|
+
*/
|
|
23
|
+
bcc?: string | string[];
|
|
24
|
+
/**
|
|
25
|
+
* CC recipient(s). Use a string or an array for multiple addresses.
|
|
26
|
+
*/
|
|
27
|
+
cc?: string | string[];
|
|
28
|
+
/**
|
|
29
|
+
* Additional custom headers for the email.
|
|
30
|
+
*/
|
|
31
|
+
headers?: Record<string, string>;
|
|
32
|
+
/**
|
|
33
|
+
* Reply-to address(es). Use a string or an array for multiple addresses.
|
|
34
|
+
*/
|
|
35
|
+
replyTo?: string | string[];
|
|
36
|
+
/**
|
|
37
|
+
* Subject line of the email.
|
|
38
|
+
*/
|
|
39
|
+
subject: string;
|
|
40
|
+
/**
|
|
41
|
+
* Schedule the email for future delivery (ISO 8601 format, e.g., 2024-08-05T11:52:01.858Z).
|
|
42
|
+
*/
|
|
43
|
+
scheduledAt?: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
declare class Zupost {
|
|
47
|
+
readonly apiKey: string;
|
|
48
|
+
readonly apiUrl?: string | undefined;
|
|
49
|
+
private readonly headers;
|
|
50
|
+
private readonly baseUrl;
|
|
51
|
+
constructor(apiKey: string, apiUrl?: string | undefined);
|
|
52
|
+
request(path: string, method: 'GET' | 'POST' | 'PUT' | 'DELETE', body?: BodyInit): Promise<unknown>;
|
|
53
|
+
get(path: string): Promise<unknown>;
|
|
54
|
+
post(path: string, body: BodyInit): Promise<unknown>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export { type CreateEmailContent, type CreateEmailOptions, Zupost };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
interface CreateEmailContent {
|
|
2
|
+
/**
|
|
3
|
+
* HTML content of the email body.
|
|
4
|
+
*/
|
|
5
|
+
html: string;
|
|
6
|
+
/**
|
|
7
|
+
* Plain text content of the email body.
|
|
8
|
+
*/
|
|
9
|
+
text: string;
|
|
10
|
+
}
|
|
11
|
+
interface CreateEmailOptions {
|
|
12
|
+
/**
|
|
13
|
+
* Email address of the recipient. Use an array for multiple recipients (up to 50).
|
|
14
|
+
*/
|
|
15
|
+
to: string | string[];
|
|
16
|
+
/**
|
|
17
|
+
* Email address of the sender. To add a display name, use: "Name <email@domain.com>".
|
|
18
|
+
*/
|
|
19
|
+
from: string;
|
|
20
|
+
/**
|
|
21
|
+
* BCC recipient(s). Use a string or an array for multiple addresses.
|
|
22
|
+
*/
|
|
23
|
+
bcc?: string | string[];
|
|
24
|
+
/**
|
|
25
|
+
* CC recipient(s). Use a string or an array for multiple addresses.
|
|
26
|
+
*/
|
|
27
|
+
cc?: string | string[];
|
|
28
|
+
/**
|
|
29
|
+
* Additional custom headers for the email.
|
|
30
|
+
*/
|
|
31
|
+
headers?: Record<string, string>;
|
|
32
|
+
/**
|
|
33
|
+
* Reply-to address(es). Use a string or an array for multiple addresses.
|
|
34
|
+
*/
|
|
35
|
+
replyTo?: string | string[];
|
|
36
|
+
/**
|
|
37
|
+
* Subject line of the email.
|
|
38
|
+
*/
|
|
39
|
+
subject: string;
|
|
40
|
+
/**
|
|
41
|
+
* Schedule the email for future delivery (ISO 8601 format, e.g., 2024-08-05T11:52:01.858Z).
|
|
42
|
+
*/
|
|
43
|
+
scheduledAt?: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
declare class Zupost {
|
|
47
|
+
readonly apiKey: string;
|
|
48
|
+
readonly apiUrl?: string | undefined;
|
|
49
|
+
private readonly headers;
|
|
50
|
+
private readonly baseUrl;
|
|
51
|
+
constructor(apiKey: string, apiUrl?: string | undefined);
|
|
52
|
+
request(path: string, method: 'GET' | 'POST' | 'PUT' | 'DELETE', body?: BodyInit): Promise<unknown>;
|
|
53
|
+
get(path: string): Promise<unknown>;
|
|
54
|
+
post(path: string, body: BodyInit): Promise<unknown>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export { type CreateEmailContent, type CreateEmailOptions, Zupost };
|