@samva/webhooks 0.14.0 → 0.16.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.
@@ -1,570 +0,0 @@
1
- //#region src/decoder.gen.ts
2
- const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
3
- const validate0 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate3(value["data"]));
4
- const validate1 = (value) => typeof value === "string" && value === "message.sent";
5
- const validate2 = (value) => typeof value === "string";
6
- const validate3 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "channel") && Object.hasOwn(value, "messageId") && Object.hasOwn(value, "organizationId") && (!Object.hasOwn(value, "mailboxId") || validate4(value["mailboxId"])) && (!Object.hasOwn(value, "channel") || validate7(value["channel"])) && (!Object.hasOwn(value, "status") || validate8(value["status"])) && (!Object.hasOwn(value, "metadata") || validate11(value["metadata"])) && (!Object.hasOwn(value, "cost") || validate14(value["cost"])) && (!Object.hasOwn(value, "recipient") || validate8(value["recipient"])) && (!Object.hasOwn(value, "occurredAt") || validate8(value["occurredAt"])) && (!Object.hasOwn(value, "failureReason") || validate8(value["failureReason"])) && (!Object.hasOwn(value, "errorCode") || validate8(value["errorCode"])) && (!Object.hasOwn(value, "conversationId") || validate8(value["conversationId"])) && (!Object.hasOwn(value, "isBillable") || validate32(value["isBillable"])) && (!Object.hasOwn(value, "messageType") || validate8(value["messageType"])) && (!Object.hasOwn(value, "templateCategory") || validate38(value["templateCategory"])) && (!Object.hasOwn(value, "subject") || validate8(value["subject"])) && (!Object.hasOwn(value, "toEmails") || validate44(value["toEmails"])) && (!Object.hasOwn(value, "providerMessageId") || validate8(value["providerMessageId"])) && (!Object.hasOwn(value, "waId") || validate8(value["waId"])) && (!Object.hasOwn(value, "hasAttachments") || validate32(value["hasAttachments"])) && (!Object.hasOwn(value, "isAutoReply") || validate32(value["isAutoReply"])) && (!Object.hasOwn(value, "segments") || validate14(value["segments"])) && (!Object.hasOwn(value, "to") || validate8(value["to"])) && (!Object.hasOwn(value, "from") || validate8(value["from"])) && (!Object.hasOwn(value, "body") || validate8(value["body"])) && (!Object.hasOwn(value, "direction") || validate72(value["direction"])) && (!Object.hasOwn(value, "errorMessage") || validate8(value["errorMessage"])) && (!Object.hasOwn(value, "parts") || validate14(value["parts"])) && (!Object.hasOwn(value, "carrier") || validate8(value["carrier"])) && (!Object.hasOwn(value, "messageId") || validate2(value["messageId"])) && (!Object.hasOwn(value, "organizationId") || validate2(value["organizationId"]));
7
- const validate4 = (value) => validate5(value) || validate6(value);
8
- const validate5 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
9
- const validate6 = (value) => value === null;
10
- const validate7 = (value) => typeof value === "string" && (value === "sms" || value === "whatsapp" || value === "email");
11
- const validate8 = (value) => validate2(value) || validate6(value);
12
- const validate11 = (value) => validate12(value) || validate6(value);
13
- const validate12 = (value) => isObject(value);
14
- const validate14 = (value) => validate15(value) || validate6(value);
15
- const validate15 = (value) => typeof value === "number" && Number.isFinite(value);
16
- const validate32 = (value) => validate33(value) || validate6(value);
17
- const validate33 = (value) => typeof value === "boolean";
18
- const validate38 = (value) => validate39(value) || validate6(value);
19
- const validate39 = (value) => typeof value === "string" && (value === "marketing" || value === "utility" || value === "authentication");
20
- const validate44 = (value) => validate45(value) || validate6(value);
21
- const validate45 = (value) => Array.isArray(value) && Array.isArray(value) && value.every(validate2);
22
- const validate72 = (value) => validate73(value) || validate6(value);
23
- const validate73 = (value) => typeof value === "string" && (value === "inbound" || value === "outbound");
24
- const validate86 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate87(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate3(value["data"]));
25
- const validate87 = (value) => typeof value === "string" && value === "message.delivered";
26
- const validate172 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate173(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate3(value["data"]));
27
- const validate173 = (value) => typeof value === "string" && value === "message.read";
28
- const validate258 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate259(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate3(value["data"]));
29
- const validate259 = (value) => typeof value === "string" && value === "message.failed";
30
- const validate344 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate345(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate347(value["data"]));
31
- const validate345 = (value) => typeof value === "string" && value === "message.bounced";
32
- const validate347 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "channel") && Object.hasOwn(value, "recipient") && Object.hasOwn(value, "occurredAt") && Object.hasOwn(value, "messageId") && Object.hasOwn(value, "organizationId") && (!Object.hasOwn(value, "mailboxId") || validate4(value["mailboxId"])) && (!Object.hasOwn(value, "channel") || validate7(value["channel"])) && (!Object.hasOwn(value, "status") || validate8(value["status"])) && (!Object.hasOwn(value, "metadata") || validate11(value["metadata"])) && (!Object.hasOwn(value, "cost") || validate14(value["cost"])) && (!Object.hasOwn(value, "recipient") || validate2(value["recipient"])) && (!Object.hasOwn(value, "occurredAt") || validate2(value["occurredAt"])) && (!Object.hasOwn(value, "failureReason") || validate8(value["failureReason"])) && (!Object.hasOwn(value, "errorCode") || validate8(value["errorCode"])) && (!Object.hasOwn(value, "conversationId") || validate8(value["conversationId"])) && (!Object.hasOwn(value, "isBillable") || validate32(value["isBillable"])) && (!Object.hasOwn(value, "messageType") || validate8(value["messageType"])) && (!Object.hasOwn(value, "templateCategory") || validate38(value["templateCategory"])) && (!Object.hasOwn(value, "subject") || validate8(value["subject"])) && (!Object.hasOwn(value, "toEmails") || validate44(value["toEmails"])) && (!Object.hasOwn(value, "providerMessageId") || validate8(value["providerMessageId"])) && (!Object.hasOwn(value, "waId") || validate8(value["waId"])) && (!Object.hasOwn(value, "hasAttachments") || validate32(value["hasAttachments"])) && (!Object.hasOwn(value, "isAutoReply") || validate32(value["isAutoReply"])) && (!Object.hasOwn(value, "segments") || validate14(value["segments"])) && (!Object.hasOwn(value, "to") || validate8(value["to"])) && (!Object.hasOwn(value, "from") || validate8(value["from"])) && (!Object.hasOwn(value, "body") || validate8(value["body"])) && (!Object.hasOwn(value, "direction") || validate72(value["direction"])) && (!Object.hasOwn(value, "errorMessage") || validate8(value["errorMessage"])) && (!Object.hasOwn(value, "parts") || validate14(value["parts"])) && (!Object.hasOwn(value, "carrier") || validate8(value["carrier"])) && (!Object.hasOwn(value, "messageId") || validate2(value["messageId"])) && (!Object.hasOwn(value, "organizationId") || validate2(value["organizationId"]));
33
- const validate426 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate427(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate347(value["data"]));
34
- const validate427 = (value) => typeof value === "string" && value === "message.complained";
35
- const validate508 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate509(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate3(value["data"]));
36
- const validate509 = (value) => typeof value === "string" && value === "message.received";
37
- const validate594 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate595(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate597(value["data"]));
38
- const validate595 = (value) => typeof value === "string" && value === "message.opened";
39
- const validate597 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "messageId") && Object.hasOwn(value, "organizationId") && Object.hasOwn(value, "channel") && Object.hasOwn(value, "deliveryId") && Object.hasOwn(value, "recipient") && Object.hasOwn(value, "occurredAt") && Object.hasOwn(value, "firstOpen") && Object.hasOwn(value, "machine") && Object.hasOwn(value, "machineReason") && (!Object.hasOwn(value, "messageId") || validate598(value["messageId"])) && (!Object.hasOwn(value, "organizationId") || validate599(value["organizationId"])) && (!Object.hasOwn(value, "channel") || validate600(value["channel"])) && (!Object.hasOwn(value, "deliveryId") || validate601(value["deliveryId"])) && (!Object.hasOwn(value, "recipient") || validate2(value["recipient"])) && (!Object.hasOwn(value, "occurredAt") || validate2(value["occurredAt"])) && (!Object.hasOwn(value, "userAgent") || validate8(value["userAgent"])) && (!Object.hasOwn(value, "ipAddress") || validate8(value["ipAddress"])) && (!Object.hasOwn(value, "firstOpen") || validate33(value["firstOpen"])) && (!Object.hasOwn(value, "machine") || validate33(value["machine"])) && (!Object.hasOwn(value, "machineReason") || validate612(value["machineReason"])) && (!Object.hasOwn(value, "country") || validate8(value["country"])) && (!Object.hasOwn(value, "city") || validate8(value["city"])) && (!Object.hasOwn(value, "asn") || validate14(value["asn"])) && (!Object.hasOwn(value, "code") || validate8(value["code"])) && (!Object.hasOwn(value, "linkIndex") || validate14(value["linkIndex"])) && (!Object.hasOwn(value, "destinationUrl") || validate8(value["destinationUrl"])) && (!Object.hasOwn(value, "metadata") || validate11(value["metadata"])) && (!Object.hasOwn(value, "campaignId") || validate636(value["campaignId"])) && (!Object.hasOwn(value, "campaignRunId") || validate639(value["campaignRunId"]));
40
- const validate598 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
41
- const validate599 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
42
- const validate600 = (value) => typeof value === "string" && value === "email";
43
- const validate601 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^mdel_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
44
- const validate612 = (value) => validate613(value) || validate6(value);
45
- const validate613 = (value) => typeof value === "string" && (value === "google-image-proxy" || value === "apple-mail-privacy" || value === "scanner-user-agent" || value === "scanner-asn" || value === "too-fast");
46
- const validate636 = (value) => validate637(value) || validate6(value);
47
- const validate637 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^camp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
48
- const validate639 = (value) => validate640(value) || validate6(value);
49
- const validate640 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^crun_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
50
- const validate642 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate643(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate645(value["data"]));
51
- const validate643 = (value) => typeof value === "string" && value === "message.clicked";
52
- const validate645 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "messageId") && Object.hasOwn(value, "organizationId") && Object.hasOwn(value, "channel") && Object.hasOwn(value, "deliveryId") && Object.hasOwn(value, "recipient") && Object.hasOwn(value, "occurredAt") && Object.hasOwn(value, "url") && Object.hasOwn(value, "linkTags") && Object.hasOwn(value, "firstClick") && Object.hasOwn(value, "machine") && Object.hasOwn(value, "machineReason") && (!Object.hasOwn(value, "messageId") || validate598(value["messageId"])) && (!Object.hasOwn(value, "organizationId") || validate599(value["organizationId"])) && (!Object.hasOwn(value, "channel") || validate600(value["channel"])) && (!Object.hasOwn(value, "deliveryId") || validate601(value["deliveryId"])) && (!Object.hasOwn(value, "recipient") || validate2(value["recipient"])) && (!Object.hasOwn(value, "occurredAt") || validate2(value["occurredAt"])) && (!Object.hasOwn(value, "userAgent") || validate8(value["userAgent"])) && (!Object.hasOwn(value, "ipAddress") || validate8(value["ipAddress"])) && (!Object.hasOwn(value, "url") || validate2(value["url"])) && (!Object.hasOwn(value, "linkTags") || validate659(value["linkTags"])) && (!Object.hasOwn(value, "firstClick") || validate33(value["firstClick"])) && (!Object.hasOwn(value, "machine") || validate33(value["machine"])) && (!Object.hasOwn(value, "machineReason") || validate612(value["machineReason"])) && (!Object.hasOwn(value, "country") || validate8(value["country"])) && (!Object.hasOwn(value, "city") || validate8(value["city"])) && (!Object.hasOwn(value, "asn") || validate14(value["asn"])) && (!Object.hasOwn(value, "code") || validate8(value["code"])) && (!Object.hasOwn(value, "linkIndex") || validate14(value["linkIndex"])) && (!Object.hasOwn(value, "destinationUrl") || validate8(value["destinationUrl"])) && (!Object.hasOwn(value, "metadata") || validate11(value["metadata"])) && (!Object.hasOwn(value, "campaignId") || validate636(value["campaignId"])) && (!Object.hasOwn(value, "campaignRunId") || validate639(value["campaignRunId"]));
53
- const validate659 = (value) => isObject(value) && isObject(value) && Object.entries(value).every(([key, item]) => validate45(item));
54
- const validate694 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate695(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate697(value["data"]));
55
- const validate695 = (value) => typeof value === "string" && value === "contact.created";
56
- const validate697 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "contactId") && Object.hasOwn(value, "status") && Object.hasOwn(value, "name") && Object.hasOwn(value, "identities") && Object.hasOwn(value, "tags") && Object.hasOwn(value, "createdAt") && Object.hasOwn(value, "updatedAt") && (!Object.hasOwn(value, "contactId") || validate698(value["contactId"])) && (!Object.hasOwn(value, "status") || validate699(value["status"])) && (!Object.hasOwn(value, "name") || validate2(value["name"])) && (!Object.hasOwn(value, "displayName") || validate701(value["displayName"])) && (!Object.hasOwn(value, "identities") || validate706(value["identities"])) && (!Object.hasOwn(value, "tags") || validate45(value["tags"])) && (!Object.hasOwn(value, "externalId") || validate701(value["externalId"])) && (!Object.hasOwn(value, "createdAt") || validate2(value["createdAt"])) && (!Object.hasOwn(value, "updatedAt") || validate2(value["updatedAt"]));
57
- const validate698 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
58
- const validate699 = (value) => typeof value === "string" && (value === "active" || value === "paused" || value === "blocked" || value === "archived");
59
- const validate701 = (value) => validate8(value) || validate6(value);
60
- const validate706 = (value) => Array.isArray(value) && Array.isArray(value) && value.every(validate707);
61
- const validate707 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "channel") && Object.hasOwn(value, "identifier") && Object.hasOwn(value, "verified") && (!Object.hasOwn(value, "channel") || validate7(value["channel"])) && (!Object.hasOwn(value, "identifier") || validate2(value["identifier"])) && (!Object.hasOwn(value, "verified") || validate33(value["verified"]));
62
- const validate720 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate721(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate697(value["data"]));
63
- const validate721 = (value) => typeof value === "string" && value === "contact.updated";
64
- const validate746 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate747(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate697(value["data"]));
65
- const validate747 = (value) => typeof value === "string" && value === "contact.deleted";
66
- const validate772 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate773(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate775(value["data"]));
67
- const validate773 = (value) => typeof value === "string" && value === "contact.subscribed";
68
- const validate775 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "organizationId") && Object.hasOwn(value, "contactId") && Object.hasOwn(value, "email") && Object.hasOwn(value, "groupId") && Object.hasOwn(value, "groupName") && Object.hasOwn(value, "source") && Object.hasOwn(value, "occurredAt") && (!Object.hasOwn(value, "organizationId") || validate599(value["organizationId"])) && (!Object.hasOwn(value, "contactId") || validate8(value["contactId"])) && (!Object.hasOwn(value, "email") || validate2(value["email"])) && (!Object.hasOwn(value, "groupId") || validate2(value["groupId"])) && (!Object.hasOwn(value, "groupName") || validate2(value["groupName"])) && (!Object.hasOwn(value, "contactGroupId") || validate783(value["contactGroupId"])) && (!Object.hasOwn(value, "unsubscribeGroupId") || validate786(value["unsubscribeGroupId"])) && (!Object.hasOwn(value, "consentIp") || validate8(value["consentIp"])) && (!Object.hasOwn(value, "consentSource") || validate8(value["consentSource"])) && (!Object.hasOwn(value, "source") || validate795(value["source"])) && (!Object.hasOwn(value, "messageId") || validate796(value["messageId"])) && (!Object.hasOwn(value, "campaignId") || validate636(value["campaignId"])) && (!Object.hasOwn(value, "campaignRunId") || validate639(value["campaignRunId"])) && (!Object.hasOwn(value, "occurredAt") || validate2(value["occurredAt"]));
69
- const validate783 = (value) => validate784(value) || validate6(value);
70
- const validate784 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^cgrp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
71
- const validate786 = (value) => validate787(value) || validate6(value);
72
- const validate787 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^unsub_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
73
- const validate795 = (value) => typeof value === "string" && (value === "link" || value === "api" || value === "manual" || value === "complaint");
74
- const validate796 = (value) => validate598(value) || validate6(value);
75
- const validate806 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate807(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate775(value["data"]));
76
- const validate807 = (value) => typeof value === "string" && value === "contact.unsubscribed";
77
- const validate840 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate841(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate775(value["data"]));
78
- const validate841 = (value) => typeof value === "string" && value === "contact.resubscribed";
79
- const validate874 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate875(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate877(value["data"]));
80
- const validate875 = (value) => typeof value === "string" && value === "conversation.created";
81
- const validate877 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "conversationId") && Object.hasOwn(value, "organizationId") && Object.hasOwn(value, "channels") && Object.hasOwn(value, "primaryChannel") && Object.hasOwn(value, "status") && Object.hasOwn(value, "createdAt") && Object.hasOwn(value, "updatedAt") && (!Object.hasOwn(value, "conversationId") || validate878(value["conversationId"])) && (!Object.hasOwn(value, "organizationId") || validate599(value["organizationId"])) && (!Object.hasOwn(value, "title") || validate701(value["title"])) && (!Object.hasOwn(value, "channels") || validate885(value["channels"])) && (!Object.hasOwn(value, "primaryChannel") || validate7(value["primaryChannel"])) && (!Object.hasOwn(value, "status") || validate888(value["status"])) && (!Object.hasOwn(value, "primaryContactId") || validate889(value["primaryContactId"])) && (!Object.hasOwn(value, "createdAt") || validate2(value["createdAt"])) && (!Object.hasOwn(value, "updatedAt") || validate2(value["updatedAt"]));
82
- const validate878 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^conv_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
83
- const validate885 = (value) => Array.isArray(value) && Array.isArray(value) && value.every(validate7);
84
- const validate888 = (value) => typeof value === "string" && (value === "active" || value === "waiting" || value === "resolved" || value === "escalated" || value === "archived");
85
- const validate889 = (value) => validate890(value) || validate6(value);
86
- const validate890 = (value) => validate698(value) || validate6(value);
87
- const validate896 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate897(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate877(value["data"]));
88
- const validate897 = (value) => typeof value === "string" && value === "conversation.updated";
89
- const validate918 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate919(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate877(value["data"]));
90
- const validate919 = (value) => typeof value === "string" && value === "conversation.archived";
91
- const validate940 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate941(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate943(value["data"]));
92
- const validate941 = (value) => typeof value === "string" && value === "webhook.created";
93
- const validate943 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "webhookId") && Object.hasOwn(value, "organizationId") && Object.hasOwn(value, "name") && Object.hasOwn(value, "url") && Object.hasOwn(value, "eventTypes") && Object.hasOwn(value, "channels") && Object.hasOwn(value, "status") && Object.hasOwn(value, "createdAt") && Object.hasOwn(value, "updatedAt") && (!Object.hasOwn(value, "webhookId") || validate944(value["webhookId"])) && (!Object.hasOwn(value, "organizationId") || validate599(value["organizationId"])) && (!Object.hasOwn(value, "name") || validate2(value["name"])) && (!Object.hasOwn(value, "url") || validate2(value["url"])) && (!Object.hasOwn(value, "eventTypes") || validate45(value["eventTypes"])) && (!Object.hasOwn(value, "channels") || validate44(value["channels"])) && (!Object.hasOwn(value, "status") || validate954(value["status"])) && (!Object.hasOwn(value, "createdAt") || validate2(value["createdAt"])) && (!Object.hasOwn(value, "updatedAt") || validate2(value["updatedAt"]));
94
- const validate944 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^wep_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
95
- const validate954 = (value) => typeof value === "string" && (value === "active" || value === "disabled");
96
- const validate957 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate958(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate943(value["data"]));
97
- const validate958 = (value) => typeof value === "string" && value === "webhook.updated";
98
- const validate974 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate975(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate943(value["data"]));
99
- const validate975 = (value) => typeof value === "string" && value === "webhook.deleted";
100
- const validate991 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate992(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate12(value["data"]));
101
- const validate992 = (value) => typeof value === "string" && value === "webhook.test";
102
- const validate995 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate996(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate998(value["data"]));
103
- const validate996 = (value) => typeof value === "string" && value === "domain.updated";
104
- const validate998 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "domainId") && Object.hasOwn(value, "organizationId") && Object.hasOwn(value, "domain") && Object.hasOwn(value, "previousPhase") && Object.hasOwn(value, "phase") && Object.hasOwn(value, "dns") && Object.hasOwn(value, "provider") && Object.hasOwn(value, "operationId") && Object.hasOwn(value, "checkedAt") && Object.hasOwn(value, "nextCheckAt") && Object.hasOwn(value, "failure") && Object.hasOwn(value, "updatedAt") && (!Object.hasOwn(value, "domainId") || validate999(value["domainId"])) && (!Object.hasOwn(value, "organizationId") || validate599(value["organizationId"])) && (!Object.hasOwn(value, "domain") || validate2(value["domain"])) && (!Object.hasOwn(value, "previousPhase") || validate1002(value["previousPhase"])) && (!Object.hasOwn(value, "phase") || validate1002(value["phase"])) && (!Object.hasOwn(value, "dns") || validate1004(value["dns"])) && (!Object.hasOwn(value, "provider") || validate1011(value["provider"])) && (!Object.hasOwn(value, "operationId") || validate1021(value["operationId"])) && (!Object.hasOwn(value, "checkedAt") || validate8(value["checkedAt"])) && (!Object.hasOwn(value, "nextCheckAt") || validate8(value["nextCheckAt"])) && (!Object.hasOwn(value, "failure") || validate1030(value["failure"])) && (!Object.hasOwn(value, "updatedAt") || validate2(value["updatedAt"]));
105
- const validate999 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^dom_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
106
- const validate1002 = (value) => typeof value === "string" && (value === "dns-setup" || value === "provisioning" || value === "verifying" || value === "ready" || value === "degraded" || value === "failed");
107
- const validate1004 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "observed") && Object.hasOwn(value, "total") && Object.hasOwn(value, "satisfied") && Object.hasOwn(value, "missing") && Object.hasOwn(value, "mismatch") && Object.hasOwn(value, "unknown") && (!Object.hasOwn(value, "observed") || validate33(value["observed"])) && (!Object.hasOwn(value, "total") || validate1006(value["total"])) && (!Object.hasOwn(value, "satisfied") || validate1006(value["satisfied"])) && (!Object.hasOwn(value, "missing") || validate1006(value["missing"])) && (!Object.hasOwn(value, "mismatch") || validate1006(value["mismatch"])) && (!Object.hasOwn(value, "unknown") || validate1006(value["unknown"]));
108
- const validate1006 = (value) => typeof value === "number" && Number.isInteger(value);
109
- const validate1011 = (value) => validate1012(value) || validate6(value);
110
- const validate1012 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "identity") && (!Object.hasOwn(value, "identity") || validate1013(value["identity"])) && (!Object.hasOwn(value, "dkim") || validate1014(value["dkim"])) && (!Object.hasOwn(value, "mailFrom") || validate1014(value["mailFrom"]));
111
- const validate1013 = (value) => typeof value === "string" && (value === "pending" || value === "verified" || value === "failed" || value === "unknown");
112
- const validate1014 = (value) => validate1013(value) || validate6(value);
113
- const validate1021 = (value) => validate1022(value) || validate6(value);
114
- const validate1022 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^op_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
115
- const validate1030 = (value) => validate1031(value) || validate6(value);
116
- const validate1031 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "code") && Object.hasOwn(value, "message") && Object.hasOwn(value, "failedAt") && (!Object.hasOwn(value, "code") || validate2(value["code"])) && (!Object.hasOwn(value, "message") || validate2(value["message"])) && (!Object.hasOwn(value, "failedAt") || validate2(value["failedAt"]));
117
- const validate1037 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1038(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1040(value["data"]));
118
- const validate1038 = (value) => typeof value === "string" && value === "domain.warming.updated";
119
- const validate1040 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "domainId") && Object.hasOwn(value, "organizationId") && Object.hasOwn(value, "domain") && Object.hasOwn(value, "planId") && Object.hasOwn(value, "reason") && Object.hasOwn(value, "status") && Object.hasOwn(value, "holdReason") && Object.hasOwn(value, "batch") && Object.hasOwn(value, "updatedAt") && (!Object.hasOwn(value, "domainId") || validate2(value["domainId"])) && (!Object.hasOwn(value, "organizationId") || validate2(value["organizationId"])) && (!Object.hasOwn(value, "domain") || validate2(value["domain"])) && (!Object.hasOwn(value, "planId") || validate2(value["planId"])) && (!Object.hasOwn(value, "reason") || validate1045(value["reason"])) && (!Object.hasOwn(value, "status") || validate1046(value["status"])) && (!Object.hasOwn(value, "holdReason") || validate8(value["holdReason"])) && (!Object.hasOwn(value, "batch") || validate1050(value["batch"])) && (!Object.hasOwn(value, "updatedAt") || validate2(value["updatedAt"]));
120
- const validate1045 = (value) => typeof value === "string" && (value === "plan-created" || value === "policy-updated" || value === "window-opened" || value === "window-cancelled" || value === "paused" || value === "resumed" || value === "held" || value === "completed");
121
- const validate1046 = (value) => typeof value === "string" && (value === "active" || value === "paused" || value === "completed");
122
- const validate1050 = (value) => validate1051(value) || validate6(value);
123
- const validate1051 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "id") && Object.hasOwn(value, "sequence") && Object.hasOwn(value, "startsAt") && Object.hasOwn(value, "endsAt") && Object.hasOwn(value, "allowanceRecipients") && Object.hasOwn(value, "dailyGrowthPercent") && Object.hasOwn(value, "targetDailyRecipients") && (!Object.hasOwn(value, "id") || validate2(value["id"])) && (!Object.hasOwn(value, "sequence") || validate15(value["sequence"])) && (!Object.hasOwn(value, "startsAt") || validate2(value["startsAt"])) && (!Object.hasOwn(value, "endsAt") || validate2(value["endsAt"])) && (!Object.hasOwn(value, "allowanceRecipients") || validate15(value["allowanceRecipients"])) && (!Object.hasOwn(value, "dailyGrowthPercent") || validate15(value["dailyGrowthPercent"])) && (!Object.hasOwn(value, "targetDailyRecipients") || validate15(value["targetDailyRecipients"]));
124
- const validate1061 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1062(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1064(value["data"]));
125
- const validate1062 = (value) => typeof value === "string" && value === "mailbox.message.received";
126
- const validate1064 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "mailboxId") && Object.hasOwn(value, "namespaceId") && Object.hasOwn(value, "message") && Object.hasOwn(value, "thread") && (!Object.hasOwn(value, "mailboxId") || validate5(value["mailboxId"])) && (!Object.hasOwn(value, "namespaceId") || validate1066(value["namespaceId"])) && (!Object.hasOwn(value, "message") || validate1069(value["message"])) && (!Object.hasOwn(value, "thread") || validate1097(value["thread"]));
127
- const validate1066 = (value) => validate1067(value) || validate6(value);
128
- const validate1067 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^ns_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
129
- const validate1069 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "id") && Object.hasOwn(value, "threadId") && Object.hasOwn(value, "from") && Object.hasOwn(value, "to") && Object.hasOwn(value, "cc") && Object.hasOwn(value, "subject") && Object.hasOwn(value, "text") && Object.hasOwn(value, "replyText") && Object.hasOwn(value, "attachments") && Object.hasOwn(value, "occurredAt") && (!Object.hasOwn(value, "id") || validate598(value["id"])) && (!Object.hasOwn(value, "threadId") || validate1071(value["threadId"])) && (!Object.hasOwn(value, "from") || validate1072(value["from"])) && (!Object.hasOwn(value, "to") || validate45(value["to"])) && (!Object.hasOwn(value, "cc") || validate45(value["cc"])) && (!Object.hasOwn(value, "subject") || validate8(value["subject"])) && (!Object.hasOwn(value, "text") || validate8(value["text"])) && (!Object.hasOwn(value, "replyText") || validate8(value["replyText"])) && (!Object.hasOwn(value, "attachments") || validate1090(value["attachments"])) && (!Object.hasOwn(value, "occurredAt") || validate2(value["occurredAt"]));
130
- const validate1071 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^thread_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
131
- const validate1072 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "address") && (!Object.hasOwn(value, "address") || validate2(value["address"])) && (!Object.hasOwn(value, "name") || validate8(value["name"]));
132
- const validate1090 = (value) => Array.isArray(value) && Array.isArray(value) && value.every(validate1091);
133
- const validate1091 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "id") && Object.hasOwn(value, "filename") && Object.hasOwn(value, "contentType") && Object.hasOwn(value, "size") && (!Object.hasOwn(value, "id") || validate1092(value["id"])) && (!Object.hasOwn(value, "filename") || validate2(value["filename"])) && (!Object.hasOwn(value, "contentType") || validate2(value["contentType"])) && (!Object.hasOwn(value, "size") || validate15(value["size"]));
134
- const validate1092 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^att_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
135
- const validate1097 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "id") && Object.hasOwn(value, "subject") && Object.hasOwn(value, "preview") && (!Object.hasOwn(value, "id") || validate1071(value["id"])) && (!Object.hasOwn(value, "subject") || validate8(value["subject"])) && (!Object.hasOwn(value, "preview") || validate8(value["preview"]));
136
- const validate1105 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1106(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1108(value["data"]));
137
- const validate1106 = (value) => typeof value === "string" && value === "mailbox.message.sent";
138
- const validate1108 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "mailboxId") && Object.hasOwn(value, "namespaceId") && Object.hasOwn(value, "actionId") && Object.hasOwn(value, "actor") && Object.hasOwn(value, "message") && (!Object.hasOwn(value, "mailboxId") || validate5(value["mailboxId"])) && (!Object.hasOwn(value, "namespaceId") || validate1066(value["namespaceId"])) && (!Object.hasOwn(value, "actionId") || validate1113(value["actionId"])) && (!Object.hasOwn(value, "state") || validate1114(value["state"])) && (!Object.hasOwn(value, "acceptedAt") || validate2(value["acceptedAt"])) && (!Object.hasOwn(value, "actor") || validate1116(value["actor"])) && (!Object.hasOwn(value, "message") || validate1069(value["message"]));
139
- const validate1113 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
140
- const validate1114 = (value) => typeof value === "string" && value === "completed";
141
- const validate1116 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "kind") && Object.hasOwn(value, "id") && Object.hasOwn(value, "source") && (!Object.hasOwn(value, "kind") || validate1117(value["kind"])) && (!Object.hasOwn(value, "id") || validate2(value["id"])) && (!Object.hasOwn(value, "displayName") || validate8(value["displayName"])) && (!Object.hasOwn(value, "source") || validate1122(value["source"]));
142
- const validate1117 = (value) => typeof value === "string" && (value === "user" || value === "apiKey" || value === "extension" || value === "externalAgent" || value === "samvaAgent" || value === "system");
143
- const validate1122 = (value) => typeof value === "string" && (value === "humanUi" || value === "externalApi" || value === "externalAgent" || value === "extension" || value === "system");
144
- const validate1151 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1152(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1154(value["data"]));
145
- const validate1152 = (value) => typeof value === "string" && value === "mailbox.action.pending_approval";
146
- const validate1154 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "mailboxId") && Object.hasOwn(value, "namespaceId") && Object.hasOwn(value, "action") && Object.hasOwn(value, "draft") && (!Object.hasOwn(value, "mailboxId") || validate5(value["mailboxId"])) && (!Object.hasOwn(value, "namespaceId") || validate1066(value["namespaceId"])) && (!Object.hasOwn(value, "action") || validate1159(value["action"])) && (!Object.hasOwn(value, "draft") || validate1189(value["draft"]));
147
- const validate1159 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "id") && Object.hasOwn(value, "type") && Object.hasOwn(value, "threadId") && Object.hasOwn(value, "reason") && Object.hasOwn(value, "proposedBy") && Object.hasOwn(value, "createdAt") && (!Object.hasOwn(value, "id") || validate1113(value["id"])) && (!Object.hasOwn(value, "type") || validate1161(value["type"])) && (!Object.hasOwn(value, "state") || validate1162(value["state"])) && (!Object.hasOwn(value, "decision") || validate1163(value["decision"])) && (!Object.hasOwn(value, "threadId") || validate1175(value["threadId"])) && (!Object.hasOwn(value, "reason") || validate8(value["reason"])) && (!Object.hasOwn(value, "proposedBy") || validate1116(value["proposedBy"])) && (!Object.hasOwn(value, "createdAt") || validate2(value["createdAt"]));
148
- const validate1161 = (value) => typeof value === "string" && (value === "sendMessage" || value === "reply" || value === "updateDraft" || value === "createNote" || value === "assignThread" || value === "changeThreadState" || value === "call" || value === "extensionRequest");
149
- const validate1162 = (value) => typeof value === "string" && value === "approvalRequired";
150
- const validate1163 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "outcome") && Object.hasOwn(value, "reason") && Object.hasOwn(value, "policyId") && Object.hasOwn(value, "source") && Object.hasOwn(value, "decidedAt") && (!Object.hasOwn(value, "outcome") || validate1164(value["outcome"])) && (!Object.hasOwn(value, "reason") || validate8(value["reason"])) && (!Object.hasOwn(value, "policyId") || validate1168(value["policyId"])) && (!Object.hasOwn(value, "source") || validate1171(value["source"])) && (!Object.hasOwn(value, "decidedAt") || validate2(value["decidedAt"]));
151
- const validate1164 = (value) => typeof value === "string" && (value === "allow" || value === "requireApproval" || value === "deny");
152
- const validate1168 = (value) => validate1169(value) || validate6(value);
153
- const validate1169 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^mbxpol_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
154
- const validate1171 = (value) => validate1172(value) || validate6(value);
155
- const validate1172 = (value) => typeof value === "string" && (value === "grant" || value === "installation" || value === "policy");
156
- const validate1175 = (value) => validate1071(value) || validate6(value);
157
- const validate1189 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "to") && Object.hasOwn(value, "cc") && Object.hasOwn(value, "subject") && (!Object.hasOwn(value, "to") || validate45(value["to"])) && (!Object.hasOwn(value, "cc") || validate45(value["cc"])) && (!Object.hasOwn(value, "subject") || validate8(value["subject"]));
158
- const validate1197 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1198(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1200(value["data"]));
159
- const validate1198 = (value) => typeof value === "string" && value === "mailbox.message.quarantined";
160
- const validate1200 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "mailboxId") && Object.hasOwn(value, "namespaceId") && Object.hasOwn(value, "disposition") && Object.hasOwn(value, "reason") && Object.hasOwn(value, "source") && Object.hasOwn(value, "message") && (!Object.hasOwn(value, "mailboxId") || validate5(value["mailboxId"])) && (!Object.hasOwn(value, "namespaceId") || validate1066(value["namespaceId"])) && (!Object.hasOwn(value, "disposition") || validate1205(value["disposition"])) && (!Object.hasOwn(value, "reason") || validate1206(value["reason"])) && (!Object.hasOwn(value, "source") || validate1207(value["source"])) && (!Object.hasOwn(value, "message") || validate1208(value["message"]));
161
- const validate1205 = (value) => typeof value === "string" && (value === "quarantined" || value === "isolated");
162
- const validate1206 = (value) => typeof value === "string" && (value === "spam" || value === "dmarc" || value === "virus" || value === "virus_unscanned" || value === "phishing" || value === "fraud" || value === "prompt_injection");
163
- const validate1207 = (value) => typeof value === "string" && (value === "receipt" || value === "classifier");
164
- const validate1208 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "id") && Object.hasOwn(value, "from") && Object.hasOwn(value, "subject") && Object.hasOwn(value, "receivedAt") && (!Object.hasOwn(value, "id") || validate598(value["id"])) && (!Object.hasOwn(value, "from") || validate1072(value["from"])) && (!Object.hasOwn(value, "subject") || validate8(value["subject"])) && (!Object.hasOwn(value, "receivedAt") || validate2(value["receivedAt"]));
165
- const validate1219 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1220(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1222(value["data"]));
166
- const validate1220 = (value) => typeof value === "string" && value === "mailbox.message.released";
167
- const validate1222 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "mailboxId") && Object.hasOwn(value, "namespaceId") && Object.hasOwn(value, "releasedBy") && Object.hasOwn(value, "reason") && Object.hasOwn(value, "message") && Object.hasOwn(value, "thread") && (!Object.hasOwn(value, "mailboxId") || validate5(value["mailboxId"])) && (!Object.hasOwn(value, "namespaceId") || validate1066(value["namespaceId"])) && (!Object.hasOwn(value, "releasedBy") || validate1116(value["releasedBy"])) && (!Object.hasOwn(value, "reason") || validate1206(value["reason"])) && (!Object.hasOwn(value, "message") || validate1069(value["message"])) && (!Object.hasOwn(value, "thread") || validate1097(value["thread"]));
168
- const validate1271 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1272(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1274(value["data"]));
169
- const validate1272 = (value) => typeof value === "string" && value === "mailbox.message.discarded";
170
- const validate1274 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "mailboxId") && Object.hasOwn(value, "namespaceId") && Object.hasOwn(value, "discardedBy") && Object.hasOwn(value, "disposition") && Object.hasOwn(value, "reason") && Object.hasOwn(value, "message") && (!Object.hasOwn(value, "mailboxId") || validate5(value["mailboxId"])) && (!Object.hasOwn(value, "namespaceId") || validate1066(value["namespaceId"])) && (!Object.hasOwn(value, "discardedBy") || validate1116(value["discardedBy"])) && (!Object.hasOwn(value, "disposition") || validate1205(value["disposition"])) && (!Object.hasOwn(value, "reason") || validate1206(value["reason"])) && (!Object.hasOwn(value, "message") || validate1208(value["message"]));
171
- /** Narrow an event to a structurally valid payload known to this package. */
172
- const isKnownEvent = (value) => {
173
- switch (value.type) {
174
- case "message.sent": return validate0(value);
175
- case "message.delivered": return validate86(value);
176
- case "message.read": return validate172(value);
177
- case "message.failed": return validate258(value);
178
- case "message.bounced": return validate344(value);
179
- case "message.complained": return validate426(value);
180
- case "message.received": return validate508(value);
181
- case "message.opened": return validate594(value);
182
- case "message.clicked": return validate642(value);
183
- case "contact.created": return validate694(value);
184
- case "contact.updated": return validate720(value);
185
- case "contact.deleted": return validate746(value);
186
- case "contact.subscribed": return validate772(value);
187
- case "contact.unsubscribed": return validate806(value);
188
- case "contact.resubscribed": return validate840(value);
189
- case "conversation.created": return validate874(value);
190
- case "conversation.updated": return validate896(value);
191
- case "conversation.archived": return validate918(value);
192
- case "webhook.created": return validate940(value);
193
- case "webhook.updated": return validate957(value);
194
- case "webhook.deleted": return validate974(value);
195
- case "webhook.test": return validate991(value);
196
- case "domain.updated": return validate995(value);
197
- case "domain.warming.updated": return validate1037(value);
198
- case "mailbox.message.received": return validate1061(value);
199
- case "mailbox.message.sent": return validate1105(value);
200
- case "mailbox.action.pending_approval": return validate1151(value);
201
- case "mailbox.message.quarantined": return validate1197(value);
202
- case "mailbox.message.released": return validate1219(value);
203
- case "mailbox.message.discarded": return validate1271(value);
204
- default: return false;
205
- }
206
- };
207
- const validateEvent = (value) => {
208
- if (!isObject(value) || typeof value.type !== "string" || typeof value.timestamp !== "string" || !Object.hasOwn(value, "data")) return false;
209
- switch (value.type) {
210
- case "message.sent": return validate0(value);
211
- case "message.delivered": return validate86(value);
212
- case "message.read": return validate172(value);
213
- case "message.failed": return validate258(value);
214
- case "message.bounced": return validate344(value);
215
- case "message.complained": return validate426(value);
216
- case "message.received": return validate508(value);
217
- case "message.opened": return validate594(value);
218
- case "message.clicked": return validate642(value);
219
- case "contact.created": return validate694(value);
220
- case "contact.updated": return validate720(value);
221
- case "contact.deleted": return validate746(value);
222
- case "contact.subscribed": return validate772(value);
223
- case "contact.unsubscribed": return validate806(value);
224
- case "contact.resubscribed": return validate840(value);
225
- case "conversation.created": return validate874(value);
226
- case "conversation.updated": return validate896(value);
227
- case "conversation.archived": return validate918(value);
228
- case "webhook.created": return validate940(value);
229
- case "webhook.updated": return validate957(value);
230
- case "webhook.deleted": return validate974(value);
231
- case "webhook.test": return validate991(value);
232
- case "domain.updated": return validate995(value);
233
- case "domain.warming.updated": return validate1037(value);
234
- case "mailbox.message.received": return validate1061(value);
235
- case "mailbox.message.sent": return validate1105(value);
236
- case "mailbox.action.pending_approval": return validate1151(value);
237
- case "mailbox.message.quarantined": return validate1197(value);
238
- case "mailbox.message.released": return validate1219(value);
239
- case "mailbox.message.discarded": return validate1271(value);
240
- default: return true;
241
- }
242
- };
243
- //#endregion
244
- //#region src/errors.ts
245
- /**
246
- * Base class for every failure this package reports while verifying a webhook delivery.
247
- *
248
- * Each subclass carries a literal `_tag` (also used as `name`), so you can branch on the failure
249
- * with a `switch` or Effect's `catchTag`. `detail` is a human-readable reason for your logs; do not
250
- * echo it to the sender, and do not match on its wording.
251
- */
252
- var WebhookVerificationError = class extends Error {
253
- /** Discriminant naming the concrete failure; equal to the subclass name. */
254
- _tag;
255
- /** Human-readable reason for logs. The wording is not a stable contract. */
256
- detail;
257
- constructor(tag, options) {
258
- super(options.detail);
259
- this.name = tag;
260
- this._tag = tag;
261
- this.detail = options.detail;
262
- }
263
- };
264
- /**
265
- * The signing secret is unusable: it lacks the `whsec_` prefix, the remainder is not Base64, or
266
- * the decoded key length is outside the accepted range (`detail` names the range). This is a
267
- * configuration error on the receiving side, not a bad delivery; copy the endpoint's signing
268
- * secret from Samva again.
269
- */
270
- var InvalidWebhookSecretError = class extends WebhookVerificationError {
271
- constructor(options) {
272
- super("InvalidWebhookSecretError", options);
273
- }
274
- };
275
- /**
276
- * One of the `webhook-id`, `webhook-timestamp`, or `webhook-signature` headers is missing or
277
- * empty; `header` names it. The request is not a Samva delivery, or something between Samva and
278
- * your handler stripped the headers.
279
- */
280
- var InvalidWebhookHeadersError = class extends WebhookVerificationError {
281
- /** The first signing header, in id, timestamp, signature order, that is missing or empty. */
282
- header;
283
- constructor(options) {
284
- super("InvalidWebhookHeadersError", options);
285
- this.header = options.header;
286
- }
287
- };
288
- /**
289
- * The `webhook-timestamp` header is not an integer count of Unix seconds, it lies further from the
290
- * current time than the replay tolerance, or the tolerance you passed is negative or not finite.
291
- * A delivery outside the tolerance is rejected even when its signature is valid; that bounds how
292
- * long a captured request can be replayed. Repeated failures on genuine deliveries usually mean
293
- * the receiving server's clock is wrong.
294
- */
295
- var WebhookTimestampError = class extends WebhookVerificationError {
296
- constructor(options) {
297
- super("WebhookTimestampError", options);
298
- }
299
- };
300
- /**
301
- * No signature in the `webhook-signature` header matches the delivery, or no verification key was
302
- * supplied. Treat the request as forged and reject it. When genuine deliveries fail, the usual
303
- * causes are the wrong endpoint secret or a body that was parsed and re-serialized before
304
- * verification instead of passed through as the exact bytes received.
305
- */
306
- var WebhookSignatureError = class extends WebhookVerificationError {
307
- constructor(options) {
308
- super("WebhookSignatureError", options);
309
- }
310
- };
311
- /**
312
- * The signature is valid, but the body is not UTF-8 JSON holding exactly the `type`,
313
- * `timestamp`, and `data` fields of a Samva event envelope.
314
- */
315
- var MalformedWebhookPayloadError = class extends WebhookVerificationError {
316
- constructor(options) {
317
- super("MalformedWebhookPayloadError", options);
318
- }
319
- };
320
- /**
321
- * The runtime's Web Crypto implementation could not import a key or compute a signature, none of
322
- * the supplied public keys could be imported, or the Effect entrypoint could not read the request
323
- * body. Points at the runtime or its configuration rather than at the delivery.
324
- */
325
- var WebhookCryptoError = class extends WebhookVerificationError {
326
- constructor(options) {
327
- super("WebhookCryptoError", options);
328
- }
329
- };
330
- //#endregion
331
- //#region src/protocol.ts
332
- /**
333
- * Header carrying the delivery's unique message ID. Retries of the same delivery reuse it, so it
334
- * is the key for deduplicating deliveries you have already handled.
335
- */
336
- const WEBHOOK_ID_HEADER = "webhook-id";
337
- /** Header carrying the time Samva signed the delivery, as integer Unix seconds. */
338
- const WEBHOOK_TIMESTAMP_HEADER = "webhook-timestamp";
339
- /**
340
- * Header carrying one or more space-separated `<version>,<base64 signature>` entries. More than one
341
- * entry appears while a signing secret is being rotated; a delivery verifies when any entry of the
342
- * expected version matches.
343
- */
344
- const WEBHOOK_SIGNATURE_HEADER = "webhook-signature";
345
- /**
346
- * Replay tolerance, in seconds, used when a caller passes no `toleranceSeconds`. A delivery whose
347
- * `webhook-timestamp` differs from the current time by more than this, in either direction, is
348
- * rejected with {@link WebhookTimestampError}.
349
- */
350
- const DEFAULT_TOLERANCE_SECONDS = 300;
351
- const SECRET_PREFIX = "whsec_";
352
- const ASYMMETRIC_ALGORITHM = {
353
- name: "RSASSA-PKCS1-v1_5",
354
- hash: "SHA-256"
355
- };
356
- const MINIMUM_SECRET_BYTES = 24;
357
- const MAXIMUM_SECRET_BYTES = 64;
358
- const GENERATED_SECRET_BYTES = 32;
359
- const encoder = new TextEncoder();
360
- const toBytes = (body) => typeof body === "string" ? encoder.encode(body) : body;
361
- const toCryptoBytes = (bytes) => new Uint8Array(bytes);
362
- const bytesToBase64 = (bytes) => {
363
- let binary = "";
364
- for (const byte of bytes) binary += String.fromCharCode(byte);
365
- return btoa(binary);
366
- };
367
- const base64ToBytes = (encoded) => {
368
- const binary = atob(encoded);
369
- return Uint8Array.from(binary, (character) => character.charCodeAt(0));
370
- };
371
- const decodeSecret = (secret) => {
372
- if (!secret.startsWith(SECRET_PREFIX)) throw new InvalidWebhookSecretError({ detail: "Webhook secret must start with whsec_" });
373
- const decoded = (() => {
374
- try {
375
- return base64ToBytes(secret.slice(6));
376
- } catch {
377
- throw new InvalidWebhookSecretError({ detail: "Webhook secret is not valid Base64" });
378
- }
379
- })();
380
- if (decoded.byteLength < MINIMUM_SECRET_BYTES || decoded.byteLength > MAXIMUM_SECRET_BYTES) throw new InvalidWebhookSecretError({ detail: `Webhook secret must decode to ${MINIMUM_SECRET_BYTES}-${MAXIMUM_SECRET_BYTES} bytes` });
381
- return decoded;
382
- };
383
- const importHmacKey = async (secret) => {
384
- const secretBytes = decodeSecret(secret);
385
- try {
386
- return await crypto.subtle.importKey("raw", toCryptoBytes(secretBytes), {
387
- name: "HMAC",
388
- hash: "SHA-256"
389
- }, false, ["sign"]);
390
- } catch (cause) {
391
- throw new WebhookCryptoError({ detail: `Unable to import webhook signing key: ${cause instanceof Error ? cause.message : String(cause)}` });
392
- }
393
- };
394
- const importVerificationKey = async (publicKey) => {
395
- try {
396
- return await crypto.subtle.importKey("spki", toCryptoBytes(base64ToBytes(publicKey.trim())), ASYMMETRIC_ALGORITHM, false, ["verify"]);
397
- } catch {
398
- return;
399
- }
400
- };
401
- const signedBytes = (id, timestamp, body) => {
402
- const prefix = encoder.encode(`${id}.${timestamp}.`);
403
- const material = new Uint8Array(prefix.byteLength + body.byteLength);
404
- material.set(prefix);
405
- material.set(body, prefix.byteLength);
406
- return material;
407
- };
408
- const hmac = async (secret, id, timestamp, body) => {
409
- const key = await importHmacKey(secret);
410
- try {
411
- return new Uint8Array(await crypto.subtle.sign("HMAC", key, toCryptoBytes(signedBytes(id, timestamp, body))));
412
- } catch (cause) {
413
- throw new WebhookCryptoError({ detail: `Unable to sign webhook: ${cause instanceof Error ? cause.message : String(cause)}` });
414
- }
415
- };
416
- const asymmetricMatch = async (key, candidate, content) => {
417
- try {
418
- return await crypto.subtle.verify(ASYMMETRIC_ALGORITHM, key, toCryptoBytes(candidate), content);
419
- } catch {
420
- return false;
421
- }
422
- };
423
- const timingSafeEqual = (left, right) => {
424
- if (left.byteLength !== right.byteLength) return false;
425
- let difference = 0;
426
- for (let index = 0; index < left.byteLength; index += 1) difference |= (left[index] ?? 0) ^ (right[index] ?? 0);
427
- return difference === 0;
428
- };
429
- const signatureCandidates = (header, expected) => header.split(" ").map((candidate) => candidate.split(",", 2)).flatMap(([version, encoded]) => {
430
- if (version !== expected || encoded === void 0) return [];
431
- try {
432
- return [base64ToBytes(encoded)];
433
- } catch {
434
- return [];
435
- }
436
- });
437
- const parseEvent = (body) => {
438
- try {
439
- const parsed = JSON.parse(new TextDecoder("utf-8", {
440
- fatal: true,
441
- ignoreBOM: false
442
- }).decode(body));
443
- if (!validateEvent(parsed)) throw new MalformedWebhookPayloadError({ detail: "Webhook event does not match its payload schema" });
444
- return parsed;
445
- } catch {
446
- throw new MalformedWebhookPayloadError({ detail: "Webhook body must be valid UTF-8 JSON matching a Samva event payload schema" });
447
- }
448
- };
449
- /**
450
- * Creates a random `whsec_`-prefixed signing secret from the runtime's secure random source.
451
- * Samva issues each endpoint's secret for you; use this to sign test deliveries with
452
- * {@link signWebhook}.
453
- */
454
- const generateWebhookSecret = () => {
455
- const bytes = crypto.getRandomValues(new Uint8Array(GENERATED_SECRET_BYTES));
456
- return `${SECRET_PREFIX}${bytesToBase64(bytes)}`;
457
- };
458
- /**
459
- * Builds the bytes every signature version covers: `<id>.<timestamp>.<body>`. Use it to verify a
460
- * signature with your own crypto code; {@link verifyWebhookAt} and
461
- * {@link verifyWebhookAtWithPublicKeys} build it for you.
462
- */
463
- const webhookSignedContent = (input) => signedBytes(input.id, input.timestamp, toBytes(input.body));
464
- /** Formats raw signature bytes as one `<version>,<base64>` entry of the `webhook-signature` header. */
465
- const encodeWebhookSignature = (version, signature) => `${version},${bytesToBase64(signature)}`;
466
- /**
467
- * Computes the `v1` HMAC-SHA256 signature Samva sends, formatted as one `webhook-signature`
468
- * entry. Use it to produce signed test deliveries for your handler.
469
- *
470
- * `timestamp` is Unix seconds; a number is stringified, and the verifier requires an integer.
471
- * Rejects with {@link InvalidWebhookSecretError} for an unusable secret and
472
- * {@link WebhookCryptoError} when Web Crypto fails.
473
- */
474
- const signWebhook = async (input) => {
475
- const timestamp = String(input.timestamp);
476
- const signature = await hmac(input.secret, input.id, timestamp, toBytes(input.body));
477
- return encodeWebhookSignature("v1", signature);
478
- };
479
- const requireHeader = (header, value) => {
480
- if (value === null || value === void 0) throw new InvalidWebhookHeadersError({
481
- header,
482
- detail: `${header} header is missing`
483
- });
484
- if (value.length === 0) throw new InvalidWebhookHeadersError({
485
- header,
486
- detail: `${header} header is empty`
487
- });
488
- return value;
489
- };
490
- const requireHeaders = (values) => ({
491
- id: requireHeader(WEBHOOK_ID_HEADER, values.id),
492
- timestamp: requireHeader(WEBHOOK_TIMESTAMP_HEADER, values.timestamp),
493
- signature: requireHeader(WEBHOOK_SIGNATURE_HEADER, values.signature)
494
- });
495
- const freshHeaders = (input) => {
496
- const { id, timestamp, signature } = requireHeaders(input.headers);
497
- const timestampSeconds = Number(timestamp);
498
- if (!Number.isInteger(timestampSeconds)) throw new WebhookTimestampError({ detail: "webhook-timestamp must be Unix seconds" });
499
- const toleranceSeconds = input.toleranceSeconds ?? 300;
500
- if (!Number.isFinite(toleranceSeconds) || toleranceSeconds < 0) throw new WebhookTimestampError({ detail: "Webhook tolerance must be non-negative" });
501
- if (Math.abs(input.nowMilliseconds / 1e3 - timestampSeconds) > toleranceSeconds) throw new WebhookTimestampError({ detail: "Webhook timestamp is outside the replay tolerance" });
502
- return {
503
- id,
504
- timestamp,
505
- signature
506
- };
507
- };
508
- /**
509
- * Verifies a `v1` (HMAC-SHA256) delivery against an explicit current time. The `verify` and
510
- * `verifyRequest` entry points call this with the current clock; call it directly when your
511
- * framework owns the clock or a test needs a fixed time.
512
- *
513
- * Checks, in order: all three headers are present and non-empty; the timestamp is integer Unix seconds within
514
- * `toleranceSeconds` of `nowMilliseconds`; some `v1` entry in the signature header matches, using
515
- * a constant-time comparison; the body has a valid envelope and known event payloads match their schema. Unknown event types pass
516
- * through with untyped data. The replay window rejects stale
517
- * deliveries but does not detect a repeat inside it; deduplicate on the returned `id`.
518
- *
519
- * Rejects with {@link InvalidWebhookHeadersError}, {@link WebhookTimestampError},
520
- * {@link InvalidWebhookSecretError}, {@link WebhookSignatureError},
521
- * {@link MalformedWebhookPayloadError}, or {@link WebhookCryptoError}.
522
- */
523
- const verifyWebhookAt = async (input) => {
524
- const { id, timestamp, signature } = freshHeaders(input);
525
- const body = toBytes(input.body);
526
- const expected = await hmac(input.secret, id, timestamp, body);
527
- if (!signatureCandidates(signature, "v1").some((candidate) => timingSafeEqual(expected, candidate))) throw new WebhookSignatureError({ detail: "Webhook signature verification failed" });
528
- return {
529
- id,
530
- event: parseEvent(body)
531
- };
532
- };
533
- /**
534
- * Verifies a `v2` (RSASSA-PKCS1-v1_5, SHA-256) delivery against one or more public keys, each a
535
- * Base64-encoded SPKI DER key. Pass several keys during a key rotation; the delivery verifies when
536
- * any `v2` signature entry matches any key.
537
- *
538
- * Header, timestamp, and envelope checks match {@link verifyWebhookAt}. Keys that fail to import
539
- * are skipped. Rejects with {@link WebhookSignatureError} when `publicKeys` is empty or nothing
540
- * matches, and {@link WebhookCryptoError} when none of the keys imports.
541
- */
542
- const verifyWebhookAtWithPublicKeys = async (input) => {
543
- const { id, timestamp, signature } = freshHeaders(input);
544
- if (input.publicKeys.length === 0) throw new WebhookSignatureError({ detail: "No webhook verification key is available" });
545
- const keys = (await Promise.all(input.publicKeys.map(importVerificationKey))).filter((key) => key !== void 0);
546
- if (keys.length === 0) throw new WebhookCryptoError({ detail: "Unable to import any webhook verification key: keys must be Base64 SPKI DER" });
547
- const body = toBytes(input.body);
548
- const content = toCryptoBytes(signedBytes(id, timestamp, body));
549
- const candidates = signatureCandidates(signature, "v2");
550
- if (!(await Promise.all(keys.flatMap((key) => candidates.map((candidate) => asymmetricMatch(key, candidate, content))))).includes(true)) throw new WebhookSignatureError({ detail: "Webhook signature verification failed" });
551
- return {
552
- id,
553
- event: parseEvent(body)
554
- };
555
- };
556
- /**
557
- * Reads the three signing headers from a Fetch API `Headers` object, for code that needs a header
558
- * value, such as the timestamp, before or beside verification. Throws
559
- * {@link InvalidWebhookHeadersError}, naming the header, when one is missing or empty; call it
560
- * inside the same error handling as the verification that follows.
561
- */
562
- const readWebhookHeaders = (headers) => requireHeaders({
563
- id: headers.get(WEBHOOK_ID_HEADER),
564
- timestamp: headers.get(WEBHOOK_TIMESTAMP_HEADER),
565
- signature: headers.get(WEBHOOK_SIGNATURE_HEADER)
566
- });
567
- //#endregion
568
- export { WebhookTimestampError as _, encodeWebhookSignature as a, signWebhook as c, webhookSignedContent as d, InvalidWebhookHeadersError as f, WebhookSignatureError as g, WebhookCryptoError as h, WEBHOOK_TIMESTAMP_HEADER as i, verifyWebhookAt as l, MalformedWebhookPayloadError as m, WEBHOOK_ID_HEADER as n, generateWebhookSecret as o, InvalidWebhookSecretError as p, WEBHOOK_SIGNATURE_HEADER as r, readWebhookHeaders as s, DEFAULT_TOLERANCE_SECONDS as t, verifyWebhookAtWithPublicKeys as u, WebhookVerificationError as v, isKnownEvent as y };
569
-
570
- //# sourceMappingURL=protocol-CLrYczjc.js.map