samva 0.13.0 → 0.14.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 +51 -6
  3. package/dist/{categories-Bcwq5jPV.js → categories-BGUBFdH9.js} +9 -1
  4. package/dist/client/sdk.gen.d.ts +105 -18
  5. package/dist/client/types.gen.d.ts +786 -118
  6. package/dist/{client-DYPNDvVU.js → client-CZjhOKPM.js} +694 -122
  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 +6184 -1243
  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 +1726 -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-BrNnSMF2.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-DT02zP7q.js} +13 -5
  66. package/dist/{operation-B_Ty1LG-.js → operation-g8nAzmIM.js} +29 -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-BFRKhpSS.js} +941 -38
  72. package/dist/service-map.d.ts +35 -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-BrNnSMF2.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}$",
@@ -591,14 +605,14 @@ const MailboxMetadataPatch = Schema$1.Record(Schema$1.String, Schema$1.Union([Sc
591
605
  expected: "an object with property names matching the schema",
592
606
  identifier: "MailboxMetadataPatch"
593
607
  }));
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
608
  const MailboxThreadId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^thread_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
599
609
  expected: "a string matching the RegExp ^thread_[0-9a-hjkmnp-tv-z]{16,24}$",
600
610
  identifier: "MailboxThreadId"
601
611
  })).pipe(Schema$1.brand("MailboxThreadId"));
612
+ const MailboxActionId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
613
+ expected: "a string matching the RegExp ^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$",
614
+ identifier: "MailboxActionId"
615
+ })).pipe(Schema$1.brand("MailboxActionId"));
602
616
  const MailboxDraftId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^mdraft_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
603
617
  expected: "a string matching the RegExp ^mdraft_[0-9a-hjkmnp-tv-z]{16,24}$",
604
618
  identifier: "MailboxDraftId"
@@ -607,6 +621,74 @@ const MailboxPolicyId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */
607
621
  expected: "a string matching the RegExp ^mbxpol_[0-9a-hjkmnp-tv-z]{16,24}$",
608
622
  identifier: "MailboxPolicyId"
609
623
  })).pipe(Schema$1.brand("MailboxPolicyId"));
