samva 0.13.0 → 0.15.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.
Files changed (73) hide show
  1. package/AGENTS.md +9 -0
  2. package/README.md +55 -6
  3. package/dist/{categories-Bcwq5jPV.js → categories-BGUBFdH9.js} +9 -1
  4. package/dist/client/sdk.gen.d.ts +129 -27
  5. package/dist/client/types.gen.d.ts +920 -166
  6. package/dist/{client-DYPNDvVU.js → client-CDg7zJs0.js} +760 -147
  7. package/dist/effect/analytics.d.ts +6 -6
  8. package/dist/effect/analytics.js +1 -1
  9. package/dist/effect/api-keys.d.ts +20 -20
  10. package/dist/effect/api-keys.js +1 -1
  11. package/dist/effect/attachments.js +1 -1
  12. package/dist/effect/brands.js +2 -2
  13. package/dist/effect/campaigns.d.ts +12 -12
  14. package/dist/effect/campaigns.js +1 -1
  15. package/dist/effect/categories.js +1 -1
  16. package/dist/effect/client.js +1 -1
  17. package/dist/effect/contact-groups.d.ts +9 -9
  18. package/dist/effect/contact-groups.js +1 -1
  19. package/dist/effect/contacts.d.ts +126 -73
  20. package/dist/effect/contacts.js +1 -1
  21. package/dist/effect/conversations.d.ts +20 -20
  22. package/dist/effect/conversations.js +1 -1
  23. package/dist/effect/custom-fields.d.ts +1 -1
  24. package/dist/effect/custom-fields.js +1 -1
  25. package/dist/effect/email.d.ts +26 -26
  26. package/dist/effect/email.js +2 -2
  27. package/dist/effect/extension-installations.d.ts +3 -3
  28. package/dist/effect/extension-installations.js +1 -1
  29. package/dist/effect/extensions.d.ts +3 -3
  30. package/dist/effect/extensions.js +1 -1
  31. package/dist/effect/feedback.d.ts +1 -1
  32. package/dist/effect/feedback.js +2 -2
  33. package/dist/effect/generated-metadata.d.ts +8 -0
  34. package/dist/effect/generated.d.ts +6335 -1112
  35. package/dist/effect/index.d.ts +2 -1
  36. package/dist/effect/index.js +6 -5
  37. package/dist/effect/internal/client.d.ts +2 -2
  38. package/dist/effect/internal/operation.d.ts +9 -9
  39. package/dist/effect/mailboxes.d.ts +1775 -109
  40. package/dist/effect/mailboxes.js +3 -3
  41. package/dist/effect/media.d.ts +1 -1
  42. package/dist/effect/media.js +1 -1
  43. package/dist/effect/messages.d.ts +19 -17
  44. package/dist/effect/messages.js +1 -1
  45. package/dist/effect/namespaces.js +1 -1
  46. package/dist/effect/operations.d.ts +6 -6
  47. package/dist/effect/operations.js +1 -1
  48. package/dist/effect/organizations.d.ts +30 -0
  49. package/dist/effect/organizations.js +4 -2
  50. package/dist/effect/retry.js +1 -1
  51. package/dist/effect/scheduled-messages.d.ts +6 -6
  52. package/dist/effect/scheduled-messages.js +1 -1
  53. package/dist/effect/subscriptions.d.ts +15 -0
  54. package/dist/effect/subscriptions.js +9 -0
  55. package/dist/effect/templates.d.ts +52 -14
  56. package/dist/effect/templates.js +5 -3
  57. package/dist/effect/unsubscribe-groups.d.ts +1 -1
  58. package/dist/effect/unsubscribe-groups.js +1 -1
  59. package/dist/effect/webhooks.d.ts +15 -15
  60. package/dist/effect/webhooks.js +2 -2
  61. package/dist/index.js +4 -4
  62. package/dist/{inline-attachments-B56eS0MF.js → inline-attachments-UxLeyytJ.js} +2 -2
  63. package/dist/{mailbox-events-CsbF35vH.js → mailbox-events-VKR4f3qq.js} +6 -4
  64. package/dist/mailbox-events.d.ts +1 -1
  65. package/dist/{mailboxes-D3Kx7elM.js → mailboxes-BH_JPmOE.js} +17 -5
  66. package/dist/{operation-B_Ty1LG-.js → operation-BZ5Xov-x.js} +37 -3
  67. package/dist/promises/errors.gen.d.ts +26 -2
  68. package/dist/promises/index.d.ts +6 -4
  69. package/dist/promises/index.js +4 -4
  70. package/dist/promises/types.gen.d.ts +1 -1
  71. package/dist/{promises-D9FJyU0q.js → promises-Cd6Jamqk.js} +1004 -47
  72. package/dist/service-map.d.ts +45 -0
  73. package/package.json +7 -2
@@ -1,5 +1,5 @@
1
- import { i as uploadContentType, o as CLIENT_ATTRIBUTION_HEADER, s as clientAttribution, t as MediaUploadError } from "./inline-attachments-B56eS0MF.js";
2
- import { Context, Effect, Layer, Schema, SchemaTransformation } from "effect";
1
+ import { i as uploadContentType, o as CLIENT_ATTRIBUTION_HEADER, s as clientAttribution, t as MediaUploadError } from "./inline-attachments-UxLeyytJ.js";
2
+ import { Context, Effect, Layer, Redacted, Schema, SchemaTransformation } from "effect";
3
3
  import { HttpApi, HttpApiClient, HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema, HttpApiSecurity, OpenApi } from "effect/http-api";
4
4
  import * as Schema$1 from "effect/Schema";
5
5
  import * as FetchHttpClient from "effect/http/FetchHttpClient";
@@ -240,6 +240,12 @@ const ContactIdentityId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__
240
240
  expected: "a string matching the RegExp ^cident_[0-9a-hjkmnp-tv-z]{16,24}$",
241
241
  identifier: "ContactIdentityId"
242
242
  })).pipe(Schema$1.brand("ContactIdentityId"));
243
+ const ContactCustomFields = Schema$1.Record(Schema$1.String, Schema$1.Union([
244
+ Schema$1.String,
245
+ Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
246
+ Schema$1.Boolean,
247
+ Schema$1.Null
248
+ ])).annotate({ identifier: "ContactCustomFields" });
243
249
  const ContactIdentityInput = Schema$1.Struct({
244
250
  channel: Schema$1.Literal("email"),
245
251
  identifier: Schema$1.String,
@@ -251,12 +257,6 @@ const ContactLocation = Schema$1.Struct({
251
257
  city: Schema$1.String,
252
258
  timezone: Schema$1.String
253
259
  }).annotate({ identifier: "ContactLocation" });
254
- const ContactCustomFields = Schema$1.Record(Schema$1.String, Schema$1.Union([
255
- Schema$1.String,
256
- Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
257
- Schema$1.Boolean,
258
- Schema$1.Null
259
- ])).annotate({ identifier: "ContactCustomFields" });
260
260
  const ContactPreferences = Schema$1.Struct({
261
261
  preferredChannels: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.Literal("email")), Schema$1.Null])),
262
262
  language: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
@@ -273,6 +273,20 @@ const BulkUpdateResult = Schema$1.Struct({
273
273
  updated: Schema$1.Finite.check(Schema$1.isInt().annotate({ expected: "an integer" })).check(Schema$1.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
274
274
  failed: Schema$1.Finite.check(Schema$1.isInt().annotate({ expected: "an integer" })).check(Schema$1.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }))
275
275
  }).annotate({ identifier: "BulkUpdateResult" });
276
+ const ContactLookup = Schema$1.Union([
277
+ Schema$1.Struct({
278
+ type: Schema$1.Literal("email"),
279
+ value: Schema$1.String.check(Schema$1.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
280
+ }),
281
+ Schema$1.Struct({
282
+ type: Schema$1.Literal("phone"),
283
+ value: Schema$1.String.check(Schema$1.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
284
+ }),
285
+ Schema$1.Struct({
286
+ type: Schema$1.Literal("externalId"),
287
+ value: Schema$1.String.check(Schema$1.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
288
+ })
289
+ ]).annotate({ identifier: "ContactLookup" });
276
290
  const UnknownRecord = Schema$1.Record(Schema$1.String, JsonValue).annotate({ identifier: "UnknownRecord" });
277
291
  const CustomFieldDefinitionId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^cfield_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
278
292
  expected: "a string matching the RegExp ^cfield_[0-9a-hjkmnp-tv-z]{16,24}$",
@@ -570,11 +584,6 @@ const FeedbackId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new
570
584
  identifier: "FeedbackId"
571
585
  })).pipe(Schema$1.brand("FeedbackId"));
572
586
  const MailboxStatus = Schema$1.Union([Schema$1.Literal("active"), Schema$1.Literal("paused")]).annotate({ identifier: "MailboxStatus" });
573
- const CreateMailboxAddressPayload = Schema$1.Struct({
574
- address: Schema$1.String,
575
- displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
576
- domainId: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
577
- }).annotate({ identifier: "CreateMailboxAddressPayload" });
578
587
  const MailboxMetadata = Schema$1.Record(Schema$1.String, Schema$1.String.check(Schema$1.isMaxCodePoints(512).annotate({ expected: "a string with at most 512 code points" })).check(Schema$1.isMaxLength(512).annotate({ expected: "a value with a length of at most 512" }))).check(Schema$1.isPropertyNames(Schema$1.String.check(Schema$1.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema$1.isMaxCodePoints(64).annotate({ expected: "a string with at most 64 code points" }))).annotate({
579
588
  expected: "an object with property names matching the schema",
580
589
  identifier: "MailboxMetadata"
@@ -591,14 +600,14 @@ const MailboxMetadataPatch = Schema$1.Record(Schema$1.String, Schema$1.Union([Sc
591
600
  expected: "an object with property names matching the schema",
592
601
  identifier: "MailboxMetadataPatch"
593
602
  }));
594
- const MailboxActionId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
595
- expected: "a string matching the RegExp ^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$",
596
- identifier: "MailboxActionId"
597
- })).pipe(Schema$1.brand("MailboxActionId"));
598
603
  const MailboxThreadId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^thread_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
599
604
  expected: "a string matching the RegExp ^thread_[0-9a-hjkmnp-tv-z]{16,24}$",
600
605
  identifier: "MailboxThreadId"
601
606
  })).pipe(Schema$1.brand("MailboxThreadId"));
607
+ const MailboxActionId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
608
+ expected: "a string matching the RegExp ^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$",
609
+ identifier: "MailboxActionId"
610
+ })).pipe(Schema$1.brand("MailboxActionId"));
602
611
  const MailboxDraftId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^mdraft_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
603
612
  expected: "a string matching the RegExp ^mdraft_[0-9a-hjkmnp-tv-z]{16,24}$",
604
613
  identifier: "MailboxDraftId"
@@ -607,6 +616,74 @@ const MailboxPolicyId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */
607
616
  expected: "a string matching the RegExp ^mbxpol_[0-9a-hjkmnp-tv-z]{16,24}$",
608
617
  identifier: "MailboxPolicyId"
609
618
  })).pipe(Schema$1.brand("MailboxPolicyId"));
619
+ const MailboxSendError = Schema$1.Union([
620
+ Schema$1.Struct({
621
+ _tag: Schema$1.Literal("SenderNotReadyError"),
622
+ message: Schema$1.String,
623
+ sender: Schema$1.String,
624
+ retryAfterSeconds: Schema$1.optionalKey(Schema$1.Union([Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })), Schema$1.Null]))
625
+ }),
626
+ Schema$1.Struct({
627
+ _tag: Schema$1.Literal("RateLimitedError"),
628
+ message: Schema$1.String,
629
+ retryAfterSeconds: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" }))
630
+ }),
631
+ Schema$1.Struct({
632
+ _tag: Schema$1.Literal("OnboardingReviewRequiredError"),
633
+ message: Schema$1.String,
634
+ code: Schema$1.Union([
635
+ Schema$1.Literal("review_required"),
636
+ Schema$1.Literal("review_in_progress"),
637
+ Schema$1.Literal("information_required"),
638
+ Schema$1.Literal("review_rejected"),
639
+ Schema$1.Literal("identity_review_required"),
640
+ Schema$1.Literal("identity_review_rejected"),
641
+ Schema$1.Literal("identity_changed")
642
+ ]),
643
+ decision: Schema$1.Union([
644
+ Schema$1.Literal("undecided"),
645
+ Schema$1.Literal("approved"),
646
+ Schema$1.Literal("rejected")
647
+ ]),
648
+ stage: Schema$1.Union([
649
+ Schema$1.Literal("collecting"),
650
+ Schema$1.Literal("automated_review"),
651
+ Schema$1.Literal("manual_review"),
652
+ Schema$1.Literal("information_requested"),
653
+ Schema$1.Literal("complete")
654
+ ]),
655
+ nextAction: Schema$1.Union([
656
+ Schema$1.Literal("wait_for_review"),
657
+ Schema$1.Literal("provide_information"),
658
+ Schema$1.Literal("verify_sending_identity"),
659
+ Schema$1.Literal("reapply"),
660
+ Schema$1.Literal("contact_support")
661
+ ]),
662
+ identityId: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
663
+ }),
664
+ Schema$1.Struct({
665
+ _tag: Schema$1.Literal("PaymentRequiredError"),
666
+ message: Schema$1.String,
667
+ resource: Schema$1.String,
668
+ currentUsage: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
669
+ limit: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" }))
670
+ }),
671
+ Schema$1.Struct({
672
+ _tag: Schema$1.Literal("ValidationError"),
673
+ message: Schema$1.String,
674
+ fields: Schema$1.optionalKey(Schema$1.Union([Schema$1.Record(Schema$1.String, Schema$1.Array(Schema$1.String)), Schema$1.Null]))
675
+ }),
676
+ Schema$1.Struct({
677
+ _tag: Schema$1.Literal("ForbiddenError"),
678
+ message: Schema$1.String
679
+ }),
680
+ Schema$1.Struct({
681
+ _tag: Schema$1.Literal("ResourceNotFoundError"),
682
+ resource: Schema$1.String,
683
+ id: Schema$1.String,
684
+ message: Schema$1.String
685
+ })
686
+ ]).annotate({ identifier: "MailboxSendError" });
610
687
  var OnboardingReviewRequiredError = class extends Schema$1.TaggedError()("OnboardingReviewRequiredError", Schema$1.Struct({
611
688
  message: Schema$1.String,
612
689
  code: Schema$1.Union([
@@ -664,7 +741,12 @@ const MailboxAgentActivity = Schema$1.Struct({
664
741
  Schema$1.Literal("approvalDenied"),
665
742
  Schema$1.Literal("executing"),
666
743
  Schema$1.Literal("executed"),
667
- Schema$1.Literal("failed")
744
+ Schema$1.Literal("failed"),
745
+ Schema$1.Literal("queued"),
746
+ Schema$1.Literal("accepted"),
747
+ Schema$1.Literal("completed"),
748
+ Schema$1.Literal("notSent"),
749
+ Schema$1.Literal("uncertain")
668
750
  ]),
669
751
  count: Schema$1.Finite.check(Schema$1.isInt().annotate({ expected: "an integer" })).check(Schema$1.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }))
670
752
  }))
