mymx 0.3.5 → 0.3.6
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/package.json +8 -27
- package/dist/contract.cjs +0 -188
- package/dist/contract.d.cts +0 -146
- package/dist/errors-CwKIO2XZ.d.cts +0 -211
- package/dist/errors-DOkb_I6u.cjs +0 -318
- package/dist/index.cjs +0 -869
- package/dist/index.d.cts +0 -764
- package/dist/signing-Bqe14lp0.cjs +0 -218
- package/dist/signing-ChbxCBRQ.d.cts +0 -84
- package/dist/types-BRl0ogvI.d.cts +0 -520
- package/dist/zod-CyQz4zEa.cjs +0 -384
- package/dist/zod.cjs +0 -16
- package/dist/zod.d.cts +0 -1356
package/dist/zod-CyQz4zEa.cjs
DELETED
|
@@ -1,384 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const require_errors = require('./errors-DOkb_I6u.cjs');
|
|
3
|
-
const zod = require_errors.__toESM(require("zod"));
|
|
4
|
-
|
|
5
|
-
//#region src/zod.ts
|
|
6
|
-
/** Pattern for valid webhook version (YYYY-MM-DD date format) */
|
|
7
|
-
const VERSION_PATTERN = /^\d{4}-\d{2}-\d{2}$/;
|
|
8
|
-
/**
|
|
9
|
-
* Schema for HTTPS URLs only.
|
|
10
|
-
* Rejects http://, javascript:, data:, file://, etc.
|
|
11
|
-
*/
|
|
12
|
-
const httpsUrlSchema = zod.z.string().url().refine((url) => url.startsWith("https://"), { message: "URL must use HTTPS protocol" });
|
|
13
|
-
/**
|
|
14
|
-
* Schema for SHA-256 hash (64 lowercase hex characters).
|
|
15
|
-
*/
|
|
16
|
-
const sha256Schema = zod.z.string().regex(/^[a-f0-9]{64}$/i, { message: "Must be a valid SHA-256 hash (64 hex characters)" });
|
|
17
|
-
const emailAddressSchema = zod.z.object({
|
|
18
|
-
address: zod.z.string(),
|
|
19
|
-
name: zod.z.string().nullable()
|
|
20
|
-
});
|
|
21
|
-
const webhookAttachmentSchema = zod.z.object({
|
|
22
|
-
filename: zod.z.string().nullable(),
|
|
23
|
-
content_type: zod.z.string(),
|
|
24
|
-
size_bytes: zod.z.number().int().nonnegative(),
|
|
25
|
-
sha256: sha256Schema,
|
|
26
|
-
part_index: zod.z.number().int().nonnegative(),
|
|
27
|
-
tar_path: zod.z.string()
|
|
28
|
-
});
|
|
29
|
-
const parsedErrorSchema = zod.z.object({
|
|
30
|
-
code: zod.z.enum(["PARSE_FAILED", "ATTACHMENT_EXTRACTION_FAILED"]),
|
|
31
|
-
message: zod.z.string(),
|
|
32
|
-
retryable: zod.z.boolean()
|
|
33
|
-
});
|
|
34
|
-
const parsedDataCompleteSchema = zod.z.object({
|
|
35
|
-
status: zod.z.literal("complete"),
|
|
36
|
-
error: zod.z.null(),
|
|
37
|
-
body_text: zod.z.string().nullable(),
|
|
38
|
-
body_html: zod.z.string().nullable(),
|
|
39
|
-
reply_to: zod.z.array(emailAddressSchema).nullable(),
|
|
40
|
-
cc: zod.z.array(emailAddressSchema).nullable(),
|
|
41
|
-
bcc: zod.z.array(emailAddressSchema).nullable(),
|
|
42
|
-
in_reply_to: zod.z.array(zod.z.string()).nullable(),
|
|
43
|
-
references: zod.z.array(zod.z.string()).nullable(),
|
|
44
|
-
attachments: zod.z.array(webhookAttachmentSchema),
|
|
45
|
-
attachments_download_url: httpsUrlSchema.nullable()
|
|
46
|
-
});
|
|
47
|
-
const parsedDataFailedSchema = zod.z.object({
|
|
48
|
-
status: zod.z.literal("failed"),
|
|
49
|
-
error: parsedErrorSchema,
|
|
50
|
-
body_text: zod.z.null(),
|
|
51
|
-
body_html: zod.z.null(),
|
|
52
|
-
reply_to: zod.z.null(),
|
|
53
|
-
cc: zod.z.null(),
|
|
54
|
-
bcc: zod.z.null(),
|
|
55
|
-
in_reply_to: zod.z.null(),
|
|
56
|
-
references: zod.z.null(),
|
|
57
|
-
attachments: zod.z.array(webhookAttachmentSchema),
|
|
58
|
-
attachments_download_url: zod.z.null()
|
|
59
|
-
});
|
|
60
|
-
const parsedDataSchema = zod.z.discriminatedUnion("status", [parsedDataCompleteSchema, parsedDataFailedSchema]);
|
|
61
|
-
const rawContentInlineSchema = zod.z.object({
|
|
62
|
-
included: zod.z.literal(true),
|
|
63
|
-
encoding: zod.z.literal("base64"),
|
|
64
|
-
max_inline_bytes: zod.z.number().int().positive(),
|
|
65
|
-
size_bytes: zod.z.number().int().nonnegative(),
|
|
66
|
-
sha256: sha256Schema,
|
|
67
|
-
data: zod.z.string()
|
|
68
|
-
});
|
|
69
|
-
const rawContentDownloadOnlySchema = zod.z.object({
|
|
70
|
-
included: zod.z.literal(false),
|
|
71
|
-
reason_code: zod.z.literal("size_exceeded"),
|
|
72
|
-
max_inline_bytes: zod.z.number().int().positive(),
|
|
73
|
-
size_bytes: zod.z.number().int().nonnegative(),
|
|
74
|
-
sha256: sha256Schema
|
|
75
|
-
});
|
|
76
|
-
const rawContentSchema = zod.z.discriminatedUnion("included", [rawContentInlineSchema, rawContentDownloadOnlySchema]);
|
|
77
|
-
const emailReceivedEventSchema = zod.z.object({
|
|
78
|
-
id: zod.z.string(),
|
|
79
|
-
event: zod.z.literal("email.received"),
|
|
80
|
-
version: zod.z.string().regex(VERSION_PATTERN, { message: "Version must be a date in YYYY-MM-DD format" }),
|
|
81
|
-
delivery: zod.z.object({
|
|
82
|
-
endpoint_id: zod.z.string(),
|
|
83
|
-
attempt: zod.z.number().int().positive(),
|
|
84
|
-
attempted_at: zod.z.string()
|
|
85
|
-
}),
|
|
86
|
-
email: zod.z.object({
|
|
87
|
-
id: zod.z.string(),
|
|
88
|
-
received_at: zod.z.string(),
|
|
89
|
-
smtp: zod.z.object({
|
|
90
|
-
helo: zod.z.string().nullable(),
|
|
91
|
-
mail_from: zod.z.string(),
|
|
92
|
-
rcpt_to: zod.z.array(zod.z.string()).min(1, "At least one recipient is required")
|
|
93
|
-
}),
|
|
94
|
-
headers: zod.z.object({
|
|
95
|
-
message_id: zod.z.string().nullable(),
|
|
96
|
-
subject: zod.z.string().nullable(),
|
|
97
|
-
from: zod.z.string(),
|
|
98
|
-
to: zod.z.string(),
|
|
99
|
-
date: zod.z.string().nullable()
|
|
100
|
-
}),
|
|
101
|
-
content: zod.z.object({
|
|
102
|
-
raw: rawContentSchema,
|
|
103
|
-
download: zod.z.object({
|
|
104
|
-
url: httpsUrlSchema,
|
|
105
|
-
expires_at: zod.z.string()
|
|
106
|
-
})
|
|
107
|
-
}),
|
|
108
|
-
parsed: parsedDataSchema,
|
|
109
|
-
analysis: zod.z.object({ spamassassin: zod.z.object({ score: zod.z.number() }) }).optional()
|
|
110
|
-
})
|
|
111
|
-
});
|
|
112
|
-
/**
|
|
113
|
-
* Human-friendly field descriptions for error messages.
|
|
114
|
-
* Maps field paths to readable descriptions.
|
|
115
|
-
*/
|
|
116
|
-
const FIELD_DESCRIPTIONS = {
|
|
117
|
-
id: "unique event identifier",
|
|
118
|
-
event: "event type",
|
|
119
|
-
version: "API version",
|
|
120
|
-
delivery: "delivery metadata",
|
|
121
|
-
"delivery.endpoint_id": "webhook endpoint ID",
|
|
122
|
-
"delivery.attempt": "delivery attempt number",
|
|
123
|
-
"delivery.attempted_at": "delivery timestamp",
|
|
124
|
-
email: "email data",
|
|
125
|
-
"email.id": "email identifier",
|
|
126
|
-
"email.received_at": "email received timestamp",
|
|
127
|
-
"email.smtp": "SMTP envelope data",
|
|
128
|
-
"email.smtp.helo": "HELO hostname",
|
|
129
|
-
"email.smtp.mail_from": "sender address (MAIL FROM)",
|
|
130
|
-
"email.smtp.rcpt_to": "recipient addresses (RCPT TO) - at least one required",
|
|
131
|
-
"email.headers": "email headers",
|
|
132
|
-
"email.headers.from": "From header",
|
|
133
|
-
"email.headers.to": "To header",
|
|
134
|
-
"email.headers.subject": "email subject",
|
|
135
|
-
"email.headers.message_id": "Message-ID header",
|
|
136
|
-
"email.headers.date": "Date header",
|
|
137
|
-
"email.content": "email content",
|
|
138
|
-
"email.content.raw": "raw email data",
|
|
139
|
-
"email.content.raw.data": "raw email content (base64)",
|
|
140
|
-
"email.content.raw.included": "whether raw content is inline",
|
|
141
|
-
"email.content.raw.encoding": "raw content encoding",
|
|
142
|
-
"email.content.raw.size_bytes": "raw email size",
|
|
143
|
-
"email.content.raw.sha256": "raw email hash",
|
|
144
|
-
"email.content.raw.max_inline_bytes": "inline size threshold",
|
|
145
|
-
"email.content.raw.reason_code": "exclusion reason",
|
|
146
|
-
"email.content.download": "download information",
|
|
147
|
-
"email.content.download.url": "download URL",
|
|
148
|
-
"email.content.download.expires_at": "download URL expiration",
|
|
149
|
-
"email.parsed": "parsed email content",
|
|
150
|
-
"email.parsed.status": "parsing status",
|
|
151
|
-
"email.parsed.error": "parsing error details",
|
|
152
|
-
"email.parsed.body_text": "plain text body",
|
|
153
|
-
"email.parsed.body_html": "HTML body",
|
|
154
|
-
"email.parsed.reply_to": "Reply-To addresses",
|
|
155
|
-
"email.parsed.cc": "CC addresses",
|
|
156
|
-
"email.parsed.bcc": "BCC addresses",
|
|
157
|
-
"email.parsed.in_reply_to": "In-Reply-To header",
|
|
158
|
-
"email.parsed.references": "References header",
|
|
159
|
-
"email.parsed.attachments": "attachment list",
|
|
160
|
-
"email.parsed.attachments_download_url": "attachments download URL",
|
|
161
|
-
"email.analysis": "email analysis results",
|
|
162
|
-
"email.analysis.spamassassin": "SpamAssassin analysis",
|
|
163
|
-
"email.analysis.spamassassin.score": "spam score",
|
|
164
|
-
"email.parsed.attachments.*.filename": "attachment filename",
|
|
165
|
-
"email.parsed.attachments.*.content_type": "attachment content type",
|
|
166
|
-
"email.parsed.attachments.*.size_bytes": "attachment size",
|
|
167
|
-
"email.parsed.attachments.*.sha256": "attachment hash",
|
|
168
|
-
"email.parsed.attachments.*.part_index": "attachment part index",
|
|
169
|
-
"email.parsed.attachments.*.tar_path": "attachment tar path",
|
|
170
|
-
"email.parsed.reply_to.*.address": "email address",
|
|
171
|
-
"email.parsed.reply_to.*.name": "display name",
|
|
172
|
-
"email.parsed.cc.*.address": "email address",
|
|
173
|
-
"email.parsed.cc.*.name": "display name",
|
|
174
|
-
"email.parsed.bcc.*.address": "email address",
|
|
175
|
-
"email.parsed.bcc.*.name": "display name",
|
|
176
|
-
"email.parsed.in_reply_to.*": "In-Reply-To message ID",
|
|
177
|
-
"email.parsed.references.*": "message reference ID",
|
|
178
|
-
"email.smtp.rcpt_to.*": "recipient address"
|
|
179
|
-
};
|
|
180
|
-
/**
|
|
181
|
-
* Get field description, handling array indices.
|
|
182
|
-
*/
|
|
183
|
-
function getFieldDescription(path) {
|
|
184
|
-
if (FIELD_DESCRIPTIONS[path]) return FIELD_DESCRIPTIONS[path];
|
|
185
|
-
const wildcardPath = path.replace(/\.\d+\./g, ".*.");
|
|
186
|
-
if (FIELD_DESCRIPTIONS[wildcardPath]) return FIELD_DESCRIPTIONS[wildcardPath];
|
|
187
|
-
const parentPath = path.replace(/\.\d+$/, "");
|
|
188
|
-
if (FIELD_DESCRIPTIONS[parentPath]) return `element in ${FIELD_DESCRIPTIONS[parentPath]}`;
|
|
189
|
-
return void 0;
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Format a Zod error into a human-friendly message with actionable suggestion.
|
|
193
|
-
*/
|
|
194
|
-
function formatZodError(error) {
|
|
195
|
-
const issue = error.issues[0];
|
|
196
|
-
const path = issue.path.length > 0 ? issue.path.join(".") : "(root)";
|
|
197
|
-
const fieldDesc = getFieldDescription(path);
|
|
198
|
-
const fieldLabel = fieldDesc ? `${path} (${fieldDesc})` : path;
|
|
199
|
-
if (issue.path.length === 0 && issue.code === "invalid_type") return {
|
|
200
|
-
field: "(root)",
|
|
201
|
-
message: `Expected webhook payload object but received ${issue.received}`,
|
|
202
|
-
suggestion: issue.received === "undefined" ? "No payload was provided. Make sure you're passing the parsed JSON body." : issue.received === "null" ? "Received null instead of payload object. Did you forget to parse the JSON?" : `Received ${issue.received} instead of object. Webhook payloads must be objects.`
|
|
203
|
-
};
|
|
204
|
-
let message;
|
|
205
|
-
let suggestion;
|
|
206
|
-
switch (issue.code) {
|
|
207
|
-
case "invalid_type":
|
|
208
|
-
if (issue.received === "undefined") {
|
|
209
|
-
message = `Missing required field: ${fieldLabel}`;
|
|
210
|
-
suggestion = `The field "${path}" is required but was not provided.`;
|
|
211
|
-
} else {
|
|
212
|
-
message = `Invalid type for ${path}: expected ${issue.expected} but got ${issue.received}`;
|
|
213
|
-
suggestion = `Check that "${path}" is a ${issue.expected}, not a ${issue.received}.`;
|
|
214
|
-
if (issue.expected === "number" && issue.received === "string") suggestion += " Don't quote numeric values in JSON.";
|
|
215
|
-
}
|
|
216
|
-
break;
|
|
217
|
-
case "invalid_literal":
|
|
218
|
-
message = `Invalid value for ${path}: expected "${issue.expected}" but got "${issue.received}"`;
|
|
219
|
-
if (path === "event") suggestion = `This SDK handles "${issue.expected}" events. The webhook sent "${issue.received}" instead.`;
|
|
220
|
-
else suggestion = `Expected the literal value "${issue.expected}" for ${fieldLabel}.`;
|
|
221
|
-
break;
|
|
222
|
-
case "invalid_string":
|
|
223
|
-
if (path === "version") {
|
|
224
|
-
message = `Invalid version format: "${issue.received || "unknown"}"`;
|
|
225
|
-
suggestion = `Version must be a date in YYYY-MM-DD format (e.g., "${require_errors.WEBHOOK_VERSION}").`;
|
|
226
|
-
} else {
|
|
227
|
-
message = `Invalid string for ${path}: ${issue.message}`;
|
|
228
|
-
suggestion = `Check the format of "${path}".`;
|
|
229
|
-
}
|
|
230
|
-
break;
|
|
231
|
-
case "invalid_enum_value":
|
|
232
|
-
message = `Invalid value for ${path}: got "${issue.received}", expected one of: ${issue.options.join(", ")}`;
|
|
233
|
-
suggestion = `The ${fieldDesc || path} must be one of: ${issue.options.join(", ")}`;
|
|
234
|
-
break;
|
|
235
|
-
case "invalid_union":
|
|
236
|
-
message = `Invalid value for ${path}: doesn't match any expected format`;
|
|
237
|
-
suggestion = `Check the structure of "${path}" matches the expected schema.`;
|
|
238
|
-
break;
|
|
239
|
-
case "invalid_union_discriminator":
|
|
240
|
-
message = `Invalid discriminator value for ${path}`;
|
|
241
|
-
suggestion = "The field used to determine the type variant has an unexpected value. Check the schema documentation.";
|
|
242
|
-
break;
|
|
243
|
-
default:
|
|
244
|
-
message = `Validation failed for ${path}: ${issue.message}`;
|
|
245
|
-
suggestion = `Check the value of "${path}" in the webhook payload.`;
|
|
246
|
-
}
|
|
247
|
-
return {
|
|
248
|
-
field: path,
|
|
249
|
-
message,
|
|
250
|
-
suggestion
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* Validate and parse a webhook payload as an EmailReceivedEvent.
|
|
255
|
-
*
|
|
256
|
-
* Uses Zod for comprehensive schema validation. Throws WebhookValidationError
|
|
257
|
-
* with human-friendly messages if validation fails.
|
|
258
|
-
*
|
|
259
|
-
* NOTE: This is the strict validation version. For lightweight parsing without
|
|
260
|
-
* full schema validation, use `parseWebhookEvent` from the main `mymx` export.
|
|
261
|
-
*
|
|
262
|
-
* @param input - The parsed JSON payload (use `JSON.parse(rawBody)`)
|
|
263
|
-
* @returns The validated and typed event
|
|
264
|
-
* @throws WebhookValidationError with actionable message if validation fails
|
|
265
|
-
*
|
|
266
|
-
* @example
|
|
267
|
-
* ```typescript
|
|
268
|
-
* import { validateEmailReceivedEvent, WebhookValidationError } from 'mymx/zod';
|
|
269
|
-
*
|
|
270
|
-
* try {
|
|
271
|
-
* const event = validateEmailReceivedEvent(JSON.parse(rawBody));
|
|
272
|
-
* // event is fully validated and typed
|
|
273
|
-
* } catch (err) {
|
|
274
|
-
* if (err instanceof WebhookValidationError) {
|
|
275
|
-
* console.error(`[${err.code}] ${err.message}`);
|
|
276
|
-
* console.error(`Field: ${err.field}`);
|
|
277
|
-
* console.error(`Suggestion: ${err.suggestion}`);
|
|
278
|
-
* }
|
|
279
|
-
* }
|
|
280
|
-
* ```
|
|
281
|
-
*/
|
|
282
|
-
function validateEmailReceivedEvent(input) {
|
|
283
|
-
const result = emailReceivedEventSchema.safeParse(input);
|
|
284
|
-
if (!result.success) {
|
|
285
|
-
const { field, message, suggestion } = formatZodError(result.error);
|
|
286
|
-
throw new require_errors.WebhookValidationError(field, message, suggestion, result.error);
|
|
287
|
-
}
|
|
288
|
-
return result.data;
|
|
289
|
-
}
|
|
290
|
-
/**
|
|
291
|
-
* Safely validate a webhook payload, returning a result object instead of throwing.
|
|
292
|
-
*
|
|
293
|
-
* @param input - The parsed JSON payload
|
|
294
|
-
* @returns A Zod SafeParseResult with either the data or error
|
|
295
|
-
*
|
|
296
|
-
* @example
|
|
297
|
-
* ```typescript
|
|
298
|
-
* import { safeValidateEmailReceivedEvent } from 'mymx/zod';
|
|
299
|
-
*
|
|
300
|
-
* const result = safeValidateEmailReceivedEvent(payload);
|
|
301
|
-
* if (result.success) {
|
|
302
|
-
* console.log('Valid event:', result.data.id);
|
|
303
|
-
* } else {
|
|
304
|
-
* console.error('Validation failed:', result.error.issues);
|
|
305
|
-
* }
|
|
306
|
-
* ```
|
|
307
|
-
*/
|
|
308
|
-
function safeValidateEmailReceivedEvent(input) {
|
|
309
|
-
return emailReceivedEventSchema.safeParse(input);
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
//#endregion
|
|
313
|
-
Object.defineProperty(exports, 'emailAddressSchema', {
|
|
314
|
-
enumerable: true,
|
|
315
|
-
get: function () {
|
|
316
|
-
return emailAddressSchema;
|
|
317
|
-
}
|
|
318
|
-
});
|
|
319
|
-
Object.defineProperty(exports, 'emailReceivedEventSchema', {
|
|
320
|
-
enumerable: true,
|
|
321
|
-
get: function () {
|
|
322
|
-
return emailReceivedEventSchema;
|
|
323
|
-
}
|
|
324
|
-
});
|
|
325
|
-
Object.defineProperty(exports, 'parsedDataCompleteSchema', {
|
|
326
|
-
enumerable: true,
|
|
327
|
-
get: function () {
|
|
328
|
-
return parsedDataCompleteSchema;
|
|
329
|
-
}
|
|
330
|
-
});
|
|
331
|
-
Object.defineProperty(exports, 'parsedDataFailedSchema', {
|
|
332
|
-
enumerable: true,
|
|
333
|
-
get: function () {
|
|
334
|
-
return parsedDataFailedSchema;
|
|
335
|
-
}
|
|
336
|
-
});
|
|
337
|
-
Object.defineProperty(exports, 'parsedDataSchema', {
|
|
338
|
-
enumerable: true,
|
|
339
|
-
get: function () {
|
|
340
|
-
return parsedDataSchema;
|
|
341
|
-
}
|
|
342
|
-
});
|
|
343
|
-
Object.defineProperty(exports, 'parsedErrorSchema', {
|
|
344
|
-
enumerable: true,
|
|
345
|
-
get: function () {
|
|
346
|
-
return parsedErrorSchema;
|
|
347
|
-
}
|
|
348
|
-
});
|
|
349
|
-
Object.defineProperty(exports, 'rawContentDownloadOnlySchema', {
|
|
350
|
-
enumerable: true,
|
|
351
|
-
get: function () {
|
|
352
|
-
return rawContentDownloadOnlySchema;
|
|
353
|
-
}
|
|
354
|
-
});
|
|
355
|
-
Object.defineProperty(exports, 'rawContentInlineSchema', {
|
|
356
|
-
enumerable: true,
|
|
357
|
-
get: function () {
|
|
358
|
-
return rawContentInlineSchema;
|
|
359
|
-
}
|
|
360
|
-
});
|
|
361
|
-
Object.defineProperty(exports, 'rawContentSchema', {
|
|
362
|
-
enumerable: true,
|
|
363
|
-
get: function () {
|
|
364
|
-
return rawContentSchema;
|
|
365
|
-
}
|
|
366
|
-
});
|
|
367
|
-
Object.defineProperty(exports, 'safeValidateEmailReceivedEvent', {
|
|
368
|
-
enumerable: true,
|
|
369
|
-
get: function () {
|
|
370
|
-
return safeValidateEmailReceivedEvent;
|
|
371
|
-
}
|
|
372
|
-
});
|
|
373
|
-
Object.defineProperty(exports, 'validateEmailReceivedEvent', {
|
|
374
|
-
enumerable: true,
|
|
375
|
-
get: function () {
|
|
376
|
-
return validateEmailReceivedEvent;
|
|
377
|
-
}
|
|
378
|
-
});
|
|
379
|
-
Object.defineProperty(exports, 'webhookAttachmentSchema', {
|
|
380
|
-
enumerable: true,
|
|
381
|
-
get: function () {
|
|
382
|
-
return webhookAttachmentSchema;
|
|
383
|
-
}
|
|
384
|
-
});
|
package/dist/zod.cjs
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
const require_errors = require('./errors-DOkb_I6u.cjs');
|
|
2
|
-
const require_zod = require('./zod-CyQz4zEa.cjs');
|
|
3
|
-
|
|
4
|
-
exports.WebhookValidationError = require_errors.WebhookValidationError
|
|
5
|
-
exports.emailAddressSchema = require_zod.emailAddressSchema
|
|
6
|
-
exports.emailReceivedEventSchema = require_zod.emailReceivedEventSchema
|
|
7
|
-
exports.parsedDataCompleteSchema = require_zod.parsedDataCompleteSchema
|
|
8
|
-
exports.parsedDataFailedSchema = require_zod.parsedDataFailedSchema
|
|
9
|
-
exports.parsedDataSchema = require_zod.parsedDataSchema
|
|
10
|
-
exports.parsedErrorSchema = require_zod.parsedErrorSchema
|
|
11
|
-
exports.rawContentDownloadOnlySchema = require_zod.rawContentDownloadOnlySchema
|
|
12
|
-
exports.rawContentInlineSchema = require_zod.rawContentInlineSchema
|
|
13
|
-
exports.rawContentSchema = require_zod.rawContentSchema
|
|
14
|
-
exports.safeValidateEmailReceivedEvent = require_zod.safeValidateEmailReceivedEvent
|
|
15
|
-
exports.validateEmailReceivedEvent = require_zod.validateEmailReceivedEvent
|
|
16
|
-
exports.webhookAttachmentSchema = require_zod.webhookAttachmentSchema
|