624
+ const MailboxSendError = Schema$1.Union([
625
+ Schema$1.Struct({
626
+ _tag: Schema$1.Literal("SenderNotReadyError"),
627
+ message: Schema$1.String,
628
+ sender: Schema$1.String,
629
+ retryAfterSeconds: Schema$1.optionalKey(Schema$1.Union([Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })), Schema$1.Null]))
630
+ }),
631
+ Schema$1.Struct({
632
+ _tag: Schema$1.Literal("RateLimitedError"),
633
+ message: Schema$1.String,
634
+ retryAfterSeconds: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" }))
635
+ }),
636
+ Schema$1.Struct({
637
+ _tag: Schema$1.Literal("OnboardingReviewRequiredError"),
638
+ message: Schema$1.String,
639
+ code: Schema$1.Union([
640
+ Schema$1.Literal("review_required"),
641
+ Schema$1.Literal("review_in_progress"),
642
+ Schema$1.Literal("information_required"),
643
+ Schema$1.Literal("review_rejected"),
644
+ Schema$1.Literal("identity_review_required"),
645
+ Schema$1.Literal("identity_review_rejected"),
646
+ Schema$1.Literal("identity_changed")
647
+ ]),
648
+ decision: Schema$1.Union([
649
+ Schema$1.Literal("undecided"),
650
+ Schema$1.Literal("approved"),
651
+ Schema$1.Literal("rejected")
652
+ ]),
653
+ stage: Schema$1.Union([
654
+ Schema$1.Literal("collecting"),
655
+ Schema$1.Literal("automated_review"),
656
+ Schema$1.Literal("manual_review"),
657
+ Schema$1.Literal("information_requested"),
658
+ Schema$1.Literal("complete")
659
+ ]),
660
+ nextAction: Schema$1.Union([
661
+ Schema$1.Literal("wait_for_review"),
662
+ Schema$1.Literal("provide_information"),
663
+ Schema$1.Literal("verify_sending_identity"),
664
+ Schema$1.Literal("reapply"),
665
+ Schema$1.Literal("contact_support")
666
+ ]),
667
+ identityId: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
668
+ }),
669
+ Schema$1.Struct({
670
+ _tag: Schema$1.Literal("PaymentRequiredError"),
671
+ message: Schema$1.String,
672
+ resource: Schema$1.String,
673
+ currentUsage: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
674
+ limit: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" }))
675
+ }),
676
+ Schema$1.Struct({
677
+ _tag: Schema$1.Literal("ValidationError"),
678
+ message: Schema$1.String,
679
+ fields: Schema$1.optionalKey(Schema$1.Union([Schema$1.Record(Schema$1.String, Schema$1.Array(Schema$1.String)), Schema$1.Null]))
680
+ }),
681
+ Schema$1.Struct({
682
+ _tag: Schema$1.Literal("ForbiddenError"),
683
+ message: Schema$1.String
684
+ }),
685
+ Schema$1.Struct({
686
+ _tag: Schema$1.Literal("ResourceNotFoundError"),
687
+ resource: Schema$1.String,
688
+ id: Schema$1.String,
689
+ message: Schema$1.String
690
+ })
691
+ ]).annotate({ identifier: "MailboxSendError" });
610
692
  var OnboardingReviewRequiredError = class extends Schema$1.TaggedError()("OnboardingReviewRequiredError", Schema$1.Struct({
611
693
  message: Schema$1.String,
612
694
  code: Schema$1.Union([
@@ -664,7 +746,12 @@ const MailboxAgentActivity = Schema$1.Struct({
664
746
  Schema$1.Literal("approvalDenied"),
665
747
  Schema$1.Literal("executing"),
666
748
  Schema$1.Literal("executed"),
667
- Schema$1.Literal("failed")
749
+ Schema$1.Literal("failed"),
750
+ Schema$1.Literal("queued"),
751
+ Schema$1.Literal("accepted"),
752
+ Schema$1.Literal("completed"),
753
+ Schema$1.Literal("notSent"),
754
+ Schema$1.Literal("uncertain")
668
755
  ]),
669
756
  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
757
  }))
@@ -677,13 +764,11 @@ const MailboxAgentActivity = Schema$1.Struct({
677
764
  Schema$1.Literal("email.released"),
678
765
  Schema$1.Literal("email.sent"),
679
766
  Schema$1.Literal("thread.created"),
680
- Schema$1.Literal("thread.updated"),
681
- Schema$1.Literal("draft.created"),
682
- Schema$1.Literal("draft.updated"),
683
767
  Schema$1.Literal("action.proposed"),
684
768
  Schema$1.Literal("action.policy_decided"),
685
769
  Schema$1.Literal("action.approval_requested"),
686
770
  Schema$1.Literal("action.approval_resolved"),
771
+ Schema$1.Literal("action.accepted"),
687
772
  Schema$1.Literal("action.executed"),
688
773
  Schema$1.Literal("action.failed")
689
774
  ]),
@@ -693,7 +778,7 @@ const MailboxAgentActivity = Schema$1.Struct({
693
778
  }).annotate({ identifier: "MailboxAgentActivity" });
694
779
  const MailboxDraftState = Schema$1.Union([
695
780
  Schema$1.Literal("saved"),
696
- Schema$1.Literal("approvalPending"),
781
+ Schema$1.Literal("locked"),
697
782
  Schema$1.Literal("sent")
698
783
  ]).annotate({ identifier: "MailboxDraftState" });
699
784
  const MailboxEventId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^mbxevt_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
@@ -913,6 +998,10 @@ const Organization = Schema$1.Struct({
913
998
  teamMembersUsed: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
914
999
  messagesResetAt: Schema$1.Union([Schema$1.String, Schema$1.Null])
915
1000
  }).annotate({ identifier: "Organization" });
1001
+ const SubscribeResult = Schema$1.Struct({
1002
+ success: Schema$1.Boolean,
1003
+ expiresAt: Schema$1.String
1004
+ }).annotate({ identifier: "SubscribeResult" });
916
1005
  const TemplateProjectId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^tproj_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
917
1006
  expected: "a string matching the RegExp ^tproj_[0-9a-hjkmnp-tv-z]{16,24}$",
918
1007
  identifier: "TemplateProjectId"
@@ -935,6 +1024,12 @@ const BrandFooterBlock = Schema$1.Struct({
935
1024
  html: Schema$1.String,
936
1025
  text: Schema$1.String
937
1026
  }).annotate({ identifier: "BrandFooterBlock" });
1027
+ const TemplatePublicationRender = Schema$1.Struct({
1028
+ subject: Schema$1.String,
1029
+ preheader: Schema$1.optionalKey(Schema$1.String),
1030
+ 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" })),
1031
+ 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" }))
1032
+ }).annotate({ identifier: "TemplatePublicationRender" });
938
1033
  const UnsubscribeGroupMemberPage = Schema$1.Struct({
939
1034
  items: Schema$1.Array(Schema$1.Struct({
940
1035
  id: 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"),
@@ -2233,13 +2358,24 @@ const MailboxActionDecision = Schema$1.Struct({
2233
2358
  ]),
2234
2359
  reason: Schema$1.Union([Schema$1.String, Schema$1.Null]),
2235
2360
  policyId: Schema$1.Union([MailboxPolicyId, Schema$1.Null]),
2361
+ source: Schema$1.Union([Schema$1.Union([
2362
+ Schema$1.Literal("grant"),
2363
+ Schema$1.Literal("installation"),
2364
+ Schema$1.Literal("policy")
2365
+ ]), Schema$1.Null]),
2236
2366
  decidedAt: Schema$1.String
2237
2367
  }).annotate({ identifier: "MailboxActionDecision" });
2368
+ const MailboxSendOutcome = Schema$1.Struct({
2369
+ code: Schema$1.String,
2370
+ message: Schema$1.String,
2371
+ error: Schema$1.optionalKey(Schema$1.Union([MailboxSendError, Schema$1.Null]))
2372
+ }).annotate({ identifier: "MailboxSendOutcome" });
2238
2373
  const MailboxDraftSummary = Schema$1.Struct({
2239
2374
  id: MailboxDraftId,
2240
2375
  threadId: Schema$1.Union([MailboxThreadId, Schema$1.Null]),
2241
2376
  inReplyToMessageId: Schema$1.Union([MessageId, Schema$1.Null]),
2242
2377
  state: MailboxDraftState,
2378
+ lockedByActionId: Schema$1.Union([MailboxActionId, Schema$1.Null]),
2243
2379
  to: Schema$1.Array(Schema$1.String),
2244
2380
  subject: Schema$1.Union([Schema$1.String, Schema$1.Null]),
2245
2381
  createdAt: Schema$1.String,
@@ -2254,13 +2390,11 @@ const MailboxEvent = Schema$1.Struct({
2254
2390
  Schema$1.Literal("email.released"),
2255
2391
  Schema$1.Literal("email.sent"),
2256
2392
  Schema$1.Literal("thread.created"),
2257
- Schema$1.Literal("thread.updated"),
2258
- Schema$1.Literal("draft.created"),
2259
- Schema$1.Literal("draft.updated"),
2260
2393
  Schema$1.Literal("action.proposed"),
2261
2394
  Schema$1.Literal("action.policy_decided"),
2262
2395
  Schema$1.Literal("action.approval_requested"),
2263
2396
  Schema$1.Literal("action.approval_resolved"),
2397
+ Schema$1.Literal("action.accepted"),
2264
2398
  Schema$1.Literal("action.executed"),
2265
2399
  Schema$1.Literal("action.failed")
2266
2400
  ]),
@@ -2537,7 +2671,8 @@ const MessageDelivery = Schema$1.Struct({
2537
2671
  Schema$1.Literal("campaign-paused"),
2538
2672
  Schema$1.Literal("domain-warming"),
2539
2673
  Schema$1.Literal("onboarding-review"),
2540
- Schema$1.Literal("content-review")
2674
+ Schema$1.Literal("content-review"),
2675
+ Schema$1.Literal("screening-unavailable")
2541
2676
  ]), Schema$1.Null]),
2542
2677
  nextRetryAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
2543
2678
  sentAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
@@ -2729,6 +2864,7 @@ const WebhookEndpointListItem = Schema$1.Struct({
2729
2864
  Schema$1.Literal("contact.created"),
2730
2865
  Schema$1.Literal("contact.updated"),
2731
2866
  Schema$1.Literal("contact.deleted"),
2867
+ Schema$1.Literal("contact.subscribed"),
2732
2868
  Schema$1.Literal("contact.unsubscribed"),
2733
2869
  Schema$1.Literal("contact.resubscribed"),
2734
2870
  Schema$1.Literal("conversation.created"),
@@ -2862,11 +2998,28 @@ const UpdateBrand = Schema$1.Struct({
2862
2998
  footer: Schema$1.optionalKey(Schema$1.Union([BrandFooter, Schema$1.Null]))
2863
2999
  }).annotate({ identifier: "UpdateBrand" });
2864
3000
  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" });
3001
+ const MailboxSendSnapshot = Schema$1.Struct({
3002
+ draftRevision: Schema$1.Finite.check(Schema$1.isInt().annotate({ expected: "an integer" })).check(Schema$1.isGreaterThan(0).annotate({ expected: "a value greater than 0" })),
3003
+ from: Schema$1.String,
3004
+ fromName: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3005
+ to: Schema$1.TupleWithRest(Schema$1.Tuple([Schema$1.String]), [Schema$1.String]),
3006
+ cc: Schema$1.Array(Schema$1.String),
3007
+ bcc: Schema$1.Array(Schema$1.String),
3008
+ replyTo: Schema$1.Array(Schema$1.String),
3009
+ subject: Schema$1.String,
3010
+ text: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3011
+ html: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3012
+ attachments: Schema$1.Array(EmailAttachment).check(Schema$1.isMaxLength(10).annotate({ expected: "a value with a length of at most 10" })),
3013
+ threadId: Schema$1.Union([MailboxThreadId, Schema$1.Null]),
3014
+ conversationId: Schema$1.Union([ConversationId, Schema$1.Null]),
3015
+ inReplyToMessageId: Schema$1.Union([MessageId, Schema$1.Null])
3016
+ }).annotate({ identifier: "MailboxSendSnapshot" });
2865
3017
  const MailboxDraft = Schema$1.Struct({
2866
3018
  id: MailboxDraftId,
2867
3019
  threadId: Schema$1.Union([MailboxThreadId, Schema$1.Null]),
2868
3020
  inReplyToMessageId: Schema$1.Union([MessageId, Schema$1.Null]),
2869
3021
  state: MailboxDraftState,
3022
+ lockedByActionId: Schema$1.Union([MailboxActionId, Schema$1.Null]),
2870
3023
  to: Schema$1.Array(Schema$1.String),
2871
3024
  subject: Schema$1.Union([Schema$1.String, Schema$1.Null]),
2872
3025
  createdAt: Schema$1.String,
@@ -2935,27 +3088,6 @@ const TemplateFamily = Schema$1.Struct({
2935
3088
  createdAt: Schema$1.String,
2936
3089
  updatedAt: Schema$1.String
2937
3090
  }).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
3091
  const MessageReceipt = Schema$1.Struct({
2960
3092
  id: MessageId,
2961
3093
  status: Schema$1.Union([
@@ -2980,7 +3112,8 @@ const MessageReceipt = Schema$1.Struct({
2980
3112
  Schema$1.Literal("campaign-paused"),
2981
3113
  Schema$1.Literal("domain-warming"),
2982
3114
  Schema$1.Literal("onboarding-review"),
2983
- Schema$1.Literal("content-review")
3115
+ Schema$1.Literal("content-review"),
3116
+ Schema$1.Literal("screening-unavailable")
2984
3117
  ]), Schema$1.Null]),
2985
3118
  reviewExpectedAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
2986
3119
  skippedRecipients: Schema$1.Array(SkippedRecipient),
@@ -3010,6 +3143,7 @@ const ContactSummary = Schema$1.Struct({
3010
3143
  channels: Schema$1.Array(Schema$1.Literal("email")),
3011
3144
  tags: Schema$1.Array(Schema$1.String),
3012
3145
  lists: Schema$1.Array(ContactListMembership),
3146
+ customFields: Schema$1.optionalKey(Schema$1.Union([ContactCustomFields, Schema$1.Null])),
3013
3147
  lastActiveAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3014
3148
  createdAt: Schema$1.String
3015
3149
  }).annotate({ identifier: "ContactSummary" });
@@ -3426,29 +3560,8 @@ const MailboxQuarantinePage = Schema$1.Struct({
3426
3560
  items: Schema$1.Array(MailboxQuarantinedMessage),
3427
3561
  nextCursor: Schema$1.Union([Schema$1.String, Schema$1.Null])
3428
3562
  }).annotate({ identifier: "MailboxQuarantinePage" });
3429
- const MailboxAction = Schema$1.Struct({
3563
+ const MailboxNonSendAction = Schema$1.Struct({
3430
3564
  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
3565
  source: Schema$1.Union([
3453
3566
  Schema$1.Literal("humanUi"),
3454
3567
  Schema$1.Literal("externalApi"),
@@ -3474,8 +3587,101 @@ const MailboxAction = Schema$1.Struct({
3474
3587
  draftId: Schema$1.Union([MailboxDraftId, Schema$1.Null]),
3475
3588
  decision: Schema$1.Union([MailboxActionDecision, Schema$1.Null]),
3476
3589
  createdAt: Schema$1.String,
3590
+ updatedAt: Schema$1.String,
3591
+ type: Schema$1.Union([
3592
+ Schema$1.Literal("updateDraft"),
3593
+ Schema$1.Literal("createNote"),
3594
+ Schema$1.Literal("assignThread"),
3595
+ Schema$1.Literal("changeThreadState"),
3596
+ Schema$1.Literal("call"),
3597
+ Schema$1.Literal("extensionRequest")
3598
+ ]),
3599
+ state: Schema$1.Union([
3600
+ Schema$1.Literal("proposed"),
3601
+ Schema$1.Literal("allowed"),
3602
+ Schema$1.Literal("approvalRequired"),
3603
+ Schema$1.Literal("policyDenied"),
3604
+ Schema$1.Literal("approved"),
3605
+ Schema$1.Literal("approvalDenied"),
3606
+ Schema$1.Literal("executing"),
3607
+ Schema$1.Literal("executed"),
3608
+ Schema$1.Literal("failed")
3609
+ ])
3610
+ }).annotate({ identifier: "MailboxNonSendAction" });
3611
+ const MailboxSendReceipt = Schema$1.Struct({
3612
+ actionId: MailboxActionId,
3613
+ draftId: Schema$1.Union([MailboxDraftId, Schema$1.Null]),
3614
+ messageId: Schema$1.Union([MessageId, Schema$1.Null]),
3615
+ threadId: Schema$1.Union([MailboxThreadId, Schema$1.Null]),
3616
+ state: Schema$1.Union([
3617
+ Schema$1.Literal("approvalRequired"),
3618
+ Schema$1.Literal("queued"),
3619
+ Schema$1.Literal("accepted"),
3620
+ Schema$1.Literal("completed"),
3621
+ Schema$1.Literal("notSent"),
3622
+ Schema$1.Literal("uncertain")
3623
+ ]),
3624
+ acceptedAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3625
+ waitReason: Schema$1.Union([Schema$1.Union([
3626
+ Schema$1.Literal("rate"),
3627
+ Schema$1.Literal("daily-quota"),
3628
+ Schema$1.Literal("domain-health"),
3629
+ Schema$1.Literal("sending-paused"),
3630
+ Schema$1.Literal("upstream-unavailable"),
3631
+ Schema$1.Literal("retry"),
3632
+ Schema$1.Literal("campaign-paused"),
3633
+ Schema$1.Literal("domain-warming"),
3634
+ Schema$1.Literal("onboarding-review"),
3635
+ Schema$1.Literal("content-review"),
3636
+ Schema$1.Literal("screening-unavailable")
3637
+ ]), Schema$1.Null]),
3638
+ reviewExpectedAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3639
+ skippedRecipients: Schema$1.Array(SkippedRecipient),
3640
+ executeUntil: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3641
+ retryAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3642
+ problem: Schema$1.Union([MailboxSendOutcome, Schema$1.Null]),
3643
+ retryEligible: Schema$1.Boolean,
3644
+ decision: Schema$1.Union([MailboxActionDecision, Schema$1.Null]),
3645
+ createdAt: Schema$1.String,
3646
+ updatedAt: Schema$1.String
3647
+ }).annotate({ identifier: "MailboxSendReceipt" });
3648
+ const MailboxPendingSendReceipt = Schema$1.Struct({
3649
+ actionId: MailboxActionId,
3650
+ draftId: Schema$1.Union([MailboxDraftId, Schema$1.Null]),
3651
+ messageId: Schema$1.Union([MessageId, Schema$1.Null]),
3652
+ threadId: Schema$1.Union([MailboxThreadId, Schema$1.Null]),
3653
+ state: Schema$1.Union([
3654
+ Schema$1.Literal("approvalRequired"),
3655
+ Schema$1.Literal("queued"),
3656
+ Schema$1.Literal("accepted"),
3657
+ Schema$1.Literal("completed"),
3658
+ Schema$1.Literal("notSent"),
3659
+ Schema$1.Literal("uncertain")
3660
+ ]),
3661
+ acceptedAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3662
+ waitReason: Schema$1.Union([Schema$1.Union([
3663
+ Schema$1.Literal("rate"),
3664
+ Schema$1.Literal("daily-quota"),
3665
+ Schema$1.Literal("domain-health"),
3666
+ Schema$1.Literal("sending-paused"),
3667
+ Schema$1.Literal("upstream-unavailable"),
3668
+ Schema$1.Literal("retry"),
3669
+ Schema$1.Literal("campaign-paused"),
3670
+ Schema$1.Literal("domain-warming"),
3671
+ Schema$1.Literal("onboarding-review"),
3672
+ Schema$1.Literal("content-review"),
3673
+ Schema$1.Literal("screening-unavailable")
3674
+ ]), Schema$1.Null]),
3675
+ reviewExpectedAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3676
+ skippedRecipients: Schema$1.Array(SkippedRecipient),
3677
+ executeUntil: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3678
+ retryAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3679
+ problem: Schema$1.Union([MailboxSendOutcome, Schema$1.Null]),
3680
+ retryEligible: Schema$1.Boolean,
3681
+ decision: Schema$1.Union([MailboxActionDecision, Schema$1.Null]),
3682
+ createdAt: Schema$1.String,
3477
3683
  updatedAt: Schema$1.String
3478
- }).annotate({ identifier: "MailboxAction" });
3684
+ }).annotate({ identifier: "MailboxPendingSendReceipt" });
3479
3685
  const MailboxDraftPage = Schema$1.Struct({
3480
3686
  items: Schema$1.Array(MailboxDraftSummary),
3481
3687
  nextCursor: Schema$1.Union([Schema$1.String, Schema$1.Null])
@@ -3592,7 +3798,8 @@ const Message = Schema$1.Struct({
3592
3798
  Schema$1.Literal("campaign-paused"),
3593
3799
  Schema$1.Literal("domain-warming"),
3594
3800
  Schema$1.Literal("onboarding-review"),
3595
- Schema$1.Literal("content-review")
3801
+ Schema$1.Literal("content-review"),
3802
+ Schema$1.Literal("screening-unavailable")
3596
3803
  ]), Schema$1.Null]),
3597
3804
  reviewExpectedAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3598
3805
  skippedRecipients: Schema$1.Array(SkippedRecipient),
@@ -3614,7 +3821,7 @@ const EmailContent = Schema$1.Struct({
3614
3821
  timeZone: Schema$1.optionalKey(RenderTimeZone),
3615
3822
  inReplyToMessageId: Schema$1.optionalKey(Schema$1.Union([MessageId, Schema$1.Null])),
3616
3823
  replyTo: Schema$1.optionalKey(ReplyToAddresses),
3617
- unsubscribeGroupId: Schema$1.optionalKey(Schema$1.Union([UnsubscribeId, Schema$1.Null])),
3824
+ 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
3825
  tracking: Schema$1.optionalKey(EmailTrackingOverrideV1),
3619
3826
  footer: Schema$1.optionalKey(EmailFooterOverride)
3620
3827
  }).annotate({ identifier: "EmailContent" });
@@ -3632,7 +3839,7 @@ const EmailDispatchContent = Schema$1.Struct({
3632
3839
  timeZone: Schema$1.optionalKey(RenderTimeZone),
3633
3840
  inReplyToMessageId: Schema$1.optionalKey(Schema$1.Union([MessageId, Schema$1.Null])),
3634
3841
  replyTo: Schema$1.optionalKey(ReplyToAddresses),
3635
- unsubscribeGroupId: Schema$1.optionalKey(Schema$1.Union([UnsubscribeId, Schema$1.Null])),
3842
+ 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
3843
  tracking: Schema$1.optionalKey(EmailTrackingOverrideV1),
3637
3844
  footer: Schema$1.optionalKey(EmailFooterOverride)
3638
3845
  }).annotate({ identifier: "EmailDispatchContent" });
@@ -3671,10 +3878,56 @@ const PublishExtensionVersionResponse = Schema$1.Struct({
3671
3878
  extension: Extension,
3672
3879
  version: ExtensionVersion
3673
3880
  }).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" });
3881
+ const MailboxSendAction = Schema$1.Struct({
3882
+ id: MailboxActionId,
3883
+ source: Schema$1.Union([
3884
+ Schema$1.Literal("humanUi"),
3885
+ Schema$1.Literal("externalApi"),
3886
+ Schema$1.Literal("aiSdkTool"),
3887
+ Schema$1.Literal("extension"),
3888
+ Schema$1.Literal("externalAgent"),
3889
+ Schema$1.Literal("samvaManagedAgent"),
3890
+ Schema$1.Literal("system")
3891
+ ]),
3892
+ proposedBy: Schema$1.Struct({
3893
+ kind: Schema$1.Union([
3894
+ Schema$1.Literal("user"),
3895
+ Schema$1.Literal("apiKey"),
3896
+ Schema$1.Literal("extension"),
3897
+ Schema$1.Literal("externalAgent"),
3898
+ Schema$1.Literal("samvaAgent"),
3899
+ Schema$1.Literal("system")
3900
+ ]),
3901
+ id: Schema$1.String,
3902
+ displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
3903
+ }),
3904
+ threadId: Schema$1.Union([MailboxThreadId, Schema$1.Null]),
3905
+ draftId: Schema$1.Union([MailboxDraftId, Schema$1.Null]),
3906
+ decision: Schema$1.Union([MailboxActionDecision, Schema$1.Null]),
3907
+ createdAt: Schema$1.String,
3908
+ updatedAt: Schema$1.String,
3909
+ type: Schema$1.Union([Schema$1.Literal("sendMessage"), Schema$1.Literal("reply")]),
3910
+ state: Schema$1.Union([
3911
+ Schema$1.Literal("approvalRequired"),
3912
+ Schema$1.Literal("queued"),
3913
+ Schema$1.Literal("accepted"),
3914
+ Schema$1.Literal("completed"),
3915
+ Schema$1.Literal("notSent"),
3916
+ Schema$1.Literal("uncertain")
3917
+ ]),
3918
+ send: MailboxSendReceipt,
3919
+ intent: Schema$1.Union([MailboxSendSnapshot, Schema$1.Null])
3920
+ }).annotate({ identifier: "MailboxSendAction" });
3921
+ var MailboxSendRefusedError = class extends Schema$1.TaggedError()("MailboxSendRefusedError", Schema$1.Struct({
3922
+ message: Schema$1.String,
3923
+ receipt: MailboxSendReceipt
3924
+ })) {};
3925
+ var MailboxSendConflictError = class extends Schema$1.TaggedError()("MailboxSendConflictError", Schema$1.Struct({
3926
+ message: Schema$1.String,
3927
+ resource: Schema$1.String,
3928
+ id: MailboxActionId,
3929
+ receipt: MailboxSendReceipt
3930
+ })) {};
3678
3931
  const ApiKeyPage = Schema$1.Struct({
3679
3932
  items: Schema$1.Array(ApiKey),
3680
3933
  nextCursor: Schema$1.Union([Schema$1.String, Schema$1.Null])
@@ -3711,10 +3964,16 @@ const EmailDispatchSendMessagePayload = Schema$1.Struct({
3711
3964
  from: Schema$1.optionalKey(EmailSender),
3712
3965
  email: EmailDispatchContent
3713
3966
  }).annotate({ identifier: "EmailDispatchSendMessagePayload" });
3967
+ const MailboxAction = Schema$1.Union([MailboxSendAction, MailboxNonSendAction]).annotate({ identifier: "MailboxAction" });
3968
+ const MailboxPendingAction = Schema$1.Union([MailboxSendAction, MailboxNonSendAction]).annotate({ identifier: "MailboxPendingAction" });
3714
3969
  const CampaignContent = Schema$1.Union([EmailCampaignContent]).annotate({ identifier: "CampaignContent" });
3715
3970
  const SendMessagePayload = Schema$1.Union([EmailSendMessagePayload]).annotate({ identifier: "SendMessagePayload" });
3716
3971
  const CampaignContentInput = Schema$1.Union([EmailCampaignContentInput]).annotate({ identifier: "CampaignContentInput" });
3717
3972
  const DispatchSendMessagePayload = Schema$1.Union([EmailDispatchSendMessagePayload]).annotate({ identifier: "DispatchSendMessagePayload" });
3973
+ const MailboxActionPage = Schema$1.Struct({
3974
+ items: Schema$1.Array(MailboxAction),
3975
+ nextCursor: Schema$1.Union([Schema$1.String, Schema$1.Null])
3976
+ }).annotate({ identifier: "MailboxActionPage" });
3718
3977
  const CampaignListItem = Schema$1.Struct({
3719
3978
  id: CampaignId,
3720
3979
  name: Schema$1.String,
@@ -4583,6 +4842,9 @@ const ContactsListQuery = Schema$1.Struct({
4583
4842
  Schema$1.Literal("blocked"),
4584
4843
  Schema$1.Literal("archived")
4585
4844
  ]), Schema$1.Null])),
4845
+ fields: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
4846
+ customField: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
4847
+ customFieldValue: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
4586
4848
  after: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
4587
4849
  before: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
4588
4850
  });
@@ -4871,13 +5133,20 @@ const ContactsFind422 = ValidationError;
4871
5133
  const ContactsFind500 = InternalError;
4872
5134
  const ContactsFind504 = GatewayTimeoutError;
4873
5135
  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]))
5136
+ lookup: ContactLookup,
5137
+ create: Schema$1.optionalKey(Schema$1.Union([Schema$1.Struct({
5138
+ name: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
5139
+ displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([Schema$1.String, Schema$1.Null]), Schema$1.Null])),
5140
+ avatar: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([Schema$1.String, Schema$1.Null]), Schema$1.Null])),
5141
+ identities: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(ContactIdentityInput), Schema$1.Null])),
5142
+ profile: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([ContactProfile, Schema$1.Null]), Schema$1.Null])),
5143
+ externalId: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([Schema$1.String, Schema$1.Null]), Schema$1.Null]))
5144
+ }), Schema$1.Null]))
5145
+ });
5146
+ const ContactsFindOrCreate200 = Schema$1.Struct({
5147
+ contact: Contact,
5148
+ created: Schema$1.Boolean
4879
5149
  });
