samva 0.11.0 → 0.13.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 (59) hide show
  1. package/dist/{categories-DvsHUJtX.js → categories-Bcwq5jPV.js} +5 -1
  2. package/dist/client/sdk.gen.d.ts +48 -21
  3. package/dist/client/types.gen.d.ts +340 -64
  4. package/dist/{client-8YXjfsVc.js → client-DYPNDvVU.js} +330 -75
  5. package/dist/effect/analytics.js +1 -1
  6. package/dist/effect/api-keys.js +1 -1
  7. package/dist/effect/attachments.js +1 -1
  8. package/dist/effect/brands.js +2 -2
  9. package/dist/effect/campaigns.d.ts +1 -1
  10. package/dist/effect/campaigns.js +1 -1
  11. package/dist/effect/categories.js +1 -1
  12. package/dist/effect/client.js +1 -1
  13. package/dist/effect/contact-groups.d.ts +0 -3
  14. package/dist/effect/contact-groups.js +1 -1
  15. package/dist/effect/contacts.d.ts +40 -8
  16. package/dist/effect/contacts.js +1 -1
  17. package/dist/effect/conversations.js +1 -1
  18. package/dist/effect/custom-fields.js +1 -1
  19. package/dist/effect/email.d.ts +87 -2
  20. package/dist/effect/email.js +7 -3
  21. package/dist/effect/extension-installations.d.ts +66 -0
  22. package/dist/effect/extension-installations.js +5 -3
  23. package/dist/effect/extensions.js +1 -1
  24. package/dist/effect/feedback.js +2 -2
  25. package/dist/effect/generated-metadata.d.ts +4 -0
  26. package/dist/effect/generated.d.ts +1312 -162
  27. package/dist/effect/index.d.ts +1 -0
  28. package/dist/effect/index.js +5 -4
  29. package/dist/effect/internal/client.d.ts +14 -0
  30. package/dist/effect/internal/operation.d.ts +5 -2
  31. package/dist/effect/mailboxes.d.ts +6 -6
  32. package/dist/effect/mailboxes.js +2 -2
  33. package/dist/effect/media.js +1 -1
  34. package/dist/effect/messages.d.ts +2 -2
  35. package/dist/effect/messages.js +1 -1
  36. package/dist/effect/namespaces.js +1 -1
  37. package/dist/effect/operations.js +1 -1
  38. package/dist/effect/organizations.js +1 -1
  39. package/dist/effect/retry.js +1 -1
  40. package/dist/effect/scheduled-messages.d.ts +1 -1
  41. package/dist/effect/scheduled-messages.js +1 -1
  42. package/dist/effect/templates.js +2 -2
  43. package/dist/effect/unsubscribe-groups.js +1 -1
  44. package/dist/effect/webhooks.js +2 -2
  45. package/dist/index.js +4 -3
  46. package/dist/inline-attachments-B56eS0MF.js +121 -0
  47. package/dist/inline-attachments.d.ts +65 -0
  48. package/dist/{mailbox-events-CcWm8lO4.js → mailbox-events-CsbF35vH.js} +18 -6
  49. package/dist/mailbox-events.d.ts +8 -5
  50. package/dist/{mailboxes-4gJMAJh4.js → mailboxes-D3Kx7elM.js} +4 -4
  51. package/dist/{operation-BuyvAsZ1.js → operation-B_Ty1LG-.js} +45 -3
  52. package/dist/promises/errors.gen.d.ts +14 -2
  53. package/dist/promises/index.d.ts +1 -0
  54. package/dist/promises/index.js +4 -3
  55. package/dist/promises/types.gen.d.ts +1 -1
  56. package/dist/{promises-CqAmI39P.js → promises-D9FJyU0q.js} +178 -20
  57. package/dist/service-map.d.ts +15 -0
  58. package/package.json +2 -2
  59. package/dist/client-attribution-Ct2FKITg.js +0 -9
@@ -1,4 +1,4 @@
1
- import { n as clientAttribution, t as CLIENT_ATTRIBUTION_HEADER } from "./client-attribution-Ct2FKITg.js";
1
+ import { i as uploadContentType, o as CLIENT_ATTRIBUTION_HEADER, s as clientAttribution, t as MediaUploadError } from "./inline-attachments-B56eS0MF.js";
2
2
  import { Context, Effect, Layer, 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";
@@ -227,6 +227,11 @@ var BrandAddressRequiredError = class extends Schema$1.TaggedError()("BrandAddre
227
227
  })) {};
228
228
  var CampaignFooterRequiredError = class extends Schema$1.TaggedError()("CampaignFooterRequiredError", Schema$1.Struct({ message: Schema$1.String })) {};
229
229
  var ExternalServiceError = class extends Schema$1.TaggedError()("ExternalServiceError", Schema$1.Struct({ message: Schema$1.String })) {};
230
+ var SenderNotReadyError = class extends Schema$1.TaggedError()("SenderNotReadyError", Schema$1.Struct({
231
+ message: Schema$1.String,
232
+ sender: Schema$1.String,
233
+ retryAfterSeconds: Schema$1.optionalKey(Schema$1.Union([Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })), Schema$1.Null]))
234
+ })) {};
230
235
  const CampaignRecipientId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^crcpt_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
231
236
  expected: "a string matching the RegExp ^crcpt_[0-9a-hjkmnp-tv-z]{16,24}$",
232
237
  identifier: "CampaignRecipientId"
@@ -264,11 +269,11 @@ const ContactPreferences = Schema$1.Struct({
264
269
  }), Schema$1.Null]))
265
270
  }), Schema$1.Null]))
266
271
  }).annotate({ identifier: "ContactPreferences" });
267
- const UnknownRecord = Schema$1.Record(Schema$1.String, JsonValue).annotate({ identifier: "UnknownRecord" });
268
272
  const BulkUpdateResult = Schema$1.Struct({
269
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" })),
270
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" }))
271
275
  }).annotate({ identifier: "BulkUpdateResult" });
276
+ const UnknownRecord = Schema$1.Record(Schema$1.String, JsonValue).annotate({ identifier: "UnknownRecord" });
272
277
  const CustomFieldDefinitionId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^cfield_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
273
278
  expected: "a string matching the RegExp ^cfield_[0-9a-hjkmnp-tv-z]{16,24}$",
274
279
  identifier: "CustomFieldDefinitionId"
@@ -317,6 +322,25 @@ var EmailChannelError = class extends Schema$1.TaggedError()("EmailChannelError"
317
322
  message: Schema$1.String,
318
323
  statusCode: Schema$1.optionalKey(Schema$1.Union([Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })), Schema$1.Null]))
319
324
  })) {};
325
+ const CustomTrackingCertificate = Schema$1.Struct({
326
+ reason: Schema$1.Struct({
327
+ code: Schema$1.Union([
328
+ Schema$1.Literal("initializing"),
329
+ Schema$1.Literal("awaiting-hostname"),
330
+ Schema$1.Literal("awaiting-dcv"),
331
+ Schema$1.Literal("issuing"),
332
+ Schema$1.Literal("caa-blocked"),
333
+ Schema$1.Literal("validation-error"),
334
+ Schema$1.Literal("timed-out"),
335
+ Schema$1.Literal("verifying-route"),
336
+ Schema$1.Literal("ready"),
337
+ Schema$1.Literal("provider-unreachable")
338
+ ]),
339
+ message: Schema$1.String
340
+ }),
341
+ lastCheckedAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
342
+ nextCheckAt: Schema$1.Union([Schema$1.String, Schema$1.Null])
343
+ }).annotate({ identifier: "CustomTrackingCertificate" });
320
344
  const CustomTrackingDnsRecord = Schema$1.Struct({
321
345
  name: Schema$1.String,
322
346
  type: Schema$1.String,
@@ -503,6 +527,36 @@ const ExtensionRun = Schema$1.Struct({
503
527
  error: Schema$1.Union([Schema$1.String, Schema$1.Null]),
504
528
  logs: Schema$1.Array(Schema$1.String)
505
529
  }).annotate({ identifier: "ExtensionRun" });
530
+ const ExtensionPermissionDiff = Schema$1.Struct({
531
+ added: Schema$1.Array(Schema$1.Union([
532
+ Schema$1.Literal("permission:read"),
533
+ Schema$1.Literal("permission:update"),
534
+ Schema$1.Literal("permission:send"),
535
+ Schema$1.Literal("permission:quarantine.read"),
536
+ Schema$1.Literal("event:mailbox.message.received"),
537
+ Schema$1.Literal("event:mailbox.message.sent"),
538
+ Schema$1.Literal("event:mailbox.action.pending_approval"),
539
+ Schema$1.Literal("event:mailbox.message.quarantined"),
540
+ Schema$1.Literal("event:mailbox.message.released"),
541
+ Schema$1.Literal("event:mailbox.message.discarded")
542
+ ])),
543
+ removed: Schema$1.Array(Schema$1.Union([
544
+ Schema$1.Literal("permission:read"),
545
+ Schema$1.Literal("permission:update"),
546
+ Schema$1.Literal("permission:send"),
547
+ Schema$1.Literal("permission:quarantine.read"),
548
+ Schema$1.Literal("event:mailbox.message.received"),
549
+ Schema$1.Literal("event:mailbox.message.sent"),
550
+ Schema$1.Literal("event:mailbox.action.pending_approval"),
551
+ Schema$1.Literal("event:mailbox.message.quarantined"),
552
+ Schema$1.Literal("event:mailbox.message.released"),
553
+ Schema$1.Literal("event:mailbox.message.discarded")
554
+ ]))
555
+ }).annotate({ identifier: "ExtensionPermissionDiff" });
556
+ const UserId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^user_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
557
+ expected: "a string matching the RegExp ^user_[0-9a-hjkmnp-tv-z]{16,24}$",
558
+ identifier: "UserId"
559
+ })).pipe(Schema$1.brand("UserId"));
506
560
  const ExtensionBundle = Schema$1.Struct({
507
561
  sha256: Schema$1.String,
508
562
  sizeBytes: Schema$1.Finite.check(Schema$1.isInt().annotate({ expected: "an integer" }))
@@ -553,6 +607,38 @@ const MailboxPolicyId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */
553
607
  expected: "a string matching the RegExp ^mbxpol_[0-9a-hjkmnp-tv-z]{16,24}$",
554
608
  identifier: "MailboxPolicyId"
555
609
  })).pipe(Schema$1.brand("MailboxPolicyId"));
