samva 0.12.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 (57) hide show
  1. package/dist/{categories-DvsHUJtX.js → categories-Bcwq5jPV.js} +5 -1
  2. package/dist/client/sdk.gen.d.ts +26 -15
  3. package/dist/client/types.gen.d.ts +206 -63
  4. package/dist/{client-Cj1bqIEe.js → client-DYPNDvVU.js} +212 -63
  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 +1 -1
  20. package/dist/effect/email.js +2 -2
  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 +964 -309
  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 +1 -1
  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 +3 -2
  46. package/dist/inline-attachments-B56eS0MF.js +121 -0
  47. package/dist/inline-attachments.d.ts +65 -0
  48. package/dist/{mailboxes-BtcktcNB.js → mailboxes-D3Kx7elM.js} +3 -3
  49. package/dist/{operation-BEghYyLu.js → operation-B_Ty1LG-.js} +37 -3
  50. package/dist/promises/errors.gen.d.ts +14 -2
  51. package/dist/promises/index.d.ts +1 -0
  52. package/dist/promises/index.js +3 -2
  53. package/dist/promises/types.gen.d.ts +1 -1
  54. package/dist/{promises-BzrwhHEW.js → promises-D9FJyU0q.js} +132 -14
  55. package/dist/service-map.d.ts +5 -0
  56. package/package.json +2 -2
  57. package/dist/client-attribution-BTWYSXxo.js +0 -9