4880
- const ContactsFindOrCreate200 = Contact;
4881
5150
  const ContactsFindOrCreate401 = UnauthorizedError;
4882
5151
  const ContactsFindOrCreate402 = PaymentRequiredError;
4883
5152
  const ContactsFindOrCreate403 = ForbiddenError;
@@ -5202,6 +5471,7 @@ const EmailAddBlock401 = UnauthorizedError;
5202
5471
  const EmailAddBlock403 = ForbiddenError;
5203
5472
  const EmailAddBlock409 = ConflictError;
5204
5473
  const EmailAddBlock422 = ValidationError;
5474
+ const EmailAddBlock500 = InternalError;
5205
5475
  const EmailAddBlock504 = GatewayTimeoutError;
5206
5476
  const EmailRemoveBlockPathParams = Schema$1.Struct({ id: BlockedEmailId });
5207
5477
  const EmailRemoveBlock200 = SuccessResult;
@@ -5346,6 +5616,7 @@ const EmailGetDomainById401 = UnauthorizedError;
5346
5616
  const EmailGetDomainById403 = ForbiddenError;
5347
5617
  const EmailGetDomainById404 = ResourceNotFoundError;
5348
5618
  const EmailGetDomainById422 = ValidationError;
5619
+ const EmailGetDomainById500 = InternalError;
5349
5620
  const EmailGetDomainById504 = GatewayTimeoutError;