610
+ var OnboardingReviewRequiredError = class extends Schema$1.TaggedError()("OnboardingReviewRequiredError", Schema$1.Struct({
611
+ message: Schema$1.String,
612
+ code: Schema$1.Union([
613
+ Schema$1.Literal("review_required"),
614
+ Schema$1.Literal("review_in_progress"),
615
+ Schema$1.Literal("information_required"),
616
+ Schema$1.Literal("review_rejected"),
617
+ Schema$1.Literal("identity_review_required"),
618
+ Schema$1.Literal("identity_review_rejected"),
619
+ Schema$1.Literal("identity_changed")
620
+ ]),
621
+ decision: Schema$1.Union([
622
+ Schema$1.Literal("undecided"),
623
+ Schema$1.Literal("approved"),
624
+ Schema$1.Literal("rejected")
625
+ ]),
626
+ stage: Schema$1.Union([
627
+ Schema$1.Literal("collecting"),
628
+ Schema$1.Literal("automated_review"),
629
+ Schema$1.Literal("manual_review"),
630
+ Schema$1.Literal("information_requested"),
631
+ Schema$1.Literal("complete")
632
+ ]),
633
+ nextAction: Schema$1.Union([
634
+ Schema$1.Literal("wait_for_review"),
635
+ Schema$1.Literal("provide_information"),
636
+ Schema$1.Literal("verify_sending_identity"),
637
+ Schema$1.Literal("reapply"),
638
+ Schema$1.Literal("contact_support")
639
+ ]),
640
+ identityId: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
641
+ })) {};
556
642
  const MailboxAgentActivity = Schema$1.Struct({
557
643
  actions: Schema$1.Struct({
558
644
  byType: Schema$1.Array(Schema$1.Struct({
@@ -626,10 +712,6 @@ const MailboxGrantId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */
626
712
  expected: "a string matching the RegExp ^mbxacl_[0-9a-hjkmnp-tv-z]{16,24}$",
627
713
  identifier: "MailboxGrantId"
628
714
  })).pipe(Schema$1.brand("MailboxGrantId"));
629
- const UserId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^user_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
630
- expected: "a string matching the RegExp ^user_[0-9a-hjkmnp-tv-z]{16,24}$",
631
- identifier: "UserId"
632
- })).pipe(Schema$1.brand("UserId"));
633
715
  const MailboxGrantRole = Schema$1.Union([
634
716
  Schema$1.Literal("admin"),
635
717
  Schema$1.Literal("collaborator"),
@@ -736,38 +818,6 @@ const EmailSender = Schema$1.Union([Schema$1.Struct({
736
818
  email: Schema$1.String.check(Schema$1.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
737
819
  name: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
738
820
  }), Schema$1.Null]).annotate({ identifier: "EmailSender" });
739
- var OnboardingReviewRequiredError = class extends Schema$1.TaggedError()("OnboardingReviewRequiredError", Schema$1.Struct({
740
- message: Schema$1.String,
741
- code: Schema$1.Union([
742
- Schema$1.Literal("review_required"),
743
- Schema$1.Literal("review_in_progress"),
744
- Schema$1.Literal("information_required"),
745
- Schema$1.Literal("review_rejected"),
746
- Schema$1.Literal("identity_review_required"),
747
- Schema$1.Literal("identity_review_rejected"),
748
- Schema$1.Literal("identity_changed")
749
- ]),
750
- decision: Schema$1.Union([
751
- Schema$1.Literal("undecided"),
752
- Schema$1.Literal("approved"),
753
- Schema$1.Literal("rejected")
754
- ]),
755
- stage: Schema$1.Union([
756
- Schema$1.Literal("collecting"),
757
- Schema$1.Literal("automated_review"),
758
- Schema$1.Literal("manual_review"),
759
- Schema$1.Literal("information_requested"),
760
- Schema$1.Literal("complete")
761
- ]),
762
- nextAction: Schema$1.Union([
763
- Schema$1.Literal("wait_for_review"),
764
- Schema$1.Literal("provide_information"),
765
- Schema$1.Literal("verify_sending_identity"),
766
- Schema$1.Literal("reapply"),
767
- Schema$1.Literal("contact_support")
768
- ]),
769
- identityId: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
770
- })) {};
771
821
  var DeliveryUnavailableError = class extends Schema$1.TaggedError()("DeliveryUnavailableError", Schema$1.Struct({
772
822
  message: Schema$1.String,
773
823
  retryAfterSeconds: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" }))
@@ -1234,7 +1284,7 @@ const BrandFooter = Schema$1.Struct({
1234
1284
  }).annotate({ identifier: "BrandFooter" });
1235
1285
  const EmailAttachment = Schema$1.Struct({
1236
1286
  filename: Schema$1.String,
1237
- content: Schema$1.optionalKey(Schema$1.Union([Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$", "u")).annotate({ expected: "a string matching the RegExp ^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$" })), Schema$1.Null])),
1287
+ content: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
1238
1288
  mediaId: Schema$1.optionalKey(Schema$1.Union([MediaId, Schema$1.Null])),
1239
1289
  contentType: Schema$1.String,
1240
1290
  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" }))
@@ -1661,6 +1711,49 @@ const BlockLogPage = Schema$1.Struct({
1661
1711
  })),
1662
1712
  nextCursor: Schema$1.Union([Schema$1.String, Schema$1.Null])
1663
1713
  }).annotate({ identifier: "BlockLogPage" });
1714
+ const ReceivingStatus = Schema$1.Struct({
1715
+ domain: Schema$1.String,
1716
+ receivingHost: Schema$1.String,
1717
+ sending: Schema$1.Struct({
1718
+ satisfied: Schema$1.Boolean,
1719
+ phase: Schema$1.Union([
1720
+ Schema$1.Literal("dns-setup"),
1721
+ Schema$1.Literal("provisioning"),
1722
+ Schema$1.Literal("verifying"),
1723
+ Schema$1.Literal("ready"),
1724
+ Schema$1.Literal("degraded"),
1725
+ Schema$1.Literal("failed")
1726
+ ])
1727
+ }),
1728
+ destination: Schema$1.Struct({
1729
+ satisfied: Schema$1.Boolean,
1730
+ endpointId: Schema$1.Union([WebhookEndpointId, Schema$1.Null]),
1731
+ forwardingRules: 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" })),
1732
+ mailboxes: 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" }))
1733
+ }),
1734
+ receiving: Schema$1.Struct({
1735
+ satisfied: Schema$1.Boolean,
1736
+ catchAll: Schema$1.Boolean
1737
+ }),
1738
+ mx: Schema$1.Struct({
1739
+ satisfied: Schema$1.Boolean,
1740
+ state: Schema$1.Union([
1741
+ Schema$1.Literal("pointing-here"),
1742
+ Schema$1.Literal("elsewhere"),
1743
+ Schema$1.Literal("missing"),
1744
+ Schema$1.Literal("unknown")
1745
+ ]),
1746
+ expected: Schema$1.Struct({
1747
+ exchange: Schema$1.String,
1748
+ priority: 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" }))
1749
+ }),
1750
+ current: Schema$1.Array(Schema$1.Struct({
1751
+ exchange: Schema$1.String,
1752
+ priority: 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" }))
1753
+ }))
1754
+ }),
1755
+ ready: Schema$1.Boolean
1756
+ }).annotate({ identifier: "ReceivingStatus" });
1664
1757
  const WebhookEndpoint = Schema$1.Struct({
1665
1758
  id: WebhookEndpointId,
1666
1759
  name: Schema$1.String,
@@ -1813,6 +1906,7 @@ const CustomTrackingStatus = Schema$1.Struct({
1813
1906
  hostname: Schema$1.String,
1814
1907
  region: Schema$1.String,
1815
1908
  sslStatus: Schema$1.Union([Schema$1.String, Schema$1.Null]),
1909
+ certificate: Schema$1.Union([CustomTrackingCertificate, Schema$1.Null]),
1816
1910
  dnsRecords: Schema$1.Struct({
1817
1911
  tracking: Schema$1.Union([CustomTrackingDnsRecord, Schema$1.Null]),
1818
1912
  dcvDelegation: Schema$1.Union([CustomTrackingDnsRecord, Schema$1.Null])
@@ -1901,10 +1995,11 @@ const ForwardingRuleList = Schema$1.Struct({ items: Schema$1.Array(Schema$1.Stru
1901
1995
  id: EmailForwardingRuleId,
1902
1996
  name: Schema$1.String,
1903
1997
  description: Schema$1.Union([Schema$1.String, Schema$1.Null]),
1998
+ domainId: Schema$1.Union([EmailDomainId, Schema$1.Null]),
1904
1999
  sourcePattern: Schema$1.Union([Schema$1.String, Schema$1.Null]),
1905
2000
  forwardTo: Schema$1.Array(Schema$1.String),
1906
2001
  preserveHeaders: Schema$1.Boolean,
1907
- priority: 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" })),
2002
+ priority: Schema$1.Finite.check(Schema$1.isInt().annotate({ expected: "an integer" })).check(Schema$1.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema$1.isLessThanOrEqualTo(2147483647).annotate({ expected: "a value less than or equal to 2147483647" })),
1908
2003
  isActive: Schema$1.Boolean,
1909
2004
  forwardCount: 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" })),
1910
2005
  failureCount: 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" })),
@@ -2005,6 +2100,22 @@ const ExtensionVersionRef = Schema$1.Struct({
2005
2100
  id: ExtensionVersionId,
2006
2101
  version: Schema$1.String
2007
2102
  }).annotate({ identifier: "ExtensionVersionRef" });
2103
+ Schema$1.Struct({
2104
+ version: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^\\d{1,6}\\.\\d{1,6}\\.\\d{1,6}(?:-[0-9A-Za-z.-]{1,64})?$", "u")).annotate({ expected: "a string matching the RegExp ^\\d{1,6}\\.\\d{1,6}\\.\\d{1,6}(?:-[0-9A-Za-z.-]{1,64})?$" })), ExtensionVersionId]), Schema$1.Null])),
2105
+ acceptPermissions: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.Union([
2106
+ Schema$1.Literal("permission:read"),
2107
+ Schema$1.Literal("permission:update"),
2108
+ Schema$1.Literal("permission:send"),
2109
+ Schema$1.Literal("permission:quarantine.read"),
2110
+ Schema$1.Literal("event:mailbox.message.received"),
2111
+ Schema$1.Literal("event:mailbox.message.sent"),
2112
+ Schema$1.Literal("event:mailbox.action.pending_approval"),
2113
+ Schema$1.Literal("event:mailbox.message.quarantined"),
2114
+ Schema$1.Literal("event:mailbox.message.released"),
2115
+ Schema$1.Literal("event:mailbox.message.discarded")
2116
+ ])), Schema$1.Null])),
2117
+ dryRun: Schema$1.optionalKey(Schema$1.Union([Schema$1.Boolean, Schema$1.Null]))
2118
+ }).annotate({ identifier: "UpgradeExtensionPayload" });
2008
2119
  const ExtensionRunList = Schema$1.Struct({ items: Schema$1.Array(ExtensionRunSummary) }).annotate({ identifier: "ExtensionRunList" });
2009
2120
  const ExtensionVersion = Schema$1.Struct({
2010
2121
  id: ExtensionVersionId,
@@ -3268,6 +3379,17 @@ const ExtensionInstallation = Schema$1.Struct({
3268
3379
  updatedAt: Schema$1.String,
3269
3380
  disabledAt: Schema$1.Union([Schema$1.String, Schema$1.Null])
3270
3381
  }).annotate({ identifier: "ExtensionInstallation" });
3382
+ const ExtensionVersionChange = Schema$1.Struct({
3383
+ id: Schema$1.String,
3384
+ organizationId: OrganizationId,
3385
+ installationId: ExtensionInstallationId,
3386
+ extensionId: ExtensionId,
3387
+ fromVersion: ExtensionVersionRef,
3388
+ toVersion: ExtensionVersionRef,
3389
+ permissionDiff: ExtensionPermissionDiff,
3390
+ changedBy: UserId,
3391
+ changedAt: Schema$1.String
3392
+ }).annotate({ identifier: "ExtensionVersionChange" });
3271
3393
  const Extension = Schema$1.Struct({
3272
3394
  id: ExtensionId,
3273
3395
  name: Schema$1.String,
@@ -3533,6 +3655,14 @@ const InstallExtensionResponse = Schema$1.Struct({
3533
3655
  webhookSecret: SensitiveString
3534
3656
  }), Schema$1.Null])
3535
3657
  }).annotate({ identifier: "InstallExtensionResponse" });
3658
+ const UpgradeExtensionResponse = Schema$1.Struct({
3659
+ installation: ExtensionInstallation,
3660
+ fromVersion: ExtensionVersionRef,
3661
+ toVersion: ExtensionVersionRef,
3662
+ permissionDiff: ExtensionPermissionDiff,
3663
+ dryRun: Schema$1.Boolean,
3664
+ versionChange: Schema$1.Union([ExtensionVersionChange, Schema$1.Null])
3665
+ }).annotate({ identifier: "UpgradeExtensionResponse" });
3536
3666
  const ExtensionPage = Schema$1.Struct({
3537
3667
  items: Schema$1.Array(Extension),
3538
3668
  nextCursor: Schema$1.Union([Schema$1.String, Schema$1.Null])
@@ -4124,6 +4254,7 @@ const CampaignsScheduleRun422 = Schema$1.Union([
4124
4254
  ]);
4125
4255
  const CampaignsScheduleRun500 = InternalError;
4126
4256
  const CampaignsScheduleRun502 = ExternalServiceError;
4257
+ const CampaignsScheduleRun503 = SenderNotReadyError;
4127
4258
  const CampaignsScheduleRun504 = GatewayTimeoutError;
4128
4259
  const CampaignsGetRunPathParams = Schema$1.Struct({
4129
4260
  id: CampaignId,
@@ -4420,8 +4551,6 @@ const ContactGroupsRemoveMembers422 = ValidationError;
4420
4551
  const ContactGroupsRemoveMembers500 = InternalError;
4421
4552
  const ContactGroupsRemoveMembers504 = GatewayTimeoutError;
4422
4553
  const ContactGroupsPreviewRequestJson = Schema$1.Struct({ criteria: Schema$1.Struct({
4423
- contactTypes: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
4424
- capabilities: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
4425
4554
  tags: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
4426
4555
  channels: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
4427
4556
  match: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([Schema$1.Literal("all"), Schema$1.Literal("any")]), Schema$1.Null])),
@@ -4436,7 +4565,6 @@ const ContactGroupsPreview200 = Schema$1.Struct({
4436
4565
  sample: Schema$1.Array(Schema$1.Struct({
4437
4566
  id: ContactId,
4438
4567
  name: Schema$1.String,
4439
- type: Schema$1.String,
4440
4568
  status: Schema$1.String
4441
4569
  }))
4442
4570
  });
@@ -4631,16 +4759,23 @@ const ContactsBulkDelete504 = GatewayTimeoutError;
4631
4759
  const ContactsBulkImportRequestJson = Schema$1.Struct({
4632
4760
  contacts: Schema$1.Array(Schema$1.Struct({
4633
4761
  name: Schema$1.String,
4634
- email: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
4635
- phone: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
4762
+ displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([Schema$1.String, Schema$1.Null]), Schema$1.Null])),
4763
+ avatar: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([Schema$1.String, Schema$1.Null]), Schema$1.Null])),
4764
+ identities: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(ContactIdentityInput), Schema$1.Null])),
4765
+ profile: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([ContactProfile, Schema$1.Null]), Schema$1.Null])),
4766
+ preferences: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([ContactPreferences, Schema$1.Null]), Schema$1.Null])),
4636
4767
  tags: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
4637
- firstName: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
4638
- lastName: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
4639
- company: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
4640
- jobTitle: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
4641
- customFields: Schema$1.optionalKey(Schema$1.Union([UnknownRecord, Schema$1.Null]))
4768
+ status: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([
4769
+ Schema$1.Literal("active"),
4770
+ Schema$1.Literal("paused"),
4771
+ Schema$1.Literal("blocked"),
4772
+ Schema$1.Literal("archived")
4773
+ ]), Schema$1.Null])),
4774
+ statusReason: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([Schema$1.String, Schema$1.Null]), Schema$1.Null])),
4775
+ externalId: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([Schema$1.String, Schema$1.Null]), Schema$1.Null])),
4776
+ metadata: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([JsonObject, Schema$1.Null]), Schema$1.Null]))
4642
4777
  })),
