@samva/webhooks 0.53.0 → 0.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/effect.js +3 -3
- package/dist/{json-schemas.gen-Du5pts9S.js → json-schemas.gen-t9dUV5my.js} +226 -30
- package/dist/promise.js +2 -2
- package/dist/{protocol-Q3-Vd3-K.js → protocol-CwGXBskp.js} +428 -425
- package/dist/protocol.js +1 -1
- package/dist/schemas.gen.d.ts +70 -0
- package/dist/schemas.gen.js +90 -20
- package/dist/types.gen.d.ts +49 -0
- package/package.json +3 -3
|
@@ -3,7 +3,7 @@ const isObject = (value) => typeof value === "object" && value !== null && !Arra
|
|
|
3
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
4
|
const validate1 = (value) => typeof value === "string" && value === "message.sent";
|
|
5
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") ||
|
|
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, "estimatedProviderCost") || validate17(value["estimatedProviderCost"])) && (!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") || validate36(value["isBillable"])) && (!Object.hasOwn(value, "messageType") || validate8(value["messageType"])) && (!Object.hasOwn(value, "templateCategory") || validate42(value["templateCategory"])) && (!Object.hasOwn(value, "subject") || validate8(value["subject"])) && (!Object.hasOwn(value, "toEmails") || validate48(value["toEmails"])) && (!Object.hasOwn(value, "providerMessageId") || validate8(value["providerMessageId"])) && (!Object.hasOwn(value, "waId") || validate8(value["waId"])) && (!Object.hasOwn(value, "hasAttachments") || validate36(value["hasAttachments"])) && (!Object.hasOwn(value, "isAutoReply") || validate36(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") || validate76(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
7
|
const validate4 = (value) => validate5(value) || validate6(value);
|
|
8
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
9
|
const validate6 = (value) => value === null;
|
|
@@ -13,395 +13,398 @@ const validate11 = (value) => validate12(value) || validate6(value);
|
|
|
13
13
|
const validate12 = (value) => isObject(value);
|
|
14
14
|
const validate14 = (value) => validate15(value) || validate6(value);
|
|
15
15
|
const validate15 = (value) => typeof value === "number" && Number.isFinite(value);
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
const
|
|
56
|
-
const
|
|
57
|
-
const
|
|
58
|
-
const
|
|
59
|
-
const
|
|
60
|
-
const
|
|
61
|
-
const validate634 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "fallback_value") && (!Object.hasOwn(value, "fallback_value") || validate2(value["fallback_value"]));
|
|
62
|
-
const validate637 = (value) => validate638(value) || validate6(value);
|
|
63
|
-
const validate638 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "link") && (!Object.hasOwn(value, "link") || validate2(value["link"]));
|
|
64
|
-
const validate641 = (value) => validate642(value) || validate6(value);
|
|
65
|
-
const validate642 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "link") && (!Object.hasOwn(value, "link") || validate2(value["link"])) && (!Object.hasOwn(value, "filename") || validate8(value["filename"]));
|
|
16
|
+
const validate17 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "amount") && Object.hasOwn(value, "currency") && Object.hasOwn(value, "category") && (!Object.hasOwn(value, "amount") || validate18(value["amount"])) && (!Object.hasOwn(value, "currency") || validate2(value["currency"])) && (!Object.hasOwn(value, "category") || validate20(value["category"]));
|
|
17
|
+
const validate18 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^\\d+\\.\\d+$", "u")).test(value);
|
|
18
|
+
const validate20 = (value) => typeof value === "string" && (value === "marketing" || value === "utility" || value === "authentication" || value === "service");
|
|
19
|
+
const validate36 = (value) => validate37(value) || validate6(value);
|
|
20
|
+
const validate37 = (value) => typeof value === "boolean";
|
|
21
|
+
const validate42 = (value) => validate43(value) || validate6(value);
|
|
22
|
+
const validate43 = (value) => typeof value === "string" && (value === "marketing" || value === "utility" || value === "authentication");
|
|
23
|
+
const validate48 = (value) => validate49(value) || validate6(value);
|
|
24
|
+
const validate49 = (value) => Array.isArray(value) && Array.isArray(value) && value.every(validate2);
|
|
25
|
+
const validate76 = (value) => validate77(value) || validate6(value);
|
|
26
|
+
const validate77 = (value) => typeof value === "string" && (value === "inbound" || value === "outbound");
|
|
27
|
+
const validate90 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate91(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate3(value["data"]));
|
|
28
|
+
const validate91 = (value) => typeof value === "string" && value === "message.delivered";
|
|
29
|
+
const validate180 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate181(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate3(value["data"]));
|
|
30
|
+
const validate181 = (value) => typeof value === "string" && value === "message.read";
|
|
31
|
+
const validate270 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate271(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate3(value["data"]));
|
|
32
|
+
const validate271 = (value) => typeof value === "string" && value === "message.failed";
|
|
33
|
+
const validate360 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate361(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate363(value["data"]));
|
|
34
|
+
const validate361 = (value) => typeof value === "string" && value === "message.bounced";
|
|
35
|
+
const validate363 = (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, "estimatedProviderCost") || validate17(value["estimatedProviderCost"])) && (!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") || validate36(value["isBillable"])) && (!Object.hasOwn(value, "messageType") || validate8(value["messageType"])) && (!Object.hasOwn(value, "templateCategory") || validate42(value["templateCategory"])) && (!Object.hasOwn(value, "subject") || validate8(value["subject"])) && (!Object.hasOwn(value, "toEmails") || validate48(value["toEmails"])) && (!Object.hasOwn(value, "providerMessageId") || validate8(value["providerMessageId"])) && (!Object.hasOwn(value, "waId") || validate8(value["waId"])) && (!Object.hasOwn(value, "hasAttachments") || validate36(value["hasAttachments"])) && (!Object.hasOwn(value, "isAutoReply") || validate36(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") || validate76(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"]));
|
|
36
|
+
const validate446 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate447(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate363(value["data"]));
|
|
37
|
+
const validate447 = (value) => typeof value === "string" && value === "message.complained";
|
|
38
|
+
const validate532 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate533(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate535(value["data"]));
|
|
39
|
+
const validate533 = (value) => typeof value === "string" && value === "message.received";
|
|
40
|
+
const validate535 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "channel") && Object.hasOwn(value, "disposition") && Object.hasOwn(value, "reason") && 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, "estimatedProviderCost") || validate17(value["estimatedProviderCost"])) && (!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") || validate36(value["isBillable"])) && (!Object.hasOwn(value, "messageType") || validate8(value["messageType"])) && (!Object.hasOwn(value, "templateCategory") || validate42(value["templateCategory"])) && (!Object.hasOwn(value, "subject") || validate8(value["subject"])) && (!Object.hasOwn(value, "toEmails") || validate48(value["toEmails"])) && (!Object.hasOwn(value, "providerMessageId") || validate8(value["providerMessageId"])) && (!Object.hasOwn(value, "waId") || validate8(value["waId"])) && (!Object.hasOwn(value, "hasAttachments") || validate36(value["hasAttachments"])) && (!Object.hasOwn(value, "isAutoReply") || validate36(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") || validate76(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, "disposition") || validate620(value["disposition"])) && (!Object.hasOwn(value, "reason") || validate621(value["reason"])) && (!Object.hasOwn(value, "campaign") || validate624(value["campaign"])) && (!Object.hasOwn(value, "replyToMetadata") || validate12(value["replyToMetadata"])) && (!Object.hasOwn(value, "whatsapp") || validate630(value["whatsapp"])) && (!Object.hasOwn(value, "messageId") || validate2(value["messageId"])) && (!Object.hasOwn(value, "organizationId") || validate2(value["organizationId"]));
|
|
41
|
+
const validate620 = (value) => typeof value === "string" && (value === "delivered" || value === "quarantined" || value === "isolated");
|
|
42
|
+
const validate621 = (value) => validate622(value) || validate6(value);
|
|
43
|
+
const validate622 = (value) => typeof value === "string" && (value === "spam" || value === "dmarc" || value === "virus" || value === "virus_unscanned" || value === "verdict_missing" || value === "phishing" || value === "fraud" || value === "prompt_injection");
|
|
44
|
+
const validate624 = (value) => validate625(value) || validate6(value);
|
|
45
|
+
const validate625 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "campaignId") && Object.hasOwn(value, "runId") && (!Object.hasOwn(value, "campaignId") || validate626(value["campaignId"])) && (!Object.hasOwn(value, "runId") || validate627(value["runId"]));
|
|
46
|
+
const validate626 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^camp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
47
|
+
const validate627 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^crun_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
48
|
+
const validate630 = (value) => validate631(value) || validate6(value);
|
|
49
|
+
const validate631 = (value) => isObject(value) && isObject(value) && (!Object.hasOwn(value, "appHandlesFlowSubmission") || validate632(value["appHandlesFlowSubmission"])) && (!Object.hasOwn(value, "text") || validate8(value["text"])) && (!Object.hasOwn(value, "template") || validate636(value["template"])) && (!Object.hasOwn(value, "interactive") || validate689(value["interactive"])) && (!Object.hasOwn(value, "media") || validate789(value["media"])) && (!Object.hasOwn(value, "reaction") || validate812(value["reaction"])) && (!Object.hasOwn(value, "location") || validate820(value["location"])) && (!Object.hasOwn(value, "contacts") || validate826(value["contacts"])) && (!Object.hasOwn(value, "reply") || validate862(value["reply"])) && (!Object.hasOwn(value, "flowResponse") || validate867(value["flowResponse"])) && (!Object.hasOwn(value, "context") || validate874(value["context"]));
|
|
50
|
+
const validate632 = (value) => typeof value === "boolean" && value === true;
|
|
51
|
+
const validate636 = (value) => validate637(value) || validate6(value);
|
|
52
|
+
const validate637 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "name") && Object.hasOwn(value, "language") && Object.hasOwn(value, "components") && (!Object.hasOwn(value, "name") || validate2(value["name"])) && (!Object.hasOwn(value, "language") || validate2(value["language"])) && (!Object.hasOwn(value, "components") || validate640(value["components"]));
|
|
53
|
+
const validate640 = (value) => Array.isArray(value) && Array.isArray(value) && value.every(validate641);
|
|
54
|
+
const validate641 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "parameters") && (!Object.hasOwn(value, "type") || validate642(value["type"])) && (!Object.hasOwn(value, "sub_type") || validate643(value["sub_type"])) && (!Object.hasOwn(value, "index") || validate8(value["index"])) && (!Object.hasOwn(value, "parameters") || validate649(value["parameters"]));
|
|
55
|
+
const validate642 = (value) => typeof value === "string" && (value === "header" || value === "body" || value === "footer" || value === "button");
|
|
56
|
+
const validate643 = (value) => validate644(value) || validate6(value);
|
|
57
|
+
const validate644 = (value) => typeof value === "string" && (value === "url" || value === "quick_reply" || value === "copy_code" || value === "flow");
|
|
58
|
+
const validate649 = (value) => Array.isArray(value) && Array.isArray(value) && value.every(validate650);
|
|
59
|
+
const validate650 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && (!Object.hasOwn(value, "type") || validate651(value["type"])) && (!Object.hasOwn(value, "text") || validate8(value["text"])) && (!Object.hasOwn(value, "currency") || validate655(value["currency"])) && (!Object.hasOwn(value, "date_time") || validate661(value["date_time"])) && (!Object.hasOwn(value, "image") || validate665(value["image"])) && (!Object.hasOwn(value, "document") || validate669(value["document"])) && (!Object.hasOwn(value, "video") || validate665(value["video"])) && (!Object.hasOwn(value, "coupon_code") || validate8(value["coupon_code"])) && (!Object.hasOwn(value, "action") || validate683(value["action"]));
|
|
60
|
+
const validate651 = (value) => typeof value === "string" && (value === "text" || value === "currency" || value === "date_time" || value === "image" || value === "document" || value === "video" || value === "coupon_code" || value === "action");
|
|
66
61
|
const validate655 = (value) => validate656(value) || validate6(value);
|
|
67
|
-
const validate656 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "
|
|
68
|
-
const validate661 = (value) => validate662(value) ||
|
|
69
|
-
const validate662 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "
|
|
70
|
-
const
|
|
71
|
-
const
|
|
72
|
-
const
|
|
73
|
-
const
|
|
74
|
-
const
|
|
75
|
-
const
|
|
76
|
-
const
|
|
77
|
-
const
|
|
78
|
-
const
|
|
79
|
-
const
|
|
80
|
-
const
|
|
81
|
-
const
|
|
82
|
-
const
|
|
83
|
-
const
|
|
84
|
-
const
|
|
85
|
-
const
|
|
86
|
-
const
|
|
87
|
-
const
|
|
88
|
-
const
|
|
89
|
-
const
|
|
90
|
-
const
|
|
91
|
-
const
|
|
92
|
-
const
|
|
93
|
-
const
|
|
94
|
-
const
|
|
95
|
-
const
|
|
96
|
-
const
|
|
97
|
-
const
|
|
98
|
-
const
|
|
99
|
-
const
|
|
100
|
-
const
|
|
101
|
-
const
|
|
102
|
-
const
|
|
103
|
-
const
|
|
104
|
-
const
|
|
105
|
-
const
|
|
106
|
-
const
|
|
107
|
-
const
|
|
108
|
-
const
|
|
109
|
-
const
|
|
110
|
-
const
|
|
111
|
-
const
|
|
112
|
-
const
|
|
113
|
-
const
|
|
114
|
-
const
|
|
115
|
-
const
|
|
116
|
-
const
|
|
117
|
-
const
|
|
118
|
-
const
|
|
119
|
-
const
|
|
120
|
-
const
|
|
121
|
-
const
|
|
122
|
-
const
|
|
123
|
-
const
|
|
124
|
-
const
|
|
125
|
-
const
|
|
126
|
-
const
|
|
127
|
-
const
|
|
128
|
-
const
|
|
129
|
-
const
|
|
130
|
-
const
|
|
131
|
-
const
|
|
132
|
-
const
|
|
133
|
-
const
|
|
134
|
-
const
|
|
135
|
-
const
|
|
136
|
-
const
|
|
137
|
-
const
|
|
138
|
-
const
|
|
139
|
-
const
|
|
140
|
-
const
|
|
141
|
-
const
|
|
142
|
-
const
|
|
143
|
-
const
|
|
144
|
-
const
|
|
145
|
-
const
|
|
146
|
-
const
|
|
147
|
-
const
|
|
148
|
-
const
|
|
149
|
-
const
|
|
150
|
-
const
|
|
151
|
-
const
|
|
152
|
-
const
|
|
153
|
-
const
|
|
154
|
-
const
|
|
155
|
-
const
|
|
156
|
-
const
|
|
157
|
-
const
|
|
158
|
-
const
|
|
159
|
-
const
|
|
160
|
-
const
|
|
161
|
-
const
|
|
162
|
-
const
|
|
163
|
-
const
|
|
164
|
-
const
|
|
165
|
-
const
|
|
166
|
-
const
|
|
167
|
-
const
|
|
168
|
-
const
|
|
169
|
-
const
|
|
170
|
-
const
|
|
171
|
-
const
|
|
172
|
-
const
|
|
173
|
-
const
|
|
174
|
-
const
|
|
175
|
-
const
|
|
176
|
-
const
|
|
177
|
-
const
|
|
178
|
-
const
|
|
179
|
-
const
|
|
180
|
-
const
|
|
181
|
-
const
|
|
182
|
-
const
|
|
183
|
-
const
|
|
184
|
-
const
|
|
185
|
-
const
|
|
186
|
-
const
|
|
187
|
-
const
|
|
188
|
-
const
|
|
189
|
-
const
|
|
190
|
-
const
|
|
191
|
-
const
|
|
192
|
-
const
|
|
193
|
-
const
|
|
194
|
-
const
|
|
195
|
-
const
|
|
196
|
-
const
|
|
197
|
-
const
|
|
198
|
-
const
|
|
199
|
-
const
|
|
200
|
-
const
|
|
201
|
-
const
|
|
202
|
-
const
|
|
203
|
-
const
|
|
204
|
-
const
|
|
205
|
-
const
|
|
206
|
-
const
|
|
207
|
-
const
|
|
208
|
-
const validate1279 = (value) =>
|
|
209
|
-
const
|
|
210
|
-
const
|
|
211
|
-
const
|
|
212
|
-
const
|
|
213
|
-
const
|
|
214
|
-
const
|
|
215
|
-
const
|
|
216
|
-
const
|
|
217
|
-
const
|
|
218
|
-
const
|
|
219
|
-
const
|
|
220
|
-
const
|
|
221
|
-
const
|
|
222
|
-
const
|
|
223
|
-
const
|
|
224
|
-
const validate1327 = (value) =>
|
|
225
|
-
const
|
|
226
|
-
const
|
|
227
|
-
const
|
|
228
|
-
const
|
|
229
|
-
const
|
|
230
|
-
const
|
|
231
|
-
const
|
|
232
|
-
const
|
|
233
|
-
const
|
|
234
|
-
const
|
|
235
|
-
const
|
|
236
|
-
const
|
|
237
|
-
const
|
|
238
|
-
const
|
|
239
|
-
const
|
|
240
|
-
const
|
|
241
|
-
const
|
|
242
|
-
const
|
|
243
|
-
const
|
|
244
|
-
const
|
|
245
|
-
const
|
|
246
|
-
const
|
|
247
|
-
const
|
|
248
|
-
const
|
|
249
|
-
const
|
|
250
|
-
const
|
|
251
|
-
const
|
|
252
|
-
const
|
|
253
|
-
const
|
|
254
|
-
const
|
|
255
|
-
const
|
|
256
|
-
const
|
|
257
|
-
const
|
|
258
|
-
const
|
|
259
|
-
const
|
|
260
|
-
const
|
|
261
|
-
const
|
|
262
|
-
const
|
|
263
|
-
const
|
|
264
|
-
const
|
|
265
|
-
const
|
|
266
|
-
const
|
|
267
|
-
const
|
|
268
|
-
const
|
|
269
|
-
const
|
|
270
|
-
const
|
|
271
|
-
const
|
|
272
|
-
const
|
|
273
|
-
const
|
|
274
|
-
const
|
|
275
|
-
const
|
|
276
|
-
const
|
|
277
|
-
const
|
|
278
|
-
const
|
|
279
|
-
const
|
|
280
|
-
const
|
|
281
|
-
const
|
|
282
|
-
const
|
|
283
|
-
const
|
|
284
|
-
const
|
|
285
|
-
const
|
|
286
|
-
const
|
|
287
|
-
const
|
|
288
|
-
const
|
|
289
|
-
const
|
|
290
|
-
const
|
|
291
|
-
const
|
|
292
|
-
const
|
|
293
|
-
const
|
|
294
|
-
const
|
|
295
|
-
const
|
|
296
|
-
const
|
|
297
|
-
const
|
|
298
|
-
const
|
|
299
|
-
const
|
|
300
|
-
const
|
|
301
|
-
const
|
|
302
|
-
const
|
|
303
|
-
const
|
|
304
|
-
const
|
|
305
|
-
const
|
|
306
|
-
const
|
|
307
|
-
const
|
|
308
|
-
const
|
|
309
|
-
const
|
|
310
|
-
const
|
|
311
|
-
const
|
|
312
|
-
const
|
|
313
|
-
const
|
|
314
|
-
const
|
|
315
|
-
const
|
|
316
|
-
const
|
|
317
|
-
const
|
|
318
|
-
const
|
|
319
|
-
const
|
|
320
|
-
const
|
|
321
|
-
const
|
|
322
|
-
const
|
|
323
|
-
const
|
|
324
|
-
const
|
|
325
|
-
const
|
|
326
|
-
const
|
|
327
|
-
const
|
|
328
|
-
const
|
|
329
|
-
const
|
|
330
|
-
const
|
|
331
|
-
const
|
|
332
|
-
const
|
|
333
|
-
const
|
|
334
|
-
const
|
|
335
|
-
const
|
|
336
|
-
const
|
|
337
|
-
const
|
|
338
|
-
const
|
|
62
|
+
const validate656 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "fallback_value") && Object.hasOwn(value, "code") && Object.hasOwn(value, "amount_1000") && (!Object.hasOwn(value, "fallback_value") || validate2(value["fallback_value"])) && (!Object.hasOwn(value, "code") || validate2(value["code"])) && (!Object.hasOwn(value, "amount_1000") || validate15(value["amount_1000"]));
|
|
63
|
+
const validate661 = (value) => validate662(value) || validate6(value);
|
|
64
|
+
const validate662 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "fallback_value") && (!Object.hasOwn(value, "fallback_value") || validate2(value["fallback_value"]));
|
|
65
|
+
const validate665 = (value) => validate666(value) || validate6(value);
|
|
66
|
+
const validate666 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "link") && (!Object.hasOwn(value, "link") || validate2(value["link"]));
|
|
67
|
+
const validate669 = (value) => validate670(value) || validate6(value);
|
|
68
|
+
const validate670 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "link") && (!Object.hasOwn(value, "link") || validate2(value["link"])) && (!Object.hasOwn(value, "filename") || validate8(value["filename"]));
|
|
69
|
+
const validate683 = (value) => validate684(value) || validate6(value);
|
|
70
|
+
const validate684 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "flow_token") && (!Object.hasOwn(value, "flow_token") || validate2(value["flow_token"])) && (!Object.hasOwn(value, "flow_action_data") || validate12(value["flow_action_data"]));
|
|
71
|
+
const validate689 = (value) => validate690(value) || validate725(value) || validate741(value) || validate774(value);
|
|
72
|
+
const validate690 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "body") && Object.hasOwn(value, "buttons") && (!Object.hasOwn(value, "type") || validate691(value["type"])) && (!Object.hasOwn(value, "header") || validate692(value["header"])) && (!Object.hasOwn(value, "body") || validate719(value["body"])) && (!Object.hasOwn(value, "footer") || validate695(value["footer"])) && (!Object.hasOwn(value, "buttons") || validate721(value["buttons"]));
|
|
73
|
+
const validate691 = (value) => typeof value === "string" && value === "buttons";
|
|
74
|
+
const validate692 = (value) => validate693(value) || validate696(value) || validate703(value) || validate710(value);
|
|
75
|
+
const validate693 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "text") && (!Object.hasOwn(value, "type") || validate694(value["type"])) && (!Object.hasOwn(value, "text") || validate695(value["text"]));
|
|
76
|
+
const validate694 = (value) => typeof value === "string" && value === "text";
|
|
77
|
+
const validate695 = (value) => typeof value === "string" && typeof value === "string" && Array.from(value).length >= 1 && typeof value === "string" && Array.from(value).length <= 60;
|
|
78
|
+
const validate696 = (value) => validate697(value) || validate700(value);
|
|
79
|
+
const validate697 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "url") && (!Object.hasOwn(value, "type") || validate698(value["type"])) && (!Object.hasOwn(value, "url") || validate2(value["url"]));
|
|
80
|
+
const validate698 = (value) => typeof value === "string" && value === "image";
|
|
81
|
+
const validate700 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "mediaId") && (!Object.hasOwn(value, "type") || validate698(value["type"])) && (!Object.hasOwn(value, "mediaId") || validate702(value["mediaId"]));
|
|
82
|
+
const validate702 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
83
|
+
const validate703 = (value) => validate704(value) || validate707(value);
|
|
84
|
+
const validate704 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "url") && (!Object.hasOwn(value, "type") || validate705(value["type"])) && (!Object.hasOwn(value, "url") || validate2(value["url"]));
|
|
85
|
+
const validate705 = (value) => typeof value === "string" && value === "video";
|
|
86
|
+
const validate707 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "mediaId") && (!Object.hasOwn(value, "type") || validate705(value["type"])) && (!Object.hasOwn(value, "mediaId") || validate702(value["mediaId"]));
|
|
87
|
+
const validate710 = (value) => validate711(value) || validate715(value);
|
|
88
|
+
const validate711 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "url") && (!Object.hasOwn(value, "type") || validate712(value["type"])) && (!Object.hasOwn(value, "filename") || validate713(value["filename"])) && (!Object.hasOwn(value, "url") || validate2(value["url"]));
|
|
89
|
+
const validate712 = (value) => typeof value === "string" && value === "document";
|
|
90
|
+
const validate713 = (value) => typeof value === "string" && typeof value === "string" && Array.from(value).length >= 1 && typeof value === "string" && Array.from(value).length <= 255;
|
|
91
|
+
const validate715 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "mediaId") && (!Object.hasOwn(value, "type") || validate712(value["type"])) && (!Object.hasOwn(value, "filename") || validate713(value["filename"])) && (!Object.hasOwn(value, "mediaId") || validate702(value["mediaId"]));
|
|
92
|
+
const validate719 = (value) => typeof value === "string" && typeof value === "string" && Array.from(value).length >= 1 && typeof value === "string" && Array.from(value).length <= 1024;
|
|
93
|
+
const validate721 = (value) => Array.isArray(value) && Array.isArray(value) && value.length >= 1 && Array.isArray(value) && value.length <= 3 && Array.isArray(value) && value.every(validate722);
|
|
94
|
+
const validate722 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "id") && Object.hasOwn(value, "title") && (!Object.hasOwn(value, "id") || validate723(value["id"])) && (!Object.hasOwn(value, "title") || validate724(value["title"]));
|
|
95
|
+
const validate723 = (value) => typeof value === "string" && typeof value === "string" && Array.from(value).length >= 1 && typeof value === "string" && Array.from(value).length <= 256;
|
|
96
|
+
const validate724 = (value) => typeof value === "string" && typeof value === "string" && Array.from(value).length >= 1 && typeof value === "string" && Array.from(value).length <= 20;
|
|
97
|
+
const validate725 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "body") && Object.hasOwn(value, "button") && Object.hasOwn(value, "sections") && (!Object.hasOwn(value, "type") || validate726(value["type"])) && (!Object.hasOwn(value, "header") || validate693(value["header"])) && (!Object.hasOwn(value, "body") || validate730(value["body"])) && (!Object.hasOwn(value, "footer") || validate695(value["footer"])) && (!Object.hasOwn(value, "button") || validate724(value["button"])) && (!Object.hasOwn(value, "sections") || validate733(value["sections"]));
|
|
98
|
+
const validate726 = (value) => typeof value === "string" && value === "list";
|
|
99
|
+
const validate730 = (value) => typeof value === "string" && typeof value === "string" && Array.from(value).length >= 1 && typeof value === "string" && Array.from(value).length <= 4096;
|
|
100
|
+
const validate733 = (value) => Array.isArray(value) && Array.isArray(value) && value.length >= 1 && Array.isArray(value) && value.length <= 10 && Array.isArray(value) && value.every(validate734);
|
|
101
|
+
const validate734 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "rows") && (!Object.hasOwn(value, "title") || validate735(value["title"])) && (!Object.hasOwn(value, "rows") || validate736(value["rows"]));
|
|
102
|
+
const validate735 = (value) => typeof value === "string" && typeof value === "string" && Array.from(value).length >= 1 && typeof value === "string" && Array.from(value).length <= 24;
|
|
103
|
+
const validate736 = (value) => Array.isArray(value) && Array.isArray(value) && value.length >= 1 && Array.isArray(value) && value.every(validate737);
|
|
104
|
+
const validate737 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "id") && Object.hasOwn(value, "title") && (!Object.hasOwn(value, "id") || validate738(value["id"])) && (!Object.hasOwn(value, "title") || validate735(value["title"])) && (!Object.hasOwn(value, "description") || validate740(value["description"]));
|
|
105
|
+
const validate738 = (value) => typeof value === "string" && typeof value === "string" && Array.from(value).length >= 1 && typeof value === "string" && Array.from(value).length <= 200;
|
|
106
|
+
const validate740 = (value) => typeof value === "string" && typeof value === "string" && Array.from(value).length >= 1 && typeof value === "string" && Array.from(value).length <= 72;
|
|
107
|
+
const validate741 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "body") && Object.hasOwn(value, "displayText") && Object.hasOwn(value, "url") && (!Object.hasOwn(value, "type") || validate742(value["type"])) && (!Object.hasOwn(value, "header") || validate692(value["header"])) && (!Object.hasOwn(value, "body") || validate719(value["body"])) && (!Object.hasOwn(value, "footer") || validate695(value["footer"])) && (!Object.hasOwn(value, "displayText") || validate724(value["displayText"])) && (!Object.hasOwn(value, "url") || validate2(value["url"]));
|
|
108
|
+
const validate742 = (value) => typeof value === "string" && value === "cta_url";
|
|
109
|
+
const validate774 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "body") && Object.hasOwn(value, "flowId") && Object.hasOwn(value, "cta") && Object.hasOwn(value, "flowVersionId") && Object.hasOwn(value, "providerFlowId") && (!Object.hasOwn(value, "type") || validate775(value["type"])) && (!Object.hasOwn(value, "header") || validate693(value["header"])) && (!Object.hasOwn(value, "body") || validate719(value["body"])) && (!Object.hasOwn(value, "footer") || validate695(value["footer"])) && (!Object.hasOwn(value, "flowId") || validate781(value["flowId"])) && (!Object.hasOwn(value, "cta") || validate782(value["cta"])) && (!Object.hasOwn(value, "token") || validate719(value["token"])) && (!Object.hasOwn(value, "action") || validate784(value["action"])) && (!Object.hasOwn(value, "screen") || validate785(value["screen"])) && (!Object.hasOwn(value, "data") || validate12(value["data"])) && (!Object.hasOwn(value, "flowVersionId") || validate787(value["flowVersionId"])) && (!Object.hasOwn(value, "providerFlowId") || validate2(value["providerFlowId"]));
|
|
110
|
+
const validate775 = (value) => typeof value === "string" && value === "flow";
|
|
111
|
+
const validate781 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^waflow_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
112
|
+
const validate782 = (value) => typeof value === "string" && typeof value === "string" && Array.from(value).length >= 1 && typeof value === "string" && Array.from(value).length <= 30;
|
|
113
|
+
const validate784 = (value) => typeof value === "string" && (value === "navigate" || value === "data_exchange");
|
|
114
|
+
const validate785 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^[A-Za-z_]{1,100}$", "u")).test(value);
|
|
115
|
+
const validate787 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^wafver_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
116
|
+
const validate789 = (value) => validate790(value) || validate6(value);
|
|
117
|
+
const validate790 = (value) => validate791(value) || validate796(value) || validate801(value);
|
|
118
|
+
const validate791 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "url") && (!Object.hasOwn(value, "type") || validate792(value["type"])) && (!Object.hasOwn(value, "url") || validate2(value["url"])) && (!Object.hasOwn(value, "caption") || validate2(value["caption"])) && (!Object.hasOwn(value, "filename") || validate2(value["filename"]));
|
|
119
|
+
const validate792 = (value) => typeof value === "string" && (value === "image" || value === "video" || value === "audio" || value === "document" || value === "sticker");
|
|
120
|
+
const validate796 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "mediaId") && (!Object.hasOwn(value, "type") || validate792(value["type"])) && (!Object.hasOwn(value, "mediaId") || validate702(value["mediaId"])) && (!Object.hasOwn(value, "caption") || validate2(value["caption"])) && (!Object.hasOwn(value, "filename") || validate2(value["filename"]));
|
|
121
|
+
const validate801 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "providerMediaId") && (!Object.hasOwn(value, "type") || validate792(value["type"])) && (!Object.hasOwn(value, "providerMediaId") || validate2(value["providerMediaId"])) && (!Object.hasOwn(value, "mimeType") || validate8(value["mimeType"])) && (!Object.hasOwn(value, "caption") || validate8(value["caption"])) && (!Object.hasOwn(value, "filename") || validate2(value["filename"]));
|
|
122
|
+
const validate812 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "messageId") && Object.hasOwn(value, "providerMessageId") && Object.hasOwn(value, "emoji") && (!Object.hasOwn(value, "messageId") || validate813(value["messageId"])) && (!Object.hasOwn(value, "providerMessageId") || validate2(value["providerMessageId"])) && (!Object.hasOwn(value, "emoji") || validate8(value["emoji"]));
|
|
123
|
+
const validate813 = (value) => validate814(value) || validate6(value);
|
|
124
|
+
const validate814 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
125
|
+
const validate820 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "latitude") && Object.hasOwn(value, "longitude") && (!Object.hasOwn(value, "latitude") || validate15(value["latitude"])) && (!Object.hasOwn(value, "longitude") || validate15(value["longitude"])) && (!Object.hasOwn(value, "name") || validate2(value["name"])) && (!Object.hasOwn(value, "address") || validate2(value["address"])) && (!Object.hasOwn(value, "url") || validate2(value["url"]));
|
|
126
|
+
const validate826 = (value) => Array.isArray(value) && Array.isArray(value) && value.every(validate827);
|
|
127
|
+
const validate827 = (value) => isObject(value) && isObject(value) && (!Object.hasOwn(value, "name") || validate828(value["name"])) && (!Object.hasOwn(value, "phones") || validate835(value["phones"])) && (!Object.hasOwn(value, "emails") || validate840(value["emails"])) && (!Object.hasOwn(value, "urls") || validate844(value["urls"])) && (!Object.hasOwn(value, "org") || validate848(value["org"])) && (!Object.hasOwn(value, "addresses") || validate852(value["addresses"])) && (!Object.hasOwn(value, "birthday") || validate2(value["birthday"]));
|
|
128
|
+
const validate828 = (value) => isObject(value) && isObject(value) && (!Object.hasOwn(value, "formattedName") || validate2(value["formattedName"])) && (!Object.hasOwn(value, "firstName") || validate2(value["firstName"])) && (!Object.hasOwn(value, "lastName") || validate2(value["lastName"])) && (!Object.hasOwn(value, "middleName") || validate2(value["middleName"])) && (!Object.hasOwn(value, "prefix") || validate2(value["prefix"])) && (!Object.hasOwn(value, "suffix") || validate2(value["suffix"]));
|
|
129
|
+
const validate835 = (value) => Array.isArray(value) && Array.isArray(value) && value.every(validate836);
|
|
130
|
+
const validate836 = (value) => isObject(value) && isObject(value) && (!Object.hasOwn(value, "phone") || validate2(value["phone"])) && (!Object.hasOwn(value, "type") || validate2(value["type"])) && (!Object.hasOwn(value, "waId") || validate2(value["waId"]));
|
|
131
|
+
const validate840 = (value) => Array.isArray(value) && Array.isArray(value) && value.every(validate841);
|
|
132
|
+
const validate841 = (value) => isObject(value) && isObject(value) && (!Object.hasOwn(value, "email") || validate2(value["email"])) && (!Object.hasOwn(value, "type") || validate2(value["type"]));
|
|
133
|
+
const validate844 = (value) => Array.isArray(value) && Array.isArray(value) && value.every(validate845);
|
|
134
|
+
const validate845 = (value) => isObject(value) && isObject(value) && (!Object.hasOwn(value, "url") || validate2(value["url"])) && (!Object.hasOwn(value, "type") || validate2(value["type"]));
|
|
135
|
+
const validate848 = (value) => isObject(value) && isObject(value) && (!Object.hasOwn(value, "company") || validate2(value["company"])) && (!Object.hasOwn(value, "department") || validate2(value["department"])) && (!Object.hasOwn(value, "title") || validate2(value["title"]));
|
|
136
|
+
const validate852 = (value) => Array.isArray(value) && Array.isArray(value) && value.every(validate853);
|
|
137
|
+
const validate853 = (value) => isObject(value) && isObject(value) && (!Object.hasOwn(value, "street") || validate2(value["street"])) && (!Object.hasOwn(value, "city") || validate2(value["city"])) && (!Object.hasOwn(value, "state") || validate2(value["state"])) && (!Object.hasOwn(value, "zip") || validate2(value["zip"])) && (!Object.hasOwn(value, "country") || validate2(value["country"])) && (!Object.hasOwn(value, "countryCode") || validate2(value["countryCode"])) && (!Object.hasOwn(value, "type") || validate2(value["type"]));
|
|
138
|
+
const validate862 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "id") && Object.hasOwn(value, "title") && (!Object.hasOwn(value, "type") || validate863(value["type"])) && (!Object.hasOwn(value, "id") || validate2(value["id"])) && (!Object.hasOwn(value, "title") || validate2(value["title"])) && (!Object.hasOwn(value, "description") || validate2(value["description"]));
|
|
139
|
+
const validate863 = (value) => typeof value === "string" && (value === "button" || value === "list" || value === "template_button");
|
|
140
|
+
const validate867 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "flowToken") && Object.hasOwn(value, "response") && (!Object.hasOwn(value, "flowToken") || validate8(value["flowToken"])) && (!Object.hasOwn(value, "submissionHandler") || validate871(value["submissionHandler"])) && (!Object.hasOwn(value, "response") || validate12(value["response"])) && (!Object.hasOwn(value, "body") || validate2(value["body"]));
|
|
141
|
+
const validate871 = (value) => typeof value === "string" && value === "app";
|
|
142
|
+
const validate874 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "messageId") && Object.hasOwn(value, "providerMessageId") && (!Object.hasOwn(value, "messageId") || validate813(value["messageId"])) && (!Object.hasOwn(value, "providerMessageId") || validate2(value["providerMessageId"]));
|
|
143
|
+
const validate882 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate883(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate885(value["data"]));
|
|
144
|
+
const validate883 = (value) => typeof value === "string" && value === "message.opened";
|
|
145
|
+
const validate885 = (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") || validate814(value["messageId"])) && (!Object.hasOwn(value, "organizationId") || validate887(value["organizationId"])) && (!Object.hasOwn(value, "channel") || validate888(value["channel"])) && (!Object.hasOwn(value, "deliveryId") || validate889(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") || validate37(value["firstOpen"])) && (!Object.hasOwn(value, "machine") || validate37(value["machine"])) && (!Object.hasOwn(value, "machineReason") || validate900(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") || validate924(value["campaignId"])) && (!Object.hasOwn(value, "campaignRunId") || validate927(value["campaignRunId"]));
|
|
146
|
+
const validate887 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
147
|
+
const validate888 = (value) => typeof value === "string" && value === "email";
|
|
148
|
+
const validate889 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^mdel_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
149
|
+
const validate900 = (value) => validate901(value) || validate6(value);
|
|
150
|
+
const validate901 = (value) => typeof value === "string" && (value === "google-image-proxy" || value === "apple-mail-privacy" || value === "scanner-user-agent" || value === "scanner-asn" || value === "too-fast");
|
|
151
|
+
const validate924 = (value) => validate626(value) || validate6(value);
|
|
152
|
+
const validate927 = (value) => validate627(value) || validate6(value);
|
|
153
|
+
const validate930 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate931(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate933(value["data"]));
|
|
154
|
+
const validate931 = (value) => typeof value === "string" && value === "message.clicked";
|
|
155
|
+
const validate933 = (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") || validate814(value["messageId"])) && (!Object.hasOwn(value, "organizationId") || validate887(value["organizationId"])) && (!Object.hasOwn(value, "channel") || validate888(value["channel"])) && (!Object.hasOwn(value, "deliveryId") || validate889(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") || validate947(value["linkTags"])) && (!Object.hasOwn(value, "firstClick") || validate37(value["firstClick"])) && (!Object.hasOwn(value, "machine") || validate37(value["machine"])) && (!Object.hasOwn(value, "machineReason") || validate900(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") || validate924(value["campaignId"])) && (!Object.hasOwn(value, "campaignRunId") || validate927(value["campaignRunId"]));
|
|
156
|
+
const validate947 = (value) => isObject(value) && isObject(value) && Object.entries(value).every(([key, item]) => validate49(item));
|
|
157
|
+
const validate982 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate983(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate985(value["data"]));
|
|
158
|
+
const validate983 = (value) => typeof value === "string" && value === "contact.created";
|
|
159
|
+
const validate985 = (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") || validate986(value["contactId"])) && (!Object.hasOwn(value, "status") || validate987(value["status"])) && (!Object.hasOwn(value, "name") || validate2(value["name"])) && (!Object.hasOwn(value, "displayName") || validate989(value["displayName"])) && (!Object.hasOwn(value, "identities") || validate993(value["identities"])) && (!Object.hasOwn(value, "tags") || validate49(value["tags"])) && (!Object.hasOwn(value, "externalId") || validate989(value["externalId"])) && (!Object.hasOwn(value, "createdAt") || validate2(value["createdAt"])) && (!Object.hasOwn(value, "updatedAt") || validate2(value["updatedAt"]));
|
|
160
|
+
const validate986 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
161
|
+
const validate987 = (value) => typeof value === "string" && (value === "active" || value === "paused" || value === "blocked" || value === "archived");
|
|
162
|
+
const validate989 = (value) => validate2(value) || validate6(value) || validate6(value);
|
|
163
|
+
const validate993 = (value) => Array.isArray(value) && Array.isArray(value) && value.every(validate994);
|
|
164
|
+
const validate994 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "identifier") && Object.hasOwn(value, "verified") && (!Object.hasOwn(value, "type") || validate995(value["type"])) && (!Object.hasOwn(value, "identifier") || validate2(value["identifier"])) && (!Object.hasOwn(value, "verified") || validate37(value["verified"]));
|
|
165
|
+
const validate995 = (value) => typeof value === "string" && (value === "email" || value === "phone");
|
|
166
|
+
const validate1006 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1007(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate985(value["data"]));
|
|
167
|
+
const validate1007 = (value) => typeof value === "string" && value === "contact.updated";
|
|
168
|
+
const validate1030 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1031(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate985(value["data"]));
|
|
169
|
+
const validate1031 = (value) => typeof value === "string" && value === "contact.deleted";
|
|
170
|
+
const validate1054 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1055(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1057(value["data"]));
|
|
171
|
+
const validate1055 = (value) => typeof value === "string" && value === "contact.subscribed";
|
|
172
|
+
const validate1057 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "organizationId") && Object.hasOwn(value, "contactId") && Object.hasOwn(value, "topicId") && Object.hasOwn(value, "topicName") && Object.hasOwn(value, "channel") && Object.hasOwn(value, "source") && Object.hasOwn(value, "occurredAt") && (!Object.hasOwn(value, "organizationId") || validate887(value["organizationId"])) && (!Object.hasOwn(value, "contactId") || validate986(value["contactId"])) && (!Object.hasOwn(value, "email") || validate8(value["email"])) && (!Object.hasOwn(value, "topicId") || validate1063(value["topicId"])) && (!Object.hasOwn(value, "topicName") || validate2(value["topicName"])) && (!Object.hasOwn(value, "channel") || validate7(value["channel"])) && (!Object.hasOwn(value, "consentIp") || validate8(value["consentIp"])) && (!Object.hasOwn(value, "consentSource") || validate8(value["consentSource"])) && (!Object.hasOwn(value, "source") || validate2(value["source"])) && (!Object.hasOwn(value, "formKey") || validate8(value["formKey"])) && (!Object.hasOwn(value, "page") || validate8(value["page"])) && (!Object.hasOwn(value, "referrer") || validate8(value["referrer"])) && (!Object.hasOwn(value, "messageId") || validate813(value["messageId"])) && (!Object.hasOwn(value, "campaignId") || validate924(value["campaignId"])) && (!Object.hasOwn(value, "campaignRunId") || validate927(value["campaignRunId"])) && (!Object.hasOwn(value, "occurredAt") || validate2(value["occurredAt"]));
|
|
173
|
+
const validate1063 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^tpc_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
174
|
+
const validate1092 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1093(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1057(value["data"]));
|
|
175
|
+
const validate1093 = (value) => typeof value === "string" && value === "contact.unsubscribed";
|
|
176
|
+
const validate1130 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1131(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1057(value["data"]));
|
|
177
|
+
const validate1131 = (value) => typeof value === "string" && value === "contact.resubscribed";
|
|
178
|
+
const validate1168 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1169(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1171(value["data"]));
|
|
179
|
+
const validate1169 = (value) => typeof value === "string" && value === "contact.consent_changed";
|
|
180
|
+
const validate1171 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "organizationId") && Object.hasOwn(value, "contactId") && Object.hasOwn(value, "identity") && Object.hasOwn(value, "channel") && Object.hasOwn(value, "status") && Object.hasOwn(value, "previousStatus") && Object.hasOwn(value, "source") && Object.hasOwn(value, "capturedAt") && (!Object.hasOwn(value, "organizationId") || validate887(value["organizationId"])) && (!Object.hasOwn(value, "contactId") || validate986(value["contactId"])) && (!Object.hasOwn(value, "identity") || validate1174(value["identity"])) && (!Object.hasOwn(value, "channel") || validate7(value["channel"])) && (!Object.hasOwn(value, "status") || validate1179(value["status"])) && (!Object.hasOwn(value, "previousStatus") || validate1180(value["previousStatus"])) && (!Object.hasOwn(value, "source") || validate2(value["source"])) && (!Object.hasOwn(value, "capturedAt") || validate2(value["capturedAt"]));
|
|
181
|
+
const validate1174 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "id") && Object.hasOwn(value, "type") && Object.hasOwn(value, "identifier") && (!Object.hasOwn(value, "id") || validate1175(value["id"])) && (!Object.hasOwn(value, "type") || validate995(value["type"])) && (!Object.hasOwn(value, "identifier") || validate2(value["identifier"]));
|
|
182
|
+
const validate1175 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^cident_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
183
|
+
const validate1179 = (value) => typeof value === "string" && (value === "opted_in" || value === "opted_out");
|
|
184
|
+
const validate1180 = (value) => validate1179(value) || validate6(value);
|
|
185
|
+
const validate1185 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1186(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1188(value["data"]));
|
|
186
|
+
const validate1186 = (value) => typeof value === "string" && value === "conversation.created";
|
|
187
|
+
const validate1188 = (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") || validate1189(value["conversationId"])) && (!Object.hasOwn(value, "organizationId") || validate887(value["organizationId"])) && (!Object.hasOwn(value, "title") || validate989(value["title"])) && (!Object.hasOwn(value, "channels") || validate1195(value["channels"])) && (!Object.hasOwn(value, "primaryChannel") || validate7(value["primaryChannel"])) && (!Object.hasOwn(value, "status") || validate1198(value["status"])) && (!Object.hasOwn(value, "primaryContactId") || validate1199(value["primaryContactId"])) && (!Object.hasOwn(value, "createdAt") || validate2(value["createdAt"])) && (!Object.hasOwn(value, "updatedAt") || validate2(value["updatedAt"]));
|
|
188
|
+
const validate1189 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^conv_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
189
|
+
const validate1195 = (value) => Array.isArray(value) && Array.isArray(value) && value.every(validate7);
|
|
190
|
+
const validate1198 = (value) => typeof value === "string" && (value === "active" || value === "waiting" || value === "resolved" || value === "escalated" || value === "archived");
|
|
191
|
+
const validate1199 = (value) => validate986(value) || validate6(value) || validate6(value);
|
|
192
|
+
const validate1205 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1206(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1188(value["data"]));
|
|
193
|
+
const validate1206 = (value) => typeof value === "string" && value === "conversation.updated";
|
|
194
|
+
const validate1225 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1226(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1188(value["data"]));
|
|
195
|
+
const validate1226 = (value) => typeof value === "string" && value === "conversation.archived";
|
|
196
|
+
const validate1245 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1246(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1248(value["data"]));
|
|
197
|
+
const validate1246 = (value) => typeof value === "string" && value === "webhook.created";
|
|
198
|
+
const validate1248 = (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") || validate1249(value["webhookId"])) && (!Object.hasOwn(value, "organizationId") || validate887(value["organizationId"])) && (!Object.hasOwn(value, "name") || validate2(value["name"])) && (!Object.hasOwn(value, "url") || validate2(value["url"])) && (!Object.hasOwn(value, "eventTypes") || validate49(value["eventTypes"])) && (!Object.hasOwn(value, "channels") || validate48(value["channels"])) && (!Object.hasOwn(value, "status") || validate1259(value["status"])) && (!Object.hasOwn(value, "createdAt") || validate2(value["createdAt"])) && (!Object.hasOwn(value, "updatedAt") || validate2(value["updatedAt"]));
|
|
199
|
+
const validate1249 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^wep_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
200
|
+
const validate1259 = (value) => typeof value === "string" && (value === "active" || value === "disabled");
|
|
201
|
+
const validate1262 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1263(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1248(value["data"]));
|
|
202
|
+
const validate1263 = (value) => typeof value === "string" && value === "webhook.updated";
|
|
203
|
+
const validate1279 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1280(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1248(value["data"]));
|
|
204
|
+
const validate1280 = (value) => typeof value === "string" && value === "webhook.deleted";
|
|
205
|
+
const validate1296 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1297(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate12(value["data"]));
|
|
206
|
+
const validate1297 = (value) => typeof value === "string" && value === "webhook.test";
|
|
207
|
+
const validate1300 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1301(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1303(value["data"]));
|
|
208
|
+
const validate1301 = (value) => typeof value === "string" && value === "domain.updated";
|
|
209
|
+
const validate1303 = (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") || validate1304(value["domainId"])) && (!Object.hasOwn(value, "organizationId") || validate887(value["organizationId"])) && (!Object.hasOwn(value, "domain") || validate2(value["domain"])) && (!Object.hasOwn(value, "previousPhase") || validate1307(value["previousPhase"])) && (!Object.hasOwn(value, "phase") || validate1307(value["phase"])) && (!Object.hasOwn(value, "dns") || validate1309(value["dns"])) && (!Object.hasOwn(value, "provider") || validate1316(value["provider"])) && (!Object.hasOwn(value, "operationId") || validate1326(value["operationId"])) && (!Object.hasOwn(value, "checkedAt") || validate8(value["checkedAt"])) && (!Object.hasOwn(value, "nextCheckAt") || validate8(value["nextCheckAt"])) && (!Object.hasOwn(value, "failure") || validate1335(value["failure"])) && (!Object.hasOwn(value, "updatedAt") || validate2(value["updatedAt"]));
|
|
210
|
+
const validate1304 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^dom_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
211
|
+
const validate1307 = (value) => typeof value === "string" && (value === "dns-setup" || value === "provisioning" || value === "verifying" || value === "ready" || value === "degraded" || value === "failed");
|
|
212
|
+
const validate1309 = (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") || validate37(value["observed"])) && (!Object.hasOwn(value, "total") || validate1311(value["total"])) && (!Object.hasOwn(value, "satisfied") || validate1311(value["satisfied"])) && (!Object.hasOwn(value, "missing") || validate1311(value["missing"])) && (!Object.hasOwn(value, "mismatch") || validate1311(value["mismatch"])) && (!Object.hasOwn(value, "unknown") || validate1311(value["unknown"]));
|
|
213
|
+
const validate1311 = (value) => typeof value === "number" && Number.isInteger(value) && typeof value === "number" && value >= -0x1fffffffffffff && typeof value === "number" && value <= 0x1fffffffffffff;
|
|
214
|
+
const validate1316 = (value) => validate1317(value) || validate6(value);
|
|
215
|
+
const validate1317 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "identity") && (!Object.hasOwn(value, "identity") || validate1318(value["identity"])) && (!Object.hasOwn(value, "dkim") || validate1319(value["dkim"])) && (!Object.hasOwn(value, "mailFrom") || validate1319(value["mailFrom"]));
|
|
216
|
+
const validate1318 = (value) => typeof value === "string" && (value === "pending" || value === "verified" || value === "failed" || value === "unknown");
|
|
217
|
+
const validate1319 = (value) => validate1318(value) || validate6(value);
|
|
218
|
+
const validate1326 = (value) => validate1327(value) || validate6(value);
|
|
219
|
+
const validate1327 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^op_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
220
|
+
const validate1335 = (value) => validate1336(value) || validate6(value);
|
|
221
|
+
const validate1336 = (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"]));
|
|
222
|
+
const validate1342 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1343(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1345(value["data"]));
|
|
223
|
+
const validate1343 = (value) => typeof value === "string" && value === "domain.warming.updated";
|
|
224
|
+
const validate1345 = (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") || validate1350(value["reason"])) && (!Object.hasOwn(value, "status") || validate1351(value["status"])) && (!Object.hasOwn(value, "holdReason") || validate8(value["holdReason"])) && (!Object.hasOwn(value, "batch") || validate1355(value["batch"])) && (!Object.hasOwn(value, "updatedAt") || validate2(value["updatedAt"]));
|
|
225
|
+
const validate1350 = (value) => typeof value === "string" && (value === "plan-created" || value === "policy-updated" || value === "window-opened" || value === "window-cancelled" || value === "paused" || value === "resumed" || value === "held" || value === "completed");
|
|
226
|
+
const validate1351 = (value) => typeof value === "string" && (value === "active" || value === "paused" || value === "completed");
|
|
227
|
+
const validate1355 = (value) => validate1356(value) || validate6(value);
|
|
228
|
+
const validate1356 = (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"]));
|
|
229
|
+
const validate1366 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1367(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1369(value["data"]));
|
|
230
|
+
const validate1367 = (value) => typeof value === "string" && value === "email.sending.paused";
|
|
231
|
+
const validate1369 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "organizationId") && Object.hasOwn(value, "namespaceId") && Object.hasOwn(value, "channel") && Object.hasOwn(value, "occurredAt") && (!Object.hasOwn(value, "organizationId") || validate887(value["organizationId"])) && (!Object.hasOwn(value, "namespaceId") || validate1371(value["namespaceId"])) && (!Object.hasOwn(value, "channel") || validate888(value["channel"])) && (!Object.hasOwn(value, "occurredAt") || validate2(value["occurredAt"]));
|
|
232
|
+
const validate1371 = (value) => validate1372(value) || validate6(value);
|
|
233
|
+
const validate1372 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^ns_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
234
|
+
const validate1376 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1377(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1369(value["data"]));
|
|
235
|
+
const validate1377 = (value) => typeof value === "string" && value === "email.sending.resumed";
|
|
236
|
+
const validate1386 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1387(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1389(value["data"]));
|
|
237
|
+
const validate1387 = (value) => typeof value === "string" && value === "template.registration.updated";
|
|
238
|
+
const validate1389 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "id") && Object.hasOwn(value, "templateId") && Object.hasOwn(value, "publicationId") && Object.hasOwn(value, "templateChannelVariantId") && Object.hasOwn(value, "target") && Object.hasOwn(value, "name") && Object.hasOwn(value, "language") && Object.hasOwn(value, "status") && Object.hasOwn(value, "pendingTemplateChannelVariantId") && Object.hasOwn(value, "category") && Object.hasOwn(value, "providerCategory") && Object.hasOwn(value, "providerTemplateId") && Object.hasOwn(value, "reason") && Object.hasOwn(value, "submittedAt") && Object.hasOwn(value, "statusChangedAt") && Object.hasOwn(value, "createdAt") && Object.hasOwn(value, "updatedAt") && Object.hasOwn(value, "organizationId") && Object.hasOwn(value, "previousStatus") && (!Object.hasOwn(value, "id") || validate1390(value["id"])) && (!Object.hasOwn(value, "templateId") || validate1391(value["templateId"])) && (!Object.hasOwn(value, "publicationId") || validate1392(value["publicationId"])) && (!Object.hasOwn(value, "templateChannelVariantId") || validate1393(value["templateChannelVariantId"])) && (!Object.hasOwn(value, "target") || validate1394(value["target"])) && (!Object.hasOwn(value, "name") || validate2(value["name"])) && (!Object.hasOwn(value, "language") || validate2(value["language"])) && (!Object.hasOwn(value, "status") || validate1404(value["status"])) && (!Object.hasOwn(value, "pendingTemplateChannelVariantId") || validate1405(value["pendingTemplateChannelVariantId"])) && (!Object.hasOwn(value, "category") || validate1408(value["category"])) && (!Object.hasOwn(value, "providerCategory") || validate1409(value["providerCategory"])) && (!Object.hasOwn(value, "providerTemplateId") || validate8(value["providerTemplateId"])) && (!Object.hasOwn(value, "reason") || validate8(value["reason"])) && (!Object.hasOwn(value, "submittedAt") || validate8(value["submittedAt"])) && (!Object.hasOwn(value, "statusChangedAt") || validate2(value["statusChangedAt"])) && (!Object.hasOwn(value, "createdAt") || validate2(value["createdAt"])) && (!Object.hasOwn(value, "updatedAt") || validate2(value["updatedAt"])) && (!Object.hasOwn(value, "organizationId") || validate887(value["organizationId"])) && (!Object.hasOwn(value, "previousStatus") || validate1404(value["previousStatus"]));
|
|
239
|
+
const validate1390 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^treg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
240
|
+
const validate1391 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
241
|
+
const validate1392 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^tpub_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
242
|
+
const validate1393 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^tvar_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
243
|
+
const validate1394 = (value) => validate1395(value) || validate1398(value);
|
|
244
|
+
const validate1395 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "provider") && Object.hasOwn(value, "wabaId") && (!Object.hasOwn(value, "provider") || validate1396(value["provider"])) && (!Object.hasOwn(value, "wabaId") || validate2(value["wabaId"]));
|
|
245
|
+
const validate1396 = (value) => typeof value === "string" && value === "whatsapp";
|
|
246
|
+
const validate1398 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "provider") && Object.hasOwn(value, "entityId") && Object.hasOwn(value, "headerId") && (!Object.hasOwn(value, "provider") || validate1399(value["provider"])) && (!Object.hasOwn(value, "entityId") || validate2(value["entityId"])) && (!Object.hasOwn(value, "headerId") || validate2(value["headerId"]));
|
|
247
|
+
const validate1399 = (value) => typeof value === "string" && value === "dlt";
|
|
248
|
+
const validate1404 = (value) => typeof value === "string" && (value === "draft" || value === "submitted" || value === "approved" || value === "rejected" || value === "paused" || value === "disabled");
|
|
249
|
+
const validate1405 = (value) => validate1393(value) || validate6(value);
|
|
250
|
+
const validate1408 = (value) => typeof value === "string" && (value === "marketing" || value === "utility" || value === "authentication" || value === "transactional" || value === "service_implicit" || value === "service_explicit" || value === "promotional");
|
|
251
|
+
const validate1409 = (value) => validate1408(value) || validate6(value);
|
|
252
|
+
const validate1426 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1427(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1429(value["data"]));
|
|
253
|
+
const validate1427 = (value) => typeof value === "string" && value === "flow.registration.updated";
|
|
254
|
+
const validate1429 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "id") && Object.hasOwn(value, "flowId") && Object.hasOwn(value, "versionId") && Object.hasOwn(value, "versionNumber") && Object.hasOwn(value, "wabaId") && Object.hasOwn(value, "providerFlowId") && Object.hasOwn(value, "name") && Object.hasOwn(value, "status") && Object.hasOwn(value, "validationErrors") && Object.hasOwn(value, "endpointAlerts") && Object.hasOwn(value, "publishedAt") && Object.hasOwn(value, "statusChangedAt") && Object.hasOwn(value, "createdAt") && Object.hasOwn(value, "updatedAt") && Object.hasOwn(value, "organizationId") && Object.hasOwn(value, "previousStatus") && (!Object.hasOwn(value, "id") || validate1430(value["id"])) && (!Object.hasOwn(value, "flowId") || validate781(value["flowId"])) && (!Object.hasOwn(value, "versionId") || validate787(value["versionId"])) && (!Object.hasOwn(value, "versionNumber") || validate1311(value["versionNumber"])) && (!Object.hasOwn(value, "wabaId") || validate2(value["wabaId"])) && (!Object.hasOwn(value, "providerFlowId") || validate8(value["providerFlowId"])) && (!Object.hasOwn(value, "name") || validate2(value["name"])) && (!Object.hasOwn(value, "status") || validate1439(value["status"])) && (!Object.hasOwn(value, "validationErrors") || validate1440(value["validationErrors"])) && (!Object.hasOwn(value, "endpointAlerts") || validate1447(value["endpointAlerts"])) && (!Object.hasOwn(value, "publishedAt") || validate8(value["publishedAt"])) && (!Object.hasOwn(value, "statusChangedAt") || validate2(value["statusChangedAt"])) && (!Object.hasOwn(value, "createdAt") || validate2(value["createdAt"])) && (!Object.hasOwn(value, "updatedAt") || validate2(value["updatedAt"])) && (!Object.hasOwn(value, "organizationId") || validate887(value["organizationId"])) && (!Object.hasOwn(value, "previousStatus") || validate1465(value["previousStatus"]));
|
|
255
|
+
const validate1430 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^wafreg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
256
|
+
const validate1439 = (value) => typeof value === "string" && (value === "draft" || value === "published" || value === "throttled" || value === "blocked" || value === "deprecated");
|
|
257
|
+
const validate1440 = (value) => Array.isArray(value) && Array.isArray(value) && value.every(validate1441);
|
|
258
|
+
const validate1441 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "error") && Object.hasOwn(value, "message") && (!Object.hasOwn(value, "error") || validate2(value["error"])) && (!Object.hasOwn(value, "message") || validate2(value["message"])) && (!Object.hasOwn(value, "path") || validate2(value["path"])) && (!Object.hasOwn(value, "line") || validate1311(value["line"])) && (!Object.hasOwn(value, "column") || validate1311(value["column"]));
|
|
259
|
+
const validate1447 = (value) => Array.isArray(value) && Array.isArray(value) && value.every(validate1448);
|
|
260
|
+
const validate1448 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "kind") && Object.hasOwn(value, "message") && Object.hasOwn(value, "value") && Object.hasOwn(value, "threshold") && Object.hasOwn(value, "activatedAt") && (!Object.hasOwn(value, "kind") || validate2(value["kind"])) && (!Object.hasOwn(value, "message") || validate2(value["message"])) && (!Object.hasOwn(value, "value") || validate14(value["value"])) && (!Object.hasOwn(value, "threshold") || validate14(value["threshold"])) && (!Object.hasOwn(value, "activatedAt") || validate2(value["activatedAt"]));
|
|
261
|
+
const validate1465 = (value) => validate1439(value) || validate6(value);
|
|
262
|
+
const validate1468 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1469(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1471(value["data"]));
|
|
263
|
+
const validate1469 = (value) => typeof value === "string" && value === "whatsapp.number.connected";
|
|
264
|
+
const validate1471 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "organizationId") && Object.hasOwn(value, "namespaceId") && Object.hasOwn(value, "businessAccountId") && Object.hasOwn(value, "phoneNumber") && Object.hasOwn(value, "phoneNumberId") && Object.hasOwn(value, "whatsappBusinessAccountId") && Object.hasOwn(value, "displayName") && Object.hasOwn(value, "verificationStatus") && Object.hasOwn(value, "reconnected") && Object.hasOwn(value, "setupLink") && (!Object.hasOwn(value, "organizationId") || validate887(value["organizationId"])) && (!Object.hasOwn(value, "namespaceId") || validate1371(value["namespaceId"])) && (!Object.hasOwn(value, "businessAccountId") || validate1476(value["businessAccountId"])) && (!Object.hasOwn(value, "phoneNumber") || validate2(value["phoneNumber"])) && (!Object.hasOwn(value, "phoneNumberId") || validate2(value["phoneNumberId"])) && (!Object.hasOwn(value, "whatsappBusinessAccountId") || validate2(value["whatsappBusinessAccountId"])) && (!Object.hasOwn(value, "displayName") || validate2(value["displayName"])) && (!Object.hasOwn(value, "verificationStatus") || validate1481(value["verificationStatus"])) && (!Object.hasOwn(value, "reconnected") || validate37(value["reconnected"])) && (!Object.hasOwn(value, "setupLink") || validate1483(value["setupLink"]));
|
|
265
|
+
const validate1476 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^waba_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
266
|
+
const validate1481 = (value) => typeof value === "string" && (value === "pending" || value === "verified" || value === "failed" || value === "suspended");
|
|
267
|
+
const validate1483 = (value) => validate1484(value) || validate6(value);
|
|
268
|
+
const validate1484 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "id") && Object.hasOwn(value, "metadata") && (!Object.hasOwn(value, "id") || validate1485(value["id"])) && (!Object.hasOwn(value, "metadata") || validate1486(value["metadata"]));
|
|
269
|
+
const validate1485 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^wasl_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
270
|
+
const validate1486 = (value) => isObject(value) && isObject(value);
|
|
271
|
+
const validate1488 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1489(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1491(value["data"]));
|
|
272
|
+
const validate1489 = (value) => typeof value === "string" && value === "mailbox.message.received";
|
|
273
|
+
const validate1491 = (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") || validate1371(value["namespaceId"])) && (!Object.hasOwn(value, "message") || validate1496(value["message"])) && (!Object.hasOwn(value, "thread") || validate1531(value["thread"]));
|
|
274
|
+
const validate1496 = (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, "flowSubmissionHandledBy") || validate871(value["flowSubmissionHandledBy"])) && (!Object.hasOwn(value, "id") || validate814(value["id"])) && (!Object.hasOwn(value, "campaign") || validate624(value["campaign"])) && (!Object.hasOwn(value, "channel") || validate7(value["channel"])) && (!Object.hasOwn(value, "threadId") || validate1505(value["threadId"])) && (!Object.hasOwn(value, "from") || validate1506(value["from"])) && (!Object.hasOwn(value, "to") || validate49(value["to"])) && (!Object.hasOwn(value, "cc") || validate49(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") || validate1524(value["attachments"])) && (!Object.hasOwn(value, "occurredAt") || validate2(value["occurredAt"]));
|
|
275
|
+
const validate1505 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^thread_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
276
|
+
const validate1506 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "address") && (!Object.hasOwn(value, "address") || validate2(value["address"])) && (!Object.hasOwn(value, "name") || validate8(value["name"]));
|
|
277
|
+
const validate1524 = (value) => Array.isArray(value) && Array.isArray(value) && value.every(validate1525);
|
|
278
|
+
const validate1525 = (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") || validate1526(value["id"])) && (!Object.hasOwn(value, "filename") || validate2(value["filename"])) && (!Object.hasOwn(value, "contentType") || validate2(value["contentType"])) && (!Object.hasOwn(value, "size") || validate15(value["size"]));
|
|
279
|
+
const validate1526 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^att_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
280
|
+
const validate1531 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "id") && Object.hasOwn(value, "subject") && Object.hasOwn(value, "preview") && (!Object.hasOwn(value, "id") || validate1505(value["id"])) && (!Object.hasOwn(value, "endpointId") || validate1533(value["endpointId"])) && (!Object.hasOwn(value, "subject") || validate8(value["subject"])) && (!Object.hasOwn(value, "preview") || validate8(value["preview"]));
|
|
281
|
+
const validate1533 = (value) => validate1534(value) || validate6(value);
|
|
282
|
+
const validate1534 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^mbxep_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
283
|
+
const validate1542 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1543(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1545(value["data"]));
|
|
284
|
+
const validate1543 = (value) => typeof value === "string" && value === "mailbox.message.sent";
|
|
285
|
+
const validate1545 = (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") || validate1371(value["namespaceId"])) && (!Object.hasOwn(value, "actionId") || validate1550(value["actionId"])) && (!Object.hasOwn(value, "state") || validate1551(value["state"])) && (!Object.hasOwn(value, "acceptedAt") || validate2(value["acceptedAt"])) && (!Object.hasOwn(value, "actor") || validate1553(value["actor"])) && (!Object.hasOwn(value, "message") || validate1496(value["message"]));
|
|
286
|
+
const validate1550 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
287
|
+
const validate1551 = (value) => typeof value === "string" && value === "completed";
|
|
288
|
+
const validate1553 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "kind") && Object.hasOwn(value, "id") && Object.hasOwn(value, "source") && (!Object.hasOwn(value, "kind") || validate1554(value["kind"])) && (!Object.hasOwn(value, "id") || validate2(value["id"])) && (!Object.hasOwn(value, "displayName") || validate8(value["displayName"])) && (!Object.hasOwn(value, "source") || validate1559(value["source"]));
|
|
289
|
+
const validate1554 = (value) => typeof value === "string" && (value === "user" || value === "apiKey" || value === "extension" || value === "externalAgent" || value === "samvaAgent" || value === "system");
|
|
290
|
+
const validate1559 = (value) => typeof value === "string" && (value === "humanUi" || value === "externalApi" || value === "externalAgent" || value === "extension" || value === "samvaManagedAgent" || value === "system");
|
|
291
|
+
const validate1595 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1596(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1598(value["data"]));
|
|
292
|
+
const validate1596 = (value) => typeof value === "string" && value === "mailbox.action.pending_approval";
|
|
293
|
+
const validate1598 = (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") || validate1371(value["namespaceId"])) && (!Object.hasOwn(value, "action") || validate1603(value["action"])) && (!Object.hasOwn(value, "draft") || validate1673(value["draft"])) && (!Object.hasOwn(value, "tool") || validate1683(value["tool"]));
|
|
294
|
+
const validate1603 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "id") && Object.hasOwn(value, "type") && Object.hasOwn(value, "reviewRound") && Object.hasOwn(value, "decision") && Object.hasOwn(value, "threadId") && Object.hasOwn(value, "reason") && Object.hasOwn(value, "proposedBy") && Object.hasOwn(value, "createdAt") && (!Object.hasOwn(value, "id") || validate1550(value["id"])) && (!Object.hasOwn(value, "type") || validate1605(value["type"])) && (!Object.hasOwn(value, "reviewRound") || validate1606(value["reviewRound"])) && (!Object.hasOwn(value, "state") || validate1607(value["state"])) && (!Object.hasOwn(value, "decision") || validate1608(value["decision"])) && (!Object.hasOwn(value, "threadId") || validate1659(value["threadId"])) && (!Object.hasOwn(value, "reason") || validate8(value["reason"])) && (!Object.hasOwn(value, "proposedBy") || validate1553(value["proposedBy"])) && (!Object.hasOwn(value, "createdAt") || validate2(value["createdAt"]));
|
|
295
|
+
const validate1605 = (value) => typeof value === "string" && (value === "sendMessage" || value === "reply" || value === "updateDraft" || value === "createNote" || value === "assignThread" || value === "changeThreadState" || value === "call" || value === "extensionRequest" || value === "toolCall" || value === "handoff");
|
|
296
|
+
const validate1606 = (value) => typeof value === "number" && Number.isInteger(value) && typeof value === "number" && value <= 0x1fffffffffffff && typeof value === "number" && value > 0;
|
|
297
|
+
const validate1607 = (value) => typeof value === "string" && value === "approvalRequired";
|
|
298
|
+
const validate1608 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "id") && Object.hasOwn(value, "reviewRound") && Object.hasOwn(value, "requirement") && Object.hasOwn(value, "decider") && Object.hasOwn(value, "outcome") && Object.hasOwn(value, "reason") && Object.hasOwn(value, "scopes") && (!Object.hasOwn(value, "id") || validate1609(value["id"])) && (!Object.hasOwn(value, "reviewRound") || validate1606(value["reviewRound"])) && (!Object.hasOwn(value, "requirement") || validate1611(value["requirement"])) && (!Object.hasOwn(value, "decider") || validate1612(value["decider"])) && (!Object.hasOwn(value, "outcome") || validate1613(value["outcome"])) && (!Object.hasOwn(value, "reason") || validate1614(value["reason"])) && (!Object.hasOwn(value, "scopes") || validate1615(value["scopes"])) && (!Object.hasOwn(value, "rule") || validate1619(value["rule"])) && (!Object.hasOwn(value, "guard") || validate1626(value["guard"])) && (!Object.hasOwn(value, "guardReason") || validate1626(value["guardReason"])) && (!Object.hasOwn(value, "resolution") || validate1632(value["resolution"]));
|
|
299
|
+
const validate1609 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^pdec_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
300
|
+
const validate1611 = (value) => typeof value === "string" && (value === "run" || value === "model" || value === "person" || value === "never");
|
|
301
|
+
const validate1612 = (value) => typeof value === "string" && (value === "rule" || value === "model" || value === "person" || value === "agent");
|
|
302
|
+
const validate1613 = (value) => typeof value === "string" && (value === "allow" || value === "hold" || value === "refuse");
|
|
303
|
+
const validate1614 = (value) => typeof value === "string" && typeof value === "string" && Array.from(value).length >= 1;
|
|
304
|
+
const validate1615 = (value) => Array.isArray(value) && Array.isArray(value) && value.every(validate1616);
|
|
305
|
+
const validate1616 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "kind") && Object.hasOwn(value, "id") && (!Object.hasOwn(value, "kind") || validate1617(value["kind"])) && (!Object.hasOwn(value, "id") || validate1614(value["id"]));
|
|
306
|
+
const validate1617 = (value) => typeof value === "string" && (value === "organization" || value === "integration" || value === "mailbox" || value === "agent" || value === "apiKey");
|
|
307
|
+
const validate1619 = (value) => validate1620(value) || validate6(value);
|
|
308
|
+
const validate1620 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "scope") && Object.hasOwn(value, "index") && (!Object.hasOwn(value, "scope") || validate1616(value["scope"])) && (!Object.hasOwn(value, "index") || validate1624(value["index"]));
|
|
309
|
+
const validate1624 = (value) => typeof value === "number" && Number.isInteger(value) && typeof value === "number" && value >= 0 && typeof value === "number" && value <= 0x1fffffffffffff;
|
|
310
|
+
const validate1626 = (value) => validate1614(value) || validate6(value);
|
|
311
|
+
const validate1632 = (value) => validate1633(value) || validate6(value);
|
|
312
|
+
const validate1633 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "by") && Object.hasOwn(value, "at") && Object.hasOwn(value, "as") && (!Object.hasOwn(value, "by") || validate1634(value["by"])) && (!Object.hasOwn(value, "at") || validate2(value["at"])) && (!Object.hasOwn(value, "as") || validate1636(value["as"])) && (!Object.hasOwn(value, "diff") || validate1637(value["diff"]));
|
|
313
|
+
const validate1634 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^user_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
314
|
+
const validate1636 = (value) => typeof value === "string" && (value === "approved" || value === "edited" || value === "denied" || value === "alwaysAllowed");
|
|
315
|
+
const validate1637 = (value) => validate1638(value) || validate6(value);
|
|
316
|
+
const validate1638 = (value) => isObject(value) && isObject(value) && (!Object.hasOwn(value, "text") || validate1639(value["text"])) && (!Object.hasOwn(value, "html") || validate1639(value["html"]));
|
|
317
|
+
const validate1639 = (value) => validate1640(value) || validate6(value);
|
|
318
|
+
const validate1640 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "before") && Object.hasOwn(value, "after") && (!Object.hasOwn(value, "before") || validate8(value["before"])) && (!Object.hasOwn(value, "after") || validate8(value["after"]));
|
|
319
|
+
const validate1659 = (value) => validate1505(value) || validate6(value);
|
|
320
|
+
const validate1673 = (value) => validate1674(value) || validate6(value);
|
|
321
|
+
const validate1674 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "to") && Object.hasOwn(value, "cc") && Object.hasOwn(value, "subject") && (!Object.hasOwn(value, "to") || validate49(value["to"])) && (!Object.hasOwn(value, "cc") || validate49(value["cc"])) && (!Object.hasOwn(value, "subject") || validate8(value["subject"]));
|
|
322
|
+
const validate1683 = (value) => validate1684(value) || validate6(value);
|
|
323
|
+
const validate1684 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "name") && Object.hasOwn(value, "argumentsHash") && Object.hasOwn(value, "arguments") && (!Object.hasOwn(value, "name") || validate1685(value["name"])) && (!Object.hasOwn(value, "argumentsHash") || validate1686(value["argumentsHash"])) && (!Object.hasOwn(value, "arguments") || validate12(value["arguments"]));
|
|
324
|
+
const validate1685 = (value) => typeof value === "string" && typeof value === "string" && Array.from(value).length >= 1 && typeof value === "string" && Array.from(value).length <= 128;
|
|
325
|
+
const validate1686 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^[0-9a-f]{64}$", "u")).test(value);
|
|
326
|
+
const validate1689 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1690(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1692(value["data"]));
|
|
327
|
+
const validate1690 = (value) => typeof value === "string" && value === "mailbox.action.resolved";
|
|
328
|
+
const validate1692 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "mailboxId") && Object.hasOwn(value, "namespaceId") && Object.hasOwn(value, "action") && Object.hasOwn(value, "resolution") && (!Object.hasOwn(value, "mailboxId") || validate5(value["mailboxId"])) && (!Object.hasOwn(value, "namespaceId") || validate1371(value["namespaceId"])) && (!Object.hasOwn(value, "action") || validate1697(value["action"])) && (!Object.hasOwn(value, "resolution") || validate1712(value["resolution"]));
|
|
329
|
+
const validate1697 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "id") && Object.hasOwn(value, "type") && Object.hasOwn(value, "reviewRound") && Object.hasOwn(value, "threadId") && Object.hasOwn(value, "proposedBy") && Object.hasOwn(value, "createdAt") && (!Object.hasOwn(value, "id") || validate1550(value["id"])) && (!Object.hasOwn(value, "type") || validate1605(value["type"])) && (!Object.hasOwn(value, "reviewRound") || validate1606(value["reviewRound"])) && (!Object.hasOwn(value, "threadId") || validate1659(value["threadId"])) && (!Object.hasOwn(value, "proposedBy") || validate1553(value["proposedBy"])) && (!Object.hasOwn(value, "createdAt") || validate2(value["createdAt"]));
|
|
330
|
+
const validate1712 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "outcome") && Object.hasOwn(value, "actor") && Object.hasOwn(value, "resolvedAt") && Object.hasOwn(value, "reason") && (!Object.hasOwn(value, "outcome") || validate1713(value["outcome"])) && (!Object.hasOwn(value, "actor") || validate1553(value["actor"])) && (!Object.hasOwn(value, "resolvedAt") || validate2(value["resolvedAt"])) && (!Object.hasOwn(value, "reason") || validate8(value["reason"]));
|
|
331
|
+
const validate1713 = (value) => typeof value === "string" && (value === "approved" || value === "denied" || value === "cancelled");
|
|
332
|
+
const validate1725 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1726(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1728(value["data"]));
|
|
333
|
+
const validate1726 = (value) => typeof value === "string" && value === "mailbox.message.spam";
|
|
334
|
+
const validate1728 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "mailboxId") && Object.hasOwn(value, "namespaceId") && Object.hasOwn(value, "disposition") && Object.hasOwn(value, "threadId") && Object.hasOwn(value, "reason") && Object.hasOwn(value, "source") && Object.hasOwn(value, "message") && (!Object.hasOwn(value, "mailboxId") || validate5(value["mailboxId"])) && (!Object.hasOwn(value, "namespaceId") || validate1371(value["namespaceId"])) && (!Object.hasOwn(value, "disposition") || validate1733(value["disposition"])) && (!Object.hasOwn(value, "threadId") || validate1659(value["threadId"])) && (!Object.hasOwn(value, "reason") || validate621(value["reason"])) && (!Object.hasOwn(value, "source") || validate1740(value["source"])) && (!Object.hasOwn(value, "message") || validate1741(value["message"]));
|
|
335
|
+
const validate1733 = (value) => typeof value === "string" && (value === "spam" || value === "isolated");
|
|
336
|
+
const validate1740 = (value) => typeof value === "string" && (value === "receipt" || value === "classifier" || value === "reader");
|
|
337
|
+
const validate1741 = (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") || validate814(value["id"])) && (!Object.hasOwn(value, "from") || validate1506(value["from"])) && (!Object.hasOwn(value, "subject") || validate8(value["subject"])) && (!Object.hasOwn(value, "receivedAt") || validate2(value["receivedAt"]));
|
|
339
338
|
const validate1752 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1753(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1755(value["data"]));
|
|
340
|
-
const validate1753 = (value) => typeof value === "string" && value === "mailbox.
|
|
341
|
-
const validate1755 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "mailboxId") && Object.hasOwn(value, "namespaceId") && Object.hasOwn(value, "
|
|
342
|
-
const
|
|
343
|
-
const
|
|
344
|
-
const
|
|
345
|
-
const
|
|
346
|
-
const
|
|
347
|
-
const
|
|
348
|
-
const
|
|
349
|
-
const
|
|
350
|
-
const
|
|
351
|
-
const
|
|
352
|
-
const
|
|
353
|
-
const
|
|
354
|
-
const
|
|
355
|
-
const
|
|
356
|
-
const
|
|
357
|
-
const
|
|
358
|
-
const
|
|
359
|
-
const
|
|
360
|
-
const
|
|
339
|
+
const validate1753 = (value) => typeof value === "string" && value === "mailbox.message.discarded";
|
|
340
|
+
const validate1755 = (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") || validate1371(value["namespaceId"])) && (!Object.hasOwn(value, "discardedBy") || validate1553(value["discardedBy"])) && (!Object.hasOwn(value, "disposition") || validate1767(value["disposition"])) && (!Object.hasOwn(value, "reason") || validate622(value["reason"])) && (!Object.hasOwn(value, "message") || validate1741(value["message"]));
|
|
341
|
+
const validate1767 = (value) => typeof value === "string" && (value === "quarantined" || value === "isolated");
|
|
342
|
+
const validate1780 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1781(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1783(value["data"]));
|
|
343
|
+
const validate1781 = (value) => typeof value === "string" && value === "mailbox.thread.deleted";
|
|
344
|
+
const validate1783 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "mailboxId") && Object.hasOwn(value, "namespaceId") && Object.hasOwn(value, "threadId") && (!Object.hasOwn(value, "mailboxId") || validate5(value["mailboxId"])) && (!Object.hasOwn(value, "namespaceId") || validate1371(value["namespaceId"])) && (!Object.hasOwn(value, "threadId") || validate1505(value["threadId"]));
|
|
345
|
+
const validate1789 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1790(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1792(value["data"]));
|
|
346
|
+
const validate1790 = (value) => typeof value === "string" && value === "mailbox.message.delivered";
|
|
347
|
+
const validate1792 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "mailboxId") && Object.hasOwn(value, "namespaceId") && Object.hasOwn(value, "threadId") && Object.hasOwn(value, "actionId") && Object.hasOwn(value, "messageId") && Object.hasOwn(value, "channel") && Object.hasOwn(value, "recipient") && Object.hasOwn(value, "occurredAt") && Object.hasOwn(value, "status") && (!Object.hasOwn(value, "mailboxId") || validate5(value["mailboxId"])) && (!Object.hasOwn(value, "namespaceId") || validate1371(value["namespaceId"])) && (!Object.hasOwn(value, "threadId") || validate1505(value["threadId"])) && (!Object.hasOwn(value, "actionId") || validate1550(value["actionId"])) && (!Object.hasOwn(value, "messageId") || validate814(value["messageId"])) && (!Object.hasOwn(value, "channel") || validate7(value["channel"])) && (!Object.hasOwn(value, "recipient") || validate2(value["recipient"])) && (!Object.hasOwn(value, "occurredAt") || validate2(value["occurredAt"])) && (!Object.hasOwn(value, "status") || validate1803(value["status"]));
|
|
348
|
+
const validate1803 = (value) => typeof value === "string" && value === "delivered";
|
|
349
|
+
const validate1804 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1805(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1807(value["data"]));
|
|
350
|
+
const validate1805 = (value) => typeof value === "string" && value === "mailbox.message.read";
|
|
351
|
+
const validate1807 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "mailboxId") && Object.hasOwn(value, "namespaceId") && Object.hasOwn(value, "threadId") && Object.hasOwn(value, "actionId") && Object.hasOwn(value, "messageId") && Object.hasOwn(value, "channel") && Object.hasOwn(value, "recipient") && Object.hasOwn(value, "occurredAt") && Object.hasOwn(value, "status") && (!Object.hasOwn(value, "mailboxId") || validate5(value["mailboxId"])) && (!Object.hasOwn(value, "namespaceId") || validate1371(value["namespaceId"])) && (!Object.hasOwn(value, "threadId") || validate1505(value["threadId"])) && (!Object.hasOwn(value, "actionId") || validate1550(value["actionId"])) && (!Object.hasOwn(value, "messageId") || validate814(value["messageId"])) && (!Object.hasOwn(value, "channel") || validate7(value["channel"])) && (!Object.hasOwn(value, "recipient") || validate2(value["recipient"])) && (!Object.hasOwn(value, "occurredAt") || validate2(value["occurredAt"])) && (!Object.hasOwn(value, "status") || validate1818(value["status"]));
|
|
352
|
+
const validate1818 = (value) => typeof value === "string" && value === "read";
|
|
353
|
+
const validate1819 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1820(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1822(value["data"]));
|
|
354
|
+
const validate1820 = (value) => typeof value === "string" && value === "mailbox.message.failed";
|
|
355
|
+
const validate1822 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "mailboxId") && Object.hasOwn(value, "namespaceId") && Object.hasOwn(value, "threadId") && Object.hasOwn(value, "actionId") && Object.hasOwn(value, "messageId") && Object.hasOwn(value, "channel") && Object.hasOwn(value, "recipient") && Object.hasOwn(value, "occurredAt") && Object.hasOwn(value, "status") && Object.hasOwn(value, "error") && (!Object.hasOwn(value, "mailboxId") || validate5(value["mailboxId"])) && (!Object.hasOwn(value, "namespaceId") || validate1371(value["namespaceId"])) && (!Object.hasOwn(value, "threadId") || validate1505(value["threadId"])) && (!Object.hasOwn(value, "actionId") || validate1550(value["actionId"])) && (!Object.hasOwn(value, "messageId") || validate814(value["messageId"])) && (!Object.hasOwn(value, "channel") || validate7(value["channel"])) && (!Object.hasOwn(value, "recipient") || validate2(value["recipient"])) && (!Object.hasOwn(value, "occurredAt") || validate2(value["occurredAt"])) && (!Object.hasOwn(value, "status") || validate1833(value["status"])) && (!Object.hasOwn(value, "error") || validate1834(value["error"]));
|
|
356
|
+
const validate1833 = (value) => typeof value === "string" && value === "failed";
|
|
357
|
+
const validate1834 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "code") && Object.hasOwn(value, "message") && (!Object.hasOwn(value, "code") || validate8(value["code"])) && (!Object.hasOwn(value, "message") || validate8(value["message"]));
|
|
358
|
+
const validate1841 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1842(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1844(value["data"]));
|
|
359
|
+
const validate1842 = (value) => typeof value === "string" && value === "journey.webhook";
|
|
360
|
+
const validate1844 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "organizationId") && Object.hasOwn(value, "journeyId") && Object.hasOwn(value, "journeyVersion") && Object.hasOwn(value, "runId") && Object.hasOwn(value, "nodeId") && Object.hasOwn(value, "contact") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "organizationId") || validate887(value["organizationId"])) && (!Object.hasOwn(value, "journeyId") || validate1846(value["journeyId"])) && (!Object.hasOwn(value, "journeyVersion") || validate1311(value["journeyVersion"])) && (!Object.hasOwn(value, "runId") || validate1848(value["runId"])) && (!Object.hasOwn(value, "nodeId") || validate2(value["nodeId"])) && (!Object.hasOwn(value, "contact") || validate1850(value["contact"])) && (!Object.hasOwn(value, "data") || validate12(value["data"]));
|
|
361
|
+
const validate1846 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^jrny_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
362
|
+
const validate1848 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^jrun_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
363
|
+
const validate1850 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "id") && Object.hasOwn(value, "externalId") && Object.hasOwn(value, "email") && (!Object.hasOwn(value, "id") || validate986(value["id"])) && (!Object.hasOwn(value, "externalId") || validate8(value["externalId"])) && (!Object.hasOwn(value, "email") || validate8(value["email"]));
|
|
361
364
|
/** Narrow an event to a structurally valid payload known to this package. */
|
|
362
365
|
const isKnownEvent = (value) => {
|
|
363
366
|
switch (value.type) {
|
|
364
367
|
case "message.sent": return validate0(value);
|
|
365
|
-
case "message.delivered": return
|
|
366
|
-
case "message.read": return
|
|
367
|
-
case "message.failed": return
|
|
368
|
-
case "message.bounced": return
|
|
369
|
-
case "message.complained": return
|
|
370
|
-
case "message.received": return
|
|
371
|
-
case "message.opened": return
|
|
372
|
-
case "message.clicked": return
|
|
373
|
-
case "contact.created": return
|
|
374
|
-
case "contact.updated": return
|
|
375
|
-
case "contact.deleted": return
|
|
376
|
-
case "contact.subscribed": return
|
|
377
|
-
case "contact.unsubscribed": return
|
|
378
|
-
case "contact.resubscribed": return
|
|
379
|
-
case "contact.consent_changed": return
|
|
380
|
-
case "conversation.created": return
|
|
381
|
-
case "conversation.updated": return
|
|
382
|
-
case "conversation.archived": return
|
|
383
|
-
case "webhook.created": return
|
|
384
|
-
case "webhook.updated": return
|
|
385
|
-
case "webhook.deleted": return
|
|
386
|
-
case "webhook.test": return
|
|
387
|
-
case "domain.updated": return
|
|
388
|
-
case "domain.warming.updated": return
|
|
389
|
-
case "email.sending.paused": return
|
|
390
|
-
case "email.sending.resumed": return
|
|
391
|
-
case "template.registration.updated": return
|
|
392
|
-
case "flow.registration.updated": return
|
|
393
|
-
case "whatsapp.number.connected": return
|
|
394
|
-
case "mailbox.message.received": return
|
|
395
|
-
case "mailbox.message.sent": return
|
|
396
|
-
case "mailbox.action.pending_approval": return
|
|
397
|
-
case "mailbox.action.resolved": return
|
|
398
|
-
case "mailbox.message.spam": return
|
|
399
|
-
case "mailbox.message.discarded": return
|
|
400
|
-
case "mailbox.thread.deleted": return
|
|
401
|
-
case "mailbox.message.delivered": return
|
|
402
|
-
case "mailbox.message.read": return
|
|
403
|
-
case "mailbox.message.failed": return
|
|
404
|
-
case "journey.webhook": return
|
|
368
|
+
case "message.delivered": return validate90(value);
|
|
369
|
+
case "message.read": return validate180(value);
|
|
370
|
+
case "message.failed": return validate270(value);
|
|
371
|
+
case "message.bounced": return validate360(value);
|
|
372
|
+
case "message.complained": return validate446(value);
|
|
373
|
+
case "message.received": return validate532(value);
|
|
374
|
+
case "message.opened": return validate882(value);
|
|
375
|
+
case "message.clicked": return validate930(value);
|
|
376
|
+
case "contact.created": return validate982(value);
|
|
377
|
+
case "contact.updated": return validate1006(value);
|
|
378
|
+
case "contact.deleted": return validate1030(value);
|
|
379
|
+
case "contact.subscribed": return validate1054(value);
|
|
380
|
+
case "contact.unsubscribed": return validate1092(value);
|
|
381
|
+
case "contact.resubscribed": return validate1130(value);
|
|
382
|
+
case "contact.consent_changed": return validate1168(value);
|
|
383
|
+
case "conversation.created": return validate1185(value);
|
|
384
|
+
case "conversation.updated": return validate1205(value);
|
|
385
|
+
case "conversation.archived": return validate1225(value);
|
|
386
|
+
case "webhook.created": return validate1245(value);
|
|
387
|
+
case "webhook.updated": return validate1262(value);
|
|
388
|
+
case "webhook.deleted": return validate1279(value);
|
|
389
|
+
case "webhook.test": return validate1296(value);
|
|
390
|
+
case "domain.updated": return validate1300(value);
|
|
391
|
+
case "domain.warming.updated": return validate1342(value);
|
|
392
|
+
case "email.sending.paused": return validate1366(value);
|
|
393
|
+
case "email.sending.resumed": return validate1376(value);
|
|
394
|
+
case "template.registration.updated": return validate1386(value);
|
|
395
|
+
case "flow.registration.updated": return validate1426(value);
|
|
396
|
+
case "whatsapp.number.connected": return validate1468(value);
|
|
397
|
+
case "mailbox.message.received": return validate1488(value);
|
|
398
|
+
case "mailbox.message.sent": return validate1542(value);
|
|
399
|
+
case "mailbox.action.pending_approval": return validate1595(value);
|
|
400
|
+
case "mailbox.action.resolved": return validate1689(value);
|
|
401
|
+
case "mailbox.message.spam": return validate1725(value);
|
|
402
|
+
case "mailbox.message.discarded": return validate1752(value);
|
|
403
|
+
case "mailbox.thread.deleted": return validate1780(value);
|
|
404
|
+
case "mailbox.message.delivered": return validate1789(value);
|
|
405
|
+
case "mailbox.message.read": return validate1804(value);
|
|
406
|
+
case "mailbox.message.failed": return validate1819(value);
|
|
407
|
+
case "journey.webhook": return validate1841(value);
|
|
405
408
|
default: return false;
|
|
406
409
|
}
|
|
407
410
|
};
|
|
@@ -409,46 +412,46 @@ const validateEvent = (value) => {
|
|
|
409
412
|
if (!isObject(value) || typeof value.type !== "string" || typeof value.timestamp !== "string" || !Object.hasOwn(value, "data")) return false;
|
|
410
413
|
switch (value.type) {
|
|
411
414
|
case "message.sent": return validate0(value);
|
|
412
|
-
case "message.delivered": return
|
|
413
|
-
case "message.read": return
|
|
414
|
-
case "message.failed": return
|
|
415
|
-
case "message.bounced": return
|
|
416
|
-
case "message.complained": return
|
|
417
|
-
case "message.received": return
|
|
418
|
-
case "message.opened": return
|
|
419
|
-
case "message.clicked": return
|
|
420
|
-
case "contact.created": return
|
|
421
|
-
case "contact.updated": return
|
|
422
|
-
case "contact.deleted": return
|
|
423
|
-
case "contact.subscribed": return
|
|
424
|
-
case "contact.unsubscribed": return
|
|
425
|
-
case "contact.resubscribed": return
|
|
426
|
-
case "contact.consent_changed": return
|
|
427
|
-
case "conversation.created": return
|
|
428
|
-
case "conversation.updated": return
|
|
429
|
-
case "conversation.archived": return
|
|
430
|
-
case "webhook.created": return
|
|
431
|
-
case "webhook.updated": return
|
|
432
|
-
case "webhook.deleted": return
|
|
433
|
-
case "webhook.test": return
|
|
434
|
-
case "domain.updated": return
|
|
435
|
-
case "domain.warming.updated": return
|
|
436
|
-
case "email.sending.paused": return
|
|
437
|
-
case "email.sending.resumed": return
|
|
438
|
-
case "template.registration.updated": return
|
|
439
|
-
case "flow.registration.updated": return
|
|
440
|
-
case "whatsapp.number.connected": return
|
|
441
|
-
case "mailbox.message.received": return
|
|
442
|
-
case "mailbox.message.sent": return
|
|
443
|
-
case "mailbox.action.pending_approval": return
|
|
444
|
-
case "mailbox.action.resolved": return
|
|
445
|
-
case "mailbox.message.spam": return
|
|
446
|
-
case "mailbox.message.discarded": return
|
|
447
|
-
case "mailbox.thread.deleted": return
|
|
448
|
-
case "mailbox.message.delivered": return
|
|
449
|
-
case "mailbox.message.read": return
|
|
450
|
-
case "mailbox.message.failed": return
|
|
451
|
-
case "journey.webhook": return
|
|
415
|
+
case "message.delivered": return validate90(value);
|
|
416
|
+
case "message.read": return validate180(value);
|
|
417
|
+
case "message.failed": return validate270(value);
|
|
418
|
+
case "message.bounced": return validate360(value);
|
|
419
|
+
case "message.complained": return validate446(value);
|
|
420
|
+
case "message.received": return validate532(value);
|
|
421
|
+
case "message.opened": return validate882(value);
|
|
422
|
+
case "message.clicked": return validate930(value);
|
|
423
|
+
case "contact.created": return validate982(value);
|
|
424
|
+
case "contact.updated": return validate1006(value);
|
|
425
|
+
case "contact.deleted": return validate1030(value);
|
|
426
|
+
case "contact.subscribed": return validate1054(value);
|
|
427
|
+
case "contact.unsubscribed": return validate1092(value);
|
|
428
|
+
case "contact.resubscribed": return validate1130(value);
|
|
429
|
+
case "contact.consent_changed": return validate1168(value);
|
|
430
|
+
case "conversation.created": return validate1185(value);
|
|
431
|
+
case "conversation.updated": return validate1205(value);
|
|
432
|
+
case "conversation.archived": return validate1225(value);
|
|
433
|
+
case "webhook.created": return validate1245(value);
|
|
434
|
+
case "webhook.updated": return validate1262(value);
|
|
435
|
+
case "webhook.deleted": return validate1279(value);
|
|
436
|
+
case "webhook.test": return validate1296(value);
|
|
437
|
+
case "domain.updated": return validate1300(value);
|
|
438
|
+
case "domain.warming.updated": return validate1342(value);
|
|
439
|
+
case "email.sending.paused": return validate1366(value);
|
|
440
|
+
case "email.sending.resumed": return validate1376(value);
|
|
441
|
+
case "template.registration.updated": return validate1386(value);
|
|
442
|
+
case "flow.registration.updated": return validate1426(value);
|
|
443
|
+
case "whatsapp.number.connected": return validate1468(value);
|
|
444
|
+
case "mailbox.message.received": return validate1488(value);
|
|
445
|
+
case "mailbox.message.sent": return validate1542(value);
|
|
446
|
+
case "mailbox.action.pending_approval": return validate1595(value);
|
|
447
|
+
case "mailbox.action.resolved": return validate1689(value);
|
|
448
|
+
case "mailbox.message.spam": return validate1725(value);
|
|
449
|
+
case "mailbox.message.discarded": return validate1752(value);
|
|
450
|
+
case "mailbox.thread.deleted": return validate1780(value);
|
|
451
|
+
case "mailbox.message.delivered": return validate1789(value);
|
|
452
|
+
case "mailbox.message.read": return validate1804(value);
|
|
453
|
+
case "mailbox.message.failed": return validate1819(value);
|
|
454
|
+
case "journey.webhook": return validate1841(value);
|
|
452
455
|
default: return true;
|
|
453
456
|
}
|
|
454
457
|
};
|
|
@@ -727,4 +730,4 @@ const readWebhookHeaders = (headers) => requireHeaders({
|
|
|
727
730
|
});
|
|
728
731
|
export { generateWebhookSecret as a, verifyWebhookAt as c, MalformedWebhookPayloadError as d, WebhookCryptoError as f, isKnownEvent as g, WebhookVerificationError as h, WEBHOOK_TIMESTAMP_HEADER as i, InvalidWebhookHeadersError as l, WebhookTimestampError as m, WEBHOOK_ID_HEADER as n, readWebhookHeaders as o, WebhookSignatureError as p, WEBHOOK_SIGNATURE_HEADER as r, signWebhook as s, DEFAULT_TOLERANCE_SECONDS as t, InvalidWebhookSecretError as u };
|
|
729
732
|
|
|
730
|
-
//# sourceMappingURL=protocol-
|
|
733
|
+
//# sourceMappingURL=protocol-CwGXBskp.js.map
|