5350
5621
  const EmailRemoveDomainPathParams = Schema$1.Struct({ id: EmailDomainId });
5351
5622
  const EmailRemoveDomain200 = SuccessResult;
@@ -5908,6 +6179,7 @@ const EmailCheckSenderVerification401 = UnauthorizedError;
5908
6179
  const EmailCheckSenderVerification403 = ForbiddenError;
5909
6180
  const EmailCheckSenderVerification404 = ResourceNotFoundError;
5910
6181
  const EmailCheckSenderVerification422 = ValidationError;
6182
+ const EmailCheckSenderVerification500 = InternalError;
5911
6183
  const EmailCheckSenderVerification502 = ExternalServiceError;
5912
6184
  const EmailCheckSenderVerification504 = GatewayTimeoutError;
5913
6185
  const EmailGetStatsQuery = Schema$1.Struct({
@@ -6272,6 +6544,7 @@ const MailboxesListActionsPathParams = Schema$1.Struct({ id: MailboxId });
6272
6544
  const MailboxesListActionsQuery = Schema$1.Struct({
6273
6545
  limit: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
6274
6546
  cursor: Schema$1.optionalKey(Schema$1.Union([Cursor, Schema$1.Null])),
6547
+ threadId: Schema$1.optionalKey(Schema$1.Union([MailboxThreadId, Schema$1.Null])),
6275
6548
  state: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([
6276
6549
  Schema$1.Literal("proposed"),
6277
6550
  Schema$1.Literal("allowed"),
@@ -6281,7 +6554,12 @@ const MailboxesListActionsQuery = Schema$1.Struct({
6281
6554
  Schema$1.Literal("approvalDenied"),
6282
6555
  Schema$1.Literal("executing"),
6283
6556
  Schema$1.Literal("executed"),
6284
- Schema$1.Literal("failed")
6557
+ Schema$1.Literal("failed"),
6558
+ Schema$1.Literal("queued"),
6559
+ Schema$1.Literal("accepted"),
6560
+ Schema$1.Literal("completed"),
6561
+ Schema$1.Literal("notSent"),
6562
+ Schema$1.Literal("uncertain")
6285
6563
  ]), Schema$1.Null])),
6286
6564
  after: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
6287
6565
  before: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
@@ -6293,22 +6571,59 @@ const MailboxesListActions404 = ResourceNotFoundError;
6293
6571
  const MailboxesListActions422 = ValidationError;
6294
6572
  const MailboxesListActions500 = InternalError;
6295
6573
  const MailboxesListActions504 = GatewayTimeoutError;
6574
+ const MailboxesGetActionPathParams = Schema$1.Struct({
6575
+ id: MailboxId,
6576
+ actionId: MailboxActionId
6577
+ });
6578
+ const MailboxesGetAction200 = MailboxAction;
6579
+ const MailboxesGetAction401 = UnauthorizedError;
6580
+ const MailboxesGetAction403 = ForbiddenError;
6581
+ const MailboxesGetAction404 = ResourceNotFoundError;
6582
+ const MailboxesGetAction422 = ValidationError;
6583
+ const MailboxesGetAction500 = InternalError;
6584
+ const MailboxesGetAction504 = GatewayTimeoutError;
6296
6585
  const MailboxesApproveActionPathParams = Schema$1.Struct({
6297
6586
  id: MailboxId,
6298
6587
  actionId: MailboxActionId
6299
6588
  });
6300
6589
  const MailboxesApproveAction200 = MailboxAction;
6590
+ const MailboxesApproveAction202 = MailboxPendingAction;
6301
6591
  const MailboxesApproveAction401 = UnauthorizedError;
6302
6592
  const MailboxesApproveAction402 = PaymentRequiredError;
6303
- const MailboxesApproveAction403 = Schema$1.Union([ForbiddenError, OnboardingReviewRequiredError]);
6593
+ const MailboxesApproveAction403 = Schema$1.Union([
6594
+ MailboxSendRefusedError,
6595
+ OnboardingReviewRequiredError,
6596
+ ForbiddenError
6597
+ ]);
6304
6598
  const MailboxesApproveAction404 = ResourceNotFoundError;
6305
- const MailboxesApproveAction409 = ConflictError;
6599
+ const MailboxesApproveAction409 = Schema$1.Union([MailboxSendConflictError, ConflictError]);
6306
6600
  const MailboxesApproveAction422 = ValidationError;
6307
6601
  const MailboxesApproveAction429 = RateLimitedError;
6308
6602
  const MailboxesApproveAction500 = InternalError;
6309
6603
  const MailboxesApproveAction502 = BillingProviderError;
6310
6604
  const MailboxesApproveAction503 = SenderNotReadyError;
6311
6605
  const MailboxesApproveAction504 = GatewayTimeoutError;
6606
+ const MailboxesCancelActionPathParams = Schema$1.Struct({
6607
+ id: MailboxId,
6608
+ actionId: MailboxActionId
6609
+ });
6610
+ const MailboxesCancelAction200 = MailboxSendReceipt;
6611
+ const MailboxesCancelAction202 = MailboxPendingSendReceipt;
6612
+ const MailboxesCancelAction401 = UnauthorizedError;
6613
+ const MailboxesCancelAction402 = PaymentRequiredError;
6614
+ const MailboxesCancelAction403 = Schema$1.Union([
6615
+ MailboxSendRefusedError,
6616
+ OnboardingReviewRequiredError,
6617
+ ForbiddenError
6618
+ ]);
6619
+ const MailboxesCancelAction404 = ResourceNotFoundError;
6620
+ const MailboxesCancelAction409 = Schema$1.Union([MailboxSendConflictError, ConflictError]);
6621
+ const MailboxesCancelAction422 = ValidationError;
6622
+ const MailboxesCancelAction429 = RateLimitedError;
6623
+ const MailboxesCancelAction500 = InternalError;
6624
+ const MailboxesCancelAction502 = BillingProviderError;
6625
+ const MailboxesCancelAction503 = SenderNotReadyError;
6626
+ const MailboxesCancelAction504 = GatewayTimeoutError;
6312
6627
  const MailboxesDenyActionPathParams = Schema$1.Struct({
6313
6628
  id: MailboxId,
6314
6629
  actionId: MailboxActionId
@@ -6318,10 +6633,31 @@ const MailboxesDenyAction200 = MailboxAction;
6318
6633
  const MailboxesDenyAction401 = UnauthorizedError;
6319
6634
  const MailboxesDenyAction403 = ForbiddenError;
6320
6635
  const MailboxesDenyAction404 = ResourceNotFoundError;
6321
- const MailboxesDenyAction409 = ConflictError;
6636
+ const MailboxesDenyAction409 = Schema$1.Union([ConflictError, MailboxSendConflictError]);
6322
6637
  const MailboxesDenyAction422 = ValidationError;
6323
6638
  const MailboxesDenyAction500 = InternalError;
6324
6639
  const MailboxesDenyAction504 = GatewayTimeoutError;
6640
+ const MailboxesRetryActionPathParams = Schema$1.Struct({
6641
+ id: MailboxId,
6642
+ actionId: MailboxActionId
6643
+ });
6644
+ const MailboxesRetryAction200 = MailboxSendReceipt;
6645
+ const MailboxesRetryAction202 = MailboxPendingSendReceipt;
6646
+ const MailboxesRetryAction401 = UnauthorizedError;
6647
+ const MailboxesRetryAction402 = PaymentRequiredError;
6648
+ const MailboxesRetryAction403 = Schema$1.Union([
6649
+ MailboxSendRefusedError,
6650
+ OnboardingReviewRequiredError,
6651
+ ForbiddenError
6652
+ ]);
6653
+ const MailboxesRetryAction404 = ResourceNotFoundError;
6654
+ const MailboxesRetryAction409 = Schema$1.Union([MailboxSendConflictError, ConflictError]);
6655
+ const MailboxesRetryAction422 = ValidationError;
6656
+ const MailboxesRetryAction429 = RateLimitedError;
6657
+ const MailboxesRetryAction500 = InternalError;
6658
+ const MailboxesRetryAction502 = BillingProviderError;
6659
+ const MailboxesRetryAction503 = SenderNotReadyError;
6660
+ const MailboxesRetryAction504 = GatewayTimeoutError;
6325
6661
  const MailboxesGetAgentActivityPathParams = Schema$1.Struct({ id: MailboxId });
6326
6662
  const MailboxesGetAgentActivityQuery = Schema$1.Struct({
6327
6663
  after: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
@@ -6414,13 +6750,18 @@ const MailboxesSendDraftPathParams = Schema$1.Struct({
6414
6750
  id: MailboxId,
6415
6751
  draftId: MailboxDraftId
6416
6752
  });
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])) });
6753
+ 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
6754
  const MailboxesSendDraft200 = MailboxSendReceipt;
6755
+ const MailboxesSendDraft202 = MailboxPendingSendReceipt;
6419
6756
  const MailboxesSendDraft401 = UnauthorizedError;
6420
6757
  const MailboxesSendDraft402 = PaymentRequiredError;
6421
- const MailboxesSendDraft403 = Schema$1.Union([ForbiddenError, OnboardingReviewRequiredError]);
6758
+ const MailboxesSendDraft403 = Schema$1.Union([
6759
+ MailboxSendRefusedError,
6760
+ OnboardingReviewRequiredError,
6761
+ ForbiddenError
6762
+ ]);
6422
6763
  const MailboxesSendDraft404 = ResourceNotFoundError;
6423
- const MailboxesSendDraft409 = ConflictError;
6764
+ const MailboxesSendDraft409 = Schema$1.Union([MailboxSendConflictError, ConflictError]);
6424
6765
  const MailboxesSendDraft422 = ValidationError;
6425
6766
  const MailboxesSendDraft429 = RateLimitedError;
6426
6767
  const MailboxesSendDraft500 = InternalError;
@@ -6566,7 +6907,7 @@ const MailboxesUpdateLabel422 = ValidationError;
6566
6907
  const MailboxesUpdateLabel500 = InternalError;
6567
6908
  const MailboxesUpdateLabel504 = GatewayTimeoutError;
6568
6909
  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])) });