4643
- upsertByEmail: Schema$1.optionalKey(Schema$1.Union([Schema$1.Boolean, Schema$1.Null]))
4778
+ onConflict: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([Schema$1.Literal("skip"), Schema$1.Literal("update")]), Schema$1.Null]))
4644
4779
  });
4645
4780
  const ContactsBulkImport200 = Schema$1.Struct({
4646
4781
  total: 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" })),
@@ -5301,6 +5436,16 @@ const EmailCompleteCustomTrackingDomainConnect403 = ForbiddenError;
5301
5436
  const EmailCompleteCustomTrackingDomainConnect422 = ValidationError;
5302
5437
  const EmailCompleteCustomTrackingDomainConnect500 = InternalError;
5303
5438
  const EmailCompleteCustomTrackingDomainConnect504 = GatewayTimeoutError;
5439
+ const EmailRecheckCustomTrackingPathParams = Schema$1.Struct({ id: EmailDomainId });
5440
+ const EmailRecheckCustomTracking200 = CustomTrackingStatus;
5441
+ const EmailRecheckCustomTracking401 = UnauthorizedError;
5442
+ const EmailRecheckCustomTracking403 = ForbiddenError;
5443
+ const EmailRecheckCustomTracking404 = ResourceNotFoundError;
5444
+ const EmailRecheckCustomTracking409 = ConflictError;
5445
+ const EmailRecheckCustomTracking422 = ValidationError;
5446
+ const EmailRecheckCustomTracking500 = InternalError;
5447
+ const EmailRecheckCustomTracking502 = EmailChannelError;
5448
+ const EmailRecheckCustomTracking504 = GatewayTimeoutError;
5304
5449
  const EmailSetDefaultDomainPathParams = Schema$1.Struct({ id: EmailDomainId });
5305
5450
  const EmailSetDefaultDomain200 = SuccessResult;
5306
5451
  const EmailSetDefaultDomain401 = UnauthorizedError;
@@ -5370,7 +5515,7 @@ const EmailCompleteDomainConnect500 = InternalError;
5370
5515
  const EmailCompleteDomainConnect502 = EmailChannelError;
5371
5516
  const EmailCompleteDomainConnect504 = GatewayTimeoutError;
5372
5517
  const EmailEnableCatchAllPathParams = Schema$1.Struct({ id: EmailDomainId });
5373
- const EmailEnableCatchAllRequestJson = Schema$1.Struct({ endpointId: WebhookEndpointId });
5518
+ const EmailEnableCatchAllRequestJson = Schema$1.Struct({ endpointId: Schema$1.optionalKey(Schema$1.Union([WebhookEndpointId, Schema$1.Null])) });
5374
5519
  const EmailEnableCatchAll201 = Schema$1.Struct({ success: Schema$1.Literal(true) });
5375
5520
  const EmailEnableCatchAll401 = UnauthorizedError;
5376
5521
  const EmailEnableCatchAll403 = ForbiddenError;
@@ -5396,6 +5541,14 @@ const EmailEnableReceiving404 = ResourceNotFoundError;
5396
5541
  const EmailEnableReceiving422 = ValidationError;
5397
5542
  const EmailEnableReceiving500 = InternalError;
5398
5543
  const EmailEnableReceiving504 = GatewayTimeoutError;
5544
+ const EmailGetReceivingStatusPathParams = Schema$1.Struct({ id: EmailDomainId });
5545
+ const EmailGetReceivingStatus200 = ReceivingStatus;
5546
+ const EmailGetReceivingStatus401 = UnauthorizedError;
5547
+ const EmailGetReceivingStatus403 = ForbiddenError;
5548
+ const EmailGetReceivingStatus404 = ResourceNotFoundError;
5549
+ const EmailGetReceivingStatus422 = ValidationError;
5550
+ const EmailGetReceivingStatus500 = InternalError;
5551
+ const EmailGetReceivingStatus504 = GatewayTimeoutError;
5399
5552
  const EmailDetectRegistrarPathParams = Schema$1.Struct({ id: EmailDomainId });
5400
5553
  const EmailDetectRegistrarRequestJson = Schema$1.Struct({ domain: Schema$1.String });
5401
5554
  const EmailDetectRegistrar200 = Schema$1.Struct({
@@ -5541,7 +5694,7 @@ const EmailCreateForwardingRuleRequestJson = Schema$1.Struct({
5541
5694
  preserveHeaders: Schema$1.optionalKey(Schema$1.Union([Schema$1.Boolean, Schema$1.Null])),
5542
5695
  appendNote: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
5543
5696
  conditions: Schema$1.optionalKey(Schema$1.Union([ForwardingConditions, Schema$1.Null])),
5544
- priority: Schema$1.optionalKey(Schema$1.Union([Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })), Schema$1.Null])),
5697
+ priority: Schema$1.optionalKey(Schema$1.Union([Schema$1.Finite.check(Schema$1.isInt().annotate({ expected: "an integer" })).check(Schema$1.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema$1.isLessThanOrEqualTo(2147483647).annotate({ expected: "a value less than or equal to 2147483647" })), Schema$1.Null])),
5545
5698
  isActive: Schema$1.optionalKey(Schema$1.Union([Schema$1.Boolean, Schema$1.Null])),
5546
5699
  metadata: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([Schema$1.Record(Schema$1.String, JsonValue), Schema$1.Null]), Schema$1.Null]))
