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