@samva/webhooks 0.54.0 → 0.56.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 CHANGED
@@ -1,7 +1,7 @@
1
- import { a as generateWebhookSecret, c as verifyWebhookAt, d as MalformedWebhookPayloadError, f as WebhookCryptoError, g as isKnownEvent, h as WebhookVerificationError, i as WEBHOOK_TIMESTAMP_HEADER, l as InvalidWebhookHeadersError, m as WebhookTimestampError, n as WEBHOOK_ID_HEADER, p as WebhookSignatureError, r as WEBHOOK_SIGNATURE_HEADER, s as signWebhook, t as DEFAULT_TOLERANCE_SECONDS, u as InvalidWebhookSecretError } from "./protocol-DwRceAlj.js";
2
- import { t as WebhookEventJsonSchemas } from "./json-schemas.gen-Ck8UIxoX.js";
3
- import { ContactConsentChangedEventSchema, ContactCreatedEventSchema, ContactDeletedEventSchema, ContactResubscribedEventSchema, ContactSubscribedEventSchema, ContactUnsubscribedEventSchema, ContactUpdatedEventSchema, ConversationArchivedEventSchema, ConversationCreatedEventSchema, ConversationUpdatedEventSchema, DomainUpdatedEventSchema, DomainWarmingUpdatedEventSchema, EmailSendingPausedEventSchema, EmailSendingResumedEventSchema, FlowRegistrationUpdatedEventSchema, JourneyWebhookEventSchema, MailboxActionPendingApprovalEventSchema, MailboxActionResolvedEventSchema, MailboxMessageDeliveredEventSchema, MailboxMessageDiscardedEventSchema, MailboxMessageFailedEventSchema, MailboxMessageReadEventSchema, MailboxMessageReceivedEventSchema, MailboxMessageSentEventSchema, MailboxMessageSpamEventSchema, MailboxThreadDeletedEventSchema, MessageBouncedEventSchema, MessageClickedEventSchema, MessageComplainedEventSchema, MessageDeliveredEventSchema, MessageFailedEventSchema, MessageOpenedEventSchema, MessageReadEventSchema, MessageReceivedEventSchema, MessageSentEventSchema, SamvaWebhookEventSchema, TemplateRegistrationUpdatedEventSchema, WebhookCreatedEventSchema, WebhookDeletedEventSchema, WebhookTestEventSchema, WebhookUpdatedEventSchema, WhatsappNumberConnectedEventSchema } from "./schemas.gen.js";
4
1
  import { Clock, Effect } from "effect";
2
+ import { a as generateWebhookSecret, c as verifyWebhookAt, d as MalformedWebhookPayloadError, f as WebhookCryptoError, g as isKnownEvent, h as WebhookVerificationError, i as WEBHOOK_TIMESTAMP_HEADER, l as InvalidWebhookHeadersError, m as WebhookTimestampError, n as WEBHOOK_ID_HEADER, p as WebhookSignatureError, r as WEBHOOK_SIGNATURE_HEADER, s as signWebhook, t as DEFAULT_TOLERANCE_SECONDS, u as InvalidWebhookSecretError } from "./protocol-DNsu129I.js";
3
+ import { t as WebhookEventJsonSchemas } from "./json-schemas.gen-C9ypfxiZ.js";
4
+ import { ContactConsentChangedEventSchema, ContactCreatedEventSchema, ContactDeletedEventSchema, ContactResubscribedEventSchema, ContactSubscribedEventSchema, ContactUnsubscribedEventSchema, ContactUpdatedEventSchema, ConversationArchivedEventSchema, ConversationCreatedEventSchema, ConversationUpdatedEventSchema, DomainUpdatedEventSchema, DomainWarmingUpdatedEventSchema, EmailSendingPausedEventSchema, EmailSendingResumedEventSchema, FlowRegistrationUpdatedEventSchema, JourneyWebhookEventSchema, MailboxActionPendingApprovalEventSchema, MailboxActionResolvedEventSchema, MailboxMessageDeliveredEventSchema, MailboxMessageDiscardedEventSchema, MailboxMessageFailedEventSchema, MailboxMessageReadEventSchema, MailboxMessageReceivedEventSchema, MailboxMessageSentEventSchema, MailboxMessageSpamEventSchema, MailboxThreadDeletedEventSchema, MessageBouncedEventSchema, MessageClickedEventSchema, MessageComplainedEventSchema, MessageDeliveredEventSchema, MessageFailedEventSchema, MessageOpenedEventSchema, MessageReadEventSchema, MessageReceivedEventSchema, MessageSentEventSchema, SamvaWebhookEventSchema, TemplateRegistrationUpdatedEventSchema, WebhookCreatedEventSchema, WebhookDeletedEventSchema, WebhookTestEventSchema, WebhookUpdatedEventSchema, WhatsappNumberConnectedEventSchema, WhatsappNumberUpdatedEventSchema } from "./schemas.gen.js";
5
5
  // src/effect.ts
