@mailoo/forms 0.0.0-stage → 1.33.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/LICENSE +16 -0
- package/README.md +208 -2
- package/dist/chunk-4B377BWO.js +147 -0
- package/dist/chunk-4B377BWO.js.map +1 -0
- package/dist/chunk-LD246ORB.js +86 -0
- package/dist/chunk-LD246ORB.js.map +1 -0
- package/dist/chunk-QBZAYHBD.js +36 -0
- package/dist/chunk-QBZAYHBD.js.map +1 -0
- package/dist/events/index.cjs +176 -0
- package/dist/events/index.cjs.map +1 -0
- package/dist/events/index.d.cts +107 -0
- package/dist/events/index.d.ts +107 -0
- package/dist/events/index.js +17 -0
- package/dist/events/index.js.map +1 -0
- package/dist/hooks/index.cjs +301 -0
- package/dist/hooks/index.cjs.map +1 -0
- package/dist/hooks/index.d.cts +130 -0
- package/dist/hooks/index.d.ts +130 -0
- package/dist/hooks/index.js +221 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/index.cjs +66 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +35 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/routes/index.cjs +544 -0
- package/dist/routes/index.cjs.map +1 -0
- package/dist/routes/index.d.cts +59 -0
- package/dist/routes/index.d.ts +59 -0
- package/dist/routes/index.js +351 -0
- package/dist/routes/index.js.map +1 -0
- package/dist/server/index.cjs +270 -0
- package/dist/server/index.cjs.map +1 -0
- package/dist/server/index.d.cts +44 -0
- package/dist/server/index.d.ts +44 -0
- package/dist/server/index.js +112 -0
- package/dist/server/index.js.map +1 -0
- package/dist/webhooks/index.cjs +111 -0
- package/dist/webhooks/index.cjs.map +1 -0
- package/dist/webhooks/index.d.cts +37 -0
- package/dist/webhooks/index.d.ts +37 -0
- package/dist/webhooks/index.js +9 -0
- package/dist/webhooks/index.js.map +1 -0
- package/package.json +77 -3
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
parseMailooLifecycleIngestData
|
|
4
|
+
} from "../chunk-4B377BWO.js";
|
|
5
|
+
|
|
6
|
+
// src/hooks/index.ts
|
|
7
|
+
import { useCallback, useState } from "react";
|
|
8
|
+
async function resolveHeaders(getHeaders) {
|
|
9
|
+
if (!getHeaders) return {};
|
|
10
|
+
if (typeof getHeaders === "function") {
|
|
11
|
+
return await getHeaders() ?? {};
|
|
12
|
+
}
|
|
13
|
+
return getHeaders;
|
|
14
|
+
}
|
|
15
|
+
async function postJson(endpoint, body, getHeaders) {
|
|
16
|
+
try {
|
|
17
|
+
const extra = await resolveHeaders(getHeaders);
|
|
18
|
+
const res = await fetch(endpoint, {
|
|
19
|
+
method: "POST",
|
|
20
|
+
headers: { "Content-Type": "application/json", ...extra },
|
|
21
|
+
body: JSON.stringify(body)
|
|
22
|
+
});
|
|
23
|
+
const data = await res.json().catch(() => ({}));
|
|
24
|
+
if (!res.ok) {
|
|
25
|
+
return {
|
|
26
|
+
ok: false,
|
|
27
|
+
status: res.status,
|
|
28
|
+
message: typeof data.message === "string" ? data.message : typeof data.error === "string" ? data.error : "Submit failed"
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
return { ok: true, status: res.status, data };
|
|
32
|
+
} catch {
|
|
33
|
+
return { ok: false, status: 0, message: "Network error" };
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
async function getJson(endpoint, getHeaders) {
|
|
37
|
+
try {
|
|
38
|
+
const extra = await resolveHeaders(getHeaders);
|
|
39
|
+
const res = await fetch(endpoint, {
|
|
40
|
+
method: "GET",
|
|
41
|
+
headers: { ...extra }
|
|
42
|
+
});
|
|
43
|
+
const data = await res.json().catch(() => ({}));
|
|
44
|
+
if (!res.ok) {
|
|
45
|
+
return {
|
|
46
|
+
ok: false,
|
|
47
|
+
status: res.status,
|
|
48
|
+
message: typeof data.message === "string" ? data.message : typeof data.error === "string" ? data.error : "Request failed"
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
return { ok: true, status: res.status, data };
|
|
52
|
+
} catch {
|
|
53
|
+
return { ok: false, status: 0, message: "Network error" };
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function toLifecycleEmitResult(result) {
|
|
57
|
+
if (!result.ok) {
|
|
58
|
+
return {
|
|
59
|
+
ok: false,
|
|
60
|
+
status: result.status,
|
|
61
|
+
message: result.message
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
const envelope = result.data;
|
|
65
|
+
const dataObj = envelope && typeof envelope === "object" && !Array.isArray(envelope) && "data" in envelope ? envelope.data : envelope;
|
|
66
|
+
const parsed = parseMailooLifecycleIngestData(dataObj);
|
|
67
|
+
if (!parsed) {
|
|
68
|
+
return {
|
|
69
|
+
ok: false,
|
|
70
|
+
status: result.status,
|
|
71
|
+
message: "Unexpected lifecycle ingest response shape",
|
|
72
|
+
data: result.data
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
return { ok: true, status: result.status, data: parsed };
|
|
76
|
+
}
|
|
77
|
+
function useMailooFormSubmit(options) {
|
|
78
|
+
const endpoint = options?.endpoint ?? "/api/v1/webhooks/forms/submit";
|
|
79
|
+
const getHeaders = options?.getHeaders;
|
|
80
|
+
const [pending, setPending] = useState(false);
|
|
81
|
+
const submit = useCallback(
|
|
82
|
+
async (body) => {
|
|
83
|
+
setPending(true);
|
|
84
|
+
try {
|
|
85
|
+
return await postJson(endpoint, body, getHeaders);
|
|
86
|
+
} finally {
|
|
87
|
+
setPending(false);
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
[endpoint, getHeaders]
|
|
91
|
+
);
|
|
92
|
+
return { submit, pending };
|
|
93
|
+
}
|
|
94
|
+
function useMailooFeedbackSubmit(options) {
|
|
95
|
+
const endpoint = options?.endpoint ?? "/api/v1/webhooks/feedback/submit";
|
|
96
|
+
const getHeaders = options?.getHeaders;
|
|
97
|
+
const [pending, setPending] = useState(false);
|
|
98
|
+
const submit = useCallback(
|
|
99
|
+
async (body) => {
|
|
100
|
+
setPending(true);
|
|
101
|
+
try {
|
|
102
|
+
return await postJson(endpoint, body, getHeaders);
|
|
103
|
+
} finally {
|
|
104
|
+
setPending(false);
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
[endpoint, getHeaders]
|
|
108
|
+
);
|
|
109
|
+
return { submit, pending };
|
|
110
|
+
}
|
|
111
|
+
async function emitMailooLifecycleEvent(body, options) {
|
|
112
|
+
const endpoint = options?.endpoint ?? "/api/v1/webhooks/lifecycle/events";
|
|
113
|
+
const result = await postJson(endpoint, body, options?.getHeaders);
|
|
114
|
+
return toLifecycleEmitResult(result);
|
|
115
|
+
}
|
|
116
|
+
function useMailooLifecycleEvent(options) {
|
|
117
|
+
const endpoint = options?.endpoint ?? "/api/v1/webhooks/lifecycle/events";
|
|
118
|
+
const getHeaders = options?.getHeaders;
|
|
119
|
+
const [pending, setPending] = useState(false);
|
|
120
|
+
const emit = useCallback(
|
|
121
|
+
async (body) => {
|
|
122
|
+
setPending(true);
|
|
123
|
+
try {
|
|
124
|
+
return await emitMailooLifecycleEvent(body, { endpoint, getHeaders });
|
|
125
|
+
} finally {
|
|
126
|
+
setPending(false);
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
[endpoint, getHeaders]
|
|
130
|
+
);
|
|
131
|
+
return { emit, pending };
|
|
132
|
+
}
|
|
133
|
+
async function retryMailooLifecycleEvent(eventId, options) {
|
|
134
|
+
const base = options?.endpoint ?? "/api/v1/webhooks/lifecycle/events";
|
|
135
|
+
const endpoint = `${base.replace(/\/$/, "")}/${encodeURIComponent(eventId)}/retry`;
|
|
136
|
+
const result = await postJson(endpoint, {}, options?.getHeaders);
|
|
137
|
+
return toLifecycleEmitResult(result);
|
|
138
|
+
}
|
|
139
|
+
function useMailooLifecycleRetry(options) {
|
|
140
|
+
const endpoint = options?.endpoint ?? "/api/v1/webhooks/lifecycle/events";
|
|
141
|
+
const getHeaders = options?.getHeaders;
|
|
142
|
+
const [pending, setPending] = useState(false);
|
|
143
|
+
const retry = useCallback(
|
|
144
|
+
async (eventId) => {
|
|
145
|
+
setPending(true);
|
|
146
|
+
try {
|
|
147
|
+
return await retryMailooLifecycleEvent(eventId, {
|
|
148
|
+
endpoint,
|
|
149
|
+
getHeaders
|
|
150
|
+
});
|
|
151
|
+
} finally {
|
|
152
|
+
setPending(false);
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
[endpoint, getHeaders]
|
|
156
|
+
);
|
|
157
|
+
return { retry, pending };
|
|
158
|
+
}
|
|
159
|
+
async function fetchMailooLifecycleStatus(query, options) {
|
|
160
|
+
const base = options?.endpoint ?? "/api/v1/webhooks/lifecycle/status";
|
|
161
|
+
const params = new URLSearchParams();
|
|
162
|
+
if (query.externalUserId?.trim()) {
|
|
163
|
+
params.set("externalUserId", query.externalUserId.trim());
|
|
164
|
+
}
|
|
165
|
+
if (query.externalUserIds?.length) {
|
|
166
|
+
params.set("externalUserIds", query.externalUserIds.join(","));
|
|
167
|
+
}
|
|
168
|
+
if (query.emails?.length) {
|
|
169
|
+
params.set("emails", query.emails.join(","));
|
|
170
|
+
}
|
|
171
|
+
const qs = params.toString();
|
|
172
|
+
const url = qs ? `${base}?${qs}` : base;
|
|
173
|
+
const result = await getJson(url, options?.getHeaders);
|
|
174
|
+
if (!result.ok) {
|
|
175
|
+
return {
|
|
176
|
+
ok: false,
|
|
177
|
+
status: result.status,
|
|
178
|
+
message: result.message
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
const data = result.data;
|
|
182
|
+
if (!data || data.success !== true) {
|
|
183
|
+
return {
|
|
184
|
+
ok: false,
|
|
185
|
+
status: result.status,
|
|
186
|
+
message: "Unexpected lifecycle status response shape"
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
return { ok: true, status: result.status, data };
|
|
190
|
+
}
|
|
191
|
+
function useMailooLifecycleStatus(options) {
|
|
192
|
+
const endpoint = options?.endpoint ?? "/api/v1/webhooks/lifecycle/status";
|
|
193
|
+
const getHeaders = options?.getHeaders;
|
|
194
|
+
const [pending, setPending] = useState(false);
|
|
195
|
+
const load = useCallback(
|
|
196
|
+
async (query) => {
|
|
197
|
+
setPending(true);
|
|
198
|
+
try {
|
|
199
|
+
return await fetchMailooLifecycleStatus(query, {
|
|
200
|
+
endpoint,
|
|
201
|
+
getHeaders
|
|
202
|
+
});
|
|
203
|
+
} finally {
|
|
204
|
+
setPending(false);
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
[endpoint, getHeaders]
|
|
208
|
+
);
|
|
209
|
+
return { load, pending };
|
|
210
|
+
}
|
|
211
|
+
export {
|
|
212
|
+
emitMailooLifecycleEvent,
|
|
213
|
+
fetchMailooLifecycleStatus,
|
|
214
|
+
retryMailooLifecycleEvent,
|
|
215
|
+
useMailooFeedbackSubmit,
|
|
216
|
+
useMailooFormSubmit,
|
|
217
|
+
useMailooLifecycleEvent,
|
|
218
|
+
useMailooLifecycleRetry,
|
|
219
|
+
useMailooLifecycleStatus
|
|
220
|
+
};
|
|
221
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/index.ts"],"sourcesContent":["'use client'\n\nimport { useCallback, useState } from 'react'\nimport type {\n MailooLifecycleEventInput,\n MailooLifecycleEventName,\n MailooMarketingConsent,\n MailooLifecycleAttributeKey,\n MailooLifecycleIngestData,\n MailooLifecycleStatusData,\n MailooLifecycleContactSummary,\n} from '../events/index.js'\nimport { parseMailooLifecycleIngestData } from '../events/index.js'\n\nexport type MailooFormSubmitBody = {\n email: string\n name?: string\n subject?: string\n content?: string\n source?: string\n /** Recipient UI locale for welcome email template overlays. */\n locale?: string\n metadata?: Record<string, unknown>\n}\n\nexport type MailooFormSubmitSuccess = {\n success: true\n message: string\n messageId?: string\n}\n\nexport type MailooFeedbackSubmitBody = {\n email: string\n message: string\n name?: string\n subject?: string\n formKey?: string\n locale?: string\n metadata?: Record<string, unknown>\n}\n\nexport type MailooFeedbackSubmitSuccess = {\n success: true\n message: string\n messageId: string\n feedbackId: string\n}\n\nexport type MailooFormSubmitResult =\n | { ok: true; status: number; data: unknown }\n | { ok: false; status: number; message: string }\n\nexport type MailooLifecycleEmitResult =\n | { ok: true; status: number; data: MailooLifecycleIngestData }\n | { ok: false; status: number; message: string; data?: unknown }\n\nexport type MailooLifecycleStatusResult =\n | { ok: true; status: number; data: MailooLifecycleStatusData }\n | { ok: false; status: number; message: string }\n\nexport type MailooFetchHeaders =\n | Record<string, string>\n | (() => Record<string, string> | Promise<Record<string, string>>)\n\nasync function resolveHeaders(\n getHeaders?: MailooFetchHeaders\n): Promise<Record<string, string>> {\n if (!getHeaders) return {}\n if (typeof getHeaders === 'function') {\n return (await getHeaders()) ?? {}\n }\n return getHeaders\n}\n\nasync function postJson(\n endpoint: string,\n body: unknown,\n getHeaders?: MailooFetchHeaders\n): Promise<MailooFormSubmitResult> {\n try {\n const extra = await resolveHeaders(getHeaders)\n const res = await fetch(endpoint, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...extra },\n body: JSON.stringify(body),\n })\n const data = await res.json().catch(() => ({}))\n if (!res.ok) {\n return {\n ok: false,\n status: res.status,\n message:\n typeof (data as { message?: string }).message === 'string'\n ? (data as { message: string }).message\n : typeof (data as { error?: string }).error === 'string'\n ? (data as { error: string }).error\n : 'Submit failed',\n }\n }\n return { ok: true, status: res.status, data }\n } catch {\n return { ok: false, status: 0, message: 'Network error' }\n }\n}\n\nasync function getJson(\n endpoint: string,\n getHeaders?: MailooFetchHeaders\n): Promise<MailooFormSubmitResult> {\n try {\n const extra = await resolveHeaders(getHeaders)\n const res = await fetch(endpoint, {\n method: 'GET',\n headers: { ...extra },\n })\n const data = await res.json().catch(() => ({}))\n if (!res.ok) {\n return {\n ok: false,\n status: res.status,\n message:\n typeof (data as { message?: string }).message === 'string'\n ? (data as { message: string }).message\n : typeof (data as { error?: string }).error === 'string'\n ? (data as { error: string }).error\n : 'Request failed',\n }\n }\n return { ok: true, status: res.status, data }\n } catch {\n return { ok: false, status: 0, message: 'Network error' }\n }\n}\n\nfunction toLifecycleEmitResult(\n result: MailooFormSubmitResult\n): MailooLifecycleEmitResult {\n if (!result.ok) {\n return {\n ok: false,\n status: result.status,\n message: result.message,\n }\n }\n const envelope = result.data\n const dataObj =\n envelope &&\n typeof envelope === 'object' &&\n !Array.isArray(envelope) &&\n 'data' in envelope\n ? (envelope as { data: unknown }).data\n : envelope\n const parsed = parseMailooLifecycleIngestData(dataObj)\n if (!parsed) {\n return {\n ok: false,\n status: result.status,\n message: 'Unexpected lifecycle ingest response shape',\n data: result.data,\n }\n }\n return { ok: true, status: result.status, data: parsed }\n}\n\nexport function useMailooFormSubmit(options?: {\n endpoint?: string\n getHeaders?: MailooFetchHeaders\n}) {\n const endpoint = options?.endpoint ?? '/api/v1/webhooks/forms/submit'\n const getHeaders = options?.getHeaders\n const [pending, setPending] = useState(false)\n\n const submit = useCallback(\n async (body: MailooFormSubmitBody): Promise<MailooFormSubmitResult> => {\n setPending(true)\n try {\n return await postJson(endpoint, body, getHeaders)\n } finally {\n setPending(false)\n }\n },\n [endpoint, getHeaders]\n )\n\n return { submit, pending }\n}\n\nexport function useMailooFeedbackSubmit(options?: {\n endpoint?: string\n getHeaders?: MailooFetchHeaders\n}) {\n const endpoint = options?.endpoint ?? '/api/v1/webhooks/feedback/submit'\n const getHeaders = options?.getHeaders\n const [pending, setPending] = useState(false)\n\n const submit = useCallback(\n async (\n body: MailooFeedbackSubmitBody\n ): Promise<MailooFormSubmitResult> => {\n setPending(true)\n try {\n return await postJson(endpoint, body, getHeaders)\n } finally {\n setPending(false)\n }\n },\n [endpoint, getHeaders]\n )\n\n return { submit, pending }\n}\n\nexport type EmitMailooLifecycleEventBody = {\n eventName: MailooLifecycleEventName\n idempotencyKey: string\n externalUserId: string\n email: string\n marketingConsent: MailooMarketingConsent\n locale?: string\n name?: string\n attributes?: Partial<Record<MailooLifecycleAttributeKey, unknown>>\n}\n\n/**\n * Browser → same-origin BFF lifecycle ingest. Never send X-API-Key from the client.\n * Use `getHeaders` to attach host auth (e.g. Firebase ID token Bearer).\n */\nexport async function emitMailooLifecycleEvent(\n body: EmitMailooLifecycleEventBody,\n options?: { endpoint?: string; getHeaders?: MailooFetchHeaders }\n): Promise<MailooLifecycleEmitResult> {\n const endpoint =\n options?.endpoint ?? '/api/v1/webhooks/lifecycle/events'\n const result = await postJson(endpoint, body, options?.getHeaders)\n return toLifecycleEmitResult(result)\n}\n\nexport function useMailooLifecycleEvent(options?: {\n endpoint?: string\n getHeaders?: MailooFetchHeaders\n}) {\n const endpoint =\n options?.endpoint ?? '/api/v1/webhooks/lifecycle/events'\n const getHeaders = options?.getHeaders\n const [pending, setPending] = useState(false)\n\n const emit = useCallback(\n async (\n body: EmitMailooLifecycleEventBody | MailooLifecycleEventInput\n ): Promise<MailooLifecycleEmitResult> => {\n setPending(true)\n try {\n return await emitMailooLifecycleEvent(body, { endpoint, getHeaders })\n } finally {\n setPending(false)\n }\n },\n [endpoint, getHeaders]\n )\n\n return { emit, pending }\n}\n\nexport async function retryMailooLifecycleEvent(\n eventId: string,\n options?: { endpoint?: string; getHeaders?: MailooFetchHeaders }\n): Promise<MailooLifecycleEmitResult> {\n const base =\n options?.endpoint ?? '/api/v1/webhooks/lifecycle/events'\n const endpoint = `${base.replace(/\\/$/, '')}/${encodeURIComponent(eventId)}/retry`\n const result = await postJson(endpoint, {}, options?.getHeaders)\n return toLifecycleEmitResult(result)\n}\n\nexport function useMailooLifecycleRetry(options?: {\n endpoint?: string\n getHeaders?: MailooFetchHeaders\n}) {\n const endpoint =\n options?.endpoint ?? '/api/v1/webhooks/lifecycle/events'\n const getHeaders = options?.getHeaders\n const [pending, setPending] = useState(false)\n\n const retry = useCallback(\n async (eventId: string): Promise<MailooLifecycleEmitResult> => {\n setPending(true)\n try {\n return await retryMailooLifecycleEvent(eventId, {\n endpoint,\n getHeaders,\n })\n } finally {\n setPending(false)\n }\n },\n [endpoint, getHeaders]\n )\n\n return { retry, pending }\n}\n\nexport type MailooLifecycleStatusQuery = {\n externalUserIds?: string[]\n emails?: string[]\n externalUserId?: string\n}\n\nexport async function fetchMailooLifecycleStatus(\n query: MailooLifecycleStatusQuery,\n options?: { endpoint?: string; getHeaders?: MailooFetchHeaders }\n): Promise<MailooLifecycleStatusResult> {\n const base =\n options?.endpoint ?? '/api/v1/webhooks/lifecycle/status'\n const params = new URLSearchParams()\n if (query.externalUserId?.trim()) {\n params.set('externalUserId', query.externalUserId.trim())\n }\n if (query.externalUserIds?.length) {\n params.set('externalUserIds', query.externalUserIds.join(','))\n }\n if (query.emails?.length) {\n params.set('emails', query.emails.join(','))\n }\n const qs = params.toString()\n const url = qs ? `${base}?${qs}` : base\n const result = await getJson(url, options?.getHeaders)\n if (!result.ok) {\n return {\n ok: false,\n status: result.status,\n message: result.message,\n }\n }\n const data = result.data as MailooLifecycleStatusData\n if (!data || data.success !== true) {\n return {\n ok: false,\n status: result.status,\n message: 'Unexpected lifecycle status response shape',\n }\n }\n return { ok: true, status: result.status, data }\n}\n\nexport function useMailooLifecycleStatus(options?: {\n endpoint?: string\n getHeaders?: MailooFetchHeaders\n}) {\n const endpoint =\n options?.endpoint ?? '/api/v1/webhooks/lifecycle/status'\n const getHeaders = options?.getHeaders\n const [pending, setPending] = useState(false)\n\n const load = useCallback(\n async (\n query: MailooLifecycleStatusQuery\n ): Promise<MailooLifecycleStatusResult> => {\n setPending(true)\n try {\n return await fetchMailooLifecycleStatus(query, {\n endpoint,\n getHeaders,\n })\n } finally {\n setPending(false)\n }\n },\n [endpoint, getHeaders]\n )\n\n return { load, pending }\n}\n\nexport type { MailooLifecycleContactSummary, MailooLifecycleIngestData }\n"],"mappings":";;;;;;AAEA,SAAS,aAAa,gBAAgB;AA8DtC,eAAe,eACb,YACiC;AACjC,MAAI,CAAC,WAAY,QAAO,CAAC;AACzB,MAAI,OAAO,eAAe,YAAY;AAC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AAA,UAC7C;AAAA,UACA;AAAA,QACF,CAAC;AAAA,MACH,UAAE;AACA,mBAAW,KAAK;AAAA,MAClB;AAAA,IACF;AAAA,IACA,CAAC,UAAU,UAAU;AAAA,EACvB;AAEA,SAAO,EAAE,MAAM,QAAQ;AACzB;","names":[]}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var src_exports = {};
|
|
22
|
+
__export(src_exports, {
|
|
23
|
+
MAILOO_FEEDBACK_INTEGRATION_PREFIX: () => MAILOO_FEEDBACK_INTEGRATION_PREFIX,
|
|
24
|
+
MAILOO_FORM_INTEGRATION_PREFIX: () => MAILOO_FORM_INTEGRATION_PREFIX,
|
|
25
|
+
MAILOO_LIFECYCLE_INTEGRATION_PREFIX: () => MAILOO_LIFECYCLE_INTEGRATION_PREFIX,
|
|
26
|
+
getMailooFeedbackIntegrationConfig: () => getMailooFeedbackIntegrationConfig,
|
|
27
|
+
getMailooFormIntegrationConfig: () => getMailooFormIntegrationConfig,
|
|
28
|
+
getMailooFormsIntegrationConfig: () => getMailooFormsIntegrationConfig,
|
|
29
|
+
isMailooFeedbackIntegrationConfigured: () => isMailooFeedbackIntegrationConfigured
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(src_exports);
|
|
32
|
+
|
|
33
|
+
// src/config.ts
|
|
34
|
+
var import_next_core = require("@mailoo/next-core");
|
|
35
|
+
var MAILOO_FORM_INTEGRATION_PREFIX = "MAILOO_CONTACT_FORM_INTEGRATION";
|
|
36
|
+
var MAILOO_FEEDBACK_INTEGRATION_PREFIX = "MAILOO_FEEDBACK_INTEGRATION";
|
|
37
|
+
var MAILOO_LIFECYCLE_INTEGRATION_PREFIX = "MAILOO_LIFECYCLE";
|
|
38
|
+
function getMailooFormsIntegrationConfig(options) {
|
|
39
|
+
return (0, import_next_core.readMailooIntegrationConfig)({ prefix: options.prefix });
|
|
40
|
+
}
|
|
41
|
+
function getMailooFormIntegrationConfig() {
|
|
42
|
+
return getMailooFormsIntegrationConfig({
|
|
43
|
+
prefix: MAILOO_FORM_INTEGRATION_PREFIX
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function getMailooFeedbackIntegrationConfig() {
|
|
47
|
+
return getMailooFormsIntegrationConfig({
|
|
48
|
+
prefix: MAILOO_FEEDBACK_INTEGRATION_PREFIX
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function isMailooFeedbackIntegrationConfigured() {
|
|
52
|
+
return getMailooFormsIntegrationConfig({
|
|
53
|
+
prefix: MAILOO_FEEDBACK_INTEGRATION_PREFIX
|
|
54
|
+
}) !== null;
|
|
55
|
+
}
|
|
56
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
57
|
+
0 && (module.exports = {
|
|
58
|
+
MAILOO_FEEDBACK_INTEGRATION_PREFIX,
|
|
59
|
+
MAILOO_FORM_INTEGRATION_PREFIX,
|
|
60
|
+
MAILOO_LIFECYCLE_INTEGRATION_PREFIX,
|
|
61
|
+
getMailooFeedbackIntegrationConfig,
|
|
62
|
+
getMailooFormIntegrationConfig,
|
|
63
|
+
getMailooFormsIntegrationConfig,
|
|
64
|
+
isMailooFeedbackIntegrationConfigured
|
|
65
|
+
});
|
|
66
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/config.ts"],"sourcesContent":["export {\n getMailooFormsIntegrationConfig,\n getMailooFormIntegrationConfig,\n getMailooFeedbackIntegrationConfig,\n isMailooFeedbackIntegrationConfigured,\n MAILOO_FORM_INTEGRATION_PREFIX,\n MAILOO_FEEDBACK_INTEGRATION_PREFIX,\n MAILOO_LIFECYCLE_INTEGRATION_PREFIX,\n} from './config.js'\n","import {\n readMailooIntegrationConfig,\n type MailooIntegrationConfig,\n} from '@mailoo/next-core'\n\n/** Default env prefix for newsletter / FORM BFF binding. */\nexport const MAILOO_FORM_INTEGRATION_PREFIX =\n 'MAILOO_CONTACT_FORM_INTEGRATION' as const\n\n/** Default env prefix for feedback / CONTACT_FORM BFF binding. */\nexport const MAILOO_FEEDBACK_INTEGRATION_PREFIX =\n 'MAILOO_FEEDBACK_INTEGRATION' as const\n\n/**\n * Default env prefix for lifecycle ingest BFF / server emit.\n * Needs an API key with `lifecycle.ingest` (separate from form-submission).\n */\nexport const MAILOO_LIFECYCLE_INTEGRATION_PREFIX = 'MAILOO_LIFECYCLE' as const\n\n/**\n * Preferred: read integration credentials for any env prefix\n * (`${prefix}_API`, `_API_KEY`, `_PROJECT_UID`, `_ID` or `_INTEGRATION_ID`).\n */\nexport function getMailooFormsIntegrationConfig(options: {\n prefix: string\n}): MailooIntegrationConfig | null {\n return readMailooIntegrationConfig({ prefix: options.prefix })\n}\n\n/**\n * @deprecated Use\n * `getMailooFormsIntegrationConfig({ prefix: 'MAILOO_CONTACT_FORM_INTEGRATION' })`\n */\nexport function getMailooFormIntegrationConfig(): MailooIntegrationConfig | null {\n return getMailooFormsIntegrationConfig({\n prefix: MAILOO_FORM_INTEGRATION_PREFIX,\n })\n}\n\n/**\n * @deprecated Use\n * `getMailooFormsIntegrationConfig({ prefix: 'MAILOO_FEEDBACK_INTEGRATION' })`\n */\nexport function getMailooFeedbackIntegrationConfig(): MailooIntegrationConfig | null {\n return getMailooFormsIntegrationConfig({\n prefix: MAILOO_FEEDBACK_INTEGRATION_PREFIX,\n })\n}\n\n/**\n * @deprecated Use\n * `getMailooFormsIntegrationConfig({ prefix: 'MAILOO_FEEDBACK_INTEGRATION' }) !== null`\n */\nexport function isMailooFeedbackIntegrationConfigured(): boolean {\n return (\n getMailooFormsIntegrationConfig({\n prefix: MAILOO_FEEDBACK_INTEGRATION_PREFIX,\n }) !== null\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,uBAGO;AAGA,IAAM,iCACX;AAGK,IAAM,qCACX;AAMK,IAAM,sCAAsC;AAM5C,SAAS,gCAAgC,SAEb;AACjC,aAAO,8CAA4B,EAAE,QAAQ,QAAQ,OAAO,CAAC;AAC/D;AAMO,SAAS,iCAAiE;AAC/E,SAAO,gCAAgC;AAAA,IACrC,QAAQ;AAAA,EACV,CAAC;AACH;AAMO,SAAS,qCAAqE;AACnF,SAAO,gCAAgC;AAAA,IACrC,QAAQ;AAAA,EACV,CAAC;AACH;AAMO,SAAS,wCAAiD;AAC/D,SACE,gCAAgC;AAAA,IAC9B,QAAQ;AAAA,EACV,CAAC,MAAM;AAEX;","names":[]}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { MailooIntegrationConfig } from '@mailoo/next-core';
|
|
2
|
+
|
|
3
|
+
/** Default env prefix for newsletter / FORM BFF binding. */
|
|
4
|
+
declare const MAILOO_FORM_INTEGRATION_PREFIX: "MAILOO_CONTACT_FORM_INTEGRATION";
|
|
5
|
+
/** Default env prefix for feedback / CONTACT_FORM BFF binding. */
|
|
6
|
+
declare const MAILOO_FEEDBACK_INTEGRATION_PREFIX: "MAILOO_FEEDBACK_INTEGRATION";
|
|
7
|
+
/**
|
|
8
|
+
* Default env prefix for lifecycle ingest BFF / server emit.
|
|
9
|
+
* Needs an API key with `lifecycle.ingest` (separate from form-submission).
|
|
10
|
+
*/
|
|
11
|
+
declare const MAILOO_LIFECYCLE_INTEGRATION_PREFIX: "MAILOO_LIFECYCLE";
|
|
12
|
+
/**
|
|
13
|
+
* Preferred: read integration credentials for any env prefix
|
|
14
|
+
* (`${prefix}_API`, `_API_KEY`, `_PROJECT_UID`, `_ID` or `_INTEGRATION_ID`).
|
|
15
|
+
*/
|
|
16
|
+
declare function getMailooFormsIntegrationConfig(options: {
|
|
17
|
+
prefix: string;
|
|
18
|
+
}): MailooIntegrationConfig | null;
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated Use
|
|
21
|
+
* `getMailooFormsIntegrationConfig({ prefix: 'MAILOO_CONTACT_FORM_INTEGRATION' })`
|
|
22
|
+
*/
|
|
23
|
+
declare function getMailooFormIntegrationConfig(): MailooIntegrationConfig | null;
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated Use
|
|
26
|
+
* `getMailooFormsIntegrationConfig({ prefix: 'MAILOO_FEEDBACK_INTEGRATION' })`
|
|
27
|
+
*/
|
|
28
|
+
declare function getMailooFeedbackIntegrationConfig(): MailooIntegrationConfig | null;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated Use
|
|
31
|
+
* `getMailooFormsIntegrationConfig({ prefix: 'MAILOO_FEEDBACK_INTEGRATION' }) !== null`
|
|
32
|
+
*/
|
|
33
|
+
declare function isMailooFeedbackIntegrationConfigured(): boolean;
|
|
34
|
+
|
|
35
|
+
export { MAILOO_FEEDBACK_INTEGRATION_PREFIX, MAILOO_FORM_INTEGRATION_PREFIX, MAILOO_LIFECYCLE_INTEGRATION_PREFIX, getMailooFeedbackIntegrationConfig, getMailooFormIntegrationConfig, getMailooFormsIntegrationConfig, isMailooFeedbackIntegrationConfigured };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { MailooIntegrationConfig } from '@mailoo/next-core';
|
|
2
|
+
|
|
3
|
+
/** Default env prefix for newsletter / FORM BFF binding. */
|
|
4
|
+
declare const MAILOO_FORM_INTEGRATION_PREFIX: "MAILOO_CONTACT_FORM_INTEGRATION";
|
|
5
|
+
/** Default env prefix for feedback / CONTACT_FORM BFF binding. */
|
|
6
|
+
declare const MAILOO_FEEDBACK_INTEGRATION_PREFIX: "MAILOO_FEEDBACK_INTEGRATION";
|
|
7
|
+
/**
|
|
8
|
+
* Default env prefix for lifecycle ingest BFF / server emit.
|
|
9
|
+
* Needs an API key with `lifecycle.ingest` (separate from form-submission).
|
|
10
|
+
*/
|
|
11
|
+
declare const MAILOO_LIFECYCLE_INTEGRATION_PREFIX: "MAILOO_LIFECYCLE";
|
|
12
|
+
/**
|
|
13
|
+
* Preferred: read integration credentials for any env prefix
|
|
14
|
+
* (`${prefix}_API`, `_API_KEY`, `_PROJECT_UID`, `_ID` or `_INTEGRATION_ID`).
|
|
15
|
+
*/
|
|
16
|
+
declare function getMailooFormsIntegrationConfig(options: {
|
|
17
|
+
prefix: string;
|
|
18
|
+
}): MailooIntegrationConfig | null;
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated Use
|
|
21
|
+
* `getMailooFormsIntegrationConfig({ prefix: 'MAILOO_CONTACT_FORM_INTEGRATION' })`
|
|
22
|
+
*/
|
|
23
|
+
declare function getMailooFormIntegrationConfig(): MailooIntegrationConfig | null;
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated Use
|
|
26
|
+
* `getMailooFormsIntegrationConfig({ prefix: 'MAILOO_FEEDBACK_INTEGRATION' })`
|
|
27
|
+
*/
|
|
28
|
+
declare function getMailooFeedbackIntegrationConfig(): MailooIntegrationConfig | null;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated Use
|
|
31
|
+
* `getMailooFormsIntegrationConfig({ prefix: 'MAILOO_FEEDBACK_INTEGRATION' }) !== null`
|
|
32
|
+
*/
|
|
33
|
+
declare function isMailooFeedbackIntegrationConfigured(): boolean;
|
|
34
|
+
|
|
35
|
+
export { MAILOO_FEEDBACK_INTEGRATION_PREFIX, MAILOO_FORM_INTEGRATION_PREFIX, MAILOO_LIFECYCLE_INTEGRATION_PREFIX, getMailooFeedbackIntegrationConfig, getMailooFormIntegrationConfig, getMailooFormsIntegrationConfig, isMailooFeedbackIntegrationConfigured };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MAILOO_FEEDBACK_INTEGRATION_PREFIX,
|
|
3
|
+
MAILOO_FORM_INTEGRATION_PREFIX,
|
|
4
|
+
MAILOO_LIFECYCLE_INTEGRATION_PREFIX,
|
|
5
|
+
getMailooFeedbackIntegrationConfig,
|
|
6
|
+
getMailooFormIntegrationConfig,
|
|
7
|
+
getMailooFormsIntegrationConfig,
|
|
8
|
+
isMailooFeedbackIntegrationConfigured
|
|
9
|
+
} from "./chunk-QBZAYHBD.js";
|
|
10
|
+
export {
|
|
11
|
+
MAILOO_FEEDBACK_INTEGRATION_PREFIX,
|
|
12
|
+
MAILOO_FORM_INTEGRATION_PREFIX,
|
|
13
|
+
MAILOO_LIFECYCLE_INTEGRATION_PREFIX,
|
|
14
|
+
getMailooFeedbackIntegrationConfig,
|
|
15
|
+
getMailooFormIntegrationConfig,
|
|
16
|
+
getMailooFormsIntegrationConfig,
|
|
17
|
+
isMailooFeedbackIntegrationConfigured
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|