6910
+ 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
6911
  const MailboxesSendMessageRequestJson = Schema$1.Struct({
6571
6912
  to: Schema$1.TupleWithRest(Schema$1.Tuple([Schema$1.String]), [Schema$1.String]),
6572
6913
  cc: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
@@ -6578,11 +6919,16 @@ const MailboxesSendMessageRequestJson = Schema$1.Struct({
6578
6919
  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
6920
  });
6580
6921
  const MailboxesSendMessage200 = MailboxSendReceipt;
6922
+ const MailboxesSendMessage202 = MailboxPendingSendReceipt;
6581
6923
  const MailboxesSendMessage401 = UnauthorizedError;
6582
6924
  const MailboxesSendMessage402 = PaymentRequiredError;
6583
- const MailboxesSendMessage403 = Schema$1.Union([ForbiddenError, OnboardingReviewRequiredError]);
6925
+ const MailboxesSendMessage403 = Schema$1.Union([
6926
+ MailboxSendRefusedError,
6927
+ OnboardingReviewRequiredError,
6928
+ ForbiddenError
6929
+ ]);
6584
6930
  const MailboxesSendMessage404 = ResourceNotFoundError;
6585
- const MailboxesSendMessage409 = ConflictError;
6931
+ const MailboxesSendMessage409 = Schema$1.Union([MailboxSendConflictError, ConflictError]);
6586
6932
  const MailboxesSendMessage422 = ValidationError;
6587
6933
  const MailboxesSendMessage429 = RateLimitedError;
6588
6934
  const MailboxesSendMessage500 = InternalError;
@@ -6612,6 +6958,19 @@ const MailboxesGetMessageAttachment404 = ResourceNotFoundError;
6612
6958
  const MailboxesGetMessageAttachment422 = ValidationError;
6613
6959
  const MailboxesGetMessageAttachment500 = InternalError;
6614
6960
  const MailboxesGetMessageAttachment504 = GatewayTimeoutError;
6961
+ const MailboxesCopyMessageAttachmentPathParams = Schema$1.Struct({
6962
+ id: MailboxId,
6963
+ messageId: MessageId,
6964
+ attachmentId: AttachmentId
6965
+ });
6966
+ const MailboxesCopyMessageAttachment201 = MailboxCopiedAttachment;
6967
+ const MailboxesCopyMessageAttachment401 = UnauthorizedError;
6968
+ const MailboxesCopyMessageAttachment403 = ForbiddenError;
6969
+ const MailboxesCopyMessageAttachment404 = ResourceNotFoundError;
6970
+ const MailboxesCopyMessageAttachment409 = ConflictError;
6971
+ const MailboxesCopyMessageAttachment422 = ValidationError;
6972
+ const MailboxesCopyMessageAttachment500 = InternalError;
6973
+ const MailboxesCopyMessageAttachment504 = GatewayTimeoutError;
6615
6974
  const MailboxesDiscardMessagePathParams = Schema$1.Struct({
6616
6975
  id: MailboxId,
6617
6976
  messageId: MessageId
@@ -6629,7 +6988,7 @@ const MailboxesForwardPathParams = Schema$1.Struct({
6629
6988
  id: MailboxId,
6630
6989
  messageId: MessageId
6631
6990
  });
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])) });
6991
+ 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
6992
  const MailboxesForwardRequestJson = Schema$1.Struct({
6634
6993
  to: Schema$1.TupleWithRest(Schema$1.Tuple([Schema$1.String]), [Schema$1.String]),
6635
6994
  cc: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
@@ -6639,11 +6998,16 @@ const MailboxesForwardRequestJson = Schema$1.Struct({
6639
6998
  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
6999
  });
6641
7000
  const MailboxesForward200 = MailboxSendReceipt;
7001
+ const MailboxesForward202 = MailboxPendingSendReceipt;
6642
7002
  const MailboxesForward401 = UnauthorizedError;
6643
7003
  const MailboxesForward402 = PaymentRequiredError;
6644
- const MailboxesForward403 = Schema$1.Union([ForbiddenError, OnboardingReviewRequiredError]);
7004
+ const MailboxesForward403 = Schema$1.Union([
7005
+ MailboxSendRefusedError,
7006
+ OnboardingReviewRequiredError,
7007
+ ForbiddenError
7008
+ ]);
6645
7009
  const MailboxesForward404 = ResourceNotFoundError;
6646
- const MailboxesForward409 = ConflictError;
7010
+ const MailboxesForward409 = Schema$1.Union([MailboxSendConflictError, ConflictError]);
6647
7011
  const MailboxesForward422 = ValidationError;
6648
7012
  const MailboxesForward429 = RateLimitedError;
6649
7013
  const MailboxesForward500 = InternalError;
@@ -6677,7 +7041,7 @@ const MailboxesReplyPathParams = Schema$1.Struct({
6677
7041
  id: MailboxId,
6678
7042
  messageId: MessageId
6679
7043
  });
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])) });
7044
+ 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
7045
  const MailboxesReplyRequestJson = Schema$1.Struct({
6682
7046
  cc: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
6683
7047
  bcc: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
@@ -6686,11 +7050,16 @@ const MailboxesReplyRequestJson = Schema$1.Struct({
6686
7050
  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
7051
  });
6688
7052
  const MailboxesReply200 = MailboxSendReceipt;
7053
+ const MailboxesReply202 = MailboxPendingSendReceipt;
6689
7054
  const MailboxesReply401 = UnauthorizedError;
6690
7055
  const MailboxesReply402 = PaymentRequiredError;
6691
- const MailboxesReply403 = Schema$1.Union([ForbiddenError, OnboardingReviewRequiredError]);
7056
+ const MailboxesReply403 = Schema$1.Union([
7057
+ MailboxSendRefusedError,
7058
+ OnboardingReviewRequiredError,
7059
+ ForbiddenError
7060
+ ]);
6692
7061
  const MailboxesReply404 = ResourceNotFoundError;
6693
- const MailboxesReply409 = ConflictError;
7062
+ const MailboxesReply409 = Schema$1.Union([MailboxSendConflictError, ConflictError]);
6694
7063
  const MailboxesReply422 = ValidationError;
6695
7064
  const MailboxesReply429 = RateLimitedError;
6696
7065
  const MailboxesReply500 = InternalError;
@@ -6701,7 +7070,7 @@ const MailboxesReplyAllPathParams = Schema$1.Struct({
6701
7070
  id: MailboxId,
6702
7071
  messageId: MessageId
6703
7072
  });
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])) });
7073
+ 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
7074
  const MailboxesReplyAllRequestJson = Schema$1.Struct({
6706
7075
  cc: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
6707
7076
  bcc: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
@@ -6710,11 +7079,16 @@ const MailboxesReplyAllRequestJson = Schema$1.Struct({
6710
7079
  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
7080
  });
6712
7081
  const MailboxesReplyAll200 = MailboxSendReceipt;
7082
+ const MailboxesReplyAll202 = MailboxPendingSendReceipt;
6713
7083
  const MailboxesReplyAll401 = UnauthorizedError;
6714
7084
  const MailboxesReplyAll402 = PaymentRequiredError;
6715
- const MailboxesReplyAll403 = Schema$1.Union([ForbiddenError, OnboardingReviewRequiredError]);
7085
+ const MailboxesReplyAll403 = Schema$1.Union([
7086
+ MailboxSendRefusedError,
7087
+ OnboardingReviewRequiredError,
7088
+ ForbiddenError
7089
+ ]);
6716
7090
  const MailboxesReplyAll404 = ResourceNotFoundError;
6717
- const MailboxesReplyAll409 = ConflictError;
7091
+ const MailboxesReplyAll409 = Schema$1.Union([MailboxSendConflictError, ConflictError]);
6718
7092
  const MailboxesReplyAll422 = ValidationError;
6719
7093
  const MailboxesReplyAll429 = RateLimitedError;
6720
7094
  const MailboxesReplyAll500 = InternalError;
@@ -7128,7 +7502,8 @@ const MessagesGetEmail200 = Schema$1.Struct({
7128
7502
  Schema$1.Literal("campaign-paused"),
7129
7503
  Schema$1.Literal("domain-warming"),
7130
7504
  Schema$1.Literal("onboarding-review"),
7131
- Schema$1.Literal("content-review")
7505
+ Schema$1.Literal("content-review"),
7506
+ Schema$1.Literal("screening-unavailable")
7132
7507
  ]), Schema$1.Null]),