@@ -673,17 +755,16 @@ const MailboxAgentActivity = Schema$1.Struct({
673
755
  type: Schema$1.Union([
674
756
  Schema$1.Literal("mailbox.created"),
675
757
  Schema$1.Literal("address.attached"),
758
+ Schema$1.Literal("address.detached"),
676
759
  Schema$1.Literal("email.received"),
677
760
  Schema$1.Literal("email.released"),
678
761
  Schema$1.Literal("email.sent"),
679
762
  Schema$1.Literal("thread.created"),
680
- Schema$1.Literal("thread.updated"),
681
- Schema$1.Literal("draft.created"),
682
- Schema$1.Literal("draft.updated"),
683
763
  Schema$1.Literal("action.proposed"),
684
764
  Schema$1.Literal("action.policy_decided"),
685
765
  Schema$1.Literal("action.approval_requested"),
686
766
  Schema$1.Literal("action.approval_resolved"),
767
+ Schema$1.Literal("action.accepted"),
687
768
  Schema$1.Literal("action.executed"),
688
769
  Schema$1.Literal("action.failed")
689
770
  ]),
@@ -693,7 +774,7 @@ const MailboxAgentActivity = Schema$1.Struct({
693
774
  }).annotate({ identifier: "MailboxAgentActivity" });
694
775
  const MailboxDraftState = Schema$1.Union([
695
776
  Schema$1.Literal("saved"),
696
- Schema$1.Literal("approvalPending"),
777
+ Schema$1.Literal("locked"),
697
778
  Schema$1.Literal("sent")
698
779
  ]).annotate({ identifier: "MailboxDraftState" });
699
780
  const MailboxEventId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^mbxevt_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
@@ -913,6 +994,10 @@ const Organization = Schema$1.Struct({
913
994
  teamMembersUsed: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
914
995
  messagesResetAt: Schema$1.Union([Schema$1.String, Schema$1.Null])
915
996
  }).annotate({ identifier: "Organization" });
997
+ const SubscribeResult = Schema$1.Struct({
998
+ success: Schema$1.Boolean,
999
+ expiresAt: Schema$1.String
1000
+ }).annotate({ identifier: "SubscribeResult" });
916
1001
  const TemplateProjectId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^tproj_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
917
1002
  expected: "a string matching the RegExp ^tproj_[0-9a-hjkmnp-tv-z]{16,24}$",
918
1003
  identifier: "TemplateProjectId"
@@ -935,6 +1020,12 @@ const BrandFooterBlock = Schema$1.Struct({
935
1020
  html: Schema$1.String,
936
1021
  text: Schema$1.String
937
1022
  }).annotate({ identifier: "BrandFooterBlock" });
1023
+ const TemplatePublicationRender = Schema$1.Struct({
1024
+ subject: Schema$1.String,
1025
+ preheader: Schema$1.optionalKey(Schema$1.String),
1026
+ html: Schema$1.String.check(Schema$1.isMaxCodePoints(2097152).annotate({ expected: "a string with at most 2097152 code points" })).check(Schema$1.isMaxLength(2097152).annotate({ expected: "a value with a length of at most 2097152" })),
1027
+ text: Schema$1.String.check(Schema$1.isMaxCodePoints(2097152).annotate({ expected: "a string with at most 2097152 code points" })).check(Schema$1.isMaxLength(2097152).annotate({ expected: "a value with a length of at most 2097152" }))
1028
+ }).annotate({ identifier: "TemplatePublicationRender" });
938
1029
  const UnsubscribeGroupMemberPage = Schema$1.Struct({
939
1030
  items: Schema$1.Array(Schema$1.Struct({
940
1031
  id: Schema$1.String,
@@ -1006,6 +1097,10 @@ Schema$1.Struct({
1006
1097
  dailyGrowthPercent: Schema$1.Finite.check(Schema$1.isInt().annotate({ expected: "an integer" })).check(Schema$1.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema$1.isLessThanOrEqualTo(1e4).annotate({ expected: "a value less than or equal to 10000" })),
1007
1098
  targetDailyRecipients: Schema$1.Finite.check(Schema$1.isInt().annotate({ expected: "an integer" })).check(Schema$1.isLessThanOrEqualTo(1e6).annotate({ expected: "a value less than or equal to 1000000" })).check(Schema$1.isGreaterThan(0).annotate({ expected: "a value greater than 0" }))
1008
1099
  }).annotate({ identifier: "CreateDomainWarmingPlanPayload" });
1100
+ Schema$1.Struct({
1101
+ address: Schema$1.String,
1102
+ displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
1103
+ }).annotate({ identifier: "CreateMailboxAddressPayload" });
1009
1104
  Schema$1.Struct({
1010
1105
  slug: Schema$1.String,
1011
1106
  displayName: Schema$1.String,
@@ -1144,6 +1239,7 @@ const CreateWebhookPayload = Schema$1.Struct({
1144
1239
  Schema$1.Literal("contact.created"),
1145
1240
  Schema$1.Literal("contact.updated"),
1146
1241
  Schema$1.Literal("contact.deleted"),
1242
+ Schema$1.Literal("contact.subscribed"),
1147
1243
  Schema$1.Literal("contact.unsubscribed"),
1148
1244
  Schema$1.Literal("contact.resubscribed"),
1149
1245
  Schema$1.Literal("conversation.created"),
@@ -1198,6 +1294,7 @@ const UpdateWebhookPayload = Schema$1.Struct({
1198
1294
  Schema$1.Literal("contact.created"),
1199
1295
  Schema$1.Literal("contact.updated"),
1200
1296
  Schema$1.Literal("contact.deleted"),
1297
+ Schema$1.Literal("contact.subscribed"),
1201
1298
  Schema$1.Literal("contact.unsubscribed"),
1202
1299
  Schema$1.Literal("contact.resubscribed"),
1203
1300
  Schema$1.Literal("conversation.created"),
@@ -1262,7 +1359,8 @@ const MessageSummary = Schema$1.Struct({
1262
1359
  Schema$1.Literal("campaign-paused"),
1263
1360
  Schema$1.Literal("domain-warming"),
1264
1361
  Schema$1.Literal("onboarding-review"),
1265
- Schema$1.Literal("content-review")
1362
+ Schema$1.Literal("content-review"),
1363
+ Schema$1.Literal("screening-unavailable")
1266
1364
  ]), Schema$1.Null]),
1267
1365
  createdAt: Schema$1.String
1268
1366
  }).annotate({ identifier: "MessageSummary" });
@@ -1289,6 +1387,13 @@ const EmailAttachment = Schema$1.Struct({
1289
1387
  contentType: Schema$1.String,
1290
1388
  size: Schema$1.Finite.check(Schema$1.isInt().annotate({ expected: "an integer" })).check(Schema$1.isLessThanOrEqualTo(26214400).annotate({ expected: "a value less than or equal to 26214400" })).check(Schema$1.isGreaterThan(0).annotate({ expected: "a value greater than 0" }))
1291
1389
  }).annotate({ identifier: "EmailAttachment" });
1390
+ const MailboxCopiedAttachment = Schema$1.Struct({
1391
+ filename: Schema$1.String,
1392
+ content: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
1393
+ mediaId: Schema$1.optionalKey(Schema$1.Union([MediaId, Schema$1.Null])),
1394
+ contentType: Schema$1.String,
1395
+ size: Schema$1.Finite.check(Schema$1.isInt().annotate({ expected: "an integer" })).check(Schema$1.isLessThanOrEqualTo(26214400).annotate({ expected: "a value less than or equal to 26214400" })).check(Schema$1.isGreaterThan(0).annotate({ expected: "a value greater than 0" }))
1396
+ }).annotate({ identifier: "MailboxCopiedAttachment" });
1292
1397
  const Media = Schema$1.Struct({
1293
1398
  id: MediaId,
1294
1399
  organizationId: OrganizationId,
@@ -1351,6 +1456,11 @@ const TemplateFamilyMember = Schema$1.Struct({
1351
1456
  updatedAt: Schema$1.String
1352
1457
  }).annotate({ identifier: "TemplateFamilyMember" });
1353
1458
  const TemplateData = Schema$1.Union([JsonObject, Schema$1.Null]).annotate({ identifier: "TemplateData" });
1459
+ Schema$1.Struct({
1460
+ data: Schema$1.Record(Schema$1.String, JsonValue).annotate({ description: "The input to render with, validated against the publication's input schema." }),
1461
+ locale: Schema$1.optionalKey(RenderLocale),
1462
+ timeZone: Schema$1.optionalKey(RenderTimeZone)
1463
+ }).annotate({ identifier: "RenderTemplatePublicationPayload" });
1354
1464
  const CampaignPolicy = Schema$1.Struct({
1355
1465
  unsubscribeGroupId: Schema$1.optionalKey(Schema$1.Union([UnsubscribeId, Schema$1.Null])),
1356
1466
  pageSize: Schema$1.optionalKey(Schema$1.Union([Schema$1.Finite.check(Schema$1.isInt().annotate({ expected: "an integer" })).check(Schema$1.isGreaterThanOrEqualTo(100).annotate({ expected: "a value greater than or equal to 100" })).check(Schema$1.isLessThanOrEqualTo(1e3).annotate({ expected: "a value less than or equal to 1000" })), Schema$1.Null]))
@@ -1388,6 +1498,8 @@ const MessageContent = Schema$1.Struct({
1388
1498
  tracking: Schema$1.optionalKey(EmailTrackingOverrideV1),
1389
1499
  attachments: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.Struct({
1390
1500
  filename: Schema$1.String,
1501
+ contentId: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
1502
+ isInline: Schema$1.optionalKey(Schema$1.Union([Schema$1.Boolean, Schema$1.Null])),
1391
1503
  content: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
1392
1504
  mediaId: Schema$1.optionalKey(Schema$1.Union([MediaId, Schema$1.Null])),
1393
1505
  contentType: Schema$1.String,
@@ -1522,6 +1634,18 @@ const ContactGroupMembershipPage = Schema$1.Struct({
1522
1634
  })),
1523
1635
  nextCursor: Schema$1.Union([Schema$1.String, Schema$1.Null])
1524
1636
  }).annotate({ identifier: "ContactGroupMembershipPage" });
1637
+ Schema$1.Struct({
1638
+ email: Schema$1.String.annotate({ description: "The recipient email address; confirmation proves consent for this address." }).check(Schema$1.isMaxCodePoints(320).annotate({ expected: "a string with at most 320 code points" })).check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$", "u")).annotate({ expected: "a string matching the RegExp ^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$" })).check(Schema$1.isMaxLength(320).annotate({ expected: "a value with a length of at most 320" })),
1639
+ contactGroupId: ContactGroupId,
1640
+ from: Schema$1.Struct({
1641
+ email: Schema$1.String,
1642
+ name: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
1643
+ }).annotate({ description: "Your verified email sender. The ordinary send pipeline selects its domain and customer brand." }),
1644
+ unsubscribeGroupId: Schema$1.optionalKey(Schema$1.Union([UnsubscribeId, Schema$1.Null]).annotate({ description: "Clear this unsubscribe group after confirmation; all other opt-outs remain." })),
1645
+ templateSlug: Schema$1.optionalKey(Schema$1.Union([Schema$1.String.annotate({ description: "A published email template slug receiving confirmUrl. Omit it to send the default confirmation email." }).check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })), Schema$1.Null])),
1646
+ consentIp: Schema$1.optionalKey(Schema$1.Union([Schema$1.String.annotate({ description: "The recipient IP recorded by your server when they requested subscription." }).check(Schema$1.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema$1.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })), Schema$1.Null])),
1647
+ consentSource: Schema$1.optionalKey(Schema$1.Union([Schema$1.String.annotate({ description: "The signup page or source recorded by your server when consent was requested." }).check(Schema$1.isMaxCodePoints(512).annotate({ expected: "a string with at most 512 code points" })).check(Schema$1.isMaxLength(512).annotate({ expected: "a value with a length of at most 512" })), Schema$1.Null]))
1648
+ }).annotate({ identifier: "SubscribePayload" });
1525
1649
  const CampaignLatestRun = Schema$1.Struct({
1526
1650
  id: CampaignRunId,
1527
1651
  status: Schema$1.Union([
@@ -1771,6 +1895,7 @@ const WebhookEndpoint = Schema$1.Struct({
1771
1895
  Schema$1.Literal("contact.created"),
1772
1896
  Schema$1.Literal("contact.updated"),
1773
1897
  Schema$1.Literal("contact.deleted"),
1898
+ Schema$1.Literal("contact.subscribed"),
1774
1899
  Schema$1.Literal("contact.unsubscribed"),
1775
1900
  Schema$1.Literal("contact.resubscribed"),
1776
1901
  Schema$1.Literal("conversation.created"),
@@ -2170,20 +2295,16 @@ const MailboxSummary = Schema$1.Struct({
2170
2295
  id: MailboxId,
2171
2296
  namespaceId: Schema$1.Union([NamespaceId, Schema$1.Null]),
2172
2297
  slug: Schema$1.String,
2173
- displayName: Schema$1.String,
2298
+ name: Schema$1.String,
2174
2299
  status: MailboxStatus,
2175
2300
  primaryAddress: Schema$1.Union([Schema$1.String, Schema$1.Null]),
2176
2301
  createdAt: Schema$1.String
2177
2302
  }).annotate({ identifier: "MailboxSummary" });
2178
2303
  Schema$1.Struct({
2179
2304
  namespaceId: Schema$1.optionalKey(Schema$1.Union([NamespaceId, Schema$1.Null])),
2180
- displayName: Schema$1.String,
2181
- slug: Schema$1.String,
2182
- addresses: Schema$1.TupleWithRest(Schema$1.Tuple([CreateMailboxAddressPayload]), [CreateMailboxAddressPayload]),
2183
- defaultFrom: Schema$1.optionalKey(Schema$1.Union([Schema$1.Struct({
2184
- address: Schema$1.String,
2185
- displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
2186
- }), Schema$1.Null])),
2305
+ address: Schema$1.String,
2306
+ name: Schema$1.String,
2307
+ slug: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
2187
2308
  metadata: Schema$1.optionalKey(Schema$1.Union([MailboxMetadata, Schema$1.Null]))
2188
2309
  }).annotate({ identifier: "CreateMailboxPayload" });
2189
2310
  const MailboxAddress = Schema$1.Struct({
@@ -2194,7 +2315,7 @@ const MailboxAddress = Schema$1.Struct({
2194
2315
  displayName: Schema$1.Union([Schema$1.String, Schema$1.Null])
2195
2316
  }).annotate({ identifier: "MailboxAddress" });
2196
2317
  Schema$1.Struct({
2197
- displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.String.check(Schema$1.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema$1.Null])),
2318
+ name: Schema$1.optionalKey(Schema$1.Union([Schema$1.String.check(Schema$1.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema$1.Null])),
2198
2319
  metadata: Schema$1.optionalKey(Schema$1.Union([MailboxMetadataPatch, Schema$1.Null])),
2199
2320
  defaultFrom: Schema$1.optionalKey(Schema$1.Union([Schema$1.Struct({
2200
2321
  address: Schema$1.String,
@@ -2233,13 +2354,24 @@ const MailboxActionDecision = Schema$1.Struct({
2233
2354
  ]),
2234
2355
  reason: Schema$1.Union([Schema$1.String, Schema$1.Null]),
2235
2356
  policyId: Schema$1.Union([MailboxPolicyId, Schema$1.Null]),
2357
+ source: Schema$1.Union([Schema$1.Union([
2358
+ Schema$1.Literal("grant"),
2359
+ Schema$1.Literal("installation"),
2360
+ Schema$1.Literal("policy")
2361
+ ]), Schema$1.Null]),
2236
2362
  decidedAt: Schema$1.String
2237
2363
  }).annotate({ identifier: "MailboxActionDecision" });
2364
+ const MailboxSendOutcome = Schema$1.Struct({
2365
+ code: Schema$1.String,
2366
+ message: Schema$1.String,
2367
+ error: Schema$1.optionalKey(Schema$1.Union([MailboxSendError, Schema$1.Null]))
2368
+ }).annotate({ identifier: "MailboxSendOutcome" });
2238
2369
  const MailboxDraftSummary = Schema$1.Struct({
2239
2370
  id: MailboxDraftId,
2240
2371
  threadId: Schema$1.Union([MailboxThreadId, Schema$1.Null]),
2241
2372
  inReplyToMessageId: Schema$1.Union([MessageId, Schema$1.Null]),
2242
2373
  state: MailboxDraftState,
2374
+ lockedByActionId: Schema$1.Union([MailboxActionId, Schema$1.Null]),
2243
2375
  to: Schema$1.Array(Schema$1.String),
2244
2376
  subject: Schema$1.Union([Schema$1.String, Schema$1.Null]),
2245
2377
  createdAt: Schema$1.String,
@@ -2250,17 +2382,16 @@ const MailboxEvent = Schema$1.Struct({
2250
2382
  type: Schema$1.Union([
2251
2383
  Schema$1.Literal("mailbox.created"),
2252
2384
  Schema$1.Literal("address.attached"),
2385
+ Schema$1.Literal("address.detached"),
2253
2386
  Schema$1.Literal("email.received"),
2254
2387
  Schema$1.Literal("email.released"),
2255
2388
  Schema$1.Literal("email.sent"),
2256
2389
  Schema$1.Literal("thread.created"),
2257
- Schema$1.Literal("thread.updated"),
2258
- Schema$1.Literal("draft.created"),
2259
- Schema$1.Literal("draft.updated"),
2260
2390
  Schema$1.Literal("action.proposed"),
2261
2391
  Schema$1.Literal("action.policy_decided"),
2262
2392
  Schema$1.Literal("action.approval_requested"),
2263
2393
  Schema$1.Literal("action.approval_resolved"),
2394
+ Schema$1.Literal("action.accepted"),
2264
2395
  Schema$1.Literal("action.executed"),
2265
2396
  Schema$1.Literal("action.failed")
2266
2397
  ]),
@@ -2537,7 +2668,8 @@ const MessageDelivery = Schema$1.Struct({
2537
2668
  Schema$1.Literal("campaign-paused"),
2538
2669
  Schema$1.Literal("domain-warming"),
2539
2670
  Schema$1.Literal("onboarding-review"),
2540
- Schema$1.Literal("content-review")
2671
+ Schema$1.Literal("content-review"),
2672
+ Schema$1.Literal("screening-unavailable")
2541
2673
  ]), Schema$1.Null]),
2542
2674
  nextRetryAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
2543
2675
  sentAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
@@ -2729,6 +2861,7 @@ const WebhookEndpointListItem = Schema$1.Struct({
2729
2861
  Schema$1.Literal("contact.created"),
2730
2862
  Schema$1.Literal("contact.updated"),
2731
2863
  Schema$1.Literal("contact.deleted"),
2864
+ Schema$1.Literal("contact.subscribed"),
2732
2865
  Schema$1.Literal("contact.unsubscribed"),
2733
2866
  Schema$1.Literal("contact.resubscribed"),
2734
2867
  Schema$1.Literal("conversation.created"),
@@ -2862,11 +2995,28 @@ const UpdateBrand = Schema$1.Struct({
2862
2995
  footer: Schema$1.optionalKey(Schema$1.Union([BrandFooter, Schema$1.Null]))
2863
2996
  }).annotate({ identifier: "UpdateBrand" });
2864
2997
  const EmailAttachments = Schema$1.Union([Schema$1.Array(EmailAttachment).check(Schema$1.isMaxLength(10).annotate({ expected: "a value with a length of at most 10" })), Schema$1.Null]).annotate({ identifier: "EmailAttachments" });
2998
+ const MailboxSendSnapshot = Schema$1.Struct({
2999
+ draftRevision: Schema$1.Finite.check(Schema$1.isInt().annotate({ expected: "an integer" })).check(Schema$1.isGreaterThan(0).annotate({ expected: "a value greater than 0" })),
3000
+ from: Schema$1.String,
3001
+ fromName: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3002
+ to: Schema$1.TupleWithRest(Schema$1.Tuple([Schema$1.String]), [Schema$1.String]),
3003
+ cc: Schema$1.Array(Schema$1.String),
3004
+ bcc: Schema$1.Array(Schema$1.String),
3005
+ replyTo: Schema$1.Array(Schema$1.String),
3006
+ subject: Schema$1.String,
3007
+ text: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3008
+ html: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3009
+ attachments: Schema$1.Array(EmailAttachment).check(Schema$1.isMaxLength(10).annotate({ expected: "a value with a length of at most 10" })),
3010
+ threadId: Schema$1.Union([MailboxThreadId, Schema$1.Null]),
3011
+ conversationId: Schema$1.Union([ConversationId, Schema$1.Null]),
3012
+ inReplyToMessageId: Schema$1.Union([MessageId, Schema$1.Null])
3013
+ }).annotate({ identifier: "MailboxSendSnapshot" });
2865
3014
  const MailboxDraft = Schema$1.Struct({
2866
3015
  id: MailboxDraftId,
2867
3016
  threadId: Schema$1.Union([MailboxThreadId, Schema$1.Null]),
2868
3017
  inReplyToMessageId: Schema$1.Union([MessageId, Schema$1.Null]),
2869
3018
  state: MailboxDraftState,
3019
+ lockedByActionId: Schema$1.Union([MailboxActionId, Schema$1.Null]),
2870
3020
  to: Schema$1.Array(Schema$1.String),
2871
3021
  subject: Schema$1.Union([Schema$1.String, Schema$1.Null]),
2872
3022
  createdAt: Schema$1.String,
@@ -2935,27 +3085,6 @@ const TemplateFamily = Schema$1.Struct({
2935
3085
  createdAt: Schema$1.String,
2936
3086
  updatedAt: Schema$1.String
2937
3087
  }).annotate({ identifier: "TemplateFamily" });
2938
- const MailboxSendReceipt = Schema$1.Struct({
2939
- actionId: MailboxActionId,
2940
- messageId: Schema$1.Union([MessageId, Schema$1.Null]),
2941
- threadId: MailboxThreadId,
2942
- status: Schema$1.Union([Schema$1.Literal("sent"), Schema$1.Literal("pending_approval")]),
2943
- waitReason: Schema$1.Union([Schema$1.Union([
2944
- Schema$1.Literal("rate"),
2945
- Schema$1.Literal("daily-quota"),
2946
- Schema$1.Literal("domain-health"),
2947
- Schema$1.Literal("sending-paused"),
2948
- Schema$1.Literal("upstream-unavailable"),
2949
- Schema$1.Literal("retry"),
2950
- Schema$1.Literal("campaign-paused"),
2951
- Schema$1.Literal("domain-warming"),
2952
- Schema$1.Literal("onboarding-review"),
2953
- Schema$1.Literal("content-review")
2954
- ]), Schema$1.Null]),
2955
- reviewExpectedAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
2956
- skippedRecipients: Schema$1.Array(SkippedRecipient),
2957
- createdAt: Schema$1.String
2958
- }).annotate({ identifier: "MailboxSendReceipt" });
2959
3088
  const MessageReceipt = Schema$1.Struct({
2960
3089
  id: MessageId,
2961
3090
  status: Schema$1.Union([
@@ -2980,7 +3109,8 @@ const MessageReceipt = Schema$1.Struct({
2980
3109
  Schema$1.Literal("campaign-paused"),
2981
3110
  Schema$1.Literal("domain-warming"),
2982
3111
  Schema$1.Literal("onboarding-review"),
2983
- Schema$1.Literal("content-review")
3112
+ Schema$1.Literal("content-review"),
3113
+ Schema$1.Literal("screening-unavailable")
2984
3114
  ]), Schema$1.Null]),
2985
3115
  reviewExpectedAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
2986
3116
  skippedRecipients: Schema$1.Array(SkippedRecipient),
@@ -3010,6 +3140,7 @@ const ContactSummary = Schema$1.Struct({
3010
3140
  channels: Schema$1.Array(Schema$1.Literal("email")),
3011
3141
  tags: Schema$1.Array(Schema$1.String),
3012
3142
  lists: Schema$1.Array(ContactListMembership),
3143
+ customFields: Schema$1.optionalKey(Schema$1.Union([ContactCustomFields, Schema$1.Null])),
3013
3144
  lastActiveAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3014
3145
  createdAt: Schema$1.String
3015
3146
  }).annotate({ identifier: "ContactSummary" });
@@ -3412,7 +3543,7 @@ const Mailbox = Schema$1.Struct({
3412
3543
  id: MailboxId,
3413
3544
  namespaceId: Schema$1.Union([NamespaceId, Schema$1.Null]),
3414
3545
  slug: Schema$1.String,
3415
- displayName: Schema$1.String,
3546
+ name: Schema$1.String,
3416
3547
  status: MailboxStatus,
3417
3548
  primaryAddress: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3418
3549
  createdAt: Schema$1.String,
@@ -3426,29 +3557,8 @@ const MailboxQuarantinePage = Schema$1.Struct({
3426
3557
  items: Schema$1.Array(MailboxQuarantinedMessage),
3427
3558
  nextCursor: Schema$1.Union([Schema$1.String, Schema$1.Null])
3428
3559
  }).annotate({ identifier: "MailboxQuarantinePage" });
3429
- const MailboxAction = Schema$1.Struct({
3560
+ const MailboxNonSendAction = Schema$1.Struct({
3430
3561
  id: MailboxActionId,
3431
- type: Schema$1.Union([
3432
- Schema$1.Literal("sendMessage"),
3433
- Schema$1.Literal("reply"),
3434
- Schema$1.Literal("updateDraft"),
3435
- Schema$1.Literal("createNote"),
3436
- Schema$1.Literal("assignThread"),
3437
- Schema$1.Literal("changeThreadState"),
3438
- Schema$1.Literal("call"),
3439
- Schema$1.Literal("extensionRequest")
3440
- ]),
3441
- state: Schema$1.Union([
3442
- Schema$1.Literal("proposed"),
3443
- Schema$1.Literal("allowed"),
3444
- Schema$1.Literal("approvalRequired"),
3445
- Schema$1.Literal("policyDenied"),
3446
- Schema$1.Literal("approved"),
3447
- Schema$1.Literal("approvalDenied"),
3448
- Schema$1.Literal("executing"),
3449
- Schema$1.Literal("executed"),
3450
- Schema$1.Literal("failed")
3451
- ]),
3452
3562
  source: Schema$1.Union([
3453
3563
  Schema$1.Literal("humanUi"),
3454
3564
  Schema$1.Literal("externalApi"),
@@ -3474,8 +3584,101 @@ const MailboxAction = Schema$1.Struct({
3474
3584
  draftId: Schema$1.Union([MailboxDraftId, Schema$1.Null]),
3475
3585
  decision: Schema$1.Union([MailboxActionDecision, Schema$1.Null]),
3476
3586
  createdAt: Schema$1.String,
3587
+ updatedAt: Schema$1.String,
3588
+ type: Schema$1.Union([
3589
+ Schema$1.Literal("updateDraft"),
3590
+ Schema$1.Literal("createNote"),
3591
+ Schema$1.Literal("assignThread"),
3592
+ Schema$1.Literal("changeThreadState"),
3593
+ Schema$1.Literal("call"),
3594
+ Schema$1.Literal("extensionRequest")
3595
+ ]),
3596
+ state: Schema$1.Union([
3597
+ Schema$1.Literal("proposed"),
3598
+ Schema$1.Literal("allowed"),
3599
+ Schema$1.Literal("approvalRequired"),
3600
+ Schema$1.Literal("policyDenied"),
3601
+ Schema$1.Literal("approved"),
3602
+ Schema$1.Literal("approvalDenied"),
3603
+ Schema$1.Literal("executing"),
3604
+ Schema$1.Literal("executed"),
3605
+ Schema$1.Literal("failed")
3606
+ ])
3607
+ }).annotate({ identifier: "MailboxNonSendAction" });
3608
+ const MailboxSendReceipt = Schema$1.Struct({
3609
+ actionId: MailboxActionId,
3610
+ draftId: Schema$1.Union([MailboxDraftId, Schema$1.Null]),
3611
+ messageId: Schema$1.Union([MessageId, Schema$1.Null]),
3612
+ threadId: Schema$1.Union([MailboxThreadId, Schema$1.Null]),
3613
+ state: Schema$1.Union([
3614
+ Schema$1.Literal("approvalRequired"),
3615
+ Schema$1.Literal("queued"),
3616
+ Schema$1.Literal("accepted"),
3617
+ Schema$1.Literal("completed"),
3618
+ Schema$1.Literal("notSent"),
3619
+ Schema$1.Literal("uncertain")
3620
+ ]),
3621
+ acceptedAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3622
+ waitReason: Schema$1.Union([Schema$1.Union([
3623
+ Schema$1.Literal("rate"),
3624
+ Schema$1.Literal("daily-quota"),
3625
+ Schema$1.Literal("domain-health"),
3626
+ Schema$1.Literal("sending-paused"),
3627
+ Schema$1.Literal("upstream-unavailable"),
3628
+ Schema$1.Literal("retry"),
3629
+ Schema$1.Literal("campaign-paused"),
3630
+ Schema$1.Literal("domain-warming"),
3631
+ Schema$1.Literal("onboarding-review"),
3632
+ Schema$1.Literal("content-review"),
3633
+ Schema$1.Literal("screening-unavailable")
3634
+ ]), Schema$1.Null]),
3635
+ reviewExpectedAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3636
+ skippedRecipients: Schema$1.Array(SkippedRecipient),
3637
+ executeUntil: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3638
+ retryAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3639
+ problem: Schema$1.Union([MailboxSendOutcome, Schema$1.Null]),
3640
+ retryEligible: Schema$1.Boolean,
3641
+ decision: Schema$1.Union([MailboxActionDecision, Schema$1.Null]),
3642
+ createdAt: Schema$1.String,
3643
+ updatedAt: Schema$1.String
3644
+ }).annotate({ identifier: "MailboxSendReceipt" });
3645
+ const MailboxPendingSendReceipt = Schema$1.Struct({
3646
+ actionId: MailboxActionId,
3647
+ draftId: Schema$1.Union([MailboxDraftId, Schema$1.Null]),
3648
+ messageId: Schema$1.Union([MessageId, Schema$1.Null]),
3649
+ threadId: Schema$1.Union([MailboxThreadId, Schema$1.Null]),
3650
+ state: Schema$1.Union([
3651
+ Schema$1.Literal("approvalRequired"),
3652
+ Schema$1.Literal("queued"),
3653
+ Schema$1.Literal("accepted"),
3654
+ Schema$1.Literal("completed"),
3655
+ Schema$1.Literal("notSent"),
3656
+ Schema$1.Literal("uncertain")
3657
+ ]),
3658
+ acceptedAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3659
+ waitReason: Schema$1.Union([Schema$1.Union([
3660
+ Schema$1.Literal("rate"),
3661
+ Schema$1.Literal("daily-quota"),
3662
+ Schema$1.Literal("domain-health"),
3663
+ Schema$1.Literal("sending-paused"),
3664
+ Schema$1.Literal("upstream-unavailable"),
3665
+ Schema$1.Literal("retry"),
3666
+ Schema$1.Literal("campaign-paused"),
3667
+ Schema$1.Literal("domain-warming"),
3668
+ Schema$1.Literal("onboarding-review"),
3669
+ Schema$1.Literal("content-review"),
3670
+ Schema$1.Literal("screening-unavailable")
3671
+ ]), Schema$1.Null]),
3672
+ reviewExpectedAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3673
+ skippedRecipients: Schema$1.Array(SkippedRecipient),
3674
+ executeUntil: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3675
+ retryAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3676
+ problem: Schema$1.Union([MailboxSendOutcome, Schema$1.Null]),
3677
+ retryEligible: Schema$1.Boolean,
3678
+ decision: Schema$1.Union([MailboxActionDecision, Schema$1.Null]),
3679
+ createdAt: Schema$1.String,
3477
3680
  updatedAt: Schema$1.String
3478
- }).annotate({ identifier: "MailboxAction" });
3681
+ }).annotate({ identifier: "MailboxPendingSendReceipt" });
3479
3682
  const MailboxDraftPage = Schema$1.Struct({
3480
3683
  items: Schema$1.Array(MailboxDraftSummary),
3481
3684
  nextCursor: Schema$1.Union([Schema$1.String, Schema$1.Null])
@@ -3592,7 +3795,8 @@ const Message = Schema$1.Struct({
3592
3795
  Schema$1.Literal("campaign-paused"),
3593
3796
  Schema$1.Literal("domain-warming"),
3594
3797
  Schema$1.Literal("onboarding-review"),
3595
- Schema$1.Literal("content-review")
3798
+ Schema$1.Literal("content-review"),
3799
+ Schema$1.Literal("screening-unavailable")
3596
3800
  ]), Schema$1.Null]),
3597
3801
  reviewExpectedAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3598
3802
  skippedRecipients: Schema$1.Array(SkippedRecipient),
@@ -3614,7 +3818,7 @@ const EmailContent = Schema$1.Struct({
3614
3818
  timeZone: Schema$1.optionalKey(RenderTimeZone),
3615
3819
  inReplyToMessageId: Schema$1.optionalKey(Schema$1.Union([MessageId, Schema$1.Null])),
3616
3820
  replyTo: Schema$1.optionalKey(ReplyToAddresses),
3617
- unsubscribeGroupId: Schema$1.optionalKey(Schema$1.Union([UnsubscribeId, Schema$1.Null])),
3821
+ unsubscribeGroupId: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([UnsubscribeId, Schema$1.Null]), Schema$1.Null]).annotate({ description: "The unsubscribe group for this send. Omit to inherit the template group; null disables group inheritance for a direct send. Campaigns require a group." })),
3618
3822
  tracking: Schema$1.optionalKey(EmailTrackingOverrideV1),
3619
3823
  footer: Schema$1.optionalKey(EmailFooterOverride)
3620
3824
  }).annotate({ identifier: "EmailContent" });
@@ -3632,7 +3836,7 @@ const EmailDispatchContent = Schema$1.Struct({
3632
3836
  timeZone: Schema$1.optionalKey(RenderTimeZone),
3633
3837
  inReplyToMessageId: Schema$1.optionalKey(Schema$1.Union([MessageId, Schema$1.Null])),
3634
3838
  replyTo: Schema$1.optionalKey(ReplyToAddresses),
3635
- unsubscribeGroupId: Schema$1.optionalKey(Schema$1.Union([UnsubscribeId, Schema$1.Null])),
3839
+ unsubscribeGroupId: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([UnsubscribeId, Schema$1.Null]), Schema$1.Null]).annotate({ description: "The unsubscribe group for this send. Omit to inherit the template group; null disables group inheritance for a direct send. Campaigns require a group." })),
3636
3840
  tracking: Schema$1.optionalKey(EmailTrackingOverrideV1),
3637
3841
  footer: Schema$1.optionalKey(EmailFooterOverride)
3638
3842
  }).annotate({ identifier: "EmailDispatchContent" });
@@ -3671,10 +3875,56 @@ const PublishExtensionVersionResponse = Schema$1.Struct({
3671
3875
  extension: Extension,
3672
3876
  version: ExtensionVersion
3673
3877
  }).annotate({ identifier: "PublishExtensionVersionResponse" });
3674
- const MailboxActionPage = Schema$1.Struct({
3675
- items: Schema$1.Array(MailboxAction),
3676
- nextCursor: Schema$1.Union([Schema$1.String, Schema$1.Null])
3677
- }).annotate({ identifier: "MailboxActionPage" });
3878
+ const MailboxSendAction = Schema$1.Struct({
3879
+ id: MailboxActionId,
3880
+ source: Schema$1.Union([
3881
+ Schema$1.Literal("humanUi"),
3882
+ Schema$1.Literal("externalApi"),
3883
+ Schema$1.Literal("aiSdkTool"),
3884
+ Schema$1.Literal("extension"),
3885
+ Schema$1.Literal("externalAgent"),
3886
+ Schema$1.Literal("samvaManagedAgent"),
3887
+ Schema$1.Literal("system")
3888
+ ]),
3889
+ proposedBy: Schema$1.Struct({
3890
+ kind: Schema$1.Union([
3891
+ Schema$1.Literal("user"),
3892
+ Schema$1.Literal("apiKey"),
3893
+ Schema$1.Literal("extension"),
3894
+ Schema$1.Literal("externalAgent"),
3895
+ Schema$1.Literal("samvaAgent"),
3896
+ Schema$1.Literal("system")
3897
+ ]),
3898
+ id: Schema$1.String,
3899
+ displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
3900
+ }),
3901
+ threadId: Schema$1.Union([MailboxThreadId, Schema$1.Null]),
3902
+ draftId: Schema$1.Union([MailboxDraftId, Schema$1.Null]),
3903
+ decision: Schema$1.Union([MailboxActionDecision, Schema$1.Null]),
3904
+ createdAt: Schema$1.String,
3905
+ updatedAt: Schema$1.String,
3906
+ type: Schema$1.Union([Schema$1.Literal("sendMessage"), Schema$1.Literal("reply")]),
3907
+ state: Schema$1.Union([
3908
+ Schema$1.Literal("approvalRequired"),
3909
+ Schema$1.Literal("queued"),
3910
+ Schema$1.Literal("accepted"),
3911
+ Schema$1.Literal("completed"),
3912
+ Schema$1.Literal("notSent"),
3913
+ Schema$1.Literal("uncertain")
3914
+ ]),
3915
+ send: MailboxSendReceipt,
3916
+ intent: Schema$1.Union([MailboxSendSnapshot, Schema$1.Null])
3917
+ }).annotate({ identifier: "MailboxSendAction" });
3918
+ var MailboxSendRefusedError = class extends Schema$1.TaggedError()("MailboxSendRefusedError", Schema$1.Struct({
3919
+ message: Schema$1.String,
3920
+ receipt: MailboxSendReceipt
3921
+ })) {};
3922
+ var MailboxSendConflictError = class extends Schema$1.TaggedError()("MailboxSendConflictError", Schema$1.Struct({
3923
+ message: Schema$1.String,
3924
+ resource: Schema$1.String,
3925
+ id: MailboxActionId,
3926
+ receipt: MailboxSendReceipt
3927
+ })) {};
3678
3928
  const ApiKeyPage = Schema$1.Struct({
3679
3929
  items: Schema$1.Array(ApiKey),
3680
3930
  nextCursor: Schema$1.Union([Schema$1.String, Schema$1.Null])
@@ -3711,10 +3961,16 @@ const EmailDispatchSendMessagePayload = Schema$1.Struct({
3711
3961
  from: Schema$1.optionalKey(EmailSender),
3712
3962
  email: EmailDispatchContent
3713
3963
  }).annotate({ identifier: "EmailDispatchSendMessagePayload" });
3964
+ const MailboxAction = Schema$1.Union([MailboxSendAction, MailboxNonSendAction]).annotate({ identifier: "MailboxAction" });
3965
+ const MailboxPendingAction = Schema$1.Union([MailboxSendAction, MailboxNonSendAction]).annotate({ identifier: "MailboxPendingAction" });
3714
3966
  const CampaignContent = Schema$1.Union([EmailCampaignContent]).annotate({ identifier: "CampaignContent" });
3715
3967
  const SendMessagePayload = Schema$1.Union([EmailSendMessagePayload]).annotate({ identifier: "SendMessagePayload" });
3716
3968
  const CampaignContentInput = Schema$1.Union([EmailCampaignContentInput]).annotate({ identifier: "CampaignContentInput" });
3717
3969
  const DispatchSendMessagePayload = Schema$1.Union([EmailDispatchSendMessagePayload]).annotate({ identifier: "DispatchSendMessagePayload" });
3970
+ const MailboxActionPage = Schema$1.Struct({
3971
+ items: Schema$1.Array(MailboxAction),
3972
+ nextCursor: Schema$1.Union([Schema$1.String, Schema$1.Null])
3973
+ }).annotate({ identifier: "MailboxActionPage" });
3718
3974
  const CampaignListItem = Schema$1.Struct({
3719
3975
  id: CampaignId,
3720
3976
  name: Schema$1.String,
@@ -4583,6 +4839,9 @@ const ContactsListQuery = Schema$1.Struct({
4583
4839
  Schema$1.Literal("blocked"),
4584
4840
  Schema$1.Literal("archived")
4585
4841
  ]), Schema$1.Null])),
4842
+ fields: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
4843
+ customField: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
4844
+ customFieldValue: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
4586
4845
  after: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
4587
4846
  before: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
4588
4847
  });
@@ -4871,13 +5130,20 @@ const ContactsFind422 = ValidationError;
4871
5130
  const ContactsFind500 = InternalError;
4872
5131
  const ContactsFind504 = GatewayTimeoutError;
4873
5132
  const ContactsFindOrCreateRequestJson = Schema$1.Struct({
4874
- email: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
4875
- phone: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
4876
- externalId: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
4877
- name: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
4878
- displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([Schema$1.String, Schema$1.Null]), Schema$1.Null]))
5133
+ lookup: ContactLookup,
5134
+ create: Schema$1.optionalKey(Schema$1.Union([Schema$1.Struct({
5135
+ name: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
5136
+ displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([Schema$1.String, Schema$1.Null]), Schema$1.Null])),
5137
+ avatar: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([Schema$1.String, Schema$1.Null]), Schema$1.Null])),
5138
+ identities: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(ContactIdentityInput), Schema$1.Null])),
5139
+ profile: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([ContactProfile, Schema$1.Null]), Schema$1.Null])),
5140
+ externalId: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([Schema$1.String, Schema$1.Null]), Schema$1.Null]))
5141
+ }), Schema$1.Null]))
5142
+ });
5143
+ const ContactsFindOrCreate200 = Schema$1.Struct({
5144
+ contact: Contact,
5145
+ created: Schema$1.Boolean
4879
5146
  });
4880
- const ContactsFindOrCreate200 = Contact;
4881
5147
  const ContactsFindOrCreate401 = UnauthorizedError;
4882
5148
  const ContactsFindOrCreate402 = PaymentRequiredError;
4883
5149
  const ContactsFindOrCreate403 = ForbiddenError;
@@ -5202,6 +5468,7 @@ const EmailAddBlock401 = UnauthorizedError;
5202
5468
  const EmailAddBlock403 = ForbiddenError;
5203
5469
  const EmailAddBlock409 = ConflictError;
5204
5470
  const EmailAddBlock422 = ValidationError;
5471
+ const EmailAddBlock500 = InternalError;
5205
5472
  const EmailAddBlock504 = GatewayTimeoutError;
5206
5473
  const EmailRemoveBlockPathParams = Schema$1.Struct({ id: BlockedEmailId });
5207
5474
  const EmailRemoveBlock200 = SuccessResult;
@@ -5346,6 +5613,7 @@ const EmailGetDomainById401 = UnauthorizedError;
5346
5613
  const EmailGetDomainById403 = ForbiddenError;
5347
5614
  const EmailGetDomainById404 = ResourceNotFoundError;
5348
5615
  const EmailGetDomainById422 = ValidationError;
5616
+ const EmailGetDomainById500 = InternalError;
5349
5617
  const EmailGetDomainById504 = GatewayTimeoutError;
5350
5618
  const EmailRemoveDomainPathParams = Schema$1.Struct({ id: EmailDomainId });
5351
5619
  const EmailRemoveDomain200 = SuccessResult;
@@ -5908,6 +6176,7 @@ const EmailCheckSenderVerification401 = UnauthorizedError;
5908
6176
  const EmailCheckSenderVerification403 = ForbiddenError;
5909
6177
  const EmailCheckSenderVerification404 = ResourceNotFoundError;
5910
6178
  const EmailCheckSenderVerification422 = ValidationError;
6179
+ const EmailCheckSenderVerification500 = InternalError;
5911
6180
  const EmailCheckSenderVerification502 = ExternalServiceError;
5912
6181
  const EmailCheckSenderVerification504 = GatewayTimeoutError;
5913
6182
  const EmailGetStatsQuery = Schema$1.Struct({
@@ -6216,13 +6485,9 @@ const MailboxesList500 = InternalError;
6216
6485
  const MailboxesList504 = GatewayTimeoutError;
6217
6486
  const MailboxesCreateRequestJson = Schema$1.Struct({
6218
6487
  namespaceId: Schema$1.optionalKey(Schema$1.Union([NamespaceId, Schema$1.Null])),
6219
- displayName: Schema$1.String,
6220
- slug: Schema$1.String,
6221
- addresses: Schema$1.TupleWithRest(Schema$1.Tuple([CreateMailboxAddressPayload]), [CreateMailboxAddressPayload]),
6222
- defaultFrom: Schema$1.optionalKey(Schema$1.Union([Schema$1.Struct({
6223
- address: Schema$1.String,
6224
- displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
6225
- }), Schema$1.Null])),
6488
+ address: Schema$1.String,
6489
+ name: Schema$1.String,
6490
+ slug: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
6226
6491
  metadata: Schema$1.optionalKey(Schema$1.Union([MailboxMetadata, Schema$1.Null]))
6227
6492
  });
6228
6493
  const MailboxesCreate201 = Mailbox;
@@ -6254,7 +6519,7 @@ const MailboxesRemove502 = BillingProviderError;
6254
6519
  const MailboxesRemove504 = GatewayTimeoutError;
6255
6520
  const MailboxesUpdatePathParams = Schema$1.Struct({ id: MailboxId });
6256
6521
  const MailboxesUpdateRequestJson = Schema$1.Struct({
6257
- displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.String.check(Schema$1.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema$1.Null])),
6522
+ name: Schema$1.optionalKey(Schema$1.Union([Schema$1.String.check(Schema$1.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema$1.Null])),
6258
6523
  metadata: Schema$1.optionalKey(Schema$1.Union([MailboxMetadataPatch, Schema$1.Null])),
6259
6524
  defaultFrom: Schema$1.optionalKey(Schema$1.Union([Schema$1.Struct({
6260
6525
  address: Schema$1.String,
@@ -6272,6 +6537,7 @@ const MailboxesListActionsPathParams = Schema$1.Struct({ id: MailboxId });
6272
6537
  const MailboxesListActionsQuery = Schema$1.Struct({
6273
6538
  limit: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
6274
6539
  cursor: Schema$1.optionalKey(Schema$1.Union([Cursor, Schema$1.Null])),
6540
+ threadId: Schema$1.optionalKey(Schema$1.Union([MailboxThreadId, Schema$1.Null])),
6275
6541
  state: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([
6276
6542
  Schema$1.Literal("proposed"),
6277
6543
  Schema$1.Literal("allowed"),
@@ -6281,7 +6547,12 @@ const MailboxesListActionsQuery = Schema$1.Struct({
6281
6547
  Schema$1.Literal("approvalDenied"),
6282
6548
  Schema$1.Literal("executing"),
6283
6549
  Schema$1.Literal("executed"),
6284
- Schema$1.Literal("failed")
6550
+ Schema$1.Literal("failed"),
6551
+ Schema$1.Literal("queued"),
6552
+ Schema$1.Literal("accepted"),
6553
+ Schema$1.Literal("completed"),
6554
+ Schema$1.Literal("notSent"),
6555
+ Schema$1.Literal("uncertain")
6285
6556
  ]), Schema$1.Null])),
6286
6557
  after: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
6287
6558
  before: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
@@ -6293,22 +6564,59 @@ const MailboxesListActions404 = ResourceNotFoundError;
6293
6564
  const MailboxesListActions422 = ValidationError;
6294
6565
  const MailboxesListActions500 = InternalError;
6295
6566
  const MailboxesListActions504 = GatewayTimeoutError;
6567
+ const MailboxesGetActionPathParams = Schema$1.Struct({
6568
+ id: MailboxId,
6569
+ actionId: MailboxActionId
6570
+ });
6571
+ const MailboxesGetAction200 = MailboxAction;
6572
+ const MailboxesGetAction401 = UnauthorizedError;
6573
+ const MailboxesGetAction403 = ForbiddenError;
6574
+ const MailboxesGetAction404 = ResourceNotFoundError;
6575
+ const MailboxesGetAction422 = ValidationError;
6576
+ const MailboxesGetAction500 = InternalError;
6577
+ const MailboxesGetAction504 = GatewayTimeoutError;
6296
6578
  const MailboxesApproveActionPathParams = Schema$1.Struct({
6297
6579
  id: MailboxId,
6298
6580
  actionId: MailboxActionId
6299
6581
  });
6300
6582
  const MailboxesApproveAction200 = MailboxAction;
6583
+ const MailboxesApproveAction202 = MailboxPendingAction;
6301
6584
  const MailboxesApproveAction401 = UnauthorizedError;
6302
6585
  const MailboxesApproveAction402 = PaymentRequiredError;
6303
- const MailboxesApproveAction403 = Schema$1.Union([ForbiddenError, OnboardingReviewRequiredError]);
6586
+ const MailboxesApproveAction403 = Schema$1.Union([
6587
+ MailboxSendRefusedError,
6588
+ OnboardingReviewRequiredError,
6589
+ ForbiddenError
6590
+ ]);
6304
6591
  const MailboxesApproveAction404 = ResourceNotFoundError;
6305
- const MailboxesApproveAction409 = ConflictError;
6592
+ const MailboxesApproveAction409 = Schema$1.Union([MailboxSendConflictError, ConflictError]);
6306
6593
  const MailboxesApproveAction422 = ValidationError;
6307
6594
  const MailboxesApproveAction429 = RateLimitedError;
6308
6595
  const MailboxesApproveAction500 = InternalError;
6309
6596
  const MailboxesApproveAction502 = BillingProviderError;
6310
6597
  const MailboxesApproveAction503 = SenderNotReadyError;
6311
6598
  const MailboxesApproveAction504 = GatewayTimeoutError;
6599
+ const MailboxesCancelActionPathParams = Schema$1.Struct({
6600
+ id: MailboxId,
6601
+ actionId: MailboxActionId
6602
+ });
6603
+ const MailboxesCancelAction200 = MailboxSendReceipt;
6604
+ const MailboxesCancelAction202 = MailboxPendingSendReceipt;
6605
+ const MailboxesCancelAction401 = UnauthorizedError;
6606
+ const MailboxesCancelAction402 = PaymentRequiredError;
6607
+ const MailboxesCancelAction403 = Schema$1.Union([
6608
+ MailboxSendRefusedError,
6609
+ OnboardingReviewRequiredError,
6610
+ ForbiddenError
6611
+ ]);
6612
+ const MailboxesCancelAction404 = ResourceNotFoundError;
6613
+ const MailboxesCancelAction409 = Schema$1.Union([MailboxSendConflictError, ConflictError]);
6614
+ const MailboxesCancelAction422 = ValidationError;
6615
+ const MailboxesCancelAction429 = RateLimitedError;
6616
+ const MailboxesCancelAction500 = InternalError;
6617
+ const MailboxesCancelAction502 = BillingProviderError;
6618
+ const MailboxesCancelAction503 = SenderNotReadyError;
6619
+ const MailboxesCancelAction504 = GatewayTimeoutError;
6312
6620
  const MailboxesDenyActionPathParams = Schema$1.Struct({
6313
6621
  id: MailboxId,
6314
6622
  actionId: MailboxActionId
@@ -6318,10 +6626,55 @@ const MailboxesDenyAction200 = MailboxAction;
6318
6626
  const MailboxesDenyAction401 = UnauthorizedError;
6319
6627
  const MailboxesDenyAction403 = ForbiddenError;
6320
6628
  const MailboxesDenyAction404 = ResourceNotFoundError;
6321
- const MailboxesDenyAction409 = ConflictError;
6629
+ const MailboxesDenyAction409 = Schema$1.Union([ConflictError, MailboxSendConflictError]);
6322
6630
  const MailboxesDenyAction422 = ValidationError;
6323
6631
  const MailboxesDenyAction500 = InternalError;
6324
6632
  const MailboxesDenyAction504 = GatewayTimeoutError;
6633
+ const MailboxesRetryActionPathParams = Schema$1.Struct({
6634
+ id: MailboxId,
6635
+ actionId: MailboxActionId
6636
+ });
6637
+ const MailboxesRetryAction200 = MailboxSendReceipt;
6638
+ const MailboxesRetryAction202 = MailboxPendingSendReceipt;
6639
+ const MailboxesRetryAction401 = UnauthorizedError;
6640
+ const MailboxesRetryAction402 = PaymentRequiredError;
6641
+ const MailboxesRetryAction403 = Schema$1.Union([
6642
+ MailboxSendRefusedError,
6643
+ OnboardingReviewRequiredError,
6644
+ ForbiddenError
6645
+ ]);
6646
+ const MailboxesRetryAction404 = ResourceNotFoundError;
6647
+ const MailboxesRetryAction409 = Schema$1.Union([MailboxSendConflictError, ConflictError]);
6648
+ const MailboxesRetryAction422 = ValidationError;
6649
+ const MailboxesRetryAction429 = RateLimitedError;
6650
+ const MailboxesRetryAction500 = InternalError;
6651
+ const MailboxesRetryAction502 = BillingProviderError;
6652
+ const MailboxesRetryAction503 = SenderNotReadyError;
6653
+ const MailboxesRetryAction504 = GatewayTimeoutError;
6654
+ const MailboxesCreateAddressPathParams = Schema$1.Struct({ id: MailboxId });
6655
+ const MailboxesCreateAddressRequestJson = Schema$1.Struct({
6656
+ address: Schema$1.String,
6657
+ displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
6658
+ });
6659
+ const MailboxesCreateAddress201 = Mailbox;
6660
+ const MailboxesCreateAddress401 = UnauthorizedError;
6661
+ const MailboxesCreateAddress403 = ForbiddenError;
6662
+ const MailboxesCreateAddress404 = ResourceNotFoundError;
6663
+ const MailboxesCreateAddress409 = ConflictError;
6664
+ const MailboxesCreateAddress422 = ValidationError;
6665
+ const MailboxesCreateAddress500 = InternalError;
6666
+ const MailboxesCreateAddress504 = GatewayTimeoutError;
6667
+ const MailboxesRemoveAddressPathParams = Schema$1.Struct({
6668
+ id: MailboxId,
6669
+ addressId: MailboxAddressId
6670
+ });
6671
+ const MailboxesRemoveAddress200 = Mailbox;
6672
+ const MailboxesRemoveAddress401 = UnauthorizedError;
6673
+ const MailboxesRemoveAddress403 = ForbiddenError;
6674
+ const MailboxesRemoveAddress404 = ResourceNotFoundError;
6675
+ const MailboxesRemoveAddress422 = ValidationError;
6676
+ const MailboxesRemoveAddress500 = InternalError;
6677
+ const MailboxesRemoveAddress504 = GatewayTimeoutError;
6325
6678
  const MailboxesGetAgentActivityPathParams = Schema$1.Struct({ id: MailboxId });
6326
6679
  const MailboxesGetAgentActivityQuery = Schema$1.Struct({
6327
6680
  after: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
@@ -6414,13 +6767,18 @@ const MailboxesSendDraftPathParams = Schema$1.Struct({
6414
6767
  id: MailboxId,
6415
6768
  draftId: MailboxDraftId
6416
6769
  });
6417
- const MailboxesSendDraftHeaders = Schema$1.Struct({ "idempotency-key": Schema$1.optionalKey(Schema$1.Union([Schema$1.String.annotate({ description: "Optional key that makes a mailbox send idempotent for the calling key or member. Repeating the request with the same key and body returns the original result without sending again; the same key with a different body returns 409, as does a duplicate that arrives while the first is still sending." }).check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^[\\s\\S]{1,255}$")).annotate({ expected: "a string matching the RegExp ^[\\s\\S]{1,255}$" })), Schema$1.Null])) });
6770
+ const MailboxesSendDraftHeaders = Schema$1.Struct({ "idempotency-key": Schema$1.optionalKey(Schema$1.Union([Schema$1.String.annotate({ description: "Optional key that makes a mailbox send idempotent for the calling key or member. Repeating the request with the same key and body returns the original action in its current state. Keep the key after a lost response. Reusing it with different content returns 409. Active actions retain their key; terminal receipts remain replayable for 24 hours." }).check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^[\\s\\S]{1,255}$")).annotate({ expected: "a string matching the RegExp ^[\\s\\S]{1,255}$" })), Schema$1.Null])) });
6418
6771
  const MailboxesSendDraft200 = MailboxSendReceipt;
6772
+ const MailboxesSendDraft202 = MailboxPendingSendReceipt;
6419
6773
  const MailboxesSendDraft401 = UnauthorizedError;
6420
6774
  const MailboxesSendDraft402 = PaymentRequiredError;
6421
- const MailboxesSendDraft403 = Schema$1.Union([ForbiddenError, OnboardingReviewRequiredError]);
6775
+ const MailboxesSendDraft403 = Schema$1.Union([
6776
+ MailboxSendRefusedError,
6777
+ OnboardingReviewRequiredError,
6778
+ ForbiddenError
6779
+ ]);
6422
6780
  const MailboxesSendDraft404 = ResourceNotFoundError;
6423
- const MailboxesSendDraft409 = ConflictError;
6781
+ const MailboxesSendDraft409 = Schema$1.Union([MailboxSendConflictError, ConflictError]);
6424
6782
  const MailboxesSendDraft422 = ValidationError;
6425
6783
  const MailboxesSendDraft429 = RateLimitedError;
6426
6784
  const MailboxesSendDraft500 = InternalError;
@@ -6566,7 +6924,7 @@ const MailboxesUpdateLabel422 = ValidationError;
6566
6924
  const MailboxesUpdateLabel500 = InternalError;
6567
6925
  const MailboxesUpdateLabel504 = GatewayTimeoutError;
6568
6926
  const MailboxesSendMessagePathParams = Schema$1.Struct({ id: MailboxId });
6569
- const MailboxesSendMessageHeaders = Schema$1.Struct({ "idempotency-key": Schema$1.optionalKey(Schema$1.Union([Schema$1.String.annotate({ description: "Optional key that makes a mailbox send idempotent for the calling key or member. Repeating the request with the same key and body returns the original result without sending again; the same key with a different body returns 409, as does a duplicate that arrives while the first is still sending." }).check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^[\\s\\S]{1,255}$")).annotate({ expected: "a string matching the RegExp ^[\\s\\S]{1,255}$" })), Schema$1.Null])) });
6927
+ const MailboxesSendMessageHeaders = Schema$1.Struct({ "idempotency-key": Schema$1.optionalKey(Schema$1.Union([Schema$1.String.annotate({ description: "Optional key that makes a mailbox send idempotent for the calling key or member. Repeating the request with the same key and body returns the original action in its current state. Keep the key after a lost response. Reusing it with different content returns 409. Active actions retain their key; terminal receipts remain replayable for 24 hours." }).check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^[\\s\\S]{1,255}$")).annotate({ expected: "a string matching the RegExp ^[\\s\\S]{1,255}$" })), Schema$1.Null])) });
6570
6928
  const MailboxesSendMessageRequestJson = Schema$1.Struct({
6571
6929
  to: Schema$1.TupleWithRest(Schema$1.Tuple([Schema$1.String]), [Schema$1.String]),
6572
6930
  cc: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
@@ -6578,11 +6936,16 @@ const MailboxesSendMessageRequestJson = Schema$1.Struct({
6578
6936
  attachments: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(EmailAttachment).check(Schema$1.isMaxLength(10).annotate({ expected: "a value with a length of at most 10" })), Schema$1.Null]))
6579
6937
  });
6580
6938
  const MailboxesSendMessage200 = MailboxSendReceipt;
6939
+ const MailboxesSendMessage202 = MailboxPendingSendReceipt;
6581
6940
  const MailboxesSendMessage401 = UnauthorizedError;
6582
6941
  const MailboxesSendMessage402 = PaymentRequiredError;
6583
- const MailboxesSendMessage403 = Schema$1.Union([ForbiddenError, OnboardingReviewRequiredError]);
6942
+ const MailboxesSendMessage403 = Schema$1.Union([
6943
+ MailboxSendRefusedError,
6944
+ OnboardingReviewRequiredError,
6945
+ ForbiddenError
6946
+ ]);
6584
6947
  const MailboxesSendMessage404 = ResourceNotFoundError;
6585
- const MailboxesSendMessage409 = ConflictError;
6948
+ const MailboxesSendMessage409 = Schema$1.Union([MailboxSendConflictError, ConflictError]);
6586
6949
  const MailboxesSendMessage422 = ValidationError;
6587
6950
  const MailboxesSendMessage429 = RateLimitedError;
6588
6951
  const MailboxesSendMessage500 = InternalError;
@@ -6612,6 +6975,19 @@ const MailboxesGetMessageAttachment404 = ResourceNotFoundError;
6612
6975
  const MailboxesGetMessageAttachment422 = ValidationError;
6613
6976
  const MailboxesGetMessageAttachment500 = InternalError;
6614
6977
  const MailboxesGetMessageAttachment504 = GatewayTimeoutError;
6978
+ const MailboxesCopyMessageAttachmentPathParams = Schema$1.Struct({
6979
+ id: MailboxId,
6980
+ messageId: MessageId,
6981
+ attachmentId: AttachmentId
6982
+ });
6983
+ const MailboxesCopyMessageAttachment201 = MailboxCopiedAttachment;
6984
+ const MailboxesCopyMessageAttachment401 = UnauthorizedError;
6985
+ const MailboxesCopyMessageAttachment403 = ForbiddenError;
6986
+ const MailboxesCopyMessageAttachment404 = ResourceNotFoundError;
6987
+ const MailboxesCopyMessageAttachment409 = ConflictError;
6988
+ const MailboxesCopyMessageAttachment422 = ValidationError;
6989
+ const MailboxesCopyMessageAttachment500 = InternalError;
6990
+ const MailboxesCopyMessageAttachment504 = GatewayTimeoutError;
6615
6991
  const MailboxesDiscardMessagePathParams = Schema$1.Struct({
6616
6992
  id: MailboxId,
6617
6993
  messageId: MessageId
@@ -6629,7 +7005,7 @@ const MailboxesForwardPathParams = Schema$1.Struct({
6629
7005
  id: MailboxId,
6630
7006
  messageId: MessageId
6631
7007
  });
6632
- const MailboxesForwardHeaders = Schema$1.Struct({ "idempotency-key": Schema$1.optionalKey(Schema$1.Union([Schema$1.String.annotate({ description: "Optional key that makes a mailbox send idempotent for the calling key or member. Repeating the request with the same key and body returns the original result without sending again; the same key with a different body returns 409, as does a duplicate that arrives while the first is still sending." }).check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^[\\s\\S]{1,255}$")).annotate({ expected: "a string matching the RegExp ^[\\s\\S]{1,255}$" })), Schema$1.Null])) });
7008
+ const MailboxesForwardHeaders = Schema$1.Struct({ "idempotency-key": Schema$1.optionalKey(Schema$1.Union([Schema$1.String.annotate({ description: "Optional key that makes a mailbox send idempotent for the calling key or member. Repeating the request with the same key and body returns the original action in its current state. Keep the key after a lost response. Reusing it with different content returns 409. Active actions retain their key; terminal receipts remain replayable for 24 hours." }).check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^[\\s\\S]{1,255}$")).annotate({ expected: "a string matching the RegExp ^[\\s\\S]{1,255}$" })), Schema$1.Null])) });
6633
7009
  const MailboxesForwardRequestJson = Schema$1.Struct({
6634
7010
  to: Schema$1.TupleWithRest(Schema$1.Tuple([Schema$1.String]), [Schema$1.String]),
6635
7011
  cc: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
@@ -6639,11 +7015,16 @@ const MailboxesForwardRequestJson = Schema$1.Struct({
6639
7015
  attachments: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(EmailAttachment).check(Schema$1.isMaxLength(10).annotate({ expected: "a value with a length of at most 10" })), Schema$1.Null]))
6640
7016
  });
6641
7017
  const MailboxesForward200 = MailboxSendReceipt;
7018
+ const MailboxesForward202 = MailboxPendingSendReceipt;
6642
7019
  const MailboxesForward401 = UnauthorizedError;
6643
7020
  const MailboxesForward402 = PaymentRequiredError;
6644
- const MailboxesForward403 = Schema$1.Union([ForbiddenError, OnboardingReviewRequiredError]);
7021
+ const MailboxesForward403 = Schema$1.Union([
7022
+ MailboxSendRefusedError,
7023
+ OnboardingReviewRequiredError,
7024
+ ForbiddenError
7025
+ ]);
6645
7026
  const MailboxesForward404 = ResourceNotFoundError;
6646
- const MailboxesForward409 = ConflictError;
7027
+ const MailboxesForward409 = Schema$1.Union([MailboxSendConflictError, ConflictError]);
6647
7028
  const MailboxesForward422 = ValidationError;
6648
7029
  const MailboxesForward429 = RateLimitedError;
6649
7030
  const MailboxesForward500 = InternalError;
@@ -6677,7 +7058,7 @@ const MailboxesReplyPathParams = Schema$1.Struct({
6677
7058
  id: MailboxId,
6678
7059
  messageId: MessageId
6679
7060
  });
6680
- const MailboxesReplyHeaders = Schema$1.Struct({ "idempotency-key": Schema$1.optionalKey(Schema$1.Union([Schema$1.String.annotate({ description: "Optional key that makes a mailbox send idempotent for the calling key or member. Repeating the request with the same key and body returns the original result without sending again; the same key with a different body returns 409, as does a duplicate that arrives while the first is still sending." }).check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^[\\s\\S]{1,255}$")).annotate({ expected: "a string matching the RegExp ^[\\s\\S]{1,255}$" })), Schema$1.Null])) });
7061
+ const MailboxesReplyHeaders = Schema$1.Struct({ "idempotency-key": Schema$1.optionalKey(Schema$1.Union([Schema$1.String.annotate({ description: "Optional key that makes a mailbox send idempotent for the calling key or member. Repeating the request with the same key and body returns the original action in its current state. Keep the key after a lost response. Reusing it with different content returns 409. Active actions retain their key; terminal receipts remain replayable for 24 hours." }).check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^[\\s\\S]{1,255}$")).annotate({ expected: "a string matching the RegExp ^[\\s\\S]{1,255}$" })), Schema$1.Null])) });
6681
7062
  const MailboxesReplyRequestJson = Schema$1.Struct({
6682
7063
  cc: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
6683
7064
  bcc: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
@@ -6686,11 +7067,16 @@ const MailboxesReplyRequestJson = Schema$1.Struct({
6686
7067
  attachments: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(EmailAttachment).check(Schema$1.isMaxLength(10).annotate({ expected: "a value with a length of at most 10" })), Schema$1.Null]))
6687
7068
  });
6688
7069
  const MailboxesReply200 = MailboxSendReceipt;
7070
+ const MailboxesReply202 = MailboxPendingSendReceipt;
6689
7071
  const MailboxesReply401 = UnauthorizedError;
6690
7072
  const MailboxesReply402 = PaymentRequiredError;
6691
- const MailboxesReply403 = Schema$1.Union([ForbiddenError, OnboardingReviewRequiredError]);
7073
+ const MailboxesReply403 = Schema$1.Union([
7074
+ MailboxSendRefusedError,
7075
+ OnboardingReviewRequiredError,
7076
+ ForbiddenError
7077
+ ]);
6692
7078
  const MailboxesReply404 = ResourceNotFoundError;
6693
- const MailboxesReply409 = ConflictError;
7079
+ const MailboxesReply409 = Schema$1.Union([MailboxSendConflictError, ConflictError]);
6694
7080
  const MailboxesReply422 = ValidationError;
6695
7081
  const MailboxesReply429 = RateLimitedError;
6696
7082
  const MailboxesReply500 = InternalError;
@@ -6701,7 +7087,7 @@ const MailboxesReplyAllPathParams = Schema$1.Struct({
6701
7087
  id: MailboxId,
6702
7088
  messageId: MessageId
6703
7089
  });
6704
- const MailboxesReplyAllHeaders = Schema$1.Struct({ "idempotency-key": Schema$1.optionalKey(Schema$1.Union([Schema$1.String.annotate({ description: "Optional key that makes a mailbox send idempotent for the calling key or member. Repeating the request with the same key and body returns the original result without sending again; the same key with a different body returns 409, as does a duplicate that arrives while the first is still sending." }).check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^[\\s\\S]{1,255}$")).annotate({ expected: "a string matching the RegExp ^[\\s\\S]{1,255}$" })), Schema$1.Null])) });
7090
+ const MailboxesReplyAllHeaders = Schema$1.Struct({ "idempotency-key": Schema$1.optionalKey(Schema$1.Union([Schema$1.String.annotate({ description: "Optional key that makes a mailbox send idempotent for the calling key or member. Repeating the request with the same key and body returns the original action in its current state. Keep the key after a lost response. Reusing it with different content returns 409. Active actions retain their key; terminal receipts remain replayable for 24 hours." }).check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^[\\s\\S]{1,255}$")).annotate({ expected: "a string matching the RegExp ^[\\s\\S]{1,255}$" })), Schema$1.Null])) });
6705
7091
  const MailboxesReplyAllRequestJson = Schema$1.Struct({
6706
7092
  cc: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
6707
7093
  bcc: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
@@ -6710,11 +7096,16 @@ const MailboxesReplyAllRequestJson = Schema$1.Struct({
6710
7096
  attachments: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(EmailAttachment).check(Schema$1.isMaxLength(10).annotate({ expected: "a value with a length of at most 10" })), Schema$1.Null]))
6711
7097
  });
6712
7098
  const MailboxesReplyAll200 = MailboxSendReceipt;
7099
+ const MailboxesReplyAll202 = MailboxPendingSendReceipt;
6713
7100
  const MailboxesReplyAll401 = UnauthorizedError;
6714
7101
  const MailboxesReplyAll402 = PaymentRequiredError;
6715
- const MailboxesReplyAll403 = Schema$1.Union([ForbiddenError, OnboardingReviewRequiredError]);
7102
+ const MailboxesReplyAll403 = Schema$1.Union([
7103
+ MailboxSendRefusedError,
7104
+ OnboardingReviewRequiredError,
7105
+ ForbiddenError
7106
+ ]);
6716
7107
  const MailboxesReplyAll404 = ResourceNotFoundError;
6717
- const MailboxesReplyAll409 = ConflictError;
7108
+ const MailboxesReplyAll409 = Schema$1.Union([MailboxSendConflictError, ConflictError]);
6718
7109
  const MailboxesReplyAll422 = ValidationError;
6719
7110
  const MailboxesReplyAll429 = RateLimitedError;
6720
7111
  const MailboxesReplyAll500 = InternalError;
@@ -7128,7 +7519,8 @@ const MessagesGetEmail200 = Schema$1.Struct({
7128
7519
  Schema$1.Literal("campaign-paused"),
7129
7520
  Schema$1.Literal("domain-warming"),
7130
7521
  Schema$1.Literal("onboarding-review"),
7131
- Schema$1.Literal("content-review")
7522
+ Schema$1.Literal("content-review"),
7523
+ Schema$1.Literal("screening-unavailable")
7132
7524
  ]), Schema$1.Null]),
7133
7525
  reviewExpectedAt: Schema$1.Union([Schema$1.String, Schema$1.Null])
7134
7526
  }), Schema$1.Null]),
@@ -7262,7 +7654,7 @@ const MessagesGetEmail200 = Schema$1.Struct({
7262
7654
  expiresAt: Schema$1.String
7263
7655
  }), Schema$1.Null]),
7264
7656
  createdAt: Schema$1.String,
7265
- receivedAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
7657
+ receivedAt: Schema$1.Union([Schema$1.String, Schema$1.Null]).annotate({ description: "When Samva's receiving server accepted the email; null for outbound email. The sender's `Date` header plays no part and stays in the raw MIME." }),
7266
7658
  processedAt: Schema$1.Union([Schema$1.String, Schema$1.Null])
7267
7659
  });
7268
7660
  const MessagesGetEmail401 = UnauthorizedError;
@@ -7531,6 +7923,53 @@ const OrganizationsDelete409 = ConflictError;
7531
7923
  const OrganizationsDelete422 = ValidationError;
7532
7924
  const OrganizationsDelete500 = InternalError;
7533
7925
  const OrganizationsDelete504 = GatewayTimeoutError;
7926
+ const OrganizationsGetTrustTier200 = Schema$1.Struct({
7927
+ tier: Schema$1.Union([
7928
+ Schema$1.Literal("screened"),
7929
+ Schema$1.Literal("probation"),
7930
+ Schema$1.Literal("established")
7931
+ ]),
7932
+ changedAt: Schema$1.String,
7933
+ sendingLimits: Schema$1.Struct({
7934
+ sendsPerSecond: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
7935
+ dailySends: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
7936
+ probation: Schema$1.Union([Schema$1.Struct({
7937
+ hourlyRecipients: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
7938
+ dailyRecipients: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
7939
+ domainShare: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
7940
+ domainShareFloor: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" }))
7941
+ }), Schema$1.Null])
7942
+ }),
7943
+ graduation: Schema$1.Union([Schema$1.Struct({
7944
+ firstSentAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
7945
+ elapsedDays: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
7946
+ sent: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
7947
+ delivered: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
7948
+ hardBounces: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
7949
+ hardBounceRate: Schema$1.Union([Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })), Schema$1.Null]),
7950
+ complaints: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
7951
+ holds: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
7952
+ requirements: Schema$1.Struct({
7953
+ minimumDays: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
7954
+ delivered: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
7955
+ maximumHardBounceRate: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" }))
7956
+ }),
7957
+ blockers: Schema$1.Array(Schema$1.Union([
7958
+ Schema$1.Literal("too_recent"),
7959
+ Schema$1.Literal("too_few_delivered"),
7960
+ Schema$1.Literal("held"),
7961
+ Schema$1.Literal("complaints"),
7962
+ Schema$1.Literal("bounce_rate")
7963
+ ]))
7964
+ }), Schema$1.Null])
7965
+ });
7966
+ const OrganizationsGetTrustTier401 = UnauthorizedError;
7967
+ const OrganizationsGetTrustTier403 = ForbiddenError;
7968
+ const OrganizationsGetTrustTier404 = ResourceNotFoundError;
7969
+ const OrganizationsGetTrustTier422 = ValidationError;
7970
+ const OrganizationsGetTrustTier500 = InternalError;
7971
+ const OrganizationsGetTrustTier502 = BillingProviderError;
7972
+ const OrganizationsGetTrustTier504 = GatewayTimeoutError;
7534
7973
  const OrganizationsGetUsageQuery = Schema$1.Struct({
7535
7974
  after: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
7536
7975
  before: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
@@ -7556,6 +7995,38 @@ const OrganizationsGetUsage403 = ForbiddenError;
7556
7995
  const OrganizationsGetUsage422 = ValidationError;
7557
7996
  const OrganizationsGetUsage500 = InternalError;
7558
7997
  const OrganizationsGetUsage504 = GatewayTimeoutError;
7998
+ const SubscriptionsSubscribeRequestJson = Schema$1.Struct({
7999
+ email: Schema$1.String.annotate({ description: "The recipient email address; confirmation proves consent for this address." }).check(Schema$1.isMaxCodePoints(320).annotate({ expected: "a string with at most 320 code points" })).check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$", "u")).annotate({ expected: "a string matching the RegExp ^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$" })).check(Schema$1.isMaxLength(320).annotate({ expected: "a value with a length of at most 320" })),
8000
+ contactGroupId: ContactGroupId,
8001
+ from: Schema$1.Struct({
8002
+ email: Schema$1.String,
8003
+ name: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
8004
+ }).annotate({ description: "Your verified email sender. The ordinary send pipeline selects its domain and customer brand." }),
8005
+ unsubscribeGroupId: Schema$1.optionalKey(Schema$1.Union([UnsubscribeId, Schema$1.Null]).annotate({ description: "Clear this unsubscribe group after confirmation; all other opt-outs remain." })),
8006
+ templateSlug: Schema$1.optionalKey(Schema$1.Union([Schema$1.String.annotate({ description: "A published email template slug receiving confirmUrl. Omit it to send the default confirmation email." }).check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })), Schema$1.Null])),
8007
+ consentIp: Schema$1.optionalKey(Schema$1.Union([Schema$1.String.annotate({ description: "The recipient IP recorded by your server when they requested subscription." }).check(Schema$1.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema$1.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })), Schema$1.Null])),
8008
+ consentSource: Schema$1.optionalKey(Schema$1.Union([Schema$1.String.annotate({ description: "The signup page or source recorded by your server when consent was requested." }).check(Schema$1.isMaxCodePoints(512).annotate({ expected: "a string with at most 512 code points" })).check(Schema$1.isMaxLength(512).annotate({ expected: "a value with a length of at most 512" })), Schema$1.Null]))
8009
+ });
8010
+ const SubscriptionsSubscribe200 = SubscribeResult;
8011
+ const SubscriptionsSubscribe401 = UnauthorizedError;
8012
+ const SubscriptionsSubscribe402 = PaymentRequiredError;
8013
+ const SubscriptionsSubscribe403 = Schema$1.Union([
8014
+ ForbiddenError,
8015
+ OnboardingReviewRequiredError,
8016
+ FlagDisabledError
8017
+ ]);
8018
+ const SubscriptionsSubscribe404 = ResourceNotFoundError;
8019
+ const SubscriptionsSubscribe409 = ConflictError;
8020
+ const SubscriptionsSubscribe422 = Schema$1.Union([
8021
+ ValidationError,
8022
+ BrandAddressRequiredError,
8023
+ CampaignFooterRequiredError
8024
+ ]);
8025
+ const SubscriptionsSubscribe429 = RateLimitedError;
8026
+ const SubscriptionsSubscribe500 = InternalError;
8027
+ const SubscriptionsSubscribe502 = Schema$1.Union([BillingProviderError, ExternalServiceError]);
8028
+ const SubscriptionsSubscribe503 = Schema$1.Union([SenderNotReadyError, DeliveryUnavailableError]);
8029
+ const SubscriptionsSubscribe504 = GatewayTimeoutError;
7559
8030
  const TemplatesListQuery = Schema$1.Struct({
7560
8031
  limit: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
7561
8032
  cursor: Schema$1.optionalKey(Schema$1.Union([Cursor, Schema$1.Null])),
@@ -7979,6 +8450,23 @@ const TemplatesGetPublication404 = ResourceNotFoundError;
7979
8450
  const TemplatesGetPublication422 = ValidationError;
7980
8451
  const TemplatesGetPublication500 = InternalError;
7981
8452
  const TemplatesGetPublication504 = GatewayTimeoutError;
8453
+ const TemplatesRenderPublicationPathParams = Schema$1.Struct({
8454
+ id: TemplateId,
8455
+ publicationId: TemplatePublicationId
8456
+ });
8457
+ const TemplatesRenderPublicationRequestJson = Schema$1.Struct({
8458
+ data: Schema$1.Record(Schema$1.String, JsonValue).annotate({ description: "The input to render with, validated against the publication's input schema." }),
8459
+ locale: Schema$1.optionalKey(RenderLocale),
8460
+ timeZone: Schema$1.optionalKey(RenderTimeZone)
8461
+ });
8462
+ const TemplatesRenderPublication200 = TemplatePublicationRender;
8463
+ const TemplatesRenderPublication401 = UnauthorizedError;
8464
+ const TemplatesRenderPublication403 = ForbiddenError;
8465
+ const TemplatesRenderPublication404 = ResourceNotFoundError;
8466
+ const TemplatesRenderPublication409 = ConflictError;
8467
+ const TemplatesRenderPublication422 = ValidationError;
8468
+ const TemplatesRenderPublication500 = InternalError;
8469
+ const TemplatesRenderPublication504 = GatewayTimeoutError;
7982
8470
  const TemplatesGetGitRepositoryPathParams = Schema$1.Struct({ id: TemplateId });
7983
8471
  const TemplatesGetGitRepository200 = Schema$1.Struct({
7984
8472
  remote: Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/" })),
@@ -9359,6 +9847,7 @@ const WebhooksCreateRequestJson = Schema$1.Struct({
9359
9847
  Schema$1.Literal("contact.created"),
9360
9848
  Schema$1.Literal("contact.updated"),
9361
9849
  Schema$1.Literal("contact.deleted"),
9850
+ Schema$1.Literal("contact.subscribed"),
9362
9851
  Schema$1.Literal("contact.unsubscribed"),
9363
9852
  Schema$1.Literal("contact.resubscribed"),
9364
9853
  Schema$1.Literal("conversation.created"),
@@ -9430,6 +9919,7 @@ const WebhooksUpdateRequestJson = Schema$1.Struct({
9430
9919
  Schema$1.Literal("contact.created"),
9431
9920
  Schema$1.Literal("contact.updated"),
9432
9921
  Schema$1.Literal("contact.deleted"),
9922
+ Schema$1.Literal("contact.subscribed"),
9433
9923
  Schema$1.Literal("contact.unsubscribed"),
9434
9924
  Schema$1.Literal("contact.resubscribed"),
9435
9925
  Schema$1.Literal("conversation.created"),
@@ -10073,7 +10563,7 @@ var ContactsGroup = class extends HttpApiGroup.make("Contacts").add(HttpApiEndpo
10073
10563
  ContactsList500,
10074
10564
  ContactsList504.pipe(HttpApiSchema.status(504))
10075
10565
  ]
10076
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.list").annotate(OpenApi.Summary, "List contacts").annotate(OpenApi.Description, "Returns contact summaries for the organization, newest first, filterable by search term, status, and creation time (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Read a contact's identities, profile, and metadata with `GET /v1/contacts/{id}`."), HttpApiEndpoint.post("contactsCreate", "/v1/contacts", {
10566
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.list").annotate(OpenApi.Summary, "List contacts").annotate(OpenApi.Description, "Returns contact summaries for the organization, newest first, filterable by search term, status, and creation time (`after`, `before`). `fields` is a comma-separated list of defined custom field keys to return in each summary's `customFields`; omitted keys and unselected fields are not returned. Filter by one defined custom field with `customField` and a JSON-encoded scalar `customFieldValue` (for example, `\"creator\"`, `42`, or `true`). Both filter parameters are required together, and unknown keys or values of the wrong type are rejected. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Read full identities, profile, and metadata with `GET /v1/contacts/{id}`."), HttpApiEndpoint.post("contactsCreate", "/v1/contacts", {
10077
10567
  payload: ContactsCreateRequestJson,
10078
10568
  success: ContactsCreate201.pipe(HttpApiSchema.status(201)),
10079
10569
  error: [
@@ -10285,7 +10775,7 @@ var ContactsGroup = class extends HttpApiGroup.make("Contacts").add(HttpApiEndpo
10285
10775
  ContactsFindOrCreate502.pipe(HttpApiSchema.status(502)),
10286
10776
  ContactsFindOrCreate504.pipe(HttpApiSchema.status(504))
10287
10777
  ]
10288
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.findOrCreate").annotate(OpenApi.Summary, "Find or create a contact").annotate(OpenApi.Description, "Returns an existing contact matching the given identifiers, or creates a new one when none exists.")).annotate(OpenApi.Description, "Contact CRUD, bulk operations, engagement metrics, and activity timeline") {};
10778
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.findOrCreate").annotate(OpenApi.Summary, "Find or create a contact").annotate(OpenApi.Description, "Looks up exactly one identifier through `lookup: { type, value }`. Returns `{ contact, created: false }` unchanged when it exists. Otherwise creates the lookup identity (or external ID), applies `create` attributes, and returns `{ contact, created: true }`. Additional addresses belong in `create.identities`, custom fields in `create.profile.customFields`; custom field keys must be defined and values must match their types. An external ID lookup cannot be contradicted by `create.externalId`. Creation returns HTTP 409 ConflictError if an externalId or address belongs to another contact; the conflicting field is named and no contact is created. Use the update endpoint to change an existing contact.")).annotate(OpenApi.Description, "Contact CRUD, bulk operations, engagement metrics, and activity timeline") {};
10289
10779
  var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(HttpApiEndpoint.get("conversationsList", "/v1/conversations", {
10290
10780
  query: ConversationsListQuery,
10291
10781
  success: ConversationsList200,
@@ -10500,6 +10990,7 @@ var EmailGroup = class extends HttpApiGroup.make("Email").add(HttpApiEndpoint.ge
10500
10990
  EmailAddBlock403.pipe(HttpApiSchema.status(403)),
10501
10991
  EmailAddBlock409.pipe(HttpApiSchema.status(409)),
10502
10992
  EmailAddBlock422.pipe(HttpApiSchema.status(422)),
10993
+ EmailAddBlock500,
10503
10994
  EmailAddBlock504.pipe(HttpApiSchema.status(504))
10504
10995
  ]
10505
10996
  }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.addBlock").annotate(OpenApi.Summary, "Add a block entry").annotate(OpenApi.Description, "Blocks an email address or domain from inbound receiving and returns the created block entry. Responds with 201."), HttpApiEndpoint.delete("emailRemoveBlock", "/v1/email/blocks/:id", {
@@ -10610,6 +11101,7 @@ var EmailGroup = class extends HttpApiGroup.make("Email").add(HttpApiEndpoint.ge
10610
11101
  EmailGetDomainById403.pipe(HttpApiSchema.status(403)),
10611
11102
  EmailGetDomainById404.pipe(HttpApiSchema.status(404)),
10612
11103
  EmailGetDomainById422.pipe(HttpApiSchema.status(422)),
11104
+ EmailGetDomainById500,
10613
11105
  EmailGetDomainById504.pipe(HttpApiSchema.status(504))
10614
11106
  ]
10615
11107
  }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.getDomainById").annotate(OpenApi.Summary, "Get a sending domain").annotate(OpenApi.Description, "Returns a single sending domain, including its DNS records and verification details."), HttpApiEndpoint.delete("emailRemoveDomain", "/v1/email/domains/:id", {
@@ -11129,6 +11621,7 @@ var EmailGroup = class extends HttpApiGroup.make("Email").add(HttpApiEndpoint.ge
11129
11621
  EmailCheckSenderVerification403.pipe(HttpApiSchema.status(403)),
11130
11622
  EmailCheckSenderVerification404.pipe(HttpApiSchema.status(404)),
11131
11623
  EmailCheckSenderVerification422.pipe(HttpApiSchema.status(422)),
11624
+ EmailCheckSenderVerification500,
11132
11625
  EmailCheckSenderVerification502.pipe(HttpApiSchema.status(502)),
11133
11626
  EmailCheckSenderVerification504.pipe(HttpApiSchema.status(504))
11134
11627
  ]
@@ -11414,7 +11907,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11414
11907
  MailboxesCreate502.pipe(HttpApiSchema.status(502)),
11415
11908
  MailboxesCreate504.pipe(HttpApiSchema.status(504))
11416
11909
  ]
11417
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.create").annotate(OpenApi.Summary, "Create a mailbox").annotate(OpenApi.Description, "Creates a mailbox with its addresses and returns it with status 201; the caller gets an admin grant on it. Each address must be under the organization's Samva-hosted mail domain or a verified domain with receiving enabled. The mailbox receives mail from now on; mail that arrived earlier is not added to it. Conflicts if an address or slug is already in use. Returns 402 when the organization is at its plan's mailbox allowance or at its mailbox storage allowance; incoming mail is still received past the storage allowance."), HttpApiEndpoint.get("mailboxesGet", "/v1/mailboxes/:id", {
11910
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.create").annotate(OpenApi.Summary, "Create a mailbox").annotate(OpenApi.Description, "Creates a mailbox with one address and returns it with status 201; the caller gets an admin grant on it. The address must be under the organization's Samva-hosted mail domain or a verified domain with receiving enabled, and the mailbox sends from it. The slug defaults to the address's local part. Pass `slug` when that is taken or not a valid slug. The mailbox receives mail from now on; mail that arrived earlier is not added to it. Conflicts if the address or slug is already in use. Returns 402 when the organization is at its plan's mailbox allowance or at its mailbox storage allowance; incoming mail is still received past the storage allowance."), HttpApiEndpoint.get("mailboxesGet", "/v1/mailboxes/:id", {
11418
11911
  params: MailboxesGetPathParams,
11419
11912
  success: MailboxesGet200,
11420
11913
  error: [
@@ -11461,9 +11954,20 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11461
11954
  MailboxesListActions500,
11462
11955
  MailboxesListActions504.pipe(HttpApiSchema.status(504))
11463
11956
  ]
11464
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.listActions").annotate(OpenApi.Summary, "List mailbox actions").annotate(OpenApi.Description, "Returns the actions proposed on a mailbox, newest first, filterable by `state` (`approvalRequired` lists the sends waiting for a person) and creation time (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page."), HttpApiEndpoint.post("mailboxesApproveAction", "/v1/mailboxes/:id/actions/:actionId/approve", {
11957
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.listActions").annotate(OpenApi.Summary, "List mailbox actions").annotate(OpenApi.Description, "Returns the actions proposed on a mailbox, newest first, filterable by `threadId`, `state` (`approvalRequired` lists the sends waiting for a person), and creation time (`after`, `before`). Filters apply together within the mailbox. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page."), HttpApiEndpoint.get("mailboxesGetAction", "/v1/mailboxes/:id/actions/:actionId", {
11958
+ params: MailboxesGetActionPathParams,
11959
+ success: MailboxesGetAction200,
11960
+ error: [
11961
+ MailboxesGetAction401.pipe(HttpApiSchema.status(401)),
11962
+ MailboxesGetAction403.pipe(HttpApiSchema.status(403)),
11963
+ MailboxesGetAction404.pipe(HttpApiSchema.status(404)),
11964
+ MailboxesGetAction422.pipe(HttpApiSchema.status(422)),
11965
+ MailboxesGetAction500,
11966
+ MailboxesGetAction504.pipe(HttpApiSchema.status(504))
11967
+ ]
11968
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.getAction").annotate(OpenApi.Summary, "Get a mailbox action").annotate(OpenApi.Description, "Returns one action with its current progress. Send actions expose their immutable approved content, deadline, problem, and accepted receipt. A caller with mailbox read access may inspect actions; send-only callers may inspect only their own proposals. Acceptance and mailbox completion do not mean recipient delivery."), HttpApiEndpoint.post("mailboxesApproveAction", "/v1/mailboxes/:id/actions/:actionId/approve", {
11465
11969
  params: MailboxesApproveActionPathParams,
11466
- success: MailboxesApproveAction200,
11970
+ success: [MailboxesApproveAction200, MailboxesApproveAction202.pipe(HttpApiSchema.status(202))],
11467
11971
  error: [
11468
11972
  MailboxesApproveAction401.pipe(HttpApiSchema.status(401)),
11469
11973
  MailboxesApproveAction402.pipe(HttpApiSchema.status(402)),
@@ -11477,7 +11981,23 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11477
11981
  MailboxesApproveAction503.pipe(HttpApiSchema.status(503)),
11478
11982
  MailboxesApproveAction504.pipe(HttpApiSchema.status(504))
11479
11983
  ]
11480
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.approveAction").annotate(OpenApi.Summary, "Approve a mailbox action").annotate(OpenApi.Description, "Approves an action waiting for approval, executes it, and returns the executed action. Only a person signed in or through OAuth may approve, and never the one who proposed it."), HttpApiEndpoint.post("mailboxesDenyAction", "/v1/mailboxes/:id/actions/:actionId/deny", {
11984
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.approveAction").annotate(OpenApi.Summary, "Approve a mailbox action").annotate(OpenApi.Description, "Records approval of a send and returns 202 while it is pending. A send is queued for automatic retry within 15 minutes of approval; repeating approval does not extend this deadline. Accepted, completed, and notSent replays return 200. No expiry applies before approval. Only a person signed in or through OAuth may approve, and never the proposer. Non-send approvals execute synchronously and return 200 with their own execution states."), HttpApiEndpoint.post("mailboxesCancelAction", "/v1/mailboxes/:id/actions/:actionId/cancel", {
11985
+ params: MailboxesCancelActionPathParams,
11986
+ success: [MailboxesCancelAction200, MailboxesCancelAction202.pipe(HttpApiSchema.status(202))],
11987
+ error: [
11988
+ MailboxesCancelAction401.pipe(HttpApiSchema.status(401)),
11989
+ MailboxesCancelAction402.pipe(HttpApiSchema.status(402)),
11990
+ MailboxesCancelAction403.pipe(HttpApiSchema.status(403)),
11991
+ MailboxesCancelAction404.pipe(HttpApiSchema.status(404)),
11992
+ MailboxesCancelAction409.pipe(HttpApiSchema.status(409)),
11993
+ MailboxesCancelAction422.pipe(HttpApiSchema.status(422)),
11994
+ MailboxesCancelAction429.pipe(HttpApiSchema.status(429)),
11995
+ MailboxesCancelAction500,
11996
+ MailboxesCancelAction502.pipe(HttpApiSchema.status(502)),
11997
+ MailboxesCancelAction503.pipe(HttpApiSchema.status(503)),
11998
+ MailboxesCancelAction504.pipe(HttpApiSchema.status(504))
11999
+ ]
12000
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.cancelAction").annotate(OpenApi.Summary, "Cancel a mailbox send").annotate(OpenApi.Description, "Cancels a definitely unsent action and reopens its draft atomically. Only an authorized person who proposed the send or can approve actions may cancel. Accepted sends return 409 with their winning receipt and cannot be withdrawn. An uncertain send requires reconciliation and cannot be cancelled as unsent."), HttpApiEndpoint.post("mailboxesDenyAction", "/v1/mailboxes/:id/actions/:actionId/deny", {
11481
12001
  params: MailboxesDenyActionPathParams,
11482
12002
  payload: MailboxesDenyActionRequestJson,
11483
12003
  success: MailboxesDenyAction200,
@@ -11490,7 +12010,47 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11490
12010
  MailboxesDenyAction500,
11491
12011
  MailboxesDenyAction504.pipe(HttpApiSchema.status(504))
11492
12012
  ]
11493
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.denyAction").annotate(OpenApi.Summary, "Deny a mailbox action").annotate(OpenApi.Description, "Denies an action waiting for approval with a reason and returns it without executing it. Only a person signed in or through OAuth may deny, and never the one who proposed it."), HttpApiEndpoint.get("mailboxesGetAgentActivity", "/v1/mailboxes/:id/agent-activity", {
12013
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.denyAction").annotate(OpenApi.Summary, "Deny a mailbox action").annotate(OpenApi.Description, "Denies an action waiting for approval with a reason and returns it without executing it. Only a person signed in or through OAuth may deny, and never the one who proposed it."), HttpApiEndpoint.post("mailboxesRetryAction", "/v1/mailboxes/:id/actions/:actionId/retry", {
12014
+ params: MailboxesRetryActionPathParams,
12015
+ success: [MailboxesRetryAction200, MailboxesRetryAction202.pipe(HttpApiSchema.status(202))],
12016
+ error: [
12017
+ MailboxesRetryAction401.pipe(HttpApiSchema.status(401)),
12018
+ MailboxesRetryAction402.pipe(HttpApiSchema.status(402)),
12019
+ MailboxesRetryAction403.pipe(HttpApiSchema.status(403)),
12020
+ MailboxesRetryAction404.pipe(HttpApiSchema.status(404)),
12021
+ MailboxesRetryAction409.pipe(HttpApiSchema.status(409)),
12022
+ MailboxesRetryAction422.pipe(HttpApiSchema.status(422)),
12023
+ MailboxesRetryAction429.pipe(HttpApiSchema.status(429)),
12024
+ MailboxesRetryAction500,
12025
+ MailboxesRetryAction502.pipe(HttpApiSchema.status(502)),
12026
+ MailboxesRetryAction503.pipe(HttpApiSchema.status(503)),
12027
+ MailboxesRetryAction504.pipe(HttpApiSchema.status(504))
12028
+ ]
12029
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.retryAction").annotate(OpenApi.Summary, "Resume a mailbox send").annotate(OpenApi.Description, "Resumes the same action only after its previous execution is confirmed ended and safe continuation is possible. Only an authorized person who proposed the send or can approve actions may retry. Automatic waits need no manual Retry. This does not grant new approval, reset the original deadline, replace the message identity, or resubmit an accepted or uncertain send."), HttpApiEndpoint.post("mailboxesCreateAddress", "/v1/mailboxes/:id/addresses", {
12030
+ params: MailboxesCreateAddressPathParams,
12031
+ payload: MailboxesCreateAddressRequestJson,
12032
+ success: MailboxesCreateAddress201.pipe(HttpApiSchema.status(201)),
12033
+ error: [
12034
+ MailboxesCreateAddress401.pipe(HttpApiSchema.status(401)),
12035
+ MailboxesCreateAddress403.pipe(HttpApiSchema.status(403)),
12036
+ MailboxesCreateAddress404.pipe(HttpApiSchema.status(404)),
12037
+ MailboxesCreateAddress409.pipe(HttpApiSchema.status(409)),
12038
+ MailboxesCreateAddress422.pipe(HttpApiSchema.status(422)),
12039
+ MailboxesCreateAddress500,
12040
+ MailboxesCreateAddress504.pipe(HttpApiSchema.status(504))
12041
+ ]
12042
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.createAddress").annotate(OpenApi.Summary, "Add an address to a mailbox").annotate(OpenApi.Description, "Adds an address to a mailbox and returns the mailbox with status 201. The address follows the same rules as the address of a new mailbox: it must be under the organization's Samva-hosted mail domain or a verified domain with receiving enabled, and no mailbox may already hold it (409). Mail sent to it reaches the mailbox from now on; the mailbox keeps sending from its current default address until you change `defaultFrom`."), HttpApiEndpoint.delete("mailboxesRemoveAddress", "/v1/mailboxes/:id/addresses/:addressId", {
12043
+ params: MailboxesRemoveAddressPathParams,
12044
+ success: MailboxesRemoveAddress200,
12045
+ error: [
12046
+ MailboxesRemoveAddress401.pipe(HttpApiSchema.status(401)),
12047
+ MailboxesRemoveAddress403.pipe(HttpApiSchema.status(403)),
12048
+ MailboxesRemoveAddress404.pipe(HttpApiSchema.status(404)),
12049
+ MailboxesRemoveAddress422.pipe(HttpApiSchema.status(422)),
12050
+ MailboxesRemoveAddress500,
12051
+ MailboxesRemoveAddress504.pipe(HttpApiSchema.status(504))
12052
+ ]
12053
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.removeAddress").annotate(OpenApi.Summary, "Remove an address from a mailbox").annotate(OpenApi.Description, "Removes an address from a mailbox and returns the mailbox. Mail sent to the address stops reaching the mailbox; its existing threads and messages stay. A mailbox keeps at least one address, so removing the last one is refused (422). When the removed address was the default `From`, the mailbox sends from its oldest remaining address, without a sender name of its own."), HttpApiEndpoint.get("mailboxesGetAgentActivity", "/v1/mailboxes/:id/agent-activity", {
11494
12054
  params: MailboxesGetAgentActivityPathParams,
11495
12055
  query: MailboxesGetAgentActivityQuery,
11496
12056
  success: MailboxesGetAgentActivity200,
@@ -11564,7 +12124,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11564
12124
  }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.updateDraft").annotate(OpenApi.Summary, "Update a draft").annotate(OpenApi.Description, "Updates the fields you name and keeps the rest; `null` clears an optional field. A draft whose send waits for approval cannot change and conflicts."), HttpApiEndpoint.post("mailboxesSendDraft", "/v1/mailboxes/:id/drafts/:draftId/send", {
11565
12125
  params: MailboxesSendDraftPathParams,
11566
12126
  headers: MailboxesSendDraftHeaders,
11567
- success: MailboxesSendDraft200,
12127
+ success: [MailboxesSendDraft200, MailboxesSendDraft202.pipe(HttpApiSchema.status(202))],
11568
12128
  error: [
11569
12129
  MailboxesSendDraft401.pipe(HttpApiSchema.status(401)),
11570
12130
  MailboxesSendDraft402.pipe(HttpApiSchema.status(402)),
@@ -11590,7 +12150,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11590
12150
  MailboxesListEvents500,
11591
12151
  MailboxesListEvents504.pipe(HttpApiSchema.status(504))
11592
12152
  ]
11593
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.listEvents").annotate(OpenApi.Summary, "List mailbox events").annotate(OpenApi.Description, "Returns what happened on a mailbox, newest first, filterable by when it happened (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page."), HttpApiEndpoint.get("mailboxesListFolders", "/v1/mailboxes/:id/folders", {
12153
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.listEvents").annotate(OpenApi.Summary, "List mailbox events").annotate(OpenApi.Description, "Returns mailbox audit records, newest first, filterable by when they happened (`after`, `before`). Audit event types: `mailbox.created`, `address.attached`, `address.detached`, `email.received`, `email.released`, `email.sent`, `thread.created`, `action.proposed`, `action.policy_decided`, `action.approval_requested`, `action.approval_resolved`, `action.accepted`, `action.executed`, `action.failed`. Thread and draft changes have no dedicated audit event types. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page."), HttpApiEndpoint.get("mailboxesListFolders", "/v1/mailboxes/:id/folders", {
11594
12154
  params: MailboxesListFoldersPathParams,
11595
12155
  success: MailboxesListFolders200,
11596
12156
  error: [
@@ -11702,7 +12262,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11702
12262
  params: MailboxesSendMessagePathParams,
11703
12263
  headers: MailboxesSendMessageHeaders,
11704
12264
  payload: MailboxesSendMessageRequestJson,
11705
- success: MailboxesSendMessage200,
12265
+ success: [MailboxesSendMessage200, MailboxesSendMessage202.pipe(HttpApiSchema.status(202))],
11706
12266
  error: [
11707
12267
  MailboxesSendMessage401.pipe(HttpApiSchema.status(401)),
11708
12268
  MailboxesSendMessage402.pipe(HttpApiSchema.status(402)),
@@ -11716,7 +12276,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11716
12276
  MailboxesSendMessage503.pipe(HttpApiSchema.status(503)),
11717
12277
  MailboxesSendMessage504.pipe(HttpApiSchema.status(504))
11718
12278
  ]
11719
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.sendMessage").annotate(OpenApi.Summary, "Send a new message").annotate(OpenApi.Description, "Starts a new conversation from the mailbox's default From address. `status` is `sent`, or `pending_approval` when the caller's grant or a mailbox policy holds sends for a person's approval; a policy that denies sends refuses it with 403."), HttpApiEndpoint.get("mailboxesGetMessage", "/v1/mailboxes/:id/messages/:messageId", {
12279
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.sendMessage").annotate(OpenApi.Summary, "Send a new message").annotate(OpenApi.Description, "Records a send action and returns 202 with its current receipt and a Location for action status. An installation, grant, or policy may require approval; otherwise the send is queued. Observe the same action through acceptance and mailbox completion. A policy refusal returns 403 with the recorded receipt."), HttpApiEndpoint.get("mailboxesGetMessage", "/v1/mailboxes/:id/messages/:messageId", {
11720
12280
  params: MailboxesGetMessagePathParams,
11721
12281
  success: MailboxesGetMessage200,
11722
12282
  error: [
@@ -11738,7 +12298,19 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11738
12298
  MailboxesGetMessageAttachment500,
11739
12299
  MailboxesGetMessageAttachment504.pipe(HttpApiSchema.status(504))
11740
12300
  ]
11741
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.getMessageAttachment").annotate(OpenApi.Summary, "Get a message attachment").annotate(OpenApi.Description, "Returns a short-lived download URL for one of the message's attachments."), HttpApiEndpoint.post("mailboxesDiscardMessage", "/v1/mailboxes/:id/messages/:messageId/discard", {
12301
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.getMessageAttachment").annotate(OpenApi.Summary, "Get a message attachment").annotate(OpenApi.Description, "Returns a short-lived download URL for one of the message's attachments."), HttpApiEndpoint.post("mailboxesCopyMessageAttachment", "/v1/mailboxes/:id/messages/:messageId/attachments/:attachmentId/copy", {
12302
+ params: MailboxesCopyMessageAttachmentPathParams,
12303
+ success: MailboxesCopyMessageAttachment201.pipe(HttpApiSchema.status(201)),
12304
+ error: [
12305
+ MailboxesCopyMessageAttachment401.pipe(HttpApiSchema.status(401)),
12306
+ MailboxesCopyMessageAttachment403.pipe(HttpApiSchema.status(403)),
12307
+ MailboxesCopyMessageAttachment404.pipe(HttpApiSchema.status(404)),
12308
+ MailboxesCopyMessageAttachment409.pipe(HttpApiSchema.status(409)),
12309
+ MailboxesCopyMessageAttachment422.pipe(HttpApiSchema.status(422)),
12310
+ MailboxesCopyMessageAttachment500,
12311
+ MailboxesCopyMessageAttachment504.pipe(HttpApiSchema.status(504))
12312
+ ]
12313
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.copyMessageAttachment").annotate(OpenApi.Summary, "Copy a message attachment").annotate(OpenApi.Description, "Copies one of a received message's attachments into the organization's media and returns it as a draft attachment (`mediaId`), so a draft can carry it. A draft that forwards a message saves each original attachment this way."), HttpApiEndpoint.post("mailboxesDiscardMessage", "/v1/mailboxes/:id/messages/:messageId/discard", {
11742
12314
  params: MailboxesDiscardMessagePathParams,
11743
12315
  success: MailboxesDiscardMessage200,
11744
12316
  error: [
@@ -11755,7 +12327,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11755
12327
  params: MailboxesForwardPathParams,
11756
12328
  headers: MailboxesForwardHeaders,
11757
12329
  payload: MailboxesForwardRequestJson,
11758
- success: MailboxesForward200,
12330
+ success: [MailboxesForward200, MailboxesForward202.pipe(HttpApiSchema.status(202))],
11759
12331
  error: [
11760
12332
  MailboxesForward401.pipe(HttpApiSchema.status(401)),
11761
12333
  MailboxesForward402.pipe(HttpApiSchema.status(402)),
@@ -11796,7 +12368,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11796
12368
  params: MailboxesReplyPathParams,
11797
12369
  headers: MailboxesReplyHeaders,
11798
12370
  payload: MailboxesReplyRequestJson,
11799
- success: MailboxesReply200,
12371
+ success: [MailboxesReply200, MailboxesReply202.pipe(HttpApiSchema.status(202))],
11800
12372
  error: [
11801
12373
  MailboxesReply401.pipe(HttpApiSchema.status(401)),
11802
12374
  MailboxesReply402.pipe(HttpApiSchema.status(402)),
@@ -11814,7 +12386,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11814
12386
  params: MailboxesReplyAllPathParams,
11815
12387
  headers: MailboxesReplyAllHeaders,
11816
12388
  payload: MailboxesReplyAllRequestJson,
11817
- success: MailboxesReplyAll200,
12389
+ success: [MailboxesReplyAll200, MailboxesReplyAll202.pipe(HttpApiSchema.status(202))],
11818
12390
  error: [
11819
12391
  MailboxesReplyAll401.pipe(HttpApiSchema.status(401)),
11820
12392
  MailboxesReplyAll402.pipe(HttpApiSchema.status(402)),
@@ -12433,7 +13005,18 @@ var OrganizationsGroup = class extends HttpApiGroup.make("Organizations").add(Ht
12433
13005
  OrganizationsDelete500,
12434
13006
  OrganizationsDelete504.pipe(HttpApiSchema.status(504))
12435
13007
  ]
12436
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "organizations.delete").annotate(OpenApi.Summary, "Delete the current organization").annotate(OpenApi.Description, "Starts an owner-authorized organization deletion operation, confirming the organization name in the request. Repeating the same request with the same Idempotency-Key returns the existing organization-scoped operation."), HttpApiEndpoint.get("organizationsGetUsage", "/v1/organizations/usage", {
13008
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "organizations.delete").annotate(OpenApi.Summary, "Delete the current organization").annotate(OpenApi.Description, "Starts an owner-authorized organization deletion operation, confirming the organization name in the request. Repeating the same request with the same Idempotency-Key returns the existing organization-scoped operation."), HttpApiEndpoint.get("organizationsGetTrustTier", "/v1/organizations/trust-tier", {
13009
+ success: OrganizationsGetTrustTier200,
13010
+ error: [
13011
+ OrganizationsGetTrustTier401.pipe(HttpApiSchema.status(401)),
13012
+ OrganizationsGetTrustTier403.pipe(HttpApiSchema.status(403)),
13013
+ OrganizationsGetTrustTier404.pipe(HttpApiSchema.status(404)),
13014
+ OrganizationsGetTrustTier422.pipe(HttpApiSchema.status(422)),
13015
+ OrganizationsGetTrustTier500,
13016
+ OrganizationsGetTrustTier502.pipe(HttpApiSchema.status(502)),
13017
+ OrganizationsGetTrustTier504.pipe(HttpApiSchema.status(504))
13018
+ ]
13019
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "organizations.getTrustTier").annotate(OpenApi.Summary, "Get organization trust tier and sending limits").annotate(OpenApi.Description, "Returns the current trust tier, plan and probation sending limits, and measured probation graduation progress. Limits are additional to billing allowance, domain readiness, and enforcement. Graduation is evaluated on delivery events."), HttpApiEndpoint.get("organizationsGetUsage", "/v1/organizations/usage", {
12437
13020
  query: OrganizationsGetUsageQuery,
12438
13021
  success: OrganizationsGetUsage200,
12439
13022
  error: [
@@ -12444,6 +13027,23 @@ var OrganizationsGroup = class extends HttpApiGroup.make("Organizations").add(Ht
12444
13027
  OrganizationsGetUsage504.pipe(HttpApiSchema.status(504))
12445
13028
  ]
12446
13029
  }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "organizations.getUsage").annotate(OpenApi.Summary, "Get organization usage").annotate(OpenApi.Description, "Returns usage statistics for the current organization between `after` and `before`, which default to the current calendar month so far. `usage.periodStart` and `usage.periodEnd` echo the window counted.")).annotate(OpenApi.Description, "Organization management and usage statistics") {};
13030
+ var SubscriptionsGroup = class extends HttpApiGroup.make("Subscriptions").add(HttpApiEndpoint.post("subscriptionsSubscribe", "/v1/subscriptions", {
13031
+ payload: SubscriptionsSubscribeRequestJson,
13032
+ success: SubscriptionsSubscribe200,
13033
+ error: [
13034
+ SubscriptionsSubscribe401.pipe(HttpApiSchema.status(401)),
13035
+ SubscriptionsSubscribe402.pipe(HttpApiSchema.status(402)),
13036
+ SubscriptionsSubscribe403.pipe(HttpApiSchema.status(403)),
13037
+ SubscriptionsSubscribe404.pipe(HttpApiSchema.status(404)),
13038
+ SubscriptionsSubscribe409.pipe(HttpApiSchema.status(409)),
13039
+ SubscriptionsSubscribe422.pipe(HttpApiSchema.status(422)),
13040
+ SubscriptionsSubscribe429.pipe(HttpApiSchema.status(429)),
13041
+ SubscriptionsSubscribe500,
13042
+ SubscriptionsSubscribe502.pipe(HttpApiSchema.status(502)),
13043
+ SubscriptionsSubscribe503.pipe(HttpApiSchema.status(503)),
13044
+ SubscriptionsSubscribe504.pipe(HttpApiSchema.status(504))
13045
+ ]
13046
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "subscriptions.subscribe").annotate(OpenApi.Summary, "Request subscription confirmation").annotate(OpenApi.Description, "Sends a confirmation email from your sender. Only the recipient's explicit confirmation adds them to the active static contact group and clears the optional unsubscribe group. The link expires after seven days and can be used once. A custom published email template receives confirmUrl. Sending follows ordinary sender, admission, billing, and brand-footer settings. Requires email send authority in addition to the declared contact grants, including the optional unsubscribe preference change.")).annotate(OpenApi.Description, "Recipient-confirmed contact list subscriptions") {};
12447
13047
  var TemplatesGroup = class extends HttpApiGroup.make("Templates").add(HttpApiEndpoint.get("templatesList", "/v1/templates", {
12448
13048
  query: TemplatesListQuery,
12449
13049
  success: TemplatesList200,
@@ -12547,7 +13147,20 @@ var TemplatesGroup = class extends HttpApiGroup.make("Templates").add(HttpApiEnd
12547
13147
  TemplatesGetPublication500,
12548
13148
  TemplatesGetPublication504.pipe(HttpApiSchema.status(504))
12549
13149
  ]
12550
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.getPublication").annotate(OpenApi.Summary, "Get a template publication").annotate(OpenApi.Description, "Returns one immutable publication and its exact build receipt."), HttpApiEndpoint.get("templatesGetGitRepository", "/v1/templates/:id/repository", {
13150
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.getPublication").annotate(OpenApi.Summary, "Get a template publication").annotate(OpenApi.Description, "Returns one immutable publication and its exact build receipt."), HttpApiEndpoint.post("templatesRenderPublication", "/v1/templates/:id/publications/:publicationId/render", {
13151
+ params: TemplatesRenderPublicationPathParams,
13152
+ payload: TemplatesRenderPublicationRequestJson,
13153
+ success: TemplatesRenderPublication200,
13154
+ error: [
13155
+ TemplatesRenderPublication401.pipe(HttpApiSchema.status(401)),
13156
+ TemplatesRenderPublication403.pipe(HttpApiSchema.status(403)),
13157
+ TemplatesRenderPublication404.pipe(HttpApiSchema.status(404)),
13158
+ TemplatesRenderPublication409.pipe(HttpApiSchema.status(409)),
13159
+ TemplatesRenderPublication422.pipe(HttpApiSchema.status(422)),
13160
+ TemplatesRenderPublication500,
13161
+ TemplatesRenderPublication504.pipe(HttpApiSchema.status(504))
13162
+ ]
13163
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.renderPublication").annotate(OpenApi.Summary, "Render a template publication").annotate(OpenApi.Description, "Renders one immutable publication against the `data` you pass, formatted in the `locale` and `timeZone` you name as a send formats them, and returns the subject, preheader, HTML and plain text a send would produce. `data` is validated against the publication's input schema exactly as a send validates it; invalid input returns a validation error that names each failing field. Nothing is sent or stored. Unpublished workspace edits are never rendered: only a publication id renders."), HttpApiEndpoint.get("templatesGetGitRepository", "/v1/templates/:id/repository", {
12551
13164
  params: TemplatesGetGitRepositoryPathParams,
12552
13165
  success: TemplatesGetGitRepository200,
12553
13166
  error: [
@@ -12958,7 +13571,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
12958
13571
  WebhooksCreate502.pipe(HttpApiSchema.status(502)),
12959
13572
  WebhooksCreate504.pipe(HttpApiSchema.status(504))
12960
13573
  ]
12961
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "webhooks.create").annotate(OpenApi.Summary, "Create a webhook").annotate(OpenApi.Description, "Creates a signed webhook endpoint for Samva delivery and inbound events, stores subscriptions, and returns the endpoint and signing secret with a 201 response."), HttpApiEndpoint.get("webhooksGet", "/v1/webhooks/:id", {
13574
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "webhooks.create").annotate(OpenApi.Summary, "Create a webhook").annotate(OpenApi.Description, "Creates a signed webhook endpoint for Samva delivery and inbound events, stores subscriptions, and returns the endpoint and signing secret with a 201 response. `mailboxIds` and `namespaceId` confine mailbox events; when both are set, every mailbox must belong to the namespace."), HttpApiEndpoint.get("webhooksGet", "/v1/webhooks/:id", {
12962
13575
  params: WebhooksGetPathParams,
12963
13576
  success: WebhooksGet200,
12964
13577
  error: [
@@ -12994,7 +13607,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
12994
13607
  WebhooksUpdate500,
12995
13608
  WebhooksUpdate504.pipe(HttpApiSchema.status(504))
12996
13609
  ]
12997
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "webhooks.update").annotate(OpenApi.Summary, "Update a webhook").annotate(OpenApi.Description, "Updates a webhook's name, URL, subscribed events, channels, custom headers, or status and returns the updated endpoint."), HttpApiEndpoint.post("webhooksRetryDelivery", "/v1/webhooks/:id/deliveries/:deliveryId/redeliver", {
13610
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "webhooks.update").annotate(OpenApi.Summary, "Update a webhook").annotate(OpenApi.Description, "Updates a webhook's name, URL, subscribed events, channels, custom headers, mailbox scope, or status and returns the updated endpoint. A change to `mailboxIds` or `namespaceId` is checked as the endpoint will stand afterward: every mailbox must belong to the namespace when both are set."), HttpApiEndpoint.post("webhooksRetryDelivery", "/v1/webhooks/:id/deliveries/:deliveryId/redeliver", {
12998
13611
  params: WebhooksRetryDeliveryPathParams,
12999
13612
  success: WebhooksRetryDelivery200,
13000
13613
  error: [
@@ -13054,12 +13667,12 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
13054
13667
  WebhooksTest504.pipe(HttpApiSchema.status(504))
13055
13668
  ]
13056
13669
  }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "webhooks.test").annotate(OpenApi.Summary, "Send a test webhook delivery").annotate(OpenApi.Description, "Queues a signed webhook.test event through the normal delivery and retry lifecycle.")).annotate(OpenApi.Description, "Customer event webhook management, testing, and delivery logs") {};
13057
- var SamvaApi = class extends HttpApi.make("SamvaApi").annotate(OpenApi.Title, "Samva API").annotate(OpenApi.Version, "1.0.0").annotate(OpenApi.Description, "Samva is the email API for your app. Send transactional email in one typed call. Delivery events and customer replies come back as signed webhooks, and replies thread to the email they answer.").annotate(OpenApi.Servers, [{ url: "https://api.samva.dev" }]).add(AnalyticsGroup, APIKeysGroup, AttachmentsGroup, BrandsGroup, CampaignsGroup, ContactGroupsGroup, ContactsGroup, ConversationsGroup, CustomFieldsGroup, EmailGroup, ExtensionInstallationsGroup, ExtensionsGroup, FeedbackGroup, MailboxesGroup, MediaGroup, MessagesGroup, ScheduledMessagesGroup, NamespacesGroup, OperationsGroup, OrganizationsGroup, TemplatesGroup, UnsubscribeGroupsGroup, WebhooksGroup) {};
13670
+ var SamvaApi = class extends HttpApi.make("SamvaApi").annotate(OpenApi.Title, "Samva API").annotate(OpenApi.Version, "1.0.0").annotate(OpenApi.Description, "Samva is the email API for your app. Send transactional email in one typed call. Delivery events and customer replies come back as signed webhooks, and replies thread to the email they answer.").annotate(OpenApi.Servers, [{ url: "https://api.samva.dev" }]).add(AnalyticsGroup, APIKeysGroup, AttachmentsGroup, BrandsGroup, CampaignsGroup, ContactGroupsGroup, ContactsGroup, ConversationsGroup, CustomFieldsGroup, EmailGroup, ExtensionInstallationsGroup, ExtensionsGroup, FeedbackGroup, MailboxesGroup, MediaGroup, MessagesGroup, ScheduledMessagesGroup, NamespacesGroup, OperationsGroup, OrganizationsGroup, SubscriptionsGroup, TemplatesGroup, UnsubscribeGroupsGroup, WebhooksGroup) {};
13058
13671
  //#endregion
13059
13672
  //#region src/effect/internal/client.ts
13060
13673
  const DEFAULT_BASE_URL = "https://api.samva.dev";
13061
13674
  var Service = class extends Context.Service()("samva/Client") {};
13062
- const authHeaders = (config) => "authToken" in config ? { Authorization: `Bearer ${config.authToken}` } : { "x-api-key": config.apiKey };
13675
+ const authHeaders = (config) => config.authToken !== void 0 ? { Authorization: `Bearer ${config.authToken}` } : { "x-api-key": Redacted.isRedacted(config.apiKey) ? Redacted.value(config.apiKey) : config.apiKey };
13063
13676
  const flatten = (nested) => {
13064
13677
  const flat = {};
13065
13678
  for (const endpoints of Object.values(nested)) for (const [endpoint, call] of Object.entries(endpoints)) flat[endpoint] = call;
@@ -13108,6 +13721,6 @@ const layer = (config) => Layer.effect(Service, make(config));
13108
13721
  const layerFetch = (config) => layer(config).pipe(Layer.provide(FetchHttpClient.layer));
13109
13722
  const raw = Effect.map(Service, (client) => client.raw);
13110
13723
  //#endregion
13111
- export { UpdateTemplatePayload as A, ResourceNotFoundError as C, TrackingRecipientEmail as D, TestWebhookPayload as E, ValidationError as M, UnauthorizedError as O, RateLimitedError as S, SendFeedback as T, ForbiddenError as _, AnalyticsQueryError as a, OnboardingReviewRequiredError as b, CampaignFooterRequiredError as c, CreateTemplatePayload as d, CreateWebhookPayload as f, FlagDisabledError as g, ExternalServiceError as h, raw as i, UpdateWebhookPayload as j, UpdateBrand as k, ConflictError as l, EmailChannelError as m, layer as n, BillingProviderError as o, DeliveryUnavailableError as p, layerFetch as r, BrandAddressRequiredError as s, Service as t, CreateBrand as u, GatewayTimeoutError as v, SamvaApi as w, PaymentRequiredError as x, InternalError as y };
13724
+ export { TrackingRecipientEmail as A, PaymentRequiredError as C, SendFeedback as D, SamvaApi as E, ValidationError as F, UpdateBrand as M, UpdateTemplatePayload as N, SenderNotReadyError as O, UpdateWebhookPayload as P, OnboardingReviewRequiredError as S, ResourceNotFoundError as T, ForbiddenError as _, AnalyticsQueryError as a, MailboxSendConflictError as b, CampaignFooterRequiredError as c, CreateTemplatePayload as d, CreateWebhookPayload as f, FlagDisabledError as g, ExternalServiceError as h, raw as i, UnauthorizedError as j, TestWebhookPayload as k, ConflictError as l, EmailChannelError as m, layer as n, BillingProviderError as o, DeliveryUnavailableError as p, layerFetch as r, BrandAddressRequiredError as s, Service as t, CreateBrand as u, GatewayTimeoutError as v, RateLimitedError as w, MailboxSendRefusedError as x, InternalError as y };
13112
13725
 
13113
- //# sourceMappingURL=client-DYPNDvVU.js.map
13726
+ //# sourceMappingURL=client-CDg7zJs0.js.map