6
6
  /**
7
7
  * Fails with the verification errors `verifyWebhookAt` rejects with. Any other rejection, such as
@@ -74,6 +74,6 @@ const verifyRequest = Effect.fn("Webhooks.verifyRequest")(function* (request, se
74
74
  nowMilliseconds
75
75
  });
76
76
  });
77
- export { ContactConsentChangedEventSchema, ContactCreatedEventSchema, ContactDeletedEventSchema, ContactResubscribedEventSchema, ContactSubscribedEventSchema, ContactUnsubscribedEventSchema, ContactUpdatedEventSchema, ConversationArchivedEventSchema, ConversationCreatedEventSchema, ConversationUpdatedEventSchema, DEFAULT_TOLERANCE_SECONDS, DomainUpdatedEventSchema, DomainWarmingUpdatedEventSchema, EmailSendingPausedEventSchema, EmailSendingResumedEventSchema, FlowRegistrationUpdatedEventSchema, InvalidWebhookHeadersError, InvalidWebhookSecretError, JourneyWebhookEventSchema, MailboxActionPendingApprovalEventSchema, MailboxActionResolvedEventSchema, MailboxMessageDeliveredEventSchema, MailboxMessageDiscardedEventSchema, MailboxMessageFailedEventSchema, MailboxMessageReadEventSchema, MailboxMessageReceivedEventSchema, MailboxMessageSentEventSchema, MailboxMessageSpamEventSchema, MailboxThreadDeletedEventSchema, MalformedWebhookPayloadError, MessageBouncedEventSchema, MessageClickedEventSchema, MessageComplainedEventSchema, MessageDeliveredEventSchema, MessageFailedEventSchema, MessageOpenedEventSchema, MessageReadEventSchema, MessageReceivedEventSchema, MessageSentEventSchema, SamvaWebhookEventSchema, TemplateRegistrationUpdatedEventSchema, WEBHOOK_ID_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER, WebhookCreatedEventSchema, WebhookCryptoError, WebhookDeletedEventSchema, WebhookEventJsonSchemas, WebhookSignatureError, WebhookTestEventSchema, WebhookTimestampError, WebhookUpdatedEventSchema, WebhookVerificationError, WhatsappNumberConnectedEventSchema, generateWebhookSecret, isKnownEvent, signWebhook, verify, verifyRequest };
77
+ export { ContactConsentChangedEventSchema, ContactCreatedEventSchema, ContactDeletedEventSchema, ContactResubscribedEventSchema, ContactSubscribedEventSchema, ContactUnsubscribedEventSchema, ContactUpdatedEventSchema, ConversationArchivedEventSchema, ConversationCreatedEventSchema, ConversationUpdatedEventSchema, DEFAULT_TOLERANCE_SECONDS, DomainUpdatedEventSchema, DomainWarmingUpdatedEventSchema, EmailSendingPausedEventSchema, EmailSendingResumedEventSchema, FlowRegistrationUpdatedEventSchema, InvalidWebhookHeadersError, InvalidWebhookSecretError, JourneyWebhookEventSchema, MailboxActionPendingApprovalEventSchema, MailboxActionResolvedEventSchema, MailboxMessageDeliveredEventSchema, MailboxMessageDiscardedEventSchema, MailboxMessageFailedEventSchema, MailboxMessageReadEventSchema, MailboxMessageReceivedEventSchema, MailboxMessageSentEventSchema, MailboxMessageSpamEventSchema, MailboxThreadDeletedEventSchema, MalformedWebhookPayloadError, MessageBouncedEventSchema, MessageClickedEventSchema, MessageComplainedEventSchema, MessageDeliveredEventSchema, MessageFailedEventSchema, MessageOpenedEventSchema, MessageReadEventSchema, MessageReceivedEventSchema, MessageSentEventSchema, SamvaWebhookEventSchema, TemplateRegistrationUpdatedEventSchema, WEBHOOK_ID_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER, WebhookCreatedEventSchema, WebhookCryptoError, WebhookDeletedEventSchema, WebhookEventJsonSchemas, WebhookSignatureError, WebhookTestEventSchema, WebhookTimestampError, WebhookUpdatedEventSchema, WebhookVerificationError, WhatsappNumberConnectedEventSchema, WhatsappNumberUpdatedEventSchema, generateWebhookSecret, isKnownEvent, signWebhook, verify, verifyRequest };
78
78
 
79
79
  //# sourceMappingURL=effect.js.map
@@ -2795,28 +2795,28 @@ const WebhookEventJsonSchemas = {
2795
2795
  observed: { type: "boolean" },
2796
2796
  total: {
2797
2797
  type: "integer",
2798
- minimum: -9007199254740991,
2799
- maximum: 9007199254740991
2798
+ minimum: -0x1fffffffffffff,
2799
+ maximum: 0x1fffffffffffff
2800
2800
  },
2801
2801
  satisfied: {
2802
2802
  type: "integer",
2803
- minimum: -9007199254740991,
2804
- maximum: 9007199254740991
2803
+ minimum: -0x1fffffffffffff,
2804
+ maximum: 0x1fffffffffffff
2805
2805
  },
2806
2806
  missing: {
2807
2807
  type: "integer",
2808
- minimum: -9007199254740991,
2809
- maximum: 9007199254740991
2808
+ minimum: -0x1fffffffffffff,
2809
+ maximum: 0x1fffffffffffff
2810
2810
  },
2811
2811
  mismatch: {
2812
2812
  type: "integer",
2813
- minimum: -9007199254740991,
2814
- maximum: 9007199254740991
2813
+ minimum: -0x1fffffffffffff,
2814
+ maximum: 0x1fffffffffffff
2815
2815
  },
2816
2816
  unknown: {
2817
2817
  type: "integer",
2818
- minimum: -9007199254740991,
2819
- maximum: 9007199254740991
2818
+ minimum: -0x1fffffffffffff,
2819
+ maximum: 0x1fffffffffffff
2820
2820
  }
2821
2821
  },
2822
2822
  required: [
@@ -3174,6 +3174,7 @@ const WebhookEventJsonSchemas = {
3174
3174
  }, { type: "null" }] },
3175
3175
  providerTemplateId: { anyOf: [{ type: "string" }, { type: "null" }] },
3176
3176
  reason: { anyOf: [{ type: "string" }, { type: "null" }] },
3177
+ targetReleasedAt: { type: "string" },
3177
3178
  submittedAt: { anyOf: [{ type: "string" }, { type: "null" }] },
3178
3179
  statusChangedAt: { type: "string" },
3179
3180
  createdAt: { type: "string" },
@@ -3250,8 +3251,8 @@ const WebhookEventJsonSchemas = {
3250
3251
  },
3251
3252
  versionNumber: {
3252
3253
  type: "integer",
3253
- minimum: -9007199254740991,
3254
- maximum: 9007199254740991
3254
+ minimum: -0x1fffffffffffff,
3255
+ maximum: 0x1fffffffffffff
3255
3256
  },
3256
3257
  wabaId: { type: "string" },
3257
3258
  providerFlowId: { anyOf: [{ type: "string" }, { type: "null" }] },
@@ -3276,13 +3277,13 @@ const WebhookEventJsonSchemas = {
3276
3277
  path: { type: "string" },
3277
3278
  line: {
3278
3279
  type: "integer",
3279
- minimum: -9007199254740991,
3280
- maximum: 9007199254740991
3280
+ minimum: -0x1fffffffffffff,
3281
+ maximum: 0x1fffffffffffff
3281
3282
  },
3282
3283
  column: {
3283
3284
  type: "integer",
3284
- minimum: -9007199254740991,
3285
- maximum: 9007199254740991
3285
+ minimum: -0x1fffffffffffff,
3286
+ maximum: 0x1fffffffffffff
3286
3287
  }
3287
3288
  },
3288
3289
  required: ["error", "message"],
@@ -3432,6 +3433,63 @@ const WebhookEventJsonSchemas = {
3432
3433
  ],
3433
3434
  additionalProperties: true
3434
3435
  },
3436
+ "whatsapp.number.updated": {
3437
+ type: "object",
3438
+ properties: {
3439
+ type: {
3440
+ type: "string",
3441
+ enum: ["whatsapp.number.updated"]
3442
+ },
3443
+ timestamp: { type: "string" },
3444
+ data: {
3445
+ type: "object",
3446
+ properties: {
3447
+ organizationId: {
3448
+ type: "string",
3449
+ pattern: "^org_[0-9a-hjkmnp-tv-z]{16,24}$"
3450
+ },
3451
+ namespaceId: { anyOf: [{
3452
+ type: "string",
3453
+ pattern: "^ns_[0-9a-hjkmnp-tv-z]{16,24}$"
3454
+ }, { type: "null" }] },
3455
+ businessAccountId: {
3456
+ type: "string",
3457
+ pattern: "^waba_[0-9a-hjkmnp-tv-z]{16,24}$"
3458
+ },
3459
+ phoneNumber: { type: "string" },
3460
+ phoneNumberId: { type: "string" },
3461
+ whatsappBusinessAccountId: { type: "string" },
3462
+ displayName: { type: "string" },
3463
+ verificationStatus: {
3464
+ type: "string",
3465
+ enum: [
3466
+ "pending",
3467
+ "verified",
3468
+ "failed",
3469
+ "suspended"
3470
+ ]
3471
+ }
3472
+ },
3473
+ required: [
3474
+ "organizationId",
3475
+ "namespaceId",
3476
+ "businessAccountId",
3477
+ "phoneNumber",
3478
+ "phoneNumberId",
3479
+ "whatsappBusinessAccountId",
3480
+ "displayName",
3481
+ "verificationStatus"
3482
+ ],
3483
+ additionalProperties: true
3484
+ }
3485
+ },
3486
+ required: [
3487
+ "type",
3488
+ "timestamp",
3489
+ "data"
3490
+ ],
3491
+ additionalProperties: true
3492
+ },
3435
3493
  "mailbox.message.received": {
3436
3494
  type: "object",
3437
3495
  properties: {
@@ -3811,7 +3869,7 @@ const WebhookEventJsonSchemas = {
3811
3869
  },
3812
3870
  reviewRound: {
3813
3871
  type: "integer",
3814
- maximum: 9007199254740991,
3872
+ maximum: 0x1fffffffffffff,
3815
3873
  exclusiveMinimum: 0
3816
3874
  },
3817
3875
  state: {
@@ -3828,7 +3886,7 @@ const WebhookEventJsonSchemas = {
3828
3886
  },
3829
3887
  reviewRound: {
3830
3888
  type: "integer",
3831
- maximum: 9007199254740991,
3889
+ maximum: 0x1fffffffffffff,
3832
3890
  exclusiveMinimum: 0
3833
3891
  },
3834
3892
  requirement: {
@@ -3912,7 +3970,7 @@ const WebhookEventJsonSchemas = {
3912
3970
  index: {
3913
3971
  type: "integer",
3914
3972
  minimum: 0,
3915
- maximum: 9007199254740991
3973
+ maximum: 0x1fffffffffffff
3916
3974
  }
3917
3975
  },
3918
3976
  required: ["scope", "index"],
@@ -4148,7 +4206,7 @@ const WebhookEventJsonSchemas = {
4148
4206
  },
4149
4207
  reviewRound: {
4150
4208
  type: "integer",
4151
- maximum: 9007199254740991,
4209
+ maximum: 0x1fffffffffffff,
4152
4210
  exclusiveMinimum: 0
4153
4211
  },
4154
4212
  threadId: { anyOf: [{
@@ -4779,8 +4837,8 @@ const WebhookEventJsonSchemas = {
4779
4837
  },
4780
4838
  journeyVersion: {
4781
4839
  type: "integer",
4782
- minimum: -9007199254740991,
4783
- maximum: 9007199254740991
4840
+ minimum: -0x1fffffffffffff,
4841
+ maximum: 0x1fffffffffffff
4784
4842
  },
4785
4843
  runId: {
4786
4844
  type: "string",
@@ -4828,4 +4886,4 @@ const WebhookEventJsonSchemas = {
4828
4886
  };
4829
4887
  export { WebhookEventJsonSchemas as t };
4830
4888
 
4831
- //# sourceMappingURL=json-schemas.gen-Ck8UIxoX.js.map
4889
+ //# sourceMappingURL=json-schemas.gen-C9ypfxiZ.js.map
package/dist/promise.js CHANGED
@@ -1,5 +1,5 @@
1
- import { a as generateWebhookSecret, c as verifyWebhookAt, d as MalformedWebhookPayloadError, f as WebhookCryptoError, g as isKnownEvent, h as WebhookVerificationError, i as WEBHOOK_TIMESTAMP_HEADER, l as InvalidWebhookHeadersError, m as WebhookTimestampError, n as WEBHOOK_ID_HEADER, o as readWebhookHeaders, p as WebhookSignatureError, r as WEBHOOK_SIGNATURE_HEADER, s as signWebhook, t as DEFAULT_TOLERANCE_SECONDS, u as InvalidWebhookSecretError } from "./protocol-DwRceAlj.js";
2
- import { t as WebhookEventJsonSchemas } from "./json-schemas.gen-Ck8UIxoX.js";
1
+ import { a as generateWebhookSecret, c as verifyWebhookAt, d as MalformedWebhookPayloadError, f as WebhookCryptoError, g as isKnownEvent, h as WebhookVerificationError, i as WEBHOOK_TIMESTAMP_HEADER, l as InvalidWebhookHeadersError, m as WebhookTimestampError, n as WEBHOOK_ID_HEADER, o as readWebhookHeaders, p as WebhookSignatureError, r as WEBHOOK_SIGNATURE_HEADER, s as signWebhook, t as DEFAULT_TOLERANCE_SECONDS, u as InvalidWebhookSecretError } from "./protocol-DNsu129I.js";
2
+ import { t as WebhookEventJsonSchemas } from "./json-schemas.gen-C9ypfxiZ.js";
3
3
  // src/promise.ts
4
4
  /**
5
5
  * Verifies a Samva webhook delivery from its body and header values, then returns its ID and
@@ -210,7 +210,7 @@ const validate1303 = (value) => isObject(value) && isObject(value) && Object.has
210
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
211
  const validate1307 = (value) => typeof value === "string" && (value === "dns-setup" || value === "provisioning" || value === "verifying" || value === "ready" || value === "degraded" || value === "failed");
212
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 >= -9007199254740991 && typeof value === "number" && value <= 9007199254740991;
213
+ const validate1311 = (value) => typeof value === "number" && Number.isInteger(value) && typeof value === "number" && value >= -0x1fffffffffffff && typeof value === "number" && value <= 0x1fffffffffffff;
214
214
  const validate1316 = (value) => validate1317(value) || validate6(value);
215
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
216
  const validate1318 = (value) => typeof value === "string" && (value === "pending" || value === "verified" || value === "failed" || value === "unknown");
@@ -235,7 +235,7 @@ const validate1376 = (value) => isObject(value) && isObject(value) && Object.has
235
235
  const validate1377 = (value) => typeof value === "string" && value === "email.sending.resumed";
236
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
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"]));
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, "targetReleasedAt") || validate2(value["targetReleasedAt"])) && (!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
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
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
241
  const validate1392 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^tpub_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
@@ -249,118 +249,121 @@ const validate1404 = (value) => typeof value === "string" && (value === "draft"
249
249
  const validate1405 = (value) => validate1393(value) || validate6(value);
250
250
  const validate1408 = (value) => typeof value === "string" && (value === "marketing" || value === "utility" || value === "authentication" || value === "transactional" || value === "service_implicit" || value === "service_explicit" || value === "promotional");
251
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 <= 9007199254740991 && 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 <= 9007199254740991;
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"]));
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"]));
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";
252
+ const validate1427 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1428(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1430(value["data"]));
253
+ const validate1428 = (value) => typeof value === "string" && value === "flow.registration.updated";
254
+ const validate1430 = (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") || validate1431(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") || validate1440(value["status"])) && (!Object.hasOwn(value, "validationErrors") || validate1441(value["validationErrors"])) && (!Object.hasOwn(value, "endpointAlerts") || validate1448(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") || validate1466(value["previousStatus"]));
255
+ const validate1431 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^wafreg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
256
+ const validate1440 = (value) => typeof value === "string" && (value === "draft" || value === "published" || value === "throttled" || value === "blocked" || value === "deprecated");
257
+ const validate1441 = (value) => Array.isArray(value) && Array.isArray(value) && value.every(validate1442);
258
+ const validate1442 = (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 validate1448 = (value) => Array.isArray(value) && Array.isArray(value) && value.every(validate1449);
260
+ const validate1449 = (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 validate1466 = (value) => validate1440(value) || validate6(value);
262
+ const validate1469 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1470(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1472(value["data"]));
263
+ const validate1470 = (value) => typeof value === "string" && value === "whatsapp.number.connected";
264
+ const validate1472 = (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") || validate1477(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") || validate1482(value["verificationStatus"])) && (!Object.hasOwn(value, "reconnected") || validate37(value["reconnected"])) && (!Object.hasOwn(value, "setupLink") || validate1484(value["setupLink"]));
265
+ const validate1477 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^waba_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
266
+ const validate1482 = (value) => typeof value === "string" && (value === "pending" || value === "verified" || value === "failed" || value === "suspended");
267
+ const validate1484 = (value) => validate1485(value) || validate6(value);
268
+ const validate1485 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "id") && Object.hasOwn(value, "metadata") && (!Object.hasOwn(value, "id") || validate1486(value["id"])) && (!Object.hasOwn(value, "metadata") || validate1487(value["metadata"]));
269
+ const validate1486 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^wasl_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
270
+ const validate1487 = (value) => isObject(value) && isObject(value);
271
+ const validate1489 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1490(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1492(value["data"]));
272
+ const validate1490 = (value) => typeof value === "string" && value === "whatsapp.number.updated";
273
+ const validate1492 = (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, "organizationId") || validate887(value["organizationId"])) && (!Object.hasOwn(value, "namespaceId") || validate1371(value["namespaceId"])) && (!Object.hasOwn(value, "businessAccountId") || validate1477(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") || validate1482(value["verificationStatus"]));
274
+ const validate1503 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1504(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1506(value["data"]));
275
+ const validate1504 = (value) => typeof value === "string" && value === "mailbox.message.received";
276
+ const validate1506 = (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") || validate1511(value["message"])) && (!Object.hasOwn(value, "thread") || validate1546(value["thread"]));
277
+ const validate1511 = (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") || validate1520(value["threadId"])) && (!Object.hasOwn(value, "from") || validate1521(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") || validate1539(value["attachments"])) && (!Object.hasOwn(value, "occurredAt") || validate2(value["occurredAt"]));
278
+ const validate1520 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^thread_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
279
+ const validate1521 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "address") && (!Object.hasOwn(value, "address") || validate2(value["address"])) && (!Object.hasOwn(value, "name") || validate8(value["name"]));
280
+ const validate1539 = (value) => Array.isArray(value) && Array.isArray(value) && value.every(validate1540);
281
+ const validate1540 = (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") || validate1541(value["id"])) && (!Object.hasOwn(value, "filename") || validate2(value["filename"])) && (!Object.hasOwn(value, "contentType") || validate2(value["contentType"])) && (!Object.hasOwn(value, "size") || validate15(value["size"]));
282
+ const validate1541 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^att_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
283
+ const validate1546 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "id") && Object.hasOwn(value, "subject") && Object.hasOwn(value, "preview") && (!Object.hasOwn(value, "id") || validate1520(value["id"])) && (!Object.hasOwn(value, "endpointId") || validate1548(value["endpointId"])) && (!Object.hasOwn(value, "subject") || validate8(value["subject"])) && (!Object.hasOwn(value, "preview") || validate8(value["preview"]));
284
+ const validate1548 = (value) => validate1549(value) || validate6(value);
285
+ const validate1549 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^mbxep_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
286
+ const validate1557 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1558(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1560(value["data"]));
287
+ const validate1558 = (value) => typeof value === "string" && value === "mailbox.message.sent";
288
+ const validate1560 = (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") || validate1565(value["actionId"])) && (!Object.hasOwn(value, "state") || validate1566(value["state"])) && (!Object.hasOwn(value, "acceptedAt") || validate2(value["acceptedAt"])) && (!Object.hasOwn(value, "actor") || validate1568(value["actor"])) && (!Object.hasOwn(value, "message") || validate1511(value["message"]));
289
+ const validate1565 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
290
+ const validate1566 = (value) => typeof value === "string" && value === "completed";
291
+ const validate1568 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "kind") && Object.hasOwn(value, "id") && Object.hasOwn(value, "source") && (!Object.hasOwn(value, "kind") || validate1569(value["kind"])) && (!Object.hasOwn(value, "id") || validate2(value["id"])) && (!Object.hasOwn(value, "displayName") || validate8(value["displayName"])) && (!Object.hasOwn(value, "source") || validate1574(value["source"]));
292
+ const validate1569 = (value) => typeof value === "string" && (value === "user" || value === "apiKey" || value === "extension" || value === "externalAgent" || value === "samvaAgent" || value === "system");
293
+ const validate1574 = (value) => typeof value === "string" && (value === "humanUi" || value === "externalApi" || value === "externalAgent" || value === "extension" || value === "samvaManagedAgent" || value === "system");
294
+ const validate1610 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1611(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1613(value["data"]));
295
+ const validate1611 = (value) => typeof value === "string" && value === "mailbox.action.pending_approval";
296
+ const validate1613 = (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") || validate1618(value["action"])) && (!Object.hasOwn(value, "draft") || validate1688(value["draft"])) && (!Object.hasOwn(value, "tool") || validate1698(value["tool"]));
297
+ const validate1618 = (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") || validate1565(value["id"])) && (!Object.hasOwn(value, "type") || validate1620(value["type"])) && (!Object.hasOwn(value, "reviewRound") || validate1621(value["reviewRound"])) && (!Object.hasOwn(value, "state") || validate1622(value["state"])) && (!Object.hasOwn(value, "decision") || validate1623(value["decision"])) && (!Object.hasOwn(value, "threadId") || validate1674(value["threadId"])) && (!Object.hasOwn(value, "reason") || validate8(value["reason"])) && (!Object.hasOwn(value, "proposedBy") || validate1568(value["proposedBy"])) && (!Object.hasOwn(value, "createdAt") || validate2(value["createdAt"]));
298
+ const validate1620 = (value) => typeof value === "string" && (value === "sendMessage" || value === "reply" || value === "updateDraft" || value === "createNote" || value === "assignThread" || value === "changeThreadState" || value === "call" || value === "extensionRequest" || value === "toolCall" || value === "handoff");
299
+ const validate1621 = (value) => typeof value === "number" && Number.isInteger(value) && typeof value === "number" && value <= 0x1fffffffffffff && typeof value === "number" && value > 0;
300
+ const validate1622 = (value) => typeof value === "string" && value === "approvalRequired";
301
+ const validate1623 = (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") || validate1624(value["id"])) && (!Object.hasOwn(value, "reviewRound") || validate1621(value["reviewRound"])) && (!Object.hasOwn(value, "requirement") || validate1626(value["requirement"])) && (!Object.hasOwn(value, "decider") || validate1627(value["decider"])) && (!Object.hasOwn(value, "outcome") || validate1628(value["outcome"])) && (!Object.hasOwn(value, "reason") || validate1629(value["reason"])) && (!Object.hasOwn(value, "scopes") || validate1630(value["scopes"])) && (!Object.hasOwn(value, "rule") || validate1634(value["rule"])) && (!Object.hasOwn(value, "guard") || validate1641(value["guard"])) && (!Object.hasOwn(value, "guardReason") || validate1641(value["guardReason"])) && (!Object.hasOwn(value, "resolution") || validate1647(value["resolution"]));
302
+ const validate1624 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^pdec_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
303
+ const validate1626 = (value) => typeof value === "string" && (value === "run" || value === "model" || value === "person" || value === "never");
304
+ const validate1627 = (value) => typeof value === "string" && (value === "rule" || value === "model" || value === "person" || value === "agent");
305
+ const validate1628 = (value) => typeof value === "string" && (value === "allow" || value === "hold" || value === "refuse");
306
+ const validate1629 = (value) => typeof value === "string" && typeof value === "string" && Array.from(value).length >= 1;
307
+ const validate1630 = (value) => Array.isArray(value) && Array.isArray(value) && value.every(validate1631);
308
+ const validate1631 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "kind") && Object.hasOwn(value, "id") && (!Object.hasOwn(value, "kind") || validate1632(value["kind"])) && (!Object.hasOwn(value, "id") || validate1629(value["id"]));
309
+ const validate1632 = (value) => typeof value === "string" && (value === "organization" || value === "integration" || value === "mailbox" || value === "agent" || value === "apiKey");
310
+ const validate1634 = (value) => validate1635(value) || validate6(value);
311
+ const validate1635 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "scope") && Object.hasOwn(value, "index") && (!Object.hasOwn(value, "scope") || validate1631(value["scope"])) && (!Object.hasOwn(value, "index") || validate1639(value["index"]));
312
+ const validate1639 = (value) => typeof value === "number" && Number.isInteger(value) && typeof value === "number" && value >= 0 && typeof value === "number" && value <= 0x1fffffffffffff;
313
+ const validate1641 = (value) => validate1629(value) || validate6(value);
314
+ const validate1647 = (value) => validate1648(value) || validate6(value);
315
+ const validate1648 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "by") && Object.hasOwn(value, "at") && Object.hasOwn(value, "as") && (!Object.hasOwn(value, "by") || validate1649(value["by"])) && (!Object.hasOwn(value, "at") || validate2(value["at"])) && (!Object.hasOwn(value, "as") || validate1651(value["as"])) && (!Object.hasOwn(value, "diff") || validate1652(value["diff"]));
316
+ const validate1649 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^user_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
317
+ const validate1651 = (value) => typeof value === "string" && (value === "approved" || value === "edited" || value === "denied" || value === "alwaysAllowed");
318
+ const validate1652 = (value) => validate1653(value) || validate6(value);
319
+ const validate1653 = (value) => isObject(value) && isObject(value) && (!Object.hasOwn(value, "text") || validate1654(value["text"])) && (!Object.hasOwn(value, "html") || validate1654(value["html"]));
320
+ const validate1654 = (value) => validate1655(value) || validate6(value);
321
+ const validate1655 = (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"]));
322
+ const validate1674 = (value) => validate1520(value) || validate6(value);
323
+ const validate1688 = (value) => validate1689(value) || validate6(value);
324
+ const validate1689 = (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"]));
325
+ const validate1698 = (value) => validate1699(value) || validate6(value);
326
+ const validate1699 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "name") && Object.hasOwn(value, "argumentsHash") && Object.hasOwn(value, "arguments") && (!Object.hasOwn(value, "name") || validate1700(value["name"])) && (!Object.hasOwn(value, "argumentsHash") || validate1701(value["argumentsHash"])) && (!Object.hasOwn(value, "arguments") || validate12(value["arguments"]));
327
+ const validate1700 = (value) => typeof value === "string" && typeof value === "string" && Array.from(value).length >= 1 && typeof value === "string" && Array.from(value).length <= 128;
328
+ const validate1701 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^[0-9a-f]{64}$", "u")).test(value);
329
+ const validate1704 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1705(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1707(value["data"]));
330
+ const validate1705 = (value) => typeof value === "string" && value === "mailbox.action.resolved";
331
+ const validate1707 = (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") || validate1712(value["action"])) && (!Object.hasOwn(value, "resolution") || validate1727(value["resolution"]));
332
+ const validate1712 = (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") || validate1565(value["id"])) && (!Object.hasOwn(value, "type") || validate1620(value["type"])) && (!Object.hasOwn(value, "reviewRound") || validate1621(value["reviewRound"])) && (!Object.hasOwn(value, "threadId") || validate1674(value["threadId"])) && (!Object.hasOwn(value, "proposedBy") || validate1568(value["proposedBy"])) && (!Object.hasOwn(value, "createdAt") || validate2(value["createdAt"]));
333
+ const validate1727 = (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") || validate1728(value["outcome"])) && (!Object.hasOwn(value, "actor") || validate1568(value["actor"])) && (!Object.hasOwn(value, "resolvedAt") || validate2(value["resolvedAt"])) && (!Object.hasOwn(value, "reason") || validate8(value["reason"]));
334
+ const validate1728 = (value) => typeof value === "string" && (value === "approved" || value === "denied" || value === "cancelled");
335
+ const validate1740 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1741(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1743(value["data"]));
336
+ const validate1741 = (value) => typeof value === "string" && value === "mailbox.message.spam";
337
+ const validate1743 = (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") || validate1748(value["disposition"])) && (!Object.hasOwn(value, "threadId") || validate1674(value["threadId"])) && (!Object.hasOwn(value, "reason") || validate621(value["reason"])) && (!Object.hasOwn(value, "source") || validate1755(value["source"])) && (!Object.hasOwn(value, "message") || validate1756(value["message"]));
338
+ const validate1748 = (value) => typeof value === "string" && (value === "spam" || value === "isolated");
339
+ const validate1755 = (value) => typeof value === "string" && (value === "receipt" || value === "classifier" || value === "reader");
340
+ const validate1756 = (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") || validate1521(value["from"])) && (!Object.hasOwn(value, "subject") || validate8(value["subject"])) && (!Object.hasOwn(value, "receivedAt") || validate2(value["receivedAt"]));
341
+ const validate1767 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1768(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1770(value["data"]));
342
+ const validate1768 = (value) => typeof value === "string" && value === "mailbox.message.discarded";
343
+ const validate1770 = (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") || validate1568(value["discardedBy"])) && (!Object.hasOwn(value, "disposition") || validate1782(value["disposition"])) && (!Object.hasOwn(value, "reason") || validate622(value["reason"])) && (!Object.hasOwn(value, "message") || validate1756(value["message"]));
344
+ const validate1782 = (value) => typeof value === "string" && (value === "quarantined" || value === "isolated");
345
+ const validate1795 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1796(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1798(value["data"]));
346
+ const validate1796 = (value) => typeof value === "string" && value === "mailbox.thread.deleted";
347
+ const validate1798 = (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") || validate1520(value["threadId"]));
349
348
  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";
349
+ const validate1805 = (value) => typeof value === "string" && value === "mailbox.message.delivered";
350
+ 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") || validate1520(value["threadId"])) && (!Object.hasOwn(value, "actionId") || validate1565(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"]));
351
+ const validate1818 = (value) => typeof value === "string" && value === "delivered";
353
352
  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"]));
353
+ const validate1820 = (value) => typeof value === "string" && value === "mailbox.message.read";
354
+ 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, "mailboxId") || validate5(value["mailboxId"])) && (!Object.hasOwn(value, "namespaceId") || validate1371(value["namespaceId"])) && (!Object.hasOwn(value, "threadId") || validate1520(value["threadId"])) && (!Object.hasOwn(value, "actionId") || validate1565(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"]));
355
+ const validate1833 = (value) => typeof value === "string" && value === "read";
356
+ const validate1834 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1835(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1837(value["data"]));
357
+ const validate1835 = (value) => typeof value === "string" && value === "mailbox.message.failed";
358
+ const validate1837 = (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") || validate1520(value["threadId"])) && (!Object.hasOwn(value, "actionId") || validate1565(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") || validate1848(value["status"])) && (!Object.hasOwn(value, "error") || validate1849(value["error"]));
359
+ const validate1848 = (value) => typeof value === "string" && value === "failed";
360
+ const validate1849 = (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"]));
361
+ const validate1856 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "type") && Object.hasOwn(value, "timestamp") && Object.hasOwn(value, "data") && (!Object.hasOwn(value, "type") || validate1857(value["type"])) && (!Object.hasOwn(value, "timestamp") || validate2(value["timestamp"])) && (!Object.hasOwn(value, "data") || validate1859(value["data"]));
362
+ const validate1857 = (value) => typeof value === "string" && value === "journey.webhook";
363
+ const validate1859 = (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") || validate1861(value["journeyId"])) && (!Object.hasOwn(value, "journeyVersion") || validate1311(value["journeyVersion"])) && (!Object.hasOwn(value, "runId") || validate1863(value["runId"])) && (!Object.hasOwn(value, "nodeId") || validate2(value["nodeId"])) && (!Object.hasOwn(value, "contact") || validate1865(value["contact"])) && (!Object.hasOwn(value, "data") || validate12(value["data"]));
364
+ const validate1861 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^jrny_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
365
+ const validate1863 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^jrun_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
366
+ const validate1865 = (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"]));
364
367
  /** Narrow an event to a structurally valid payload known to this package. */