7133
7508
  reviewExpectedAt: Schema$1.Union([Schema$1.String, Schema$1.Null])
7134
7509
  }), Schema$1.Null]),
@@ -7531,6 +7906,53 @@ const OrganizationsDelete409 = ConflictError;
7531
7906
  const OrganizationsDelete422 = ValidationError;
7532
7907
  const OrganizationsDelete500 = InternalError;
7533
7908
  const OrganizationsDelete504 = GatewayTimeoutError;
7909
+ const OrganizationsGetTrustTier200 = Schema$1.Struct({
7910
+ tier: Schema$1.Union([
7911
+ Schema$1.Literal("screened"),
7912
+ Schema$1.Literal("probation"),
7913
+ Schema$1.Literal("established")
7914
+ ]),
7915
+ changedAt: Schema$1.String,
7916
+ sendingLimits: Schema$1.Struct({
7917
+ sendsPerSecond: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
7918
+ dailySends: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
7919
+ probation: Schema$1.Union([Schema$1.Struct({
7920
+ hourlyRecipients: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
7921
+ dailyRecipients: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
7922
+ domainShare: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
7923
+ domainShareFloor: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" }))
7924
+ }), Schema$1.Null])
7925
+ }),
7926
+ graduation: Schema$1.Union([Schema$1.Struct({
7927
+ firstSentAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
7928
+ elapsedDays: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
7929
+ sent: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
7930
+ delivered: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
7931
+ hardBounces: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
7932
+ hardBounceRate: Schema$1.Union([Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })), Schema$1.Null]),
7933
+ complaints: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
7934
+ holds: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
7935
+ requirements: Schema$1.Struct({
7936
+ minimumDays: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
7937
+ delivered: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })),
7938
+ maximumHardBounceRate: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" }))
7939
+ }),
7940
+ blockers: Schema$1.Array(Schema$1.Union([
7941
+ Schema$1.Literal("too_recent"),
7942
+ Schema$1.Literal("too_few_delivered"),
7943
+ Schema$1.Literal("held"),
7944
+ Schema$1.Literal("complaints"),
7945
+ Schema$1.Literal("bounce_rate")
7946
+ ]))
7947
+ }), Schema$1.Null])
7948
+ });
7949
+ const OrganizationsGetTrustTier401 = UnauthorizedError;
7950
+ const OrganizationsGetTrustTier403 = ForbiddenError;
7951
+ const OrganizationsGetTrustTier404 = ResourceNotFoundError;
7952
+ const OrganizationsGetTrustTier422 = ValidationError;
7953
+ const OrganizationsGetTrustTier500 = InternalError;
7954
+ const OrganizationsGetTrustTier502 = BillingProviderError;
7955
+ const OrganizationsGetTrustTier504 = GatewayTimeoutError;
7534
7956
  const OrganizationsGetUsageQuery = Schema$1.Struct({
7535
7957
  after: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
7536
7958
  before: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
@@ -7556,6 +7978,38 @@ const OrganizationsGetUsage403 = ForbiddenError;
7556
7978
  const OrganizationsGetUsage422 = ValidationError;
7557
7979
  const OrganizationsGetUsage500 = InternalError;
7558
7980
  const OrganizationsGetUsage504 = GatewayTimeoutError;
7981
+ const SubscriptionsSubscribeRequestJson = Schema$1.Struct({
7982
+ 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" })),
7983
+ contactGroupId: ContactGroupId,
7984
+ from: Schema$1.Struct({
7985
+ email: Schema$1.String,
7986
+ name: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
7987
+ }).annotate({ description: "Your verified email sender. The ordinary send pipeline selects its domain and customer brand." }),
7988
+ unsubscribeGroupId: Schema$1.optionalKey(Schema$1.Union([UnsubscribeId, Schema$1.Null]).annotate({ description: "Clear this unsubscribe group after confirmation; all other opt-outs remain." })),
7989
+ 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])),
7990
+ 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])),
7991
+ 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]))
7992
+ });
7993
+ const SubscriptionsSubscribe200 = SubscribeResult;
7994
+ const SubscriptionsSubscribe401 = UnauthorizedError;
7995
+ const SubscriptionsSubscribe402 = PaymentRequiredError;
7996
+ const SubscriptionsSubscribe403 = Schema$1.Union([
7997
+ ForbiddenError,
7998
+ OnboardingReviewRequiredError,
7999
+ FlagDisabledError
8000
+ ]);
8001
+ const SubscriptionsSubscribe404 = ResourceNotFoundError;
8002
+ const SubscriptionsSubscribe409 = ConflictError;
8003
+ const SubscriptionsSubscribe422 = Schema$1.Union([
8004
+ ValidationError,
8005
+ BrandAddressRequiredError,
8006
+ CampaignFooterRequiredError
8007
+ ]);
8008
+ const SubscriptionsSubscribe429 = RateLimitedError;
8009
+ const SubscriptionsSubscribe500 = InternalError;
8010
+ const SubscriptionsSubscribe502 = Schema$1.Union([BillingProviderError, ExternalServiceError]);
8011
+ const SubscriptionsSubscribe503 = Schema$1.Union([SenderNotReadyError, DeliveryUnavailableError]);
8012
+ const SubscriptionsSubscribe504 = GatewayTimeoutError;
7559
8013
  const TemplatesListQuery = Schema$1.Struct({
7560
8014
  limit: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
7561
8015
  cursor: Schema$1.optionalKey(Schema$1.Union([Cursor, Schema$1.Null])),
@@ -7979,6 +8433,23 @@ const TemplatesGetPublication404 = ResourceNotFoundError;
7979
8433
  const TemplatesGetPublication422 = ValidationError;
7980
8434
  const TemplatesGetPublication500 = InternalError;
7981
8435
  const TemplatesGetPublication504 = GatewayTimeoutError;
8436
+ const TemplatesRenderPublicationPathParams = Schema$1.Struct({
8437
+ id: TemplateId,
8438
+ publicationId: TemplatePublicationId
8439
+ });
8440
+ const TemplatesRenderPublicationRequestJson = Schema$1.Struct({
8441
+ data: Schema$1.Record(Schema$1.String, JsonValue).annotate({ description: "The input to render with, validated against the publication's input schema." }),
8442
+ locale: Schema$1.optionalKey(RenderLocale),
8443
+ timeZone: Schema$1.optionalKey(RenderTimeZone)
8444
+ });
8445
+ const TemplatesRenderPublication200 = TemplatePublicationRender;
8446
+ const TemplatesRenderPublication401 = UnauthorizedError;
8447
+ const TemplatesRenderPublication403 = ForbiddenError;
8448
+ const TemplatesRenderPublication404 = ResourceNotFoundError;
8449
+ const TemplatesRenderPublication409 = ConflictError;
8450
+ const TemplatesRenderPublication422 = ValidationError;
8451
+ const TemplatesRenderPublication500 = InternalError;
8452
+ const TemplatesRenderPublication504 = GatewayTimeoutError;
7982
8453
  const TemplatesGetGitRepositoryPathParams = Schema$1.Struct({ id: TemplateId });
7983
8454
  const TemplatesGetGitRepository200 = Schema$1.Struct({
7984
8455
  remote: Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/" })),
@@ -9359,6 +9830,7 @@ const WebhooksCreateRequestJson = Schema$1.Struct({
9359
9830
  Schema$1.Literal("contact.created"),
9360
9831
  Schema$1.Literal("contact.updated"),
9361
9832
  Schema$1.Literal("contact.deleted"),
9833
+ Schema$1.Literal("contact.subscribed"),
9362
9834
  Schema$1.Literal("contact.unsubscribed"),
9363
9835
  Schema$1.Literal("contact.resubscribed"),
9364
9836
  Schema$1.Literal("conversation.created"),
@@ -9430,6 +9902,7 @@ const WebhooksUpdateRequestJson = Schema$1.Struct({
9430
9902
  Schema$1.Literal("contact.created"),
9431
9903
  Schema$1.Literal("contact.updated"),
9432
9904
  Schema$1.Literal("contact.deleted"),
9905
+ Schema$1.Literal("contact.subscribed"),
9433
9906
  Schema$1.Literal("contact.unsubscribed"),
9434
9907
  Schema$1.Literal("contact.resubscribed"),
9435
9908
  Schema$1.Literal("conversation.created"),
@@ -10073,7 +10546,7 @@ var ContactsGroup = class extends HttpApiGroup.make("Contacts").add(HttpApiEndpo
10073
10546
  ContactsList500,
10074
10547
  ContactsList504.pipe(HttpApiSchema.status(504))
10075
10548
  ]
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", {
10549
+ }).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
10550
  payload: ContactsCreateRequestJson,
10078
10551
  success: ContactsCreate201.pipe(HttpApiSchema.status(201)),
10079
10552
  error: [
@@ -10285,7 +10758,7 @@ var ContactsGroup = class extends HttpApiGroup.make("Contacts").add(HttpApiEndpo
10285
10758
  ContactsFindOrCreate502.pipe(HttpApiSchema.status(502)),
10286
10759
  ContactsFindOrCreate504.pipe(HttpApiSchema.status(504))
10287
10760
  ]
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") {};
10761
+ }).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
10762
  var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(HttpApiEndpoint.get("conversationsList", "/v1/conversations", {
10290
10763
  query: ConversationsListQuery,
10291
10764
  success: ConversationsList200,
@@ -10500,6 +10973,7 @@ var EmailGroup = class extends HttpApiGroup.make("Email").add(HttpApiEndpoint.ge
10500
10973
  EmailAddBlock403.pipe(HttpApiSchema.status(403)),
10501
10974
  EmailAddBlock409.pipe(HttpApiSchema.status(409)),
10502
10975
  EmailAddBlock422.pipe(HttpApiSchema.status(422)),
10976
+ EmailAddBlock500,
10503
10977
  EmailAddBlock504.pipe(HttpApiSchema.status(504))
10504
10978
  ]
10505
10979
  }).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 +11084,7 @@ var EmailGroup = class extends HttpApiGroup.make("Email").add(HttpApiEndpoint.ge
10610
11084
  EmailGetDomainById403.pipe(HttpApiSchema.status(403)),
10611
11085
  EmailGetDomainById404.pipe(HttpApiSchema.status(404)),
10612
11086
  EmailGetDomainById422.pipe(HttpApiSchema.status(422)),
11087
+ EmailGetDomainById500,
10613
11088
  EmailGetDomainById504.pipe(HttpApiSchema.status(504))
10614
11089
  ]
10615
11090
  }).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 +11604,7 @@ var EmailGroup = class extends HttpApiGroup.make("Email").add(HttpApiEndpoint.ge
11129
11604
  EmailCheckSenderVerification403.pipe(HttpApiSchema.status(403)),
11130
11605
  EmailCheckSenderVerification404.pipe(HttpApiSchema.status(404)),
11131
11606
  EmailCheckSenderVerification422.pipe(HttpApiSchema.status(422)),
11607
+ EmailCheckSenderVerification500,
11132
11608
  EmailCheckSenderVerification502.pipe(HttpApiSchema.status(502)),
11133
11609
  EmailCheckSenderVerification504.pipe(HttpApiSchema.status(504))
11134
11610
  ]
@@ -11461,9 +11937,20 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11461
11937
  MailboxesListActions500,
11462
11938
  MailboxesListActions504.pipe(HttpApiSchema.status(504))
11463
11939
  ]
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", {
11940
+ }).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", {
11941
+ params: MailboxesGetActionPathParams,
11942
+ success: MailboxesGetAction200,
11943
+ error: [
11944
+ MailboxesGetAction401.pipe(HttpApiSchema.status(401)),
11945
+ MailboxesGetAction403.pipe(HttpApiSchema.status(403)),
11946
+ MailboxesGetAction404.pipe(HttpApiSchema.status(404)),
11947
+ MailboxesGetAction422.pipe(HttpApiSchema.status(422)),
11948
+ MailboxesGetAction500,
11949
+ MailboxesGetAction504.pipe(HttpApiSchema.status(504))
11950
+ ]
11951
+ }).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
11952
  params: MailboxesApproveActionPathParams,