5547
5700
  });
@@ -5549,7 +5702,7 @@ const EmailCreateForwardingRule201 = Schema$1.Struct({
5549
5702
  id: EmailForwardingRuleId,
5550
5703
  name: Schema$1.String,
5551
5704
  forwardTo: Schema$1.Array(Schema$1.String),
5552
- priority: 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" })),
5705
+ priority: Schema$1.Finite.check(Schema$1.isInt().annotate({ expected: "an integer" })).check(Schema$1.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema$1.isLessThanOrEqualTo(2147483647).annotate({ expected: "a value less than or equal to 2147483647" })),
5553
5706
  isActive: Schema$1.Boolean,
5554
5707
  createdAt: Schema$1.String
5555
5708
  });
@@ -5578,7 +5731,7 @@ const EmailUpdateForwardingRuleRequestJson = Schema$1.Struct({
5578
5731
  preserveHeaders: Schema$1.optionalKey(Schema$1.Union([Schema$1.Boolean, Schema$1.Null])),
5579
5732
  appendNote: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
5580
5733
  conditions: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([ForwardingConditions, Schema$1.Null]), Schema$1.Null])),
5581
- priority: Schema$1.optionalKey(Schema$1.Union([Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })), Schema$1.Null])),
5734
+ priority: Schema$1.optionalKey(Schema$1.Union([Schema$1.Finite.check(Schema$1.isInt().annotate({ expected: "an integer" })).check(Schema$1.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema$1.isLessThanOrEqualTo(2147483647).annotate({ expected: "a value less than or equal to 2147483647" })), Schema$1.Null])),
5582
5735
  isActive: Schema$1.optionalKey(Schema$1.Union([Schema$1.Boolean, Schema$1.Null])),
5583
5736
  metadata: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([Schema$1.Record(Schema$1.String, JsonValue), Schema$1.Null]), Schema$1.Null]))
5584
5737
  });
@@ -5586,7 +5739,7 @@ const EmailUpdateForwardingRule200 = Schema$1.Struct({
5586
5739
  id: EmailForwardingRuleId,
5587
5740
  name: Schema$1.String,
5588
5741
  forwardTo: Schema$1.Array(Schema$1.String),
5589
- priority: 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" })),
5742
+ priority: Schema$1.Finite.check(Schema$1.isInt().annotate({ expected: "an integer" })).check(Schema$1.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema$1.isLessThanOrEqualTo(2147483647).annotate({ expected: "a value less than or equal to 2147483647" })),
5590
5743
  isActive: Schema$1.Boolean,
5591
5744
  updatedAt: Schema$1.String
5592
5745
  });
@@ -5932,6 +6085,31 @@ const ExtensionInstallationsGetRun404 = ResourceNotFoundError;
5932
6085
  const ExtensionInstallationsGetRun422 = ValidationError;
5933
6086
  const ExtensionInstallationsGetRun500 = InternalError;
5934
6087
  const ExtensionInstallationsGetRun504 = GatewayTimeoutError;