365
368
  const isKnownEvent = (value) => {
366
369
  switch (value.type) {
@@ -392,19 +395,20 @@ const isKnownEvent = (value) => {
392
395
  case "email.sending.paused": return validate1366(value);
393
396
  case "email.sending.resumed": return validate1376(value);
394
397
  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);
398
+ case "flow.registration.updated": return validate1427(value);
399
+ case "whatsapp.number.connected": return validate1469(value);
400
+ case "whatsapp.number.updated": return validate1489(value);
401
+ case "mailbox.message.received": return validate1503(value);
402
+ case "mailbox.message.sent": return validate1557(value);
403
+ case "mailbox.action.pending_approval": return validate1610(value);
404
+ case "mailbox.action.resolved": return validate1704(value);
405
+ case "mailbox.message.spam": return validate1740(value);
406
+ case "mailbox.message.discarded": return validate1767(value);
407
+ case "mailbox.thread.deleted": return validate1795(value);
408
+ case "mailbox.message.delivered": return validate1804(value);
409
+ case "mailbox.message.read": return validate1819(value);
410
+ case "mailbox.message.failed": return validate1834(value);
411
+ case "journey.webhook": return validate1856(value);
408
412
  default: return false;
409
413
  }
410
414
  };
@@ -439,19 +443,20 @@ const validateEvent = (value) => {
439
443
  case "email.sending.paused": return validate1366(value);
440
444
  case "email.sending.resumed": return validate1376(value);
441
445
  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);