11466
- success: MailboxesApproveAction200,
11953
+ success: [MailboxesApproveAction200, MailboxesApproveAction202.pipe(HttpApiSchema.status(202))],
11467
11954
  error: [
11468
11955
  MailboxesApproveAction401.pipe(HttpApiSchema.status(401)),
11469
11956
  MailboxesApproveAction402.pipe(HttpApiSchema.status(402)),
@@ -11477,7 +11964,23 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11477
11964
  MailboxesApproveAction503.pipe(HttpApiSchema.status(503)),
11478
11965
  MailboxesApproveAction504.pipe(HttpApiSchema.status(504))
11479
11966
  ]
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", {
11967
+ }).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", {
11968
+ params: MailboxesCancelActionPathParams,
11969
+ success: [MailboxesCancelAction200, MailboxesCancelAction202.pipe(HttpApiSchema.status(202))],
11970
+ error: [
11971
+ MailboxesCancelAction401.pipe(HttpApiSchema.status(401)),
11972
+ MailboxesCancelAction402.pipe(HttpApiSchema.status(402)),
11973
+ MailboxesCancelAction403.pipe(HttpApiSchema.status(403)),
11974
+ MailboxesCancelAction404.pipe(HttpApiSchema.status(404)),
11975
+ MailboxesCancelAction409.pipe(HttpApiSchema.status(409)),
11976
+ MailboxesCancelAction422.pipe(HttpApiSchema.status(422)),
11977
+ MailboxesCancelAction429.pipe(HttpApiSchema.status(429)),
11978
+ MailboxesCancelAction500,
11979
+ MailboxesCancelAction502.pipe(HttpApiSchema.status(502)),
11980
+ MailboxesCancelAction503.pipe(HttpApiSchema.status(503)),
11981
+ MailboxesCancelAction504.pipe(HttpApiSchema.status(504))
11982
+ ]
11983
+ }).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
11984
  params: MailboxesDenyActionPathParams,
11482
11985
  payload: MailboxesDenyActionRequestJson,
11483
11986
  success: MailboxesDenyAction200,
@@ -11490,7 +11993,23 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11490
11993
  MailboxesDenyAction500,
11491
11994
  MailboxesDenyAction504.pipe(HttpApiSchema.status(504))
11492
11995
  ]
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", {
11996
+ }).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", {
11997
+ params: MailboxesRetryActionPathParams,
11998
+ success: [MailboxesRetryAction200, MailboxesRetryAction202.pipe(HttpApiSchema.status(202))],
11999
+ error: [
12000
+ MailboxesRetryAction401.pipe(HttpApiSchema.status(401)),
12001
+ MailboxesRetryAction402.pipe(HttpApiSchema.status(402)),
12002
+ MailboxesRetryAction403.pipe(HttpApiSchema.status(403)),
12003
+ MailboxesRetryAction404.pipe(HttpApiSchema.status(404)),
12004
+ MailboxesRetryAction409.pipe(HttpApiSchema.status(409)),
12005
+ MailboxesRetryAction422.pipe(HttpApiSchema.status(422)),
12006
+ MailboxesRetryAction429.pipe(HttpApiSchema.status(429)),
12007
+ MailboxesRetryAction500,
12008
+ MailboxesRetryAction502.pipe(HttpApiSchema.status(502)),
12009
+ MailboxesRetryAction503.pipe(HttpApiSchema.status(503)),
12010
+ MailboxesRetryAction504.pipe(HttpApiSchema.status(504))
12011
+ ]
12012
+ }).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.get("mailboxesGetAgentActivity", "/v1/mailboxes/:id/agent-activity", {
11494
12013
  params: MailboxesGetAgentActivityPathParams,
11495
12014
  query: MailboxesGetAgentActivityQuery,
11496
12015
  success: MailboxesGetAgentActivity200,
@@ -11564,7 +12083,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11564
12083
  }).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
12084
  params: MailboxesSendDraftPathParams,
11566
12085
  headers: MailboxesSendDraftHeaders,
11567
- success: MailboxesSendDraft200,
12086
+ success: [MailboxesSendDraft200, MailboxesSendDraft202.pipe(HttpApiSchema.status(202))],
11568
12087
  error: [
11569
12088
  MailboxesSendDraft401.pipe(HttpApiSchema.status(401)),
11570
12089
  MailboxesSendDraft402.pipe(HttpApiSchema.status(402)),
@@ -11590,7 +12109,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11590
12109
  MailboxesListEvents500,
11591
12110
  MailboxesListEvents504.pipe(HttpApiSchema.status(504))
11592
12111
  ]
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", {
12112
+ }).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`, `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
12113
  params: MailboxesListFoldersPathParams,
11595
12114
  success: MailboxesListFolders200,
11596
12115
  error: [
@@ -11702,7 +12221,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11702
12221
  params: MailboxesSendMessagePathParams,
11703
12222
  headers: MailboxesSendMessageHeaders,
11704
12223
  payload: MailboxesSendMessageRequestJson,
11705
- success: MailboxesSendMessage200,
12224
+ success: [MailboxesSendMessage200, MailboxesSendMessage202.pipe(HttpApiSchema.status(202))],
11706
12225
  error: [
11707
12226
  MailboxesSendMessage401.pipe(HttpApiSchema.status(401)),
11708
12227
  MailboxesSendMessage402.pipe(HttpApiSchema.status(402)),
@@ -11716,7 +12235,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11716
12235
  MailboxesSendMessage503.pipe(HttpApiSchema.status(503)),
11717
12236
  MailboxesSendMessage504.pipe(HttpApiSchema.status(504))
11718
12237
  ]
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", {
12238
+ }).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
12239
  params: MailboxesGetMessagePathParams,