@@ -1,4 +1,4 @@
1
- import { n as clientAttribution, t as CLIENT_ATTRIBUTION_HEADER } from "./client-attribution-BTWYSXxo.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"
@@ -522,6 +527,36 @@ const ExtensionRun = Schema$1.Struct({
522
527
  error: Schema$1.Union([Schema$1.String, Schema$1.Null]),
523
528
  logs: Schema$1.Array(Schema$1.String)
524
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"));
525
560
  const ExtensionBundle = Schema$1.Struct({
526
561
  sha256: Schema$1.String,
527
562
  sizeBytes: Schema$1.Finite.check(Schema$1.isInt().annotate({ expected: "an integer" }))
@@ -572,6 +607,38 @@ const MailboxPolicyId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */
572
607
  expected: "a string matching the RegExp ^mbxpol_[0-9a-hjkmnp-tv-z]{16,24}$",
573
608
  identifier: "MailboxPolicyId"
574
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
+ })) {};
575
642
  const MailboxAgentActivity = Schema$1.Struct({
576
643
  actions: Schema$1.Struct({
577
644
  byType: Schema$1.Array(Schema$1.Struct({
@@ -645,10 +712,6 @@ const MailboxGrantId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */
645
712
  expected: "a string matching the RegExp ^mbxacl_[0-9a-hjkmnp-tv-z]{16,24}$",
646
713
  identifier: "MailboxGrantId"
647
714
  })).pipe(Schema$1.brand("MailboxGrantId"));
648
- const UserId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^user_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
649
- expected: "a string matching the RegExp ^user_[0-9a-hjkmnp-tv-z]{16,24}$",
650
- identifier: "UserId"
651
- })).pipe(Schema$1.brand("UserId"));
652
715
  const MailboxGrantRole = Schema$1.Union([
653
716
  Schema$1.Literal("admin"),
654
717
  Schema$1.Literal("collaborator"),
@@ -755,38 +818,6 @@ const EmailSender = Schema$1.Union([Schema$1.Struct({
755
818
  email: Schema$1.String.check(Schema$1.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
756
819
  name: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
757
820
  }), Schema$1.Null]).annotate({ identifier: "EmailSender" });
758
- var OnboardingReviewRequiredError = class extends Schema$1.TaggedError()("OnboardingReviewRequiredError", Schema$1.Struct({
759
- message: Schema$1.String,
760
- code: Schema$1.Union([
761
- Schema$1.Literal("review_required"),
762
- Schema$1.Literal("review_in_progress"),
763
- Schema$1.Literal("information_required"),
764
- Schema$1.Literal("review_rejected"),
765
- Schema$1.Literal("identity_review_required"),
766
- Schema$1.Literal("identity_review_rejected"),
767
- Schema$1.Literal("identity_changed")
768
- ]),
769
- decision: Schema$1.Union([
770
- Schema$1.Literal("undecided"),
771
- Schema$1.Literal("approved"),
772
- Schema$1.Literal("rejected")
773
- ]),
774
- stage: Schema$1.Union([
775
- Schema$1.Literal("collecting"),
776
- Schema$1.Literal("automated_review"),
777
- Schema$1.Literal("manual_review"),
778
- Schema$1.Literal("information_requested"),
779
- Schema$1.Literal("complete")
780
- ]),
781
- nextAction: Schema$1.Union([
782
- Schema$1.Literal("wait_for_review"),
783
- Schema$1.Literal("provide_information"),
784
- Schema$1.Literal("verify_sending_identity"),
785
- Schema$1.Literal("reapply"),
786
- Schema$1.Literal("contact_support")
787
- ]),
788
- identityId: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
789
- })) {};
790
821
  var DeliveryUnavailableError = class extends Schema$1.TaggedError()("DeliveryUnavailableError", Schema$1.Struct({
791
822
  message: Schema$1.String,
792
823
  retryAfterSeconds: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" }))
@@ -1253,7 +1284,7 @@ const BrandFooter = Schema$1.Struct({
1253
1284
  }).annotate({ identifier: "BrandFooter" });
1254
1285
  const EmailAttachment = Schema$1.Struct({
1255
1286
  filename: Schema$1.String,
1256
- 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])),
1257
1288
  mediaId: Schema$1.optionalKey(Schema$1.Union([MediaId, Schema$1.Null])),
1258
1289
  contentType: Schema$1.String,
1259
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" }))
@@ -2069,6 +2100,22 @@ const ExtensionVersionRef = Schema$1.Struct({
2069
2100
  id: ExtensionVersionId,
2070
2101
  version: Schema$1.String
2071
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" });
2072
2119
  const ExtensionRunList = Schema$1.Struct({ items: Schema$1.Array(ExtensionRunSummary) }).annotate({ identifier: "ExtensionRunList" });
2073
2120
  const ExtensionVersion = Schema$1.Struct({
2074
2121
  id: ExtensionVersionId,
@@ -3332,6 +3379,17 @@ const ExtensionInstallation = Schema$1.Struct({
3332
3379
  updatedAt: Schema$1.String,
3333
3380
  disabledAt: Schema$1.Union([Schema$1.String, Schema$1.Null])
3334
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" });
3335
3393
  const Extension = Schema$1.Struct({
3336
3394
  id: ExtensionId,
3337
3395
  name: Schema$1.String,
@@ -3597,6 +3655,14 @@ const InstallExtensionResponse = Schema$1.Struct({
3597
3655
  webhookSecret: SensitiveString
3598
3656
  }), Schema$1.Null])
3599
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" });
3600
3666
  const ExtensionPage = Schema$1.Struct({
3601
3667
  items: Schema$1.Array(Extension),
3602
3668
  nextCursor: Schema$1.Union([Schema$1.String, Schema$1.Null])
@@ -4188,6 +4254,7 @@ const CampaignsScheduleRun422 = Schema$1.Union([
4188
4254
  ]);
4189
4255
  const CampaignsScheduleRun500 = InternalError;
4190
4256
  const CampaignsScheduleRun502 = ExternalServiceError;
4257
+ const CampaignsScheduleRun503 = SenderNotReadyError;
4191
4258
  const CampaignsScheduleRun504 = GatewayTimeoutError;
4192
4259
  const CampaignsGetRunPathParams = Schema$1.Struct({
4193
4260
  id: CampaignId,
@@ -4484,8 +4551,6 @@ const ContactGroupsRemoveMembers422 = ValidationError;
4484
4551
  const ContactGroupsRemoveMembers500 = InternalError;
4485
4552
  const ContactGroupsRemoveMembers504 = GatewayTimeoutError;
4486
4553
  const ContactGroupsPreviewRequestJson = Schema$1.Struct({ criteria: Schema$1.Struct({
4487
- contactTypes: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
4488
- capabilities: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
4489
4554
  tags: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
4490
4555
  channels: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
4491
4556
  match: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([Schema$1.Literal("all"), Schema$1.Literal("any")]), Schema$1.Null])),
@@ -4500,7 +4565,6 @@ const ContactGroupsPreview200 = Schema$1.Struct({
4500
4565
  sample: Schema$1.Array(Schema$1.Struct({
4501
4566
  id: ContactId,
4502
4567
  name: Schema$1.String,
4503
- type: Schema$1.String,
4504
4568
  status: Schema$1.String
4505
4569
  }))
4506
4570
  });
@@ -4695,16 +4759,23 @@ const ContactsBulkDelete504 = GatewayTimeoutError;
4695
4759
  const ContactsBulkImportRequestJson = Schema$1.Struct({
4696
4760
  contacts: Schema$1.Array(Schema$1.Struct({
4697
4761
  name: Schema$1.String,
4698
- email: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
4699
- 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])),
4700
4767
  tags: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
4701
- firstName: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
4702
- lastName: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
4703
- company: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
4704
- jobTitle: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
4705
- 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]))
4706
4777
  })),
4707
- 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]))
4708
4779
  });
4709
4780
  const ContactsBulkImport200 = Schema$1.Struct({
4710
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" })),
@@ -6014,6 +6085,31 @@ const ExtensionInstallationsGetRun404 = ResourceNotFoundError;
6014
6085
  const ExtensionInstallationsGetRun422 = ValidationError;
6015
6086
  const ExtensionInstallationsGetRun500 = InternalError;
6016
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;
6017
6113
  const ExtensionsListQuery = Schema$1.Struct({
6018
6114
  limit: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
6019
6115
  cursor: Schema$1.optionalKey(Schema$1.Union([Cursor, Schema$1.Null])),
@@ -6204,12 +6300,14 @@ const MailboxesApproveActionPathParams = Schema$1.Struct({
6204
6300
  const MailboxesApproveAction200 = MailboxAction;
6205
6301
  const MailboxesApproveAction401 = UnauthorizedError;
6206
6302
  const MailboxesApproveAction402 = PaymentRequiredError;
6207
- const MailboxesApproveAction403 = ForbiddenError;
6303
+ const MailboxesApproveAction403 = Schema$1.Union([ForbiddenError, OnboardingReviewRequiredError]);
6208
6304
  const MailboxesApproveAction404 = ResourceNotFoundError;
6209
6305
  const MailboxesApproveAction409 = ConflictError;
6210
6306
  const MailboxesApproveAction422 = ValidationError;
6307
+ const MailboxesApproveAction429 = RateLimitedError;
6211
6308
  const MailboxesApproveAction500 = InternalError;
6212
6309
  const MailboxesApproveAction502 = BillingProviderError;
6310
+ const MailboxesApproveAction503 = SenderNotReadyError;
6213
6311
  const MailboxesApproveAction504 = GatewayTimeoutError;
6214
6312
  const MailboxesDenyActionPathParams = Schema$1.Struct({
6215
6313
  id: MailboxId,
@@ -6320,12 +6418,14 @@ const MailboxesSendDraftHeaders = Schema$1.Struct({ "idempotency-key": Schema$1.
6320
6418
  const MailboxesSendDraft200 = MailboxSendReceipt;
6321
6419
  const MailboxesSendDraft401 = UnauthorizedError;
6322
6420
  const MailboxesSendDraft402 = PaymentRequiredError;
6323
- const MailboxesSendDraft403 = ForbiddenError;
6421
+ const MailboxesSendDraft403 = Schema$1.Union([ForbiddenError, OnboardingReviewRequiredError]);
6324
6422
  const MailboxesSendDraft404 = ResourceNotFoundError;
6325
6423
  const MailboxesSendDraft409 = ConflictError;
6326
6424
  const MailboxesSendDraft422 = ValidationError;
6425
+ const MailboxesSendDraft429 = RateLimitedError;
6327
6426
  const MailboxesSendDraft500 = InternalError;
6328
6427
  const MailboxesSendDraft502 = BillingProviderError;
6428
+ const MailboxesSendDraft503 = SenderNotReadyError;
6329
6429
  const MailboxesSendDraft504 = GatewayTimeoutError;
6330
6430
  const MailboxesListEventsPathParams = Schema$1.Struct({ id: MailboxId });
6331
6431
  const MailboxesListEventsQuery = Schema$1.Struct({
@@ -6480,12 +6580,14 @@ const MailboxesSendMessageRequestJson = Schema$1.Struct({
6480
6580
  const MailboxesSendMessage200 = MailboxSendReceipt;
6481
6581
  const MailboxesSendMessage401 = UnauthorizedError;
6482
6582
  const MailboxesSendMessage402 = PaymentRequiredError;
6483
- const MailboxesSendMessage403 = ForbiddenError;
6583
+ const MailboxesSendMessage403 = Schema$1.Union([ForbiddenError, OnboardingReviewRequiredError]);
6484
6584
  const MailboxesSendMessage404 = ResourceNotFoundError;
6485
6585
  const MailboxesSendMessage409 = ConflictError;
6486
6586
  const MailboxesSendMessage422 = ValidationError;
6587
+ const MailboxesSendMessage429 = RateLimitedError;
6487
6588
  const MailboxesSendMessage500 = InternalError;
6488
6589
  const MailboxesSendMessage502 = BillingProviderError;
6590
+ const MailboxesSendMessage503 = SenderNotReadyError;
6489
6591
  const MailboxesSendMessage504 = GatewayTimeoutError;
6490
6592
  const MailboxesGetMessagePathParams = Schema$1.Struct({
6491
6593
  id: MailboxId,
@@ -6539,12 +6641,14 @@ const MailboxesForwardRequestJson = Schema$1.Struct({
6539
6641
  const MailboxesForward200 = MailboxSendReceipt;
6540
6642
  const MailboxesForward401 = UnauthorizedError;
6541
6643
  const MailboxesForward402 = PaymentRequiredError;
6542
- const MailboxesForward403 = ForbiddenError;
6644
+ const MailboxesForward403 = Schema$1.Union([ForbiddenError, OnboardingReviewRequiredError]);
6543
6645
  const MailboxesForward404 = ResourceNotFoundError;
6544
6646
  const MailboxesForward409 = ConflictError;
6545
6647
  const MailboxesForward422 = ValidationError;
6648
+ const MailboxesForward429 = RateLimitedError;
6546
6649
  const MailboxesForward500 = InternalError;
6547
6650
  const MailboxesForward502 = BillingProviderError;
6651
+ const MailboxesForward503 = SenderNotReadyError;
6548
6652
  const MailboxesForward504 = GatewayTimeoutError;
6549
6653
  const MailboxesGetMessageRawPathParams = Schema$1.Struct({
6550
6654
  id: MailboxId,
@@ -6584,12 +6688,14 @@ const MailboxesReplyRequestJson = Schema$1.Struct({
6584
6688
  const MailboxesReply200 = MailboxSendReceipt;
6585
6689
  const MailboxesReply401 = UnauthorizedError;
6586
6690
  const MailboxesReply402 = PaymentRequiredError;
6587
- const MailboxesReply403 = ForbiddenError;
6691
+ const MailboxesReply403 = Schema$1.Union([ForbiddenError, OnboardingReviewRequiredError]);
6588
6692
  const MailboxesReply404 = ResourceNotFoundError;
6589
6693
  const MailboxesReply409 = ConflictError;
6590
6694
  const MailboxesReply422 = ValidationError;
6695
+ const MailboxesReply429 = RateLimitedError;
6591
6696
  const MailboxesReply500 = InternalError;
6592
6697
  const MailboxesReply502 = BillingProviderError;
6698
+ const MailboxesReply503 = SenderNotReadyError;
6593
6699
  const MailboxesReply504 = GatewayTimeoutError;
6594
6700
  const MailboxesReplyAllPathParams = Schema$1.Struct({
6595
6701
  id: MailboxId,
@@ -6606,12 +6712,14 @@ const MailboxesReplyAllRequestJson = Schema$1.Struct({
6606
6712
  const MailboxesReplyAll200 = MailboxSendReceipt;
6607
6713
  const MailboxesReplyAll401 = UnauthorizedError;
6608
6714
  const MailboxesReplyAll402 = PaymentRequiredError;
6609
- const MailboxesReplyAll403 = ForbiddenError;
6715
+ const MailboxesReplyAll403 = Schema$1.Union([ForbiddenError, OnboardingReviewRequiredError]);
6610
6716
  const MailboxesReplyAll404 = ResourceNotFoundError;
6611
6717
  const MailboxesReplyAll409 = ConflictError;
6612
6718
  const MailboxesReplyAll422 = ValidationError;
6719
+ const MailboxesReplyAll429 = RateLimitedError;
6613
6720
  const MailboxesReplyAll500 = InternalError;
6614
6721
  const MailboxesReplyAll502 = BillingProviderError;
6722
+ const MailboxesReplyAll503 = SenderNotReadyError;
6615
6723
  const MailboxesReplyAll504 = GatewayTimeoutError;
6616
6724
  const MailboxesPausePathParams = Schema$1.Struct({ id: MailboxId });
6617
6725
  const MailboxesPause200 = Mailbox;
@@ -6962,7 +7070,7 @@ const MessagesSend422 = ValidationError;
6962
7070
  const MessagesSend429 = RateLimitedError;
6963
7071
  const MessagesSend500 = InternalError;
6964
7072
  const MessagesSend502 = Schema$1.Union([BillingProviderError, ExternalServiceError]);
6965
- const MessagesSend503 = DeliveryUnavailableError;
7073
+ const MessagesSend503 = Schema$1.Union([SenderNotReadyError, DeliveryUnavailableError]);
6966
7074
  const MessagesSend504 = GatewayTimeoutError;
6967
7075
  const MessagesGetPathParams = Schema$1.Struct({ id: MessageId });
6968
7076
  const MessagesGet200 = Message;
@@ -7264,6 +7372,7 @@ const ScheduledMessagesResume409 = ConflictError;
7264
7372
  const ScheduledMessagesResume422 = ValidationError;
7265
7373
  const ScheduledMessagesResume500 = InternalError;
7266
7374
  const ScheduledMessagesResume502 = ExternalServiceError;
7375
+ const ScheduledMessagesResume503 = SenderNotReadyError;
7267
7376
  const ScheduledMessagesResume504 = GatewayTimeoutError;
7268
7377
  const MessagesValidateEmailRequestJson = Schema$1.Struct({
7269
7378
  conversationId: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([ConversationId, Schema$1.Null]), Schema$1.Null])),
@@ -7281,6 +7390,7 @@ const MessagesValidateEmail403 = ForbiddenError;
7281
7390
  const MessagesValidateEmail404 = ResourceNotFoundError;
7282
7391
  const MessagesValidateEmail422 = ValidationError;
7283
7392
  const MessagesValidateEmail500 = InternalError;
7393
+ const MessagesValidateEmail503 = SenderNotReadyError;
7284
7394
  const MessagesValidateEmail504 = GatewayTimeoutError;
7285
7395
  const NamespacesListQuery = Schema$1.Struct({
7286
7396
  limit: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
@@ -9775,6 +9885,7 @@ var CampaignsGroup = class extends HttpApiGroup.make("Campaigns").add(HttpApiEnd
9775
9885
  CampaignsScheduleRun422.pipe(HttpApiSchema.status(422)),
9776
9886
  CampaignsScheduleRun500,
9777
9887
  CampaignsScheduleRun502.pipe(HttpApiSchema.status(502)),
9888
+ CampaignsScheduleRun503.pipe(HttpApiSchema.status(503)),
9778
9889
  CampaignsScheduleRun504.pipe(HttpApiSchema.status(504))
9779
9890
  ]
9780
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", {
@@ -10118,7 +10229,7 @@ var ContactsGroup = class extends HttpApiGroup.make("Contacts").add(HttpApiEndpo
10118
10229
  ContactsBulkImport502.pipe(HttpApiSchema.status(502)),
10119
10230
  ContactsBulkImport504.pipe(HttpApiSchema.status(504))
10120
10231
  ]
10121
- }).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", {
10122
10233
  payload: ContactsBulkUpdateStatusRequestJson,
10123
10234
  success: ContactsBulkUpdateStatus200,
10124
10235
  error: [
@@ -11196,7 +11307,20 @@ var ExtensionInstallationsGroup = class extends HttpApiGroup.make("Extension ins
11196
11307
  ExtensionInstallationsGetRun500,
11197
11308
  ExtensionInstallationsGetRun504.pipe(HttpApiSchema.status(504))
11198
11309
  ]
11199
- }).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") {};
11200
11324
  var ExtensionsGroup = class extends HttpApiGroup.make("Extensions").add(HttpApiEndpoint.get("extensionsList", "/v1/extensions", {
11201
11325
  query: ExtensionsListQuery,
11202
11326
  success: ExtensionsList200,
@@ -11347,8 +11471,10 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11347
11471
  MailboxesApproveAction404.pipe(HttpApiSchema.status(404)),
11348
11472
  MailboxesApproveAction409.pipe(HttpApiSchema.status(409)),
11349
11473
  MailboxesApproveAction422.pipe(HttpApiSchema.status(422)),
11474
+ MailboxesApproveAction429.pipe(HttpApiSchema.status(429)),
11350
11475
  MailboxesApproveAction500,
11351
11476
  MailboxesApproveAction502.pipe(HttpApiSchema.status(502)),
11477
+ MailboxesApproveAction503.pipe(HttpApiSchema.status(503)),
11352
11478
  MailboxesApproveAction504.pipe(HttpApiSchema.status(504))
11353
11479
  ]
11354
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", {
@@ -11446,8 +11572,10 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11446
11572
  MailboxesSendDraft404.pipe(HttpApiSchema.status(404)),
11447
11573
  MailboxesSendDraft409.pipe(HttpApiSchema.status(409)),
11448
11574
  MailboxesSendDraft422.pipe(HttpApiSchema.status(422)),
11575
+ MailboxesSendDraft429.pipe(HttpApiSchema.status(429)),
11449
11576
  MailboxesSendDraft500,
11450
11577
  MailboxesSendDraft502.pipe(HttpApiSchema.status(502)),
11578
+ MailboxesSendDraft503.pipe(HttpApiSchema.status(503)),
11451
11579
  MailboxesSendDraft504.pipe(HttpApiSchema.status(504))
11452
11580
  ]
11453
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", {
@@ -11582,8 +11710,10 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11582
11710
  MailboxesSendMessage404.pipe(HttpApiSchema.status(404)),
11583
11711
  MailboxesSendMessage409.pipe(HttpApiSchema.status(409)),
11584
11712
  MailboxesSendMessage422.pipe(HttpApiSchema.status(422)),
11713
+ MailboxesSendMessage429.pipe(HttpApiSchema.status(429)),
11585
11714
  MailboxesSendMessage500,
11586
11715
  MailboxesSendMessage502.pipe(HttpApiSchema.status(502)),
11716
+ MailboxesSendMessage503.pipe(HttpApiSchema.status(503)),
11587
11717
  MailboxesSendMessage504.pipe(HttpApiSchema.status(504))
11588
11718
  ]
11589
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", {
@@ -11633,8 +11763,10 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11633
11763
  MailboxesForward404.pipe(HttpApiSchema.status(404)),
11634
11764
  MailboxesForward409.pipe(HttpApiSchema.status(409)),
11635
11765
  MailboxesForward422.pipe(HttpApiSchema.status(422)),
11766
+ MailboxesForward429.pipe(HttpApiSchema.status(429)),
11636
11767
  MailboxesForward500,
11637
11768
  MailboxesForward502.pipe(HttpApiSchema.status(502)),
11769
+ MailboxesForward503.pipe(HttpApiSchema.status(503)),
11638
11770
  MailboxesForward504.pipe(HttpApiSchema.status(504))
11639
11771
  ]
11640
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", {
@@ -11672,8 +11804,10 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11672
11804
  MailboxesReply404.pipe(HttpApiSchema.status(404)),
11673
11805
  MailboxesReply409.pipe(HttpApiSchema.status(409)),
11674
11806
  MailboxesReply422.pipe(HttpApiSchema.status(422)),
11807
+ MailboxesReply429.pipe(HttpApiSchema.status(429)),
11675
11808
  MailboxesReply500,
11676
11809
  MailboxesReply502.pipe(HttpApiSchema.status(502)),
11810
+ MailboxesReply503.pipe(HttpApiSchema.status(503)),
11677
11811
  MailboxesReply504.pipe(HttpApiSchema.status(504))
11678
11812
  ]
11679
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", {
@@ -11688,8 +11822,10 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11688
11822
  MailboxesReplyAll404.pipe(HttpApiSchema.status(404)),
11689
11823
  MailboxesReplyAll409.pipe(HttpApiSchema.status(409)),
11690
11824
  MailboxesReplyAll422.pipe(HttpApiSchema.status(422)),
11825
+ MailboxesReplyAll429.pipe(HttpApiSchema.status(429)),
11691
11826
  MailboxesReplyAll500,
11692
11827
  MailboxesReplyAll502.pipe(HttpApiSchema.status(502)),
11828
+ MailboxesReplyAll503.pipe(HttpApiSchema.status(503)),
11693
11829
  MailboxesReplyAll504.pipe(HttpApiSchema.status(504))
11694
11830
  ]
11695
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", {
@@ -11925,7 +12061,7 @@ var MediaGroup = class extends HttpApiGroup.make("Media").add(HttpApiEndpoint.po
11925
12061
  MediaCreate500,
11926
12062
  MediaCreate504.pipe(HttpApiSchema.status(504))
11927
12063
  ]
11928
- }).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", {
11929
12065
  params: MediaGetByIdPathParams,
11930
12066
  success: MediaGetById200,
11931
12067
  error: [
@@ -11958,7 +12094,7 @@ var MediaGroup = class extends HttpApiGroup.make("Media").add(HttpApiEndpoint.po
11958
12094
  MediaComplete500,
11959
12095
  MediaComplete504.pipe(HttpApiSchema.status(504))
11960
12096
  ]
11961
- }).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", {
11962
12098
  params: MediaDownloadUrlPathParams,
11963
12099
  success: MediaDownloadUrl200,
11964
12100
  error: [
@@ -12086,6 +12222,7 @@ var MessagesGroup = class extends HttpApiGroup.make("Messages").add(HttpApiEndpo
12086
12222
  MessagesValidateEmail404.pipe(HttpApiSchema.status(404)),
12087
12223
  MessagesValidateEmail422.pipe(HttpApiSchema.status(422)),
12088
12224
  MessagesValidateEmail500,
12225
+ MessagesValidateEmail503.pipe(HttpApiSchema.status(503)),
12089
12226
  MessagesValidateEmail504.pipe(HttpApiSchema.status(504))
12090
12227
  ]
12091
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.") {};
@@ -12146,6 +12283,7 @@ var ScheduledMessagesGroup = class extends HttpApiGroup.make("Scheduled Messages
12146
12283
  ScheduledMessagesResume422.pipe(HttpApiSchema.status(422)),
12147
12284
  ScheduledMessagesResume500,
12148
12285
  ScheduledMessagesResume502.pipe(HttpApiSchema.status(502)),
12286
+ ScheduledMessagesResume503.pipe(HttpApiSchema.status(503)),
12149
12287
  ScheduledMessagesResume504.pipe(HttpApiSchema.status(504))
12150
12288
  ]
12151
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") {};
@@ -12193,7 +12331,7 @@ var NamespacesGroup = class extends HttpApiGroup.make("Namespaces").add(HttpApiE
12193
12331
  NamespacesRemove500,
12194
12332
  NamespacesRemove504.pipe(HttpApiSchema.status(504))
12195
12333
  ]
12196
- }).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", {
12197
12335
  params: NamespacesUpdatePathParams,
12198
12336
  payload: NamespacesUpdateRequestJson,
12199
12337
  success: NamespacesUpdate200,
@@ -12943,7 +13081,18 @@ const make = (config) => Effect.gen(function* () {
12943
13081
  const flat = flatten(raw);
12944
13082
  const headers = removesAttribution ? {} : { [CLIENT_ATTRIBUTION_HEADER]: clientAttribution("typescript-effect") };
12945
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
+ }))));
12946
13094
  return Service.of({
13095
+ putUpload,
12947
13096
  raw,
12948
13097
  operation: (name) => flat[name],
12949
13098
  connection: {
@@ -12961,4 +13110,4 @@ const raw = Effect.map(Service, (client) => client.raw);
12961
13110
  //#endregion
12962
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 };
12963
13112
 
12964
- //# sourceMappingURL=client-Cj1bqIEe.js.map
13113
+ //# sourceMappingURL=client-DYPNDvVU.js.map
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { n as make } from "../operation-BEghYyLu.js";
2
+ import { n as make } from "../operation-B_Ty1LG-.js";
3
3
  //#region src/effect/analytics.ts
4
4
  var analytics_exports = /* @__PURE__ */ __exportAll({
5
5
  exportData: () => exportData,
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { n as make } from "../operation-BEghYyLu.js";
2
+ import { n as make } from "../operation-B_Ty1LG-.js";
3
3
  //#region src/effect/api-keys.ts
4
4
  var api_keys_exports = /* @__PURE__ */ __exportAll({
5
5
  create: () => create,
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { n as make } from "../operation-BEghYyLu.js";
2
+ import { n as make } from "../operation-B_Ty1LG-.js";
3
3
  //#region src/effect/attachments.ts
4
4
  var attachments_exports = /* @__PURE__ */ __exportAll({
5
5
  downloadUrl: () => downloadUrl,
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { n as make } from "../operation-BEghYyLu.js";
3
- import { k as UpdateBrand, u as CreateBrand } from "../client-Cj1bqIEe.js";
2
+ import { n as make } from "../operation-B_Ty1LG-.js";
3
+ import { k as UpdateBrand, u as CreateBrand } from "../client-DYPNDvVU.js";
4
4
  //#region src/effect/brands.ts
5
5
  var brands_exports = /* @__PURE__ */ __exportAll({
6
6
  CreatePayload: () => CreateBrand,