446
+ case "flow.registration.updated": return validate1427(value);
447
+ case "whatsapp.number.connected": return validate1469(value);
448
+ case "whatsapp.number.updated": return validate1489(value);
449
+ case "mailbox.message.received": return validate1503(value);
450
+ case "mailbox.message.sent": return validate1557(value);
451
+ case "mailbox.action.pending_approval": return validate1610(value);
452
+ case "mailbox.action.resolved": return validate1704(value);
453
+ case "mailbox.message.spam": return validate1740(value);
454
+ case "mailbox.message.discarded": return validate1767(value);
455
+ case "mailbox.thread.deleted": return validate1795(value);
456
+ case "mailbox.message.delivered": return validate1804(value);
457
+ case "mailbox.message.read": return validate1819(value);
458
+ case "mailbox.message.failed": return validate1834(value);
459
+ case "journey.webhook": return validate1856(value);
455
460
  default: return true;
456
461
  }
457
462
  };
@@ -730,4 +735,4 @@ const readWebhookHeaders = (headers) => requireHeaders({
730
735
  });
731
736
  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 };
732
737
 
733
- //# sourceMappingURL=protocol-DwRceAlj.js.map
738
+ //# sourceMappingURL=protocol-DNsu129I.js.map
package/dist/protocol.js CHANGED
@@ -1 +1 @@
1
- export { t as DEFAULT_TOLERANCE_SECONDS, l as InvalidWebhookHeadersError, u as InvalidWebhookSecretError, d as MalformedWebhookPayloadError, n as WEBHOOK_ID_HEADER, r as WEBHOOK_SIGNATURE_HEADER, i as WEBHOOK_TIMESTAMP_HEADER, f as WebhookCryptoError, p as WebhookSignatureError, m as WebhookTimestampError, h as WebhookVerificationError, a as generateWebhookSecret, g as isKnownEvent, o as readWebhookHeaders, s as signWebhook, c as verifyWebhookAt } from "./protocol-DwRceAlj.js";
1
+ export { t as DEFAULT_TOLERANCE_SECONDS, l as InvalidWebhookHeadersError, u as InvalidWebhookSecretError, d as MalformedWebhookPayloadError, n as WEBHOOK_ID_HEADER, r as WEBHOOK_SIGNATURE_HEADER, i as WEBHOOK_TIMESTAMP_HEADER, f as WebhookCryptoError, p as WebhookSignatureError, m as WebhookTimestampError, h as WebhookVerificationError, a as generateWebhookSecret, g as isKnownEvent, o as readWebhookHeaders, s as signWebhook, c as verifyWebhookAt } from "./protocol-DNsu129I.js";
@@ -895,6 +895,7 @@ export declare const TemplateRegistrationUpdatedEventSchema: Schema.StructWithRe
895
895
  readonly providerCategory: Schema.Union<readonly [Schema.Literals<readonly ["marketing", "utility", "authentication", "transactional", "service_implicit", "service_explicit", "promotional"]>, Schema.Null]>;