11721
12240
  success: MailboxesGetMessage200,
11722
12241
  error: [
@@ -11738,7 +12257,19 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11738
12257
  MailboxesGetMessageAttachment500,
11739
12258
  MailboxesGetMessageAttachment504.pipe(HttpApiSchema.status(504))
11740
12259
  ]
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", {
12260
+ }).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", {
12261
+ params: MailboxesCopyMessageAttachmentPathParams,
12262
+ success: MailboxesCopyMessageAttachment201.pipe(HttpApiSchema.status(201)),
12263
+ error: [
12264
+ MailboxesCopyMessageAttachment401.pipe(HttpApiSchema.status(401)),
12265
+ MailboxesCopyMessageAttachment403.pipe(HttpApiSchema.status(403)),
12266
+ MailboxesCopyMessageAttachment404.pipe(HttpApiSchema.status(404)),
12267
+ MailboxesCopyMessageAttachment409.pipe(HttpApiSchema.status(409)),
12268
+ MailboxesCopyMessageAttachment422.pipe(HttpApiSchema.status(422)),
12269
+ MailboxesCopyMessageAttachment500,
12270
+ MailboxesCopyMessageAttachment504.pipe(HttpApiSchema.status(504))
12271
+ ]
12272
+ }).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
12273
  params: MailboxesDiscardMessagePathParams,
11743
12274
  success: MailboxesDiscardMessage200,
11744
12275
  error: [
@@ -11755,7 +12286,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11755
12286
  params: MailboxesForwardPathParams,
11756
12287
  headers: MailboxesForwardHeaders,
11757
12288
  payload: MailboxesForwardRequestJson,
11758
- success: MailboxesForward200,
12289
+ success: [MailboxesForward200, MailboxesForward202.pipe(HttpApiSchema.status(202))],
11759
12290
  error: [
11760
12291
  MailboxesForward401.pipe(HttpApiSchema.status(401)),
11761
12292
  MailboxesForward402.pipe(HttpApiSchema.status(402)),
@@ -11796,7 +12327,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11796
12327
  params: MailboxesReplyPathParams,
11797
12328
  headers: MailboxesReplyHeaders,
11798
12329
  payload: MailboxesReplyRequestJson,
11799
- success: MailboxesReply200,
12330
+ success: [MailboxesReply200, MailboxesReply202.pipe(HttpApiSchema.status(202))],
11800
12331
  error: [
11801
12332
  MailboxesReply401.pipe(HttpApiSchema.status(401)),
11802
12333
  MailboxesReply402.pipe(HttpApiSchema.status(402)),
@@ -11814,7 +12345,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11814
12345
  params: MailboxesReplyAllPathParams,
11815
12346
  headers: MailboxesReplyAllHeaders,
11816
12347
  payload: MailboxesReplyAllRequestJson,
11817
- success: MailboxesReplyAll200,
12348
+ success: [MailboxesReplyAll200, MailboxesReplyAll202.pipe(HttpApiSchema.status(202))],
11818
12349
  error: [
11819
12350
  MailboxesReplyAll401.pipe(HttpApiSchema.status(401)),
11820
12351
  MailboxesReplyAll402.pipe(HttpApiSchema.status(402)),
@@ -12433,7 +12964,18 @@ var OrganizationsGroup = class extends HttpApiGroup.make("Organizations").add(Ht
12433
12964
  OrganizationsDelete500,
12434
12965
  OrganizationsDelete504.pipe(HttpApiSchema.status(504))
12435
12966
  ]
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", {
12967
+ }).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", {
12968
+ success: OrganizationsGetTrustTier200,
12969
+ error: [
12970
+ OrganizationsGetTrustTier401.pipe(HttpApiSchema.status(401)),
12971
+ OrganizationsGetTrustTier403.pipe(HttpApiSchema.status(403)),
12972
+ OrganizationsGetTrustTier404.pipe(HttpApiSchema.status(404)),
12973
+ OrganizationsGetTrustTier422.pipe(HttpApiSchema.status(422)),
12974
+ OrganizationsGetTrustTier500,
12975
+ OrganizationsGetTrustTier502.pipe(HttpApiSchema.status(502)),
12976
+ OrganizationsGetTrustTier504.pipe(HttpApiSchema.status(504))
12977
+ ]
12978
+ }).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
12979
  query: OrganizationsGetUsageQuery,
12438
12980
  success: OrganizationsGetUsage200,
12439
12981
  error: [
@@ -12444,6 +12986,23 @@ var OrganizationsGroup = class extends HttpApiGroup.make("Organizations").add(Ht
12444
12986
  OrganizationsGetUsage504.pipe(HttpApiSchema.status(504))
12445
12987
  ]
12446
12988
  }).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") {};
12989
+ var SubscriptionsGroup = class extends HttpApiGroup.make("Subscriptions").add(HttpApiEndpoint.post("subscriptionsSubscribe", "/v1/subscriptions", {
12990
+ payload: SubscriptionsSubscribeRequestJson,
12991
+ success: SubscriptionsSubscribe200,
12992
+ error: [
12993
+ SubscriptionsSubscribe401.pipe(HttpApiSchema.status(401)),
12994
+ SubscriptionsSubscribe402.pipe(HttpApiSchema.status(402)),
12995
+ SubscriptionsSubscribe403.pipe(HttpApiSchema.status(403)),
12996
+ SubscriptionsSubscribe404.pipe(HttpApiSchema.status(404)),
12997
+ SubscriptionsSubscribe409.pipe(HttpApiSchema.status(409)),
12998
+ SubscriptionsSubscribe422.pipe(HttpApiSchema.status(422)),
12999
+ SubscriptionsSubscribe429.pipe(HttpApiSchema.status(429)),
13000
+ SubscriptionsSubscribe500,
13001
+ SubscriptionsSubscribe502.pipe(HttpApiSchema.status(502)),
13002
+ SubscriptionsSubscribe503.pipe(HttpApiSchema.status(503)),
13003
+ SubscriptionsSubscribe504.pipe(HttpApiSchema.status(504))
13004
+ ]
13005
+ }).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
13006
  var TemplatesGroup = class extends HttpApiGroup.make("Templates").add(HttpApiEndpoint.get("templatesList", "/v1/templates", {
12448
13007
  query: TemplatesListQuery,
12449
13008
  success: TemplatesList200,
@@ -12547,7 +13106,20 @@ var TemplatesGroup = class extends HttpApiGroup.make("Templates").add(HttpApiEnd
12547
13106
  TemplatesGetPublication500,
12548
13107
  TemplatesGetPublication504.pipe(HttpApiSchema.status(504))
12549
13108
  ]
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", {
13109
+ }).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", {
13110
+ params: TemplatesRenderPublicationPathParams,
13111
+ payload: TemplatesRenderPublicationRequestJson,
13112
+ success: TemplatesRenderPublication200,
13113
+ error: [
13114
+ TemplatesRenderPublication401.pipe(HttpApiSchema.status(401)),
13115
+ TemplatesRenderPublication403.pipe(HttpApiSchema.status(403)),
13116
+ TemplatesRenderPublication404.pipe(HttpApiSchema.status(404)),
13117
+ TemplatesRenderPublication409.pipe(HttpApiSchema.status(409)),
13118
+ TemplatesRenderPublication422.pipe(HttpApiSchema.status(422)),
13119
+ TemplatesRenderPublication500,
13120
+ TemplatesRenderPublication504.pipe(HttpApiSchema.status(504))
13121
+ ]
13122
+ }).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
13123
  params: TemplatesGetGitRepositoryPathParams,
12552
13124
  success: TemplatesGetGitRepository200,
12553
13125
  error: [
@@ -12958,7 +13530,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
12958
13530
  WebhooksCreate502.pipe(HttpApiSchema.status(502)),
12959
13531
  WebhooksCreate504.pipe(HttpApiSchema.status(504))
12960
13532
  ]
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", {
13533
+ }).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
13534
  params: WebhooksGetPathParams,
12963
13535
  success: WebhooksGet200,
12964
13536
  error: [
@@ -12994,7 +13566,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
12994
13566
  WebhooksUpdate500,
12995
13567
  WebhooksUpdate504.pipe(HttpApiSchema.status(504))
12996
13568
  ]
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", {
13569
+ }).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
13570
  params: WebhooksRetryDeliveryPathParams,
12999
13571
  success: WebhooksRetryDelivery200,
13000
13572
  error: [
@@ -13054,12 +13626,12 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
13054
13626
  WebhooksTest504.pipe(HttpApiSchema.status(504))
13055
13627
  ]
13056
13628
  }).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) {};
13629
+ 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
13630
  //#endregion
13059
13631
  //#region src/effect/internal/client.ts
13060
13632
  const DEFAULT_BASE_URL = "https://api.samva.dev";
13061
13633
  var Service = class extends Context.Service()("samva/Client") {};
13062
- const authHeaders = (config) => "authToken" in config ? { Authorization: `Bearer ${config.authToken}` } : { "x-api-key": config.apiKey };
13634
+ 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
13635
  const flatten = (nested) => {
13064
13636
  const flat = {};
13065
13637
  for (const endpoints of Object.values(nested)) for (const [endpoint, call] of Object.entries(endpoints)) flat[endpoint] = call;
@@ -13108,6 +13680,6 @@ const layer = (config) => Layer.effect(Service, make(config));
13108
13680
  const layerFetch = (config) => layer(config).pipe(Layer.provide(FetchHttpClient.layer));
13109
13681
  const raw = Effect.map(Service, (client) => client.raw);
13110
13682
  //#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 };
13683
+ 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
13684
 
13113
- //# sourceMappingURL=client-DYPNDvVU.js.map
13685
+ //# sourceMappingURL=client-CZjhOKPM.js.map