6088
+ const ExtensionInstallationsUpgradePathParams = Schema$1.Struct({ id: ExtensionInstallationId });
6089
+ const ExtensionInstallationsUpgradeRequestJson = Schema$1.Struct({
6090
+ version: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^\\d{1,6}\\.\\d{1,6}\\.\\d{1,6}(?:-[0-9A-Za-z.-]{1,64})?$", "u")).annotate({ expected: "a string matching the RegExp ^\\d{1,6}\\.\\d{1,6}\\.\\d{1,6}(?:-[0-9A-Za-z.-]{1,64})?$" })), ExtensionVersionId]), Schema$1.Null])),
6091
+ acceptPermissions: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.Union([
6092
+ Schema$1.Literal("permission:read"),
6093
+ Schema$1.Literal("permission:update"),
6094
+ Schema$1.Literal("permission:send"),
6095
+ Schema$1.Literal("permission:quarantine.read"),
6096
+ Schema$1.Literal("event:mailbox.message.received"),
6097
+ Schema$1.Literal("event:mailbox.message.sent"),
6098
+ Schema$1.Literal("event:mailbox.action.pending_approval"),
6099
+ Schema$1.Literal("event:mailbox.message.quarantined"),
6100
+ Schema$1.Literal("event:mailbox.message.released"),
6101
+ Schema$1.Literal("event:mailbox.message.discarded")
6102
+ ])), Schema$1.Null])),
6103
+ dryRun: Schema$1.optionalKey(Schema$1.Union([Schema$1.Boolean, Schema$1.Null]))
6104
+ });
6105
+ const ExtensionInstallationsUpgrade200 = UpgradeExtensionResponse;
6106
+ const ExtensionInstallationsUpgrade401 = UnauthorizedError;
6107
+ const ExtensionInstallationsUpgrade403 = ForbiddenError;
6108
+ const ExtensionInstallationsUpgrade404 = ResourceNotFoundError;
6109
+ const ExtensionInstallationsUpgrade409 = ConflictError;
6110
+ const ExtensionInstallationsUpgrade422 = ValidationError;
6111
+ const ExtensionInstallationsUpgrade500 = InternalError;
6112
+ const ExtensionInstallationsUpgrade504 = GatewayTimeoutError;
5935
6113
  const ExtensionsListQuery = Schema$1.Struct({
5936
6114
  limit: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
5937
6115
  cursor: Schema$1.optionalKey(Schema$1.Union([Cursor, Schema$1.Null])),
@@ -6122,12 +6300,14 @@ const MailboxesApproveActionPathParams = Schema$1.Struct({
6122
6300
  const MailboxesApproveAction200 = MailboxAction;
6123
6301
  const MailboxesApproveAction401 = UnauthorizedError;
6124
6302
  const MailboxesApproveAction402 = PaymentRequiredError;
6125
- const MailboxesApproveAction403 = ForbiddenError;
6303
+ const MailboxesApproveAction403 = Schema$1.Union([ForbiddenError, OnboardingReviewRequiredError]);
6126
6304
  const MailboxesApproveAction404 = ResourceNotFoundError;
6127
6305
  const MailboxesApproveAction409 = ConflictError;
6128
6306
  const MailboxesApproveAction422 = ValidationError;
6307
+ const MailboxesApproveAction429 = RateLimitedError;
6129
6308
  const MailboxesApproveAction500 = InternalError;
6130
6309
  const MailboxesApproveAction502 = BillingProviderError;
6310
+ const MailboxesApproveAction503 = SenderNotReadyError;
6131
6311
  const MailboxesApproveAction504 = GatewayTimeoutError;
6132
6312
  const MailboxesDenyActionPathParams = Schema$1.Struct({
6133
6313
  id: MailboxId,
@@ -6238,12 +6418,14 @@ const MailboxesSendDraftHeaders = Schema$1.Struct({ "idempotency-key": Schema$1.
6238
6418
  const MailboxesSendDraft200 = MailboxSendReceipt;
6239
6419
  const MailboxesSendDraft401 = UnauthorizedError;
6240
6420
  const MailboxesSendDraft402 = PaymentRequiredError;
6241
- const MailboxesSendDraft403 = ForbiddenError;
6421
+ const MailboxesSendDraft403 = Schema$1.Union([ForbiddenError, OnboardingReviewRequiredError]);
6242
6422
  const MailboxesSendDraft404 = ResourceNotFoundError;
6243
6423
  const MailboxesSendDraft409 = ConflictError;
6244
6424
  const MailboxesSendDraft422 = ValidationError;
6425
+ const MailboxesSendDraft429 = RateLimitedError;
6245
6426
  const MailboxesSendDraft500 = InternalError;
6246
6427
  const MailboxesSendDraft502 = BillingProviderError;
6428
+ const MailboxesSendDraft503 = SenderNotReadyError;
6247
6429
  const MailboxesSendDraft504 = GatewayTimeoutError;
6248
6430
  const MailboxesListEventsPathParams = Schema$1.Struct({ id: MailboxId });
6249
6431
  const MailboxesListEventsQuery = Schema$1.Struct({
@@ -6398,12 +6580,14 @@ const MailboxesSendMessageRequestJson = Schema$1.Struct({
6398
6580
  const MailboxesSendMessage200 = MailboxSendReceipt;
6399
6581
  const MailboxesSendMessage401 = UnauthorizedError;
6400
6582
  const MailboxesSendMessage402 = PaymentRequiredError;
6401
- const MailboxesSendMessage403 = ForbiddenError;
6583
+ const MailboxesSendMessage403 = Schema$1.Union([ForbiddenError, OnboardingReviewRequiredError]);
6402
6584
  const MailboxesSendMessage404 = ResourceNotFoundError;
6403
6585
  const MailboxesSendMessage409 = ConflictError;
6404
6586
  const MailboxesSendMessage422 = ValidationError;
6587
+ const MailboxesSendMessage429 = RateLimitedError;
6405
6588
  const MailboxesSendMessage500 = InternalError;
6406
6589
  const MailboxesSendMessage502 = BillingProviderError;
6590
+ const MailboxesSendMessage503 = SenderNotReadyError;
6407
6591
  const MailboxesSendMessage504 = GatewayTimeoutError;
6408
6592
  const MailboxesGetMessagePathParams = Schema$1.Struct({
6409
6593
  id: MailboxId,
@@ -6457,12 +6641,14 @@ const MailboxesForwardRequestJson = Schema$1.Struct({
6457
6641
  const MailboxesForward200 = MailboxSendReceipt;
6458
6642
  const MailboxesForward401 = UnauthorizedError;
6459
6643
  const MailboxesForward402 = PaymentRequiredError;
6460
- const MailboxesForward403 = ForbiddenError;
6644
+ const MailboxesForward403 = Schema$1.Union([ForbiddenError, OnboardingReviewRequiredError]);
6461
6645
  const MailboxesForward404 = ResourceNotFoundError;
6462
6646
  const MailboxesForward409 = ConflictError;
6463
6647
  const MailboxesForward422 = ValidationError;
6648
+ const MailboxesForward429 = RateLimitedError;
6464
6649
  const MailboxesForward500 = InternalError;
6465
6650
  const MailboxesForward502 = BillingProviderError;
6651
+ const MailboxesForward503 = SenderNotReadyError;
6466
6652
  const MailboxesForward504 = GatewayTimeoutError;
6467
6653
  const MailboxesGetMessageRawPathParams = Schema$1.Struct({
6468
6654
  id: MailboxId,
@@ -6502,12 +6688,14 @@ const MailboxesReplyRequestJson = Schema$1.Struct({
6502
6688
  const MailboxesReply200 = MailboxSendReceipt;
6503
6689
  const MailboxesReply401 = UnauthorizedError;
6504
6690
  const MailboxesReply402 = PaymentRequiredError;
6505
- const MailboxesReply403 = ForbiddenError;
6691
+ const MailboxesReply403 = Schema$1.Union([ForbiddenError, OnboardingReviewRequiredError]);
6506
6692
  const MailboxesReply404 = ResourceNotFoundError;
6507
6693
  const MailboxesReply409 = ConflictError;
6508
6694
  const MailboxesReply422 = ValidationError;
6695
+ const MailboxesReply429 = RateLimitedError;
6509
6696
  const MailboxesReply500 = InternalError;
6510
6697
  const MailboxesReply502 = BillingProviderError;
6698
+ const MailboxesReply503 = SenderNotReadyError;
6511
6699
  const MailboxesReply504 = GatewayTimeoutError;
6512
6700
  const MailboxesReplyAllPathParams = Schema$1.Struct({
6513
6701
  id: MailboxId,
@@ -6524,12 +6712,14 @@ const MailboxesReplyAllRequestJson = Schema$1.Struct({
6524
6712
  const MailboxesReplyAll200 = MailboxSendReceipt;
6525
6713
  const MailboxesReplyAll401 = UnauthorizedError;
6526
6714
  const MailboxesReplyAll402 = PaymentRequiredError;
6527
- const MailboxesReplyAll403 = ForbiddenError;
6715
+ const MailboxesReplyAll403 = Schema$1.Union([ForbiddenError, OnboardingReviewRequiredError]);
6528
6716
  const MailboxesReplyAll404 = ResourceNotFoundError;
6529
6717
  const MailboxesReplyAll409 = ConflictError;
6530
6718
  const MailboxesReplyAll422 = ValidationError;
6719
+ const MailboxesReplyAll429 = RateLimitedError;
6531
6720
  const MailboxesReplyAll500 = InternalError;
6532
6721
  const MailboxesReplyAll502 = BillingProviderError;
6722
+ const MailboxesReplyAll503 = SenderNotReadyError;
6533
6723
  const MailboxesReplyAll504 = GatewayTimeoutError;
6534
6724
  const MailboxesPausePathParams = Schema$1.Struct({ id: MailboxId });
6535
6725
  const MailboxesPause200 = Mailbox;
@@ -6880,7 +7070,7 @@ const MessagesSend422 = ValidationError;
6880
7070
  const MessagesSend429 = RateLimitedError;
6881
7071
  const MessagesSend500 = InternalError;
6882
7072
  const MessagesSend502 = Schema$1.Union([BillingProviderError, ExternalServiceError]);
6883
- const MessagesSend503 = DeliveryUnavailableError;
7073
+ const MessagesSend503 = Schema$1.Union([SenderNotReadyError, DeliveryUnavailableError]);
6884
7074
  const MessagesSend504 = GatewayTimeoutError;
6885
7075
  const MessagesGetPathParams = Schema$1.Struct({ id: MessageId });
6886
7076
  const MessagesGet200 = Message;
@@ -7182,6 +7372,7 @@ const ScheduledMessagesResume409 = ConflictError;
7182
7372
  const ScheduledMessagesResume422 = ValidationError;
7183
7373
  const ScheduledMessagesResume500 = InternalError;
7184
7374
  const ScheduledMessagesResume502 = ExternalServiceError;
7375
+ const ScheduledMessagesResume503 = SenderNotReadyError;
7185
7376
  const ScheduledMessagesResume504 = GatewayTimeoutError;
7186
7377
  const MessagesValidateEmailRequestJson = Schema$1.Struct({
7187
7378
  conversationId: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([ConversationId, Schema$1.Null]), Schema$1.Null])),
@@ -7199,6 +7390,7 @@ const MessagesValidateEmail403 = ForbiddenError;
7199
7390
  const MessagesValidateEmail404 = ResourceNotFoundError;
7200
7391
  const MessagesValidateEmail422 = ValidationError;
7201
7392
  const MessagesValidateEmail500 = InternalError;
7393
+ const MessagesValidateEmail503 = SenderNotReadyError;
7202
7394
  const MessagesValidateEmail504 = GatewayTimeoutError;
7203
7395
  const NamespacesListQuery = Schema$1.Struct({
7204
7396
  limit: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
@@ -9693,6 +9885,7 @@ var CampaignsGroup = class extends HttpApiGroup.make("Campaigns").add(HttpApiEnd
9693
9885
  CampaignsScheduleRun422.pipe(HttpApiSchema.status(422)),
9694
9886
  CampaignsScheduleRun500,
9695
9887
  CampaignsScheduleRun502.pipe(HttpApiSchema.status(502)),
9888
+ CampaignsScheduleRun503.pipe(HttpApiSchema.status(503)),
9696
9889
  CampaignsScheduleRun504.pipe(HttpApiSchema.status(504))
9697
9890
  ]
9698
9891
  }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "campaigns.scheduleRun").annotate(OpenApi.Summary, "Schedule a campaign run").annotate(OpenApi.Description, "Schedules an email campaign run at the absolute ISO-8601 instant in scheduledFor, or immediately when omitted. The optional idempotencyKey is scoped to the organization and replays return the original run. An email campaign must carry the brand footer: it is refused with CampaignFooterRequiredError when its footer is off and its template renders no BrandFooter, and with BrandAddressRequiredError when a brand that signs it off has no postal address."), HttpApiEndpoint.get("campaignsGetRun", "/v1/campaigns/:id/runs/:runId", {
@@ -10036,7 +10229,7 @@ var ContactsGroup = class extends HttpApiGroup.make("Contacts").add(HttpApiEndpo
10036
10229
  ContactsBulkImport502.pipe(HttpApiSchema.status(502)),
10037
10230
  ContactsBulkImport504.pipe(HttpApiSchema.status(504))
10038
10231
  ]
10039
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.bulkImport").annotate(OpenApi.Summary, "Bulk import contacts").annotate(OpenApi.Description, "Creates or updates contacts in bulk from a list, returning per-entry results with created, updated, skipped, and error counts."), HttpApiEndpoint.post("contactsBulkUpdateStatus", "/v1/contacts/bulk-update-status", {
10232
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.bulkImport").annotate(OpenApi.Summary, "Bulk import contacts").annotate(OpenApi.Description, "Creates contacts in bulk from a list of entries shaped like a create request, returning per-entry results with created, updated, skipped, and error counts. An entry whose identities match an existing contact is skipped, or updates it with `onConflict: \"update\"`."), HttpApiEndpoint.post("contactsBulkUpdateStatus", "/v1/contacts/bulk-update-status", {
10040
10233
  payload: ContactsBulkUpdateStatusRequestJson,
10041
10234
  success: ContactsBulkUpdateStatus200,
10042
10235
  error: [
@@ -10513,7 +10706,20 @@ var EmailGroup = class extends HttpApiGroup.make("Email").add(HttpApiEndpoint.ge
10513
10706
  EmailCompleteCustomTrackingDomainConnect500,
10514
10707
  EmailCompleteCustomTrackingDomainConnect504.pipe(HttpApiSchema.status(504))
10515
10708
  ]
10516
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.completeCustomTrackingDomainConnect").annotate(OpenApi.Summary, "Complete an automatic Custom Tracking Domain return").annotate(OpenApi.Description, "Validates the signed state returned by the DNS provider, then checks the tracking host again. Returning here never marks the host ready or changes which tracking host email uses."), HttpApiEndpoint.post("emailSetDefaultDomain", "/v1/email/domains/:id/default", {
10709
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.completeCustomTrackingDomainConnect").annotate(OpenApi.Summary, "Complete an automatic Custom Tracking Domain return").annotate(OpenApi.Description, "Validates the signed state returned by the DNS provider, then checks the tracking host again. Returning here never marks the host ready or changes which tracking host email uses."), HttpApiEndpoint.post("emailRecheckCustomTracking", "/v1/email/domains/:id/custom-tracking/recheck", {
10710
+ params: EmailRecheckCustomTrackingPathParams,
10711
+ success: EmailRecheckCustomTracking200,
10712
+ error: [
10713
+ EmailRecheckCustomTracking401.pipe(HttpApiSchema.status(401)),
10714
+ EmailRecheckCustomTracking403.pipe(HttpApiSchema.status(403)),
10715
+ EmailRecheckCustomTracking404.pipe(HttpApiSchema.status(404)),
10716
+ EmailRecheckCustomTracking409.pipe(HttpApiSchema.status(409)),
10717
+ EmailRecheckCustomTracking422.pipe(HttpApiSchema.status(422)),
10718
+ EmailRecheckCustomTracking500,
10719
+ EmailRecheckCustomTracking502.pipe(HttpApiSchema.status(502)),
10720
+ EmailRecheckCustomTracking504.pipe(HttpApiSchema.status(504))
10721
+ ]
10722
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.recheckCustomTracking").annotate(OpenApi.Summary, "Recheck a custom tracking domain's certificate").annotate(OpenApi.Description, "Checks the hostname's certificate now instead of waiting for the next scheduled check, and returns the refreshed state. Samva checks a hostname at most once every 30 seconds; a recheck inside that window returns the state from the last check. Returns a conflict when custom tracking is disabled or being torn down."), HttpApiEndpoint.post("emailSetDefaultDomain", "/v1/email/domains/:id/default", {
10517
10723
  params: EmailSetDefaultDomainPathParams,
10518
10724
  success: EmailSetDefaultDomain200,
10519
10725
  error: [
@@ -10585,7 +10791,7 @@ var EmailGroup = class extends HttpApiGroup.make("Email").add(HttpApiEndpoint.ge
10585
10791
  EmailBuildDomainConnectApplyUrl502.pipe(HttpApiSchema.status(502)),
10586
10792
  EmailBuildDomainConnectApplyUrl504.pipe(HttpApiSchema.status(504))
10587
10793
  ]
10588
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.buildDomainConnectApplyUrl").annotate(OpenApi.Summary, "Build a one-click DNS apply URL").annotate(OpenApi.Description, "Builds the signed Domain Connect apply URL for the selected sending-only or sending-and-receiving service. Manual DNS remains available for either mode."), HttpApiEndpoint.post("emailCompleteDomainConnect", "/v1/email/domains/:id/domain-connect/complete", {
10794
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.buildDomainConnectApplyUrl").annotate(OpenApi.Summary, "Build a one-click DNS apply URL").annotate(OpenApi.Description, "Builds the signed Domain Connect apply URL for the selected sending-only or sending-and-receiving service. The sending-and-receiving service writes the apex inbound MX, so it is refused until the domain's receiving is enabled. Manual DNS remains available for either mode."), HttpApiEndpoint.post("emailCompleteDomainConnect", "/v1/email/domains/:id/domain-connect/complete", {
10589
10795
  params: EmailCompleteDomainConnectPathParams,
10590
10796
  payload: EmailCompleteDomainConnectRequestJson,
10591
10797
  success: EmailCompleteDomainConnect200,
@@ -10611,7 +10817,7 @@ var EmailGroup = class extends HttpApiGroup.make("Email").add(HttpApiEndpoint.ge
10611
10817
  EmailEnableCatchAll502.pipe(HttpApiSchema.status(502)),
10612
10818
  EmailEnableCatchAll504.pipe(HttpApiSchema.status(504))
10613
10819
  ]
10614
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.enableCatchAll").annotate(OpenApi.Summary, "Enable catch-all receiving").annotate(OpenApi.Description, "Enables catch-all inbound receiving for a domain. `endpointId` is one of the organization's webhook endpoints; every address on the domain delivers `message.received` to it. Responds with 201."), HttpApiEndpoint.post("emailEnableReceiving", "/v1/email/domains/:id/enable-receiving", {
10820
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.enableCatchAll").annotate(OpenApi.Summary, "Enable catch-all receiving").annotate(OpenApi.Description, "Enables catch-all inbound receiving for a verified domain. `endpointId` is one of the organization's webhook endpoints; every address on the domain delivers `message.received` to it. Omit it to deliver through forwarding rules alone, which needs at least one active forwarding rule covering the domain. Mail that matches neither a rule nor an endpoint is rejected as an unknown recipient. Responds with 201."), HttpApiEndpoint.post("emailEnableReceiving", "/v1/email/domains/:id/enable-receiving", {
10615
10821
  params: EmailEnableReceivingPathParams,
10616
10822
  payload: EmailEnableReceivingRequestJson,
10617
10823
  success: EmailEnableReceiving200,
@@ -10623,7 +10829,18 @@ var EmailGroup = class extends HttpApiGroup.make("Email").add(HttpApiEndpoint.ge
10623
10829
  EmailEnableReceiving500,
10624
10830
  EmailEnableReceiving504.pipe(HttpApiSchema.status(504))
10625
10831
  ]
10626
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.enableReceiving").annotate(OpenApi.Summary, "Enable inbound email for a domain").annotate(OpenApi.Description, "Enables inbound receiving for a verified domain and returns the recipient addresses it accepts. Set `catchAll` to route every address on the domain; that requires a webhook endpoint, supplied as `endpointId` or already configured on the domain."), HttpApiEndpoint.post("emailDetectRegistrar", "/v1/email/domains/:id/registrar", {
10832
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.enableReceiving").annotate(OpenApi.Summary, "Enable inbound email for a domain").annotate(OpenApi.Description, "Enables inbound receiving for a verified domain and returns the recipient addresses it accepts. Set `catchAll` to route every address on the domain; that needs a destination: a webhook endpoint, supplied as `endpointId` or already configured on the domain, or at least one active forwarding rule that covers the domain. Mail that matches neither is rejected, never accepted and dropped."), HttpApiEndpoint.get("emailGetReceivingStatus", "/v1/email/domains/:id/receiving-status", {
10833
+ params: EmailGetReceivingStatusPathParams,
10834
+ success: EmailGetReceivingStatus200,
10835
+ error: [
10836
+ EmailGetReceivingStatus401.pipe(HttpApiSchema.status(401)),
10837
+ EmailGetReceivingStatus403.pipe(HttpApiSchema.status(403)),
10838
+ EmailGetReceivingStatus404.pipe(HttpApiSchema.status(404)),
10839
+ EmailGetReceivingStatus422.pipe(HttpApiSchema.status(422)),
10840
+ EmailGetReceivingStatus500,
10841
+ EmailGetReceivingStatus504.pipe(HttpApiSchema.status(504))
10842
+ ]
10843
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.getReceivingStatus").annotate(OpenApi.Summary, "Get receiving setup status").annotate(OpenApi.Description, "Reports each prerequisite for receiving a domain's mail at Samva, in order: sending verified, a destination (a webhook endpoint or an active forwarding rule), receiving enabled, and the inbound MX record. The MX answer is a live DNS lookup that names the current target when mail is routed elsewhere."), HttpApiEndpoint.post("emailDetectRegistrar", "/v1/email/domains/:id/registrar", {
10627
10844
  params: EmailDetectRegistrarPathParams,
10628
10845
  payload: EmailDetectRegistrarRequestJson,
10629
10846
  success: EmailDetectRegistrar200,
@@ -10771,7 +10988,7 @@ var EmailGroup = class extends HttpApiGroup.make("Email").add(HttpApiEndpoint.ge
10771
10988
  EmailListForwardingRules500,
10772
10989
  EmailListForwardingRules504.pipe(HttpApiSchema.status(504))
10773
10990
  ]
10774
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.listForwardingRules").annotate(OpenApi.Summary, "List forwarding rules").annotate(OpenApi.Description, "Returns every inbound email forwarding rule, highest priority first, optionally filtered by domain and active state. An organization holds at most 100, so the list is never paged."), HttpApiEndpoint.post("emailCreateForwardingRule", "/v1/email/forwarding", {
10991
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.listForwardingRules").annotate(OpenApi.Summary, "List forwarding rules").annotate(OpenApi.Description, "Returns every inbound email forwarding rule in the order inbound mail is matched against them: highest priority first, then an exact address before a wildcard pattern at equal priority, then oldest first. The first rule that matches is the one that forwards. Filtering by domain returns that domain's rules and the rules that apply to every domain (domainId null). An organization holds at most 100, so the list is never paged."), HttpApiEndpoint.post("emailCreateForwardingRule", "/v1/email/forwarding", {
10775
10992
  payload: EmailCreateForwardingRuleRequestJson,
10776
10993
  success: EmailCreateForwardingRule201.pipe(HttpApiSchema.status(201)),
10777
10994
  error: [
@@ -10783,7 +11000,7 @@ var EmailGroup = class extends HttpApiGroup.make("Email").add(HttpApiEndpoint.ge
10783
11000
  EmailCreateForwardingRule500,
10784
11001
  EmailCreateForwardingRule504.pipe(HttpApiSchema.status(504))
10785
11002
  ]
10786
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.createForwardingRule").annotate(OpenApi.Summary, "Create a forwarding rule").annotate(OpenApi.Description, "Creates an inbound email forwarding rule and returns it. Responds with 201. An organization holds at most 100 forwarding rules."), HttpApiEndpoint.delete("emailDeleteForwardingRule", "/v1/email/forwarding/:id", {
11003
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.createForwardingRule").annotate(OpenApi.Summary, "Create a forwarding rule").annotate(OpenApi.Description, "Creates an inbound email forwarding rule and returns it. Responds with 201. Priority is a non-negative integer, default 0; higher priority rules are tried first, and at equal priority an exact address outranks a wildcard pattern. An organization holds at most 100 forwarding rules."), HttpApiEndpoint.delete("emailDeleteForwardingRule", "/v1/email/forwarding/:id", {
10787
11004
  params: EmailDeleteForwardingRulePathParams,
10788
11005
  success: EmailDeleteForwardingRule200,
10789
11006
  error: [
@@ -11090,7 +11307,20 @@ var ExtensionInstallationsGroup = class extends HttpApiGroup.make("Extension ins
11090
11307
  ExtensionInstallationsGetRun500,
11091
11308
  ExtensionInstallationsGetRun504.pipe(HttpApiSchema.status(504))
11092
11309
  ]
11093
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "extensionInstallations.getRun").annotate(OpenApi.Summary, "Get a hosted run").annotate(OpenApi.Description, "Returns one retained run with the lines its handler logged: at most 50 lines of 500 characters.")).annotate(OpenApi.Description, "Extension versions installed into the organization, each acting as its own principal") {};
11310
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "extensionInstallations.getRun").annotate(OpenApi.Summary, "Get a hosted run").annotate(OpenApi.Description, "Returns one retained run with the lines its handler logged: at most 50 lines of 500 characters."), HttpApiEndpoint.post("extensionInstallationsUpgrade", "/v1/extension-installations/:id/upgrade", {
11311
+ params: ExtensionInstallationsUpgradePathParams,
11312
+ payload: ExtensionInstallationsUpgradeRequestJson,
11313
+ success: ExtensionInstallationsUpgrade200,
11314
+ error: [
11315
+ ExtensionInstallationsUpgrade401.pipe(HttpApiSchema.status(401)),
11316
+ ExtensionInstallationsUpgrade403.pipe(HttpApiSchema.status(403)),
11317
+ ExtensionInstallationsUpgrade404.pipe(HttpApiSchema.status(404)),
11318
+ ExtensionInstallationsUpgrade409.pipe(HttpApiSchema.status(409)),
11319
+ ExtensionInstallationsUpgrade422.pipe(HttpApiSchema.status(422)),
11320
+ ExtensionInstallationsUpgrade500,
11321
+ ExtensionInstallationsUpgrade504.pipe(HttpApiSchema.status(504))
11322
+ ]
11323
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "extensionInstallations.upgrade").annotate(OpenApi.Summary, "Upgrade or roll back an installation").annotate(OpenApi.Description, "Changes the pinned version in place. Omit version for the latest publication, or name a version string or id, including an older version to roll back. Preview with dryRun; changing requires acceptPermissions to list exactly the added permission: and event: grants. Only a person can upgrade. Credentials, owner, scope, send mode, and status stay attached to the installation.")).annotate(OpenApi.Description, "Extension versions installed into the organization, each acting as its own principal") {};
11094
11324
  var ExtensionsGroup = class extends HttpApiGroup.make("Extensions").add(HttpApiEndpoint.get("extensionsList", "/v1/extensions", {
11095
11325
  query: ExtensionsListQuery,
11096
11326
  success: ExtensionsList200,
@@ -11241,8 +11471,10 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11241
11471
  MailboxesApproveAction404.pipe(HttpApiSchema.status(404)),
11242
11472
  MailboxesApproveAction409.pipe(HttpApiSchema.status(409)),
11243
11473
  MailboxesApproveAction422.pipe(HttpApiSchema.status(422)),
11474
+ MailboxesApproveAction429.pipe(HttpApiSchema.status(429)),
11244
11475
  MailboxesApproveAction500,
11245
11476
  MailboxesApproveAction502.pipe(HttpApiSchema.status(502)),
11477
+ MailboxesApproveAction503.pipe(HttpApiSchema.status(503)),
11246
11478
  MailboxesApproveAction504.pipe(HttpApiSchema.status(504))
11247
11479
  ]
11248
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", {
@@ -11340,8 +11572,10 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11340
11572
  MailboxesSendDraft404.pipe(HttpApiSchema.status(404)),
11341
11573
  MailboxesSendDraft409.pipe(HttpApiSchema.status(409)),
11342
11574
  MailboxesSendDraft422.pipe(HttpApiSchema.status(422)),
11575
+ MailboxesSendDraft429.pipe(HttpApiSchema.status(429)),
11343
11576
  MailboxesSendDraft500,
11344
11577
  MailboxesSendDraft502.pipe(HttpApiSchema.status(502)),
11578
+ MailboxesSendDraft503.pipe(HttpApiSchema.status(503)),
11345
11579
  MailboxesSendDraft504.pipe(HttpApiSchema.status(504))
11346
11580
  ]
11347
11581
  }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.sendDraft").annotate(OpenApi.Summary, "Send a draft").annotate(OpenApi.Description, "Sends one of the caller's drafts: a reply draft in its thread, any other draft as a new conversation. A draft needs recipients, a subject, and a body."), HttpApiEndpoint.get("mailboxesListEvents", "/v1/mailboxes/:id/events", {
@@ -11476,8 +11710,10 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11476
11710
  MailboxesSendMessage404.pipe(HttpApiSchema.status(404)),
11477
11711
  MailboxesSendMessage409.pipe(HttpApiSchema.status(409)),
11478
11712
  MailboxesSendMessage422.pipe(HttpApiSchema.status(422)),
11713
+ MailboxesSendMessage429.pipe(HttpApiSchema.status(429)),
11479
11714
  MailboxesSendMessage500,
11480
11715
  MailboxesSendMessage502.pipe(HttpApiSchema.status(502)),
11716
+ MailboxesSendMessage503.pipe(HttpApiSchema.status(503)),
11481
11717
  MailboxesSendMessage504.pipe(HttpApiSchema.status(504))
11482
11718
  ]
11483
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", {
@@ -11527,8 +11763,10 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11527
11763
  MailboxesForward404.pipe(HttpApiSchema.status(404)),
11528
11764
  MailboxesForward409.pipe(HttpApiSchema.status(409)),
11529
11765
  MailboxesForward422.pipe(HttpApiSchema.status(422)),
11766
+ MailboxesForward429.pipe(HttpApiSchema.status(429)),
11530
11767
  MailboxesForward500,
11531
11768
  MailboxesForward502.pipe(HttpApiSchema.status(502)),
11769
+ MailboxesForward503.pipe(HttpApiSchema.status(503)),
11532
11770
  MailboxesForward504.pipe(HttpApiSchema.status(504))
11533
11771
  ]
11534
11772
  }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.forward").annotate(OpenApi.Summary, "Forward a message").annotate(OpenApi.Description, "Forwards the message to new recipients as a new conversation, with the original quoted below the caller's text and its attachments attached ahead of any the caller adds. The combined attachments must fit the email attachment limits."), HttpApiEndpoint.get("mailboxesGetMessageRaw", "/v1/mailboxes/:id/messages/:messageId/raw", {
@@ -11566,8 +11804,10 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11566
11804
  MailboxesReply404.pipe(HttpApiSchema.status(404)),
11567
11805
  MailboxesReply409.pipe(HttpApiSchema.status(409)),
11568
11806
  MailboxesReply422.pipe(HttpApiSchema.status(422)),
11807
+ MailboxesReply429.pipe(HttpApiSchema.status(429)),
11569
11808
  MailboxesReply500,
11570
11809
  MailboxesReply502.pipe(HttpApiSchema.status(502)),
11810
+ MailboxesReply503.pipe(HttpApiSchema.status(503)),
11571
11811
  MailboxesReply504.pipe(HttpApiSchema.status(504))
11572
11812
  ]
11573
11813
  }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.reply").annotate(OpenApi.Summary, "Reply to a message").annotate(OpenApi.Description, "Replies to the message's Reply-To address, or its sender, in the same thread. The server sets the recipients, subject, and threading headers."), HttpApiEndpoint.post("mailboxesReplyAll", "/v1/mailboxes/:id/messages/:messageId/reply-all", {
@@ -11582,8 +11822,10 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11582
11822
  MailboxesReplyAll404.pipe(HttpApiSchema.status(404)),
11583
11823
  MailboxesReplyAll409.pipe(HttpApiSchema.status(409)),
11584
11824
  MailboxesReplyAll422.pipe(HttpApiSchema.status(422)),
11825
+ MailboxesReplyAll429.pipe(HttpApiSchema.status(429)),
11585
11826
  MailboxesReplyAll500,
11586
11827
  MailboxesReplyAll502.pipe(HttpApiSchema.status(502)),
11828
+ MailboxesReplyAll503.pipe(HttpApiSchema.status(503)),
11587
11829
  MailboxesReplyAll504.pipe(HttpApiSchema.status(504))
11588
11830
  ]
11589
11831
  }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.replyAll").annotate(OpenApi.Summary, "Reply to all recipients of a message").annotate(OpenApi.Description, "Replies to the sender and every other recipient of the message except the mailbox itself, in the same thread."), HttpApiEndpoint.post("mailboxesPause", "/v1/mailboxes/:id/pause", {
@@ -11819,7 +12061,7 @@ var MediaGroup = class extends HttpApiGroup.make("Media").add(HttpApiEndpoint.po
11819
12061
  MediaCreate500,
11820
12062
  MediaCreate504.pipe(HttpApiSchema.status(504))
11821
12063
  ]
11822
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "media.create").annotate(OpenApi.Summary, "Create a media object").annotate(OpenApi.Description, "Creates the media object in the pending state and returns it with the upload instruction — URL, method, and headers — for putting its bytes into storage."), HttpApiEndpoint.get("mediaGetById", "/v1/media/:id", {
12064
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "media.create").annotate(OpenApi.Summary, "Create a media object").annotate(OpenApi.Description, "Creates the media object in the pending state and returns it with the upload instruction — URL, method, and headers — for putting its bytes into storage. Requires `messages:create`, or `email:send` for `attachment` media."), HttpApiEndpoint.get("mediaGetById", "/v1/media/:id", {
11823
12065
  params: MediaGetByIdPathParams,
11824
12066
  success: MediaGetById200,
11825
12067
  error: [
@@ -11852,7 +12094,7 @@ var MediaGroup = class extends HttpApiGroup.make("Media").add(HttpApiEndpoint.po
11852
12094
  MediaComplete500,
11853
12095
  MediaComplete504.pipe(HttpApiSchema.status(504))
11854
12096
  ]
11855
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "media.complete").annotate(OpenApi.Summary, "Complete a media upload").annotate(OpenApi.Description, "Verifies the uploaded object exists in storage, marks the media object ready, and returns it with a download URL."), HttpApiEndpoint.get("mediaDownloadUrl", "/v1/media/:id/url", {
12097
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "media.complete").annotate(OpenApi.Summary, "Complete a media upload").annotate(OpenApi.Description, "Verifies the uploaded object exists in storage, marks the media object ready, and returns it with a download URL. Requires the permission that creating the media object did."), HttpApiEndpoint.get("mediaDownloadUrl", "/v1/media/:id/url", {
11856
12098
  params: MediaDownloadUrlPathParams,
11857
12099
  success: MediaDownloadUrl200,
11858
12100
  error: [
@@ -11980,6 +12222,7 @@ var MessagesGroup = class extends HttpApiGroup.make("Messages").add(HttpApiEndpo
11980
12222
  MessagesValidateEmail404.pipe(HttpApiSchema.status(404)),
11981
12223
  MessagesValidateEmail422.pipe(HttpApiSchema.status(422)),
11982
12224
  MessagesValidateEmail500,
12225
+ MessagesValidateEmail503.pipe(HttpApiSchema.status(503)),
11983
12226
  MessagesValidateEmail504.pipe(HttpApiSchema.status(504))
11984
12227
  ]
11985
12228
  }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "messages.validateEmail").annotate(OpenApi.Summary, "Validate an email message").annotate(OpenApi.Description, "Resolves recipients, sender, and inline or published-template content without sending anything, creating contacts or messages, or counting toward your quota.")).annotate(OpenApi.Description, "Send messages and read their delivery state and timeline.") {};
@@ -12040,6 +12283,7 @@ var ScheduledMessagesGroup = class extends HttpApiGroup.make("Scheduled Messages
12040
12283
  ScheduledMessagesResume422.pipe(HttpApiSchema.status(422)),
12041
12284
  ScheduledMessagesResume500,
12042
12285
  ScheduledMessagesResume502.pipe(HttpApiSchema.status(502)),
12286
+ ScheduledMessagesResume503.pipe(HttpApiSchema.status(503)),
12043
12287
  ScheduledMessagesResume504.pipe(HttpApiSchema.status(504))
12044
12288
  ]
12045
12289
  }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "scheduledMessages.resume").annotate(OpenApi.Summary, "Resume a review-paused scheduled message").annotate(OpenApi.Description, "Explicitly resumes a scheduled message after onboarding review clearance. An overdue message requires either send_now or a new future scheduledFor value.")).annotate(OpenApi.Description, "One-off scheduled message timers") {};
@@ -12087,7 +12331,7 @@ var NamespacesGroup = class extends HttpApiGroup.make("Namespaces").add(HttpApiE
12087
12331
  NamespacesRemove500,
12088
12332
  NamespacesRemove504.pipe(HttpApiSchema.status(504))
12089
12333
  ]
12090
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "namespaces.remove").annotate(OpenApi.Summary, "Delete a namespace").annotate(OpenApi.Description, "Deletes an empty namespace. A namespace that still holds mailboxes or API keys conflicts: remove or move them first."), HttpApiEndpoint.patch("namespacesUpdate", "/v1/namespaces/:id", {
12334
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "namespaces.remove").annotate(OpenApi.Summary, "Delete a namespace").annotate(OpenApi.Description, "Deletes an empty namespace. A namespace that still holds mailboxes, API keys, or webhook endpoints conflicts: remove them first."), HttpApiEndpoint.patch("namespacesUpdate", "/v1/namespaces/:id", {
12091
12335
  params: NamespacesUpdatePathParams,
12092
12336
  payload: NamespacesUpdateRequestJson,
12093
12337
  success: NamespacesUpdate200,
@@ -12837,7 +13081,18 @@ const make = (config) => Effect.gen(function* () {
12837
13081
  const flat = flatten(raw);
12838
13082
  const headers = removesAttribution ? {} : { [CLIENT_ATTRIBUTION_HEADER]: clientAttribution("typescript-effect") };
12839
13083
  for (const [name, value] of Object.entries(config.headers ?? {})) if (value !== void 0) headers[name] = value;
13084
+ const storage = yield* HttpClient.HttpClient;
13085
+ const putUpload = (input) => storage.execute(HttpClientRequest.make(input.method)(input.url).pipe(HttpClientRequest.bodyUint8Array(input.bytes, uploadContentType(input.headers)), HttpClientRequest.setHeaders(input.headers))).pipe(Effect.mapError((cause) => new MediaUploadError({
13086
+ filename: input.filename,
13087
+ mediaId: input.mediaId,
13088
+ cause
13089
+ })), Effect.flatMap((response) => response.status >= 200 && response.status < 300 ? Effect.void : Effect.fail(new MediaUploadError({
13090
+ filename: input.filename,
13091
+ mediaId: input.mediaId,
13092
+ status: response.status
13093
+ }))));
12840
13094
  return Service.of({
13095
+ putUpload,
12841
13096
  raw,
12842
13097
  operation: (name) => flat[name],
12843
13098
  connection: {
@@ -12855,4 +13110,4 @@ const raw = Effect.map(Service, (client) => client.raw);
12855
13110
  //#endregion
12856
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 };
12857
13112
 
12858
- //# sourceMappingURL=client-8YXjfsVc.js.map
13113
+ //# sourceMappingURL=client-DYPNDvVU.js.map