This repository has been archived by the owner on Oct 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathnode-ses.d.ts
63 lines (62 loc) · 1.52 KB
/
node-ses.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import { Response } from "request";
declare module "node-ses" {
export type Emails = string | string[];
export interface MessageTag {
name: string;
value: any;
}
export interface sendEmailOptions {
from: string;
subject: string;
message: string;
altText?: string;
to?: Emails;
cc?: Emails;
bcc?: Emails;
replyTo?: string;
configurationSet?: string;
messageTags?: MessageTag[];
key?: string;
secret?: string;
amazon?: string;
}
export interface sendRawEmailOptions {
from: string;
rawMessage: string;
}
export interface SendEmailResult {
MessageId: string;
}
export interface ResponseMetadata {
RequestId: string;
}
export interface SendEmailResponse {
SendEmailResult: SendEmailResult;
ResponseMetadata: ResponseMetadata;
}
export interface SendEmailData {
SendEmailResponse: SendEmailResponse;
}
export interface SendEmailError {
Type: string;
Code: string;
Message: string;
Detail?: string;
}
export type Callback = (
error: SendEmailError,
data: SendEmailData,
response: Response
) => any;
export interface Client {
sendEmail(options: sendEmailOptions, callback: Callback): void;
sendemail(options: sendEmailOptions, callback: Callback): void;
sendRawEmail(options: sendRawEmailOptions, callback: Callback): void;
}
export interface ClientConfig {
key: string;
secret: string;
amazon?: string;
}
export function createClient(options?: ClientConfig): Client;
}