@lovable.dev/email-js 0.1.1-rc.5 → 0.1.1-rc.7
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.cjs +220 -313
- package/dist/index.d.cts +116 -112
- package/dist/index.d.ts +116 -112
- package/dist/index.js +218 -275
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -1,158 +1,162 @@
|
|
|
1
|
-
import { ReactElement } from
|
|
2
|
-
import { EmailWebhookPayload } from
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { EmailWebhookPayload, EmailWebhookPayload as EmailWebhookPayload$1 } from "@lovable.dev/webhooks-js";
|
|
3
|
+
//#region src/types.d.ts
|
|
5
4
|
interface EmailSendRequest {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
5
|
+
run_id?: string;
|
|
6
|
+
to: string;
|
|
7
|
+
from: string;
|
|
8
|
+
sender_domain?: string;
|
|
9
|
+
subject: string;
|
|
10
|
+
html: string;
|
|
11
|
+
text: string;
|
|
12
|
+
purpose?: string;
|
|
13
|
+
reply_to?: string;
|
|
14
|
+
identity_id?: string;
|
|
15
|
+
test_mode?: boolean;
|
|
16
|
+
label?: string;
|
|
17
|
+
idempotency_key?: string;
|
|
18
|
+
unsubscribe_token?: string;
|
|
19
|
+
message_id?: string;
|
|
21
20
|
}
|
|
22
21
|
interface EmailSendResponse {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
success: boolean;
|
|
23
|
+
message_id?: string;
|
|
24
|
+
workflow_id?: string;
|
|
25
|
+
status?: string;
|
|
27
26
|
}
|
|
28
27
|
interface SendEmailOptions {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
apiKey: string;
|
|
29
|
+
authHeader?: string;
|
|
30
|
+
apiBaseUrl?: string;
|
|
31
|
+
sendUrl?: string | undefined;
|
|
32
|
+
idempotencyKey?: string;
|
|
34
33
|
}
|
|
35
34
|
interface EmailClientOptions {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
apiKey: string;
|
|
36
|
+
authHeader?: string;
|
|
37
|
+
apiBaseUrl?: string;
|
|
39
38
|
}
|
|
40
39
|
interface ListEmailLogsFilters {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
40
|
+
recipient?: string;
|
|
41
|
+
event_type?: string;
|
|
42
|
+
status?: string;
|
|
43
|
+
tag?: string;
|
|
44
|
+
since?: string;
|
|
45
|
+
until?: string;
|
|
46
|
+
limit?: number;
|
|
47
|
+
cursor?: string;
|
|
49
48
|
}
|
|
50
49
|
interface EmailEvent {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
timestamp: string;
|
|
51
|
+
recipient: string;
|
|
52
|
+
event_type: string;
|
|
53
|
+
status?: string;
|
|
54
|
+
message_id?: string;
|
|
55
|
+
tags?: string[] | null;
|
|
57
56
|
}
|
|
58
57
|
interface EmailLogsPagination {
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
next_cursor: string | null;
|
|
59
|
+
has_more: boolean;
|
|
61
60
|
}
|
|
62
61
|
interface ListEmailLogsResponse {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
data: EmailEvent[];
|
|
63
|
+
pagination: EmailLogsPagination;
|
|
64
|
+
/** Earliest timestamp visible under the workspace plan's retention window; an older `since` is clamped to it. */
|
|
65
|
+
history_starts_at: string;
|
|
67
66
|
}
|
|
68
67
|
interface GetEmailUnsubscribeRequest {
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
recipient: string;
|
|
69
|
+
domain: string;
|
|
71
70
|
}
|
|
72
71
|
interface SetEmailUnsubscribeRequest {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
recipient: string;
|
|
73
|
+
domain: string;
|
|
74
|
+
subscribed: boolean;
|
|
76
75
|
}
|
|
77
76
|
interface EmailUnsubscribeResponse {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
recipient: string;
|
|
78
|
+
domain: string;
|
|
79
|
+
subscribed: boolean;
|
|
81
80
|
}
|
|
82
81
|
type EmailWebhookEventType = "email.bounced" | "email.complaint" | "email.unsubscribed" | "email.resubscribed";
|
|
83
82
|
interface WebhookEnvelope<Type extends string, Data> {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
83
|
+
event_id: string;
|
|
84
|
+
run_id: string;
|
|
85
|
+
type: Type;
|
|
86
|
+
project_id: string;
|
|
87
|
+
environment: "dev" | "prod";
|
|
88
|
+
data: Data;
|
|
89
|
+
timestamp: string;
|
|
90
|
+
version: string;
|
|
91
|
+
replay_id?: string;
|
|
93
92
|
}
|
|
94
93
|
type EmailWebhookEvent<T extends EmailWebhookEventType = EmailWebhookEventType> = WebhookEnvelope<T, {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
event: T;
|
|
95
|
+
recipient: string;
|
|
96
|
+
message_id: string;
|
|
98
97
|
}>;
|
|
99
|
-
type EmailWebhookHandlers = {
|
|
100
|
-
[T in EmailWebhookEventType]?: (event: EmailWebhookEvent<T>) => void | Promise<void>;
|
|
101
|
-
};
|
|
98
|
+
type EmailWebhookHandlers = { [T in EmailWebhookEventType]?: (event: EmailWebhookEvent<T>) => void | Promise<void>; };
|
|
102
99
|
interface EmailWebhookHandlerOptions {
|
|
103
|
-
|
|
104
|
-
|
|
100
|
+
apiKey: string;
|
|
101
|
+
on: EmailWebhookHandlers;
|
|
105
102
|
}
|
|
106
103
|
type AuthEmailActionType = "signup" | "invite" | "magiclink" | "recovery" | "email_change" | "reauthentication";
|
|
107
104
|
interface AuthEmailHookData {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
105
|
+
action_type: AuthEmailActionType;
|
|
106
|
+
url: string;
|
|
107
|
+
email: string;
|
|
108
|
+
old_email: string | null;
|
|
109
|
+
new_email: string | null;
|
|
110
|
+
site_url: string | null;
|
|
111
|
+
token: string | null;
|
|
112
|
+
new_token: string | null;
|
|
113
|
+
callback_url?: string;
|
|
117
114
|
}
|
|
118
115
|
type AuthEmailWebhookPayload = WebhookEnvelope<"auth", AuthEmailHookData>;
|
|
119
116
|
interface AuthEmailContent {
|
|
120
|
-
|
|
121
|
-
|
|
117
|
+
subject: string;
|
|
118
|
+
element: ReactElement;
|
|
122
119
|
}
|
|
123
120
|
type AuthEmailDefinition = {
|
|
124
|
-
|
|
125
|
-
|
|
121
|
+
subject: string;
|
|
122
|
+
render: (data: AuthEmailHookData) => ReactElement | Promise<ReactElement>;
|
|
126
123
|
} | ((data: AuthEmailHookData) => AuthEmailContent | Promise<AuthEmailContent>);
|
|
127
124
|
type AuthEmailDefinitions = Record<AuthEmailActionType, AuthEmailDefinition>;
|
|
128
125
|
interface AuthEmailHandlerOptions {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
|
|
126
|
+
apiKey: string;
|
|
127
|
+
from: string;
|
|
128
|
+
/** Defaults to the domain of `from`. */
|
|
129
|
+
senderDomain?: string;
|
|
130
|
+
sendUrl?: string | undefined;
|
|
131
|
+
emails: AuthEmailDefinitions;
|
|
132
|
+
}
|
|
133
|
+
//#endregion
|
|
134
|
+
//#region src/auth-email-handler.d.ts
|
|
137
135
|
declare function createAuthEmailHandler(options: AuthEmailHandlerOptions): (req: Request) => Promise<Response>;
|
|
138
|
-
|
|
136
|
+
//#endregion
|
|
137
|
+
//#region src/email.d.ts
|
|
139
138
|
declare function sendLovableEmail(payload: EmailSendRequest, options: SendEmailOptions): Promise<EmailSendResponse>;
|
|
140
|
-
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region src/http.d.ts
|
|
141
141
|
declare class EmailAPIError extends Error {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}
|
|
148
|
-
|
|
142
|
+
readonly status: number;
|
|
143
|
+
readonly retryAfterSeconds: number | null;
|
|
144
|
+
readonly code: string | null;
|
|
145
|
+
constructor(status: number, message: string, retryAfterSeconds: number | null, code?: string | null);
|
|
146
|
+
get retryable(): boolean;
|
|
147
|
+
}
|
|
148
|
+
//#endregion
|
|
149
|
+
//#region src/logs.d.ts
|
|
149
150
|
declare function listEmailLogs(filters: ListEmailLogsFilters, options: EmailClientOptions): Promise<ListEmailLogsResponse>;
|
|
150
|
-
|
|
151
|
+
//#endregion
|
|
152
|
+
//#region src/unsubscribe.d.ts
|
|
151
153
|
declare function getEmailUnsubscribe(request: GetEmailUnsubscribeRequest, options: EmailClientOptions): Promise<EmailUnsubscribeResponse>;
|
|
152
154
|
declare function setEmailUnsubscribe(request: SetEmailUnsubscribeRequest, options: EmailClientOptions): Promise<EmailUnsubscribeResponse>;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region src/webhook.d.ts
|
|
157
|
+
declare function parseEmailWebhookPayload(body: string): EmailWebhookPayload$1;
|
|
158
|
+
//#endregion
|
|
159
|
+
//#region src/webhook-handler.d.ts
|
|
156
160
|
declare function createEmailWebhookHandler(options: EmailWebhookHandlerOptions): (req: Request) => Promise<Response>;
|
|
157
|
-
|
|
158
|
-
export { type AuthEmailActionType, type AuthEmailContent, type AuthEmailDefinition, type AuthEmailDefinitions, type AuthEmailHandlerOptions, type AuthEmailHookData, type AuthEmailWebhookPayload, EmailAPIError, type EmailClientOptions, type EmailEvent, type EmailLogsPagination, type EmailSendRequest, type EmailSendResponse, type EmailUnsubscribeResponse, type EmailWebhookEvent, type EmailWebhookEventType, type EmailWebhookHandlerOptions, type EmailWebhookHandlers, type GetEmailUnsubscribeRequest, type ListEmailLogsFilters, type ListEmailLogsResponse, type SendEmailOptions, type SetEmailUnsubscribeRequest, createAuthEmailHandler, createEmailWebhookHandler, getEmailUnsubscribe, listEmailLogs, parseEmailWebhookPayload, sendLovableEmail, setEmailUnsubscribe };
|
|
161
|
+
//#endregion
|
|
162
|
+
export { type AuthEmailActionType, type AuthEmailContent, type AuthEmailDefinition, type AuthEmailDefinitions, type AuthEmailHandlerOptions, type AuthEmailHookData, type AuthEmailWebhookPayload, EmailAPIError, type EmailClientOptions, type EmailEvent, type EmailLogsPagination, type EmailSendRequest, type EmailSendResponse, type EmailUnsubscribeResponse, type EmailWebhookEvent, type EmailWebhookEventType, type EmailWebhookHandlerOptions, type EmailWebhookHandlers, type EmailWebhookPayload, type GetEmailUnsubscribeRequest, type ListEmailLogsFilters, type ListEmailLogsResponse, type SendEmailOptions, type SetEmailUnsubscribeRequest, createAuthEmailHandler, createEmailWebhookHandler, getEmailUnsubscribe, listEmailLogs, parseEmailWebhookPayload, sendLovableEmail, setEmailUnsubscribe };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,158 +1,162 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { EmailWebhookPayload, EmailWebhookPayload as EmailWebhookPayload$1 } from "@lovable.dev/webhooks-js";
|
|
2
|
+
import { ReactElement } from "react";
|
|
3
|
+
//#region src/types.d.ts
|
|
5
4
|
interface EmailSendRequest {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
5
|
+
run_id?: string;
|
|
6
|
+
to: string;
|
|
7
|
+
from: string;
|
|
8
|
+
sender_domain?: string;
|
|
9
|
+
subject: string;
|
|
10
|
+
html: string;
|
|
11
|
+
text: string;
|
|
12
|
+
purpose?: string;
|
|
13
|
+
reply_to?: string;
|
|
14
|
+
identity_id?: string;
|
|
15
|
+
test_mode?: boolean;
|
|
16
|
+
label?: string;
|
|
17
|
+
idempotency_key?: string;
|
|
18
|
+
unsubscribe_token?: string;
|
|
19
|
+
message_id?: string;
|
|
21
20
|
}
|
|
22
21
|
interface EmailSendResponse {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
success: boolean;
|
|
23
|
+
message_id?: string;
|
|
24
|
+
workflow_id?: string;
|
|
25
|
+
status?: string;
|
|
27
26
|
}
|
|
28
27
|
interface SendEmailOptions {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
apiKey: string;
|
|
29
|
+
authHeader?: string;
|
|
30
|
+
apiBaseUrl?: string;
|
|
31
|
+
sendUrl?: string | undefined;
|
|
32
|
+
idempotencyKey?: string;
|
|
34
33
|
}
|
|
35
34
|
interface EmailClientOptions {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
apiKey: string;
|
|
36
|
+
authHeader?: string;
|
|
37
|
+
apiBaseUrl?: string;
|
|
39
38
|
}
|
|
40
39
|
interface ListEmailLogsFilters {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
40
|
+
recipient?: string;
|
|
41
|
+
event_type?: string;
|
|
42
|
+
status?: string;
|
|
43
|
+
tag?: string;
|
|
44
|
+
since?: string;
|
|
45
|
+
until?: string;
|
|
46
|
+
limit?: number;
|
|
47
|
+
cursor?: string;
|
|
49
48
|
}
|
|
50
49
|
interface EmailEvent {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
timestamp: string;
|
|
51
|
+
recipient: string;
|
|
52
|
+
event_type: string;
|
|
53
|
+
status?: string;
|
|
54
|
+
message_id?: string;
|
|
55
|
+
tags?: string[] | null;
|
|
57
56
|
}
|
|
58
57
|
interface EmailLogsPagination {
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
next_cursor: string | null;
|
|
59
|
+
has_more: boolean;
|
|
61
60
|
}
|
|
62
61
|
interface ListEmailLogsResponse {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
data: EmailEvent[];
|
|
63
|
+
pagination: EmailLogsPagination;
|
|
64
|
+
/** Earliest timestamp visible under the workspace plan's retention window; an older `since` is clamped to it. */
|
|
65
|
+
history_starts_at: string;
|
|
67
66
|
}
|
|
68
67
|
interface GetEmailUnsubscribeRequest {
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
recipient: string;
|
|
69
|
+
domain: string;
|
|
71
70
|
}
|
|
72
71
|
interface SetEmailUnsubscribeRequest {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
recipient: string;
|
|
73
|
+
domain: string;
|
|
74
|
+
subscribed: boolean;
|
|
76
75
|
}
|
|
77
76
|
interface EmailUnsubscribeResponse {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
recipient: string;
|
|
78
|
+
domain: string;
|
|
79
|
+
subscribed: boolean;
|
|
81
80
|
}
|
|
82
81
|
type EmailWebhookEventType = "email.bounced" | "email.complaint" | "email.unsubscribed" | "email.resubscribed";
|
|
83
82
|
interface WebhookEnvelope<Type extends string, Data> {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
83
|
+
event_id: string;
|
|
84
|
+
run_id: string;
|
|
85
|
+
type: Type;
|
|
86
|
+
project_id: string;
|
|
87
|
+
environment: "dev" | "prod";
|
|
88
|
+
data: Data;
|
|
89
|
+
timestamp: string;
|
|
90
|
+
version: string;
|
|
91
|
+
replay_id?: string;
|
|
93
92
|
}
|
|
94
93
|
type EmailWebhookEvent<T extends EmailWebhookEventType = EmailWebhookEventType> = WebhookEnvelope<T, {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
event: T;
|
|
95
|
+
recipient: string;
|
|
96
|
+
message_id: string;
|
|
98
97
|
}>;
|
|
99
|
-
type EmailWebhookHandlers = {
|
|
100
|
-
[T in EmailWebhookEventType]?: (event: EmailWebhookEvent<T>) => void | Promise<void>;
|
|
101
|
-
};
|
|
98
|
+
type EmailWebhookHandlers = { [T in EmailWebhookEventType]?: (event: EmailWebhookEvent<T>) => void | Promise<void>; };
|
|
102
99
|
interface EmailWebhookHandlerOptions {
|
|
103
|
-
|
|
104
|
-
|
|
100
|
+
apiKey: string;
|
|
101
|
+
on: EmailWebhookHandlers;
|
|
105
102
|
}
|
|
106
103
|
type AuthEmailActionType = "signup" | "invite" | "magiclink" | "recovery" | "email_change" | "reauthentication";
|
|
107
104
|
interface AuthEmailHookData {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
105
|
+
action_type: AuthEmailActionType;
|
|
106
|
+
url: string;
|
|
107
|
+
email: string;
|
|
108
|
+
old_email: string | null;
|
|
109
|
+
new_email: string | null;
|
|
110
|
+
site_url: string | null;
|
|
111
|
+
token: string | null;
|
|
112
|
+
new_token: string | null;
|
|
113
|
+
callback_url?: string;
|
|
117
114
|
}
|
|
118
115
|
type AuthEmailWebhookPayload = WebhookEnvelope<"auth", AuthEmailHookData>;
|
|
119
116
|
interface AuthEmailContent {
|
|
120
|
-
|
|
121
|
-
|
|
117
|
+
subject: string;
|
|
118
|
+
element: ReactElement;
|
|
122
119
|
}
|
|
123
120
|
type AuthEmailDefinition = {
|
|
124
|
-
|
|
125
|
-
|
|
121
|
+
subject: string;
|
|
122
|
+
render: (data: AuthEmailHookData) => ReactElement | Promise<ReactElement>;
|
|
126
123
|
} | ((data: AuthEmailHookData) => AuthEmailContent | Promise<AuthEmailContent>);
|
|
127
124
|
type AuthEmailDefinitions = Record<AuthEmailActionType, AuthEmailDefinition>;
|
|
128
125
|
interface AuthEmailHandlerOptions {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
|
|
126
|
+
apiKey: string;
|
|
127
|
+
from: string;
|
|
128
|
+
/** Defaults to the domain of `from`. */
|
|
129
|
+
senderDomain?: string;
|
|
130
|
+
sendUrl?: string | undefined;
|
|
131
|
+
emails: AuthEmailDefinitions;
|
|
132
|
+
}
|
|
133
|
+
//#endregion
|
|
134
|
+
//#region src/auth-email-handler.d.ts
|
|
137
135
|
declare function createAuthEmailHandler(options: AuthEmailHandlerOptions): (req: Request) => Promise<Response>;
|
|
138
|
-
|
|
136
|
+
//#endregion
|
|
137
|
+
//#region src/email.d.ts
|
|
139
138
|
declare function sendLovableEmail(payload: EmailSendRequest, options: SendEmailOptions): Promise<EmailSendResponse>;
|
|
140
|
-
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region src/http.d.ts
|
|
141
141
|
declare class EmailAPIError extends Error {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}
|
|
148
|
-
|
|
142
|
+
readonly status: number;
|
|
143
|
+
readonly retryAfterSeconds: number | null;
|
|
144
|
+
readonly code: string | null;
|
|
145
|
+
constructor(status: number, message: string, retryAfterSeconds: number | null, code?: string | null);
|
|
146
|
+
get retryable(): boolean;
|
|
147
|
+
}
|
|
148
|
+
//#endregion
|
|
149
|
+
//#region src/logs.d.ts
|
|
149
150
|
declare function listEmailLogs(filters: ListEmailLogsFilters, options: EmailClientOptions): Promise<ListEmailLogsResponse>;
|
|
150
|
-
|
|
151
|
+
//#endregion
|
|
152
|
+
//#region src/unsubscribe.d.ts
|
|
151
153
|
declare function getEmailUnsubscribe(request: GetEmailUnsubscribeRequest, options: EmailClientOptions): Promise<EmailUnsubscribeResponse>;
|
|
152
154
|
declare function setEmailUnsubscribe(request: SetEmailUnsubscribeRequest, options: EmailClientOptions): Promise<EmailUnsubscribeResponse>;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region src/webhook.d.ts
|
|
157
|
+
declare function parseEmailWebhookPayload(body: string): EmailWebhookPayload$1;
|
|
158
|
+
//#endregion
|
|
159
|
+
//#region src/webhook-handler.d.ts
|
|
156
160
|
declare function createEmailWebhookHandler(options: EmailWebhookHandlerOptions): (req: Request) => Promise<Response>;
|
|
157
|
-
|
|
158
|
-
export { type AuthEmailActionType, type AuthEmailContent, type AuthEmailDefinition, type AuthEmailDefinitions, type AuthEmailHandlerOptions, type AuthEmailHookData, type AuthEmailWebhookPayload, EmailAPIError, type EmailClientOptions, type EmailEvent, type EmailLogsPagination, type EmailSendRequest, type EmailSendResponse, type EmailUnsubscribeResponse, type EmailWebhookEvent, type EmailWebhookEventType, type EmailWebhookHandlerOptions, type EmailWebhookHandlers, type GetEmailUnsubscribeRequest, type ListEmailLogsFilters, type ListEmailLogsResponse, type SendEmailOptions, type SetEmailUnsubscribeRequest, createAuthEmailHandler, createEmailWebhookHandler, getEmailUnsubscribe, listEmailLogs, parseEmailWebhookPayload, sendLovableEmail, setEmailUnsubscribe };
|
|
161
|
+
//#endregion
|
|
162
|
+
export { type AuthEmailActionType, type AuthEmailContent, type AuthEmailDefinition, type AuthEmailDefinitions, type AuthEmailHandlerOptions, type AuthEmailHookData, type AuthEmailWebhookPayload, EmailAPIError, type EmailClientOptions, type EmailEvent, type EmailLogsPagination, type EmailSendRequest, type EmailSendResponse, type EmailUnsubscribeResponse, type EmailWebhookEvent, type EmailWebhookEventType, type EmailWebhookHandlerOptions, type EmailWebhookHandlers, type EmailWebhookPayload, type GetEmailUnsubscribeRequest, type ListEmailLogsFilters, type ListEmailLogsResponse, type SendEmailOptions, type SetEmailUnsubscribeRequest, createAuthEmailHandler, createEmailWebhookHandler, getEmailUnsubscribe, listEmailLogs, parseEmailWebhookPayload, sendLovableEmail, setEmailUnsubscribe };
|