896
896
  readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
897
897
  readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
898
+ readonly targetReleasedAt: Schema.optionalKey<Schema.String>;
898
899
  readonly submittedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
899
900
  readonly statusChangedAt: Schema.String;
900
901
  readonly createdAt: Schema.String;
@@ -956,6 +957,20 @@ export declare const WhatsappNumberConnectedEventSchema: Schema.StructWithRest<S
956
957
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.Null]>;
957
958
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
958
959
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
960
+ export declare const WhatsappNumberUpdatedEventSchema: Schema.StructWithRest<Schema.Struct<{
961
+ readonly type: Schema.Literal<"whatsapp.number.updated">;
962
+ readonly timestamp: Schema.String;
963
+ readonly data: Schema.StructWithRest<Schema.Struct<{
964
+ readonly organizationId: Schema.String;
965
+ readonly namespaceId: Schema.Union<readonly [Schema.String, Schema.Null]>;
966
+ readonly businessAccountId: Schema.String;
967
+ readonly phoneNumber: Schema.String;
968
+ readonly phoneNumberId: Schema.String;
969
+ readonly whatsappBusinessAccountId: Schema.String;
970
+ readonly displayName: Schema.String;
971
+ readonly verificationStatus: Schema.Literals<readonly ["pending", "verified", "failed", "suspended"]>;
972
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
973
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
959
974
  export declare const MailboxMessageReceivedEventSchema: Schema.StructWithRest<Schema.Struct<{
960
975
  readonly type: Schema.Literal<"mailbox.message.received">;
961
976
  readonly timestamp: Schema.String;
@@ -2130,6 +2145,7 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
2130
2145
  readonly providerCategory: Schema.Union<readonly [Schema.Literals<readonly ["marketing", "utility", "authentication", "transactional", "service_implicit", "service_explicit", "promotional"]>, Schema.Null]>;
2131
2146
  readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
2132
2147
  readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
2148
+ readonly targetReleasedAt: Schema.optionalKey<Schema.String>;
2133
2149
  readonly submittedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
2134
2150
  readonly statusChangedAt: Schema.String;
2135
2151
  readonly createdAt: Schema.String;
@@ -2188,6 +2204,19 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
2188
2204
  readonly metadata: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
2189
2205
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.Null]>;
2190
2206
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2207
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
2208
+ readonly type: Schema.Literal<"whatsapp.number.updated">;
2209
+ readonly timestamp: Schema.String;
2210
+ readonly data: Schema.StructWithRest<Schema.Struct<{
2211
+ readonly organizationId: Schema.String;
2212
+ readonly namespaceId: Schema.Union<readonly [Schema.String, Schema.Null]>;
2213
+ readonly businessAccountId: Schema.String;
2214
+ readonly phoneNumber: Schema.String;
2215
+ readonly phoneNumberId: Schema.String;
2216
+ readonly whatsappBusinessAccountId: Schema.String;
2217
+ readonly displayName: Schema.String;
2218
+ readonly verificationStatus: Schema.Literals<readonly ["pending", "verified", "failed", "suspended"]>;
2219
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2191
2220
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
2192
2221
  readonly type: Schema.Literal<"mailbox.message.received">;
2193
2222
  readonly timestamp: Schema.String;
@@ -1112,11 +1112,11 @@ const DomainUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
1112
1112
  ]),
1113
1113
  dns: Schema.StructWithRest(Schema.Struct({
1114
1114
  observed: Schema.Boolean,
1115
- total: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
1116
- satisfied: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
1117
- missing: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
1118
- mismatch: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
1119
- unknown: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
1115
+ total: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-0x1fffffffffffff).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
1116
+ satisfied: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-0x1fffffffffffff).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
1117
+ missing: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-0x1fffffffffffff).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
1118
+ mismatch: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-0x1fffffffffffff).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
1119
+ unknown: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-0x1fffffffffffff).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" }))
1120
1120
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
1121
1121
  provider: Schema.Union([Schema.StructWithRest(Schema.Struct({
1122
1122
  identity: Schema.Literals([
@@ -1252,6 +1252,7 @@ const TemplateRegistrationUpdatedEventSchema = Schema.StructWithRest(Schema.Stru
1252
1252
  ]), Schema.Null]),
1253
1253
  providerTemplateId: Schema.Union([Schema.String, Schema.Null]),
1254
1254
  reason: Schema.Union([Schema.String, Schema.Null]),
1255
+ targetReleasedAt: Schema.optionalKey(Schema.String),
1255
1256
  submittedAt: Schema.Union([Schema.String, Schema.Null]),
1256
1257
  statusChangedAt: Schema.String,
1257
1258
  createdAt: Schema.String,
@@ -1274,7 +1275,7 @@ const FlowRegistrationUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
1274
1275
  id: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^wafreg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^wafreg_[0-9a-hjkmnp-tv-z]{16,24}$" })),
1275
1276
  flowId: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^waflow_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^waflow_[0-9a-hjkmnp-tv-z]{16,24}$" })),
1276
1277
  versionId: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^wafver_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^wafver_[0-9a-hjkmnp-tv-z]{16,24}$" })),
1277
- versionNumber: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
1278
+ versionNumber: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-0x1fffffffffffff).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
1278
1279
  wabaId: Schema.String,
1279
1280
  providerFlowId: Schema.Union([Schema.String, Schema.Null]),
1280
1281
  name: Schema.String,
@@ -1289,8 +1290,8 @@ const FlowRegistrationUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
1289
1290
  error: Schema.String,
1290
1291
  message: Schema.String,
1291
1292
  path: Schema.optionalKey(Schema.String),
1292
- line: Schema.optionalKey(Schema.Int.check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))),
1293
- column: Schema.optionalKey(Schema.Int.check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })))
1293
+ line: Schema.optionalKey(Schema.Int.check(Schema.isGreaterThanOrEqualTo(-0x1fffffffffffff).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" }))),
1294
+ column: Schema.optionalKey(Schema.Int.check(Schema.isGreaterThanOrEqualTo(-0x1fffffffffffff).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })))
1294
1295
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
1295
1296
  endpointAlerts: Schema.Array(Schema.StructWithRest(Schema.Struct({
1296
1297
  kind: Schema.String,
@@ -1337,6 +1338,25 @@ const WhatsappNumberConnectedEventSchema = Schema.StructWithRest(Schema.Struct({
1337
1338
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])
1338
1339
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
1339
1340
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
1341
+ const WhatsappNumberUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
1342
+ type: Schema.Literal("whatsapp.number.updated"),
1343
+ timestamp: Schema.String,
1344
+ data: Schema.StructWithRest(Schema.Struct({
1345
+ organizationId: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^org_[0-9a-hjkmnp-tv-z]{16,24}$" })),
1346
+ namespaceId: Schema.Union([Schema.String.check(Schema.isPattern(new globalThis.RegExp("^ns_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^ns_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null]),
1347
+ businessAccountId: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^waba_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^waba_[0-9a-hjkmnp-tv-z]{16,24}$" })),
1348
+ phoneNumber: Schema.String,
1349
+ phoneNumberId: Schema.String,
1350
+ whatsappBusinessAccountId: Schema.String,
1351
+ displayName: Schema.String,
1352
+ verificationStatus: Schema.Literals([
1353
+ "pending",
1354
+ "verified",
1355
+ "failed",
1356
+ "suspended"
1357
+ ])
1358
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
1359
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
1340
1360
  const MailboxMessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
1341
1361
  type: Schema.Literal("mailbox.message.received"),
1342
1362
  timestamp: Schema.String,
@@ -1462,11 +1482,11 @@ const MailboxActionPendingApprovalEventSchema = Schema.StructWithRest(Schema.Str
1462
1482
  "toolCall",
1463
1483
  "handoff"
1464
1484
  ]),
1465
- reviewRound: Schema.Int.check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })),
1485
+ reviewRound: Schema.Int.check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })),
1466
1486
  state: Schema.optionalKey(Schema.Literal("approvalRequired").annotate({ description: "Deliveries recorded before this field existed omit it." })),
1467
1487
  decision: Schema.StructWithRest(Schema.Struct({
1468
1488
  id: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^pdec_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^pdec_[0-9a-hjkmnp-tv-z]{16,24}$" })),
1469
- reviewRound: Schema.Int.check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })),
1489
+ reviewRound: Schema.Int.check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })),
1470
1490
  requirement: Schema.Literals([
1471
1491
  "run",
1472
1492
  "model",
@@ -1506,7 +1526,7 @@ const MailboxActionPendingApprovalEventSchema = Schema.StructWithRest(Schema.Str
1506
1526
  ]),
1507
1527
  id: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
1508
1528
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
1509
- index: Schema.Int.check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
1529
+ index: Schema.Int.check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" }))
1510
1530
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
1511
1531
  guard: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
1512
1532
  guardReason: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
@@ -1587,7 +1607,7 @@ const MailboxActionResolvedEventSchema = Schema.StructWithRest(Schema.Struct({
1587
1607
  "toolCall",
1588
1608
  "handoff"
1589
1609
  ]),
1590
- reviewRound: Schema.Int.check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })),
1610
+ reviewRound: Schema.Int.check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })),
1591
1611
  threadId: Schema.Union([Schema.String.check(Schema.isPattern(new globalThis.RegExp("^thread_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^thread_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null]),
1592
1612
  proposedBy: Schema.StructWithRest(Schema.Struct({
1593
1613
  kind: Schema.Literals([
@@ -1800,7 +1820,7 @@ const JourneyWebhookEventSchema = Schema.StructWithRest(Schema.Struct({
1800
1820
  data: Schema.StructWithRest(Schema.Struct({
1801
1821
  organizationId: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^org_[0-9a-hjkmnp-tv-z]{16,24}$" })),
1802
1822
  journeyId: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^jrny_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^jrny_[0-9a-hjkmnp-tv-z]{16,24}$" })),
1803
- journeyVersion: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
1823
+ journeyVersion: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-0x1fffffffffffff).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
1804
1824
  runId: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^jrun_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^jrun_[0-9a-hjkmnp-tv-z]{16,24}$" })),
1805
1825
  nodeId: Schema.String,
1806
1826
  contact: Schema.StructWithRest(Schema.Struct({
@@ -1842,6 +1862,7 @@ const SamvaWebhookEventSchema = Schema.Union([
1842
1862
  TemplateRegistrationUpdatedEventSchema,
1843
1863
  FlowRegistrationUpdatedEventSchema,
1844
1864
  WhatsappNumberConnectedEventSchema,
1865
+ WhatsappNumberUpdatedEventSchema,
1845
1866
  MailboxMessageReceivedEventSchema,
1846
1867
  MailboxMessageSentEventSchema,
1847
1868
  MailboxActionPendingApprovalEventSchema,
@@ -1854,6 +1875,6 @@ const SamvaWebhookEventSchema = Schema.Union([
1854
1875
  MailboxMessageFailedEventSchema,
1855
1876
  JourneyWebhookEventSchema
1856
1877
  ]);
1857
- export { ContactConsentChangedEventSchema, ContactCreatedEventSchema, ContactDeletedEventSchema, ContactResubscribedEventSchema, ContactSubscribedEventSchema, ContactUnsubscribedEventSchema, ContactUpdatedEventSchema, ConversationArchivedEventSchema, ConversationCreatedEventSchema, ConversationUpdatedEventSchema, DomainUpdatedEventSchema, DomainWarmingUpdatedEventSchema, EmailSendingPausedEventSchema, EmailSendingResumedEventSchema, FlowRegistrationUpdatedEventSchema, JourneyWebhookEventSchema, MailboxActionPendingApprovalEventSchema, MailboxActionResolvedEventSchema, MailboxMessageDeliveredEventSchema, MailboxMessageDiscardedEventSchema, MailboxMessageFailedEventSchema, MailboxMessageReadEventSchema, MailboxMessageReceivedEventSchema, MailboxMessageSentEventSchema, MailboxMessageSpamEventSchema, MailboxThreadDeletedEventSchema, MessageBouncedEventSchema, MessageClickedEventSchema, MessageComplainedEventSchema, MessageDeliveredEventSchema, MessageFailedEventSchema, MessageOpenedEventSchema, MessageReadEventSchema, MessageReceivedEventSchema, MessageSentEventSchema, SamvaWebhookEventSchema, TemplateRegistrationUpdatedEventSchema, WebhookCreatedEventSchema, WebhookDeletedEventSchema, WebhookTestEventSchema, WebhookUpdatedEventSchema, WhatsappNumberConnectedEventSchema };
1878
+ export { ContactConsentChangedEventSchema, ContactCreatedEventSchema, ContactDeletedEventSchema, ContactResubscribedEventSchema, ContactSubscribedEventSchema, ContactUnsubscribedEventSchema, ContactUpdatedEventSchema, ConversationArchivedEventSchema, ConversationCreatedEventSchema, ConversationUpdatedEventSchema, DomainUpdatedEventSchema, DomainWarmingUpdatedEventSchema, EmailSendingPausedEventSchema, EmailSendingResumedEventSchema, FlowRegistrationUpdatedEventSchema, JourneyWebhookEventSchema, MailboxActionPendingApprovalEventSchema, MailboxActionResolvedEventSchema, MailboxMessageDeliveredEventSchema, MailboxMessageDiscardedEventSchema, MailboxMessageFailedEventSchema, MailboxMessageReadEventSchema, MailboxMessageReceivedEventSchema, MailboxMessageSentEventSchema, MailboxMessageSpamEventSchema, MailboxThreadDeletedEventSchema, MessageBouncedEventSchema, MessageClickedEventSchema, MessageComplainedEventSchema, MessageDeliveredEventSchema, MessageFailedEventSchema, MessageOpenedEventSchema, MessageReadEventSchema, MessageReceivedEventSchema, MessageSentEventSchema, SamvaWebhookEventSchema, TemplateRegistrationUpdatedEventSchema, WebhookCreatedEventSchema, WebhookDeletedEventSchema, WebhookTestEventSchema, WebhookUpdatedEventSchema, WhatsappNumberConnectedEventSchema, WhatsappNumberUpdatedEventSchema };
1858
1879
 
1859
1880
  //# sourceMappingURL=schemas.gen.js.map
@@ -1192,6 +1192,7 @@ export type TemplateRegistrationUpdatedEvent = {
1192
1192
  readonly providerCategory: "marketing" | "utility" | "authentication" | "transactional" | "service_implicit" | "service_explicit" | "promotional" | null;
1193
1193
  readonly providerTemplateId: string | null;
1194
1194
  readonly reason: string | null;
1195
+ readonly targetReleasedAt?: string;
1195
1196
  readonly submittedAt: string | null;
1196
1197
  readonly statusChangedAt: string;
1197
1198
  readonly createdAt: string;
@@ -1276,6 +1277,25 @@ export type WhatsappNumberConnectedEvent = {
1276
1277
  readonly [x: string]: JsonValue;
1277
1278
  };
1278
1279
  export type WhatsappNumberConnectedPayload = WhatsappNumberConnectedEvent["data"];
1280
+ export type WhatsappNumberUpdatedEvent = {
1281
+ readonly type: "whatsapp.number.updated";
1282
+ readonly timestamp: string;
1283
+ readonly data: {
1284
+ readonly organizationId: string;
1285
+ readonly namespaceId: string | null;
1286
+ readonly businessAccountId: string;
1287
+ readonly phoneNumber: string;
1288
+ readonly phoneNumberId: string;
1289
+ readonly whatsappBusinessAccountId: string;
1290
+ readonly displayName: string;
1291
+ readonly verificationStatus: "pending" | "verified" | "failed" | "suspended";
1292
+ } & {
1293
+ readonly [x: string]: JsonValue;
1294
+ };
1295
+ } & {
1296
+ readonly [x: string]: JsonValue;
1297
+ };
1298
+ export type WhatsappNumberUpdatedPayload = WhatsappNumberUpdatedEvent["data"];
1279
1299
  export type MailboxMessageReceivedEvent = {
1280
1300
  readonly type: "mailbox.message.received";
1281
1301
  readonly timestamp: string;
@@ -1706,7 +1726,7 @@ export type JourneyWebhookEvent = {
1706
1726
  readonly [x: string]: JsonValue;
1707
1727
  };
1708
1728
  export type JourneyWebhookPayload = JourneyWebhookEvent["data"];
1709
- export type SamvaWebhookEvent = MessageSentEvent | MessageDeliveredEvent | MessageReadEvent | MessageFailedEvent | MessageBouncedEvent | MessageComplainedEvent | MessageReceivedEvent | MessageOpenedEvent | MessageClickedEvent | ContactCreatedEvent | ContactUpdatedEvent | ContactDeletedEvent | ContactSubscribedEvent | ContactUnsubscribedEvent | ContactResubscribedEvent | ContactConsentChangedEvent | ConversationCreatedEvent | ConversationUpdatedEvent | ConversationArchivedEvent | WebhookCreatedEvent | WebhookUpdatedEvent | WebhookDeletedEvent | WebhookTestEvent | DomainUpdatedEvent | DomainWarmingUpdatedEvent | EmailSendingPausedEvent | EmailSendingResumedEvent | TemplateRegistrationUpdatedEvent | FlowRegistrationUpdatedEvent | WhatsappNumberConnectedEvent | MailboxMessageReceivedEvent | MailboxMessageSentEvent | MailboxActionPendingApprovalEvent | MailboxActionResolvedEvent | MailboxMessageSpamEvent | MailboxMessageDiscardedEvent | MailboxThreadDeletedEvent | MailboxMessageDeliveredEvent | MailboxMessageReadEvent | MailboxMessageFailedEvent | JourneyWebhookEvent;
1729
+ export type SamvaWebhookEvent = MessageSentEvent | MessageDeliveredEvent | MessageReadEvent | MessageFailedEvent | MessageBouncedEvent | MessageComplainedEvent | MessageReceivedEvent | MessageOpenedEvent | MessageClickedEvent | ContactCreatedEvent | ContactUpdatedEvent | ContactDeletedEvent | ContactSubscribedEvent | ContactUnsubscribedEvent | ContactResubscribedEvent | ContactConsentChangedEvent | ConversationCreatedEvent | ConversationUpdatedEvent | ConversationArchivedEvent | WebhookCreatedEvent | WebhookUpdatedEvent | WebhookDeletedEvent | WebhookTestEvent | DomainUpdatedEvent | DomainWarmingUpdatedEvent | EmailSendingPausedEvent | EmailSendingResumedEvent | TemplateRegistrationUpdatedEvent | FlowRegistrationUpdatedEvent | WhatsappNumberConnectedEvent | WhatsappNumberUpdatedEvent | MailboxMessageReceivedEvent | MailboxMessageSentEvent | MailboxActionPendingApprovalEvent | MailboxActionResolvedEvent | MailboxMessageSpamEvent | MailboxMessageDiscardedEvent | MailboxThreadDeletedEvent | MailboxMessageDeliveredEvent | MailboxMessageReadEvent | MailboxMessageFailedEvent | JourneyWebhookEvent;
1710
1730
  export interface UnknownWebhookEvent {
1711
1731
  readonly type: string;
1712
1732
  readonly timestamp: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@samva/webhooks",
3
- "version": "0.54.0",
3
+ "version": "0.56.0",
4
4
  "description": "Runtime-neutral verification for Samva webhook deliveries",
5
5
  "keywords": [
6
6
  "samva",
@@ -66,7 +66,7 @@
66
66
  "test:bundle": "slot --all 'bun run build && bun run scripts/check-bundle.ts \"$@\"'"
67
67
  },
68
68
  "devDependencies": {
69
- "@effect/tsgo": "0.69.0",
69
+ "@effect/tsgo": "0.74.1",
70
70
  "@effect/vitest": "^4.1.4",
71
71
  "@samva/openapi": "0.0.0",
72
72
  "ajv": "^8.20.0",
@@ -74,7 +74,7 @@
74
74
  "effect": "^4.1.4",
75
75
  "tsdown": "0.23.7",
76
76
  "typescript": "^7.0.2",
77
- "vitest": "5.1.1"
77
+ "vitest": "5.1.2"
78
78
  },
79
79
  "peerDependencies": {
80
80
  "effect": "^4.0.4"