samva 0.14.0 → 0.16.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 (52) hide show
  1. package/README.md +6 -0
  2. package/dist/{categories-BGUBFdH9.js → categories-DV51kr2H.js} +5 -1
  3. package/dist/client/sdk.gen.d.ts +74 -45
  4. package/dist/client/types.gen.d.ts +356 -212
  5. package/dist/{client-CZjhOKPM.js → client-BMUew5Wp.js} +307 -198
  6. package/dist/effect/analytics.js +1 -1
  7. package/dist/effect/api-keys.d.ts +1 -0
  8. package/dist/effect/api-keys.js +5 -2
  9. package/dist/effect/attachments.js +1 -1
  10. package/dist/effect/brands.js +2 -2
  11. package/dist/effect/campaigns.js +1 -1
  12. package/dist/effect/categories.js +1 -1
  13. package/dist/effect/client.js +1 -1
  14. package/dist/effect/contact-groups.js +1 -1
  15. package/dist/effect/contacts.js +1 -1
  16. package/dist/effect/conversations.js +1 -1
  17. package/dist/effect/custom-fields.js +1 -1
  18. package/dist/effect/email.d.ts +0 -18
  19. package/dist/effect/email.js +3 -7
  20. package/dist/effect/extension-installations.js +1 -1
  21. package/dist/effect/extensions.js +1 -1
  22. package/dist/effect/feedback.js +2 -2
  23. package/dist/effect/generated-metadata.d.ts +4 -0
  24. package/dist/effect/generated.d.ts +1477 -1250
  25. package/dist/effect/index.d.ts +2 -1
  26. package/dist/effect/index.js +6 -5
  27. package/dist/effect/mailboxes.d.ts +191 -92
  28. package/dist/effect/mailboxes.js +2 -2
  29. package/dist/effect/media.js +1 -1
  30. package/dist/effect/messages.js +1 -1
  31. package/dist/effect/namespaces.js +1 -1
  32. package/dist/effect/operations.js +1 -1
  33. package/dist/effect/organizations.js +1 -1
  34. package/dist/effect/retry.js +1 -1
  35. package/dist/effect/scheduled-messages.js +1 -1
  36. package/dist/effect/subscriptions.js +1 -1
  37. package/dist/effect/templates.js +2 -2
  38. package/dist/effect/unsubscribe-groups.js +1 -1
  39. package/dist/effect/webhooks.js +2 -2
  40. package/dist/effect/whoami.d.ts +46 -0
  41. package/dist/effect/whoami.js +9 -0
  42. package/dist/index.js +3 -3
  43. package/dist/{inline-attachments-BrNnSMF2.js → inline-attachments-Cegg6tTF.js} +2 -2
  44. package/dist/{mailboxes-DT02zP7q.js → mailboxes-Thp5z0oX.js} +10 -4
  45. package/dist/{operation-g8nAzmIM.js → operation-BTXjPrwf.js} +18 -12
  46. package/dist/promises/errors.gen.d.ts +12 -2
  47. package/dist/promises/index.d.ts +3 -1
  48. package/dist/promises/index.js +3 -3
  49. package/dist/promises/types.gen.d.ts +1 -1
  50. package/dist/{promises-BFRKhpSS.js → promises-KrA2nSLg.js} +224 -84
  51. package/dist/service-map.d.ts +21 -10
  52. package/package.json +6 -2
@@ -1,4 +1,4 @@
1
- import { i as uploadContentType, o as CLIENT_ATTRIBUTION_HEADER, s as clientAttribution, t as MediaUploadError } from "./inline-attachments-BrNnSMF2.js";
1
+ import { i as uploadContentType, o as CLIENT_ATTRIBUTION_HEADER, s as clientAttribution, t as MediaUploadError } from "./inline-attachments-Cegg6tTF.js";
2
2
  import { Context, Effect, Layer, Redacted, Schema, SchemaTransformation } from "effect";
3
3
  import { HttpApi, HttpApiClient, HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema, HttpApiSecurity, OpenApi } from "effect/http-api";
4
4
  import * as Schema$1 from "effect/Schema";
@@ -308,10 +308,6 @@ const WebhookEndpointId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__
308
308
  expected: "a string matching the RegExp ^wep_[0-9a-hjkmnp-tv-z]{16,24}$",
309
309
  identifier: "WebhookEndpointId"
310
310
  })).pipe(Schema$1.brand("WebhookEndpointId"));
311
- const EmailSenderId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^sender_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
312
- expected: "a string matching the RegExp ^sender_[0-9a-hjkmnp-tv-z]{16,24}$",
313
- identifier: "EmailSenderId"
314
- })).pipe(Schema$1.brand("EmailSenderId"));
315
311
  const DeliverabilityFacts = Schema$1.Struct({
316
312
  bounceRate: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })).check(Schema$1.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema$1.isLessThanOrEqualTo(1).annotate({ expected: "a value less than or equal to 1" })),
317
313
  complaintRate: Schema$1.Finite.check(Schema$1.isFinite().annotate({ expected: "a finite number" })).check(Schema$1.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema$1.isLessThanOrEqualTo(1).annotate({ expected: "a value less than or equal to 1" })),
@@ -464,6 +460,10 @@ const IdentityClearanceStatus = Schema$1.Struct({
464
460
  ]), Schema$1.Null]),
465
461
  updatedAt: Schema$1.String
466
462
  }).annotate({ identifier: "IdentityClearanceStatus" });
463
+ const EmailSenderId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^sender_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
464
+ expected: "a string matching the RegExp ^sender_[0-9a-hjkmnp-tv-z]{16,24}$",
465
+ identifier: "EmailSenderId"
466
+ })).pipe(Schema$1.brand("EmailSenderId"));
467
467
  const SuppressionId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^supp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
468
468
  expected: "a string matching the RegExp ^supp_[0-9a-hjkmnp-tv-z]{16,24}$",
469
469
  identifier: "SuppressionId"
@@ -584,23 +584,22 @@ const FeedbackId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new
584
584
  identifier: "FeedbackId"
585
585
  })).pipe(Schema$1.brand("FeedbackId"));
586
586
  const MailboxStatus = Schema$1.Union([Schema$1.Literal("active"), Schema$1.Literal("paused")]).annotate({ identifier: "MailboxStatus" });
587
- const CreateMailboxAddressPayload = Schema$1.Struct({
588
- address: Schema$1.String,
589
- displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
590
- domainId: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
591
- }).annotate({ identifier: "CreateMailboxAddressPayload" });
587
+ const MailboxChannel = Schema$1.Literal("email").annotate({
588
+ description: "The channel an endpoint, thread, or message belongs to.",
589
+ identifier: "MailboxChannel"
590
+ });
592
591
  const MailboxMetadata = Schema$1.Record(Schema$1.String, Schema$1.String.check(Schema$1.isMaxCodePoints(512).annotate({ expected: "a string with at most 512 code points" })).check(Schema$1.isMaxLength(512).annotate({ expected: "a value with a length of at most 512" }))).check(Schema$1.isPropertyNames(Schema$1.String.check(Schema$1.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema$1.isMaxCodePoints(64).annotate({ expected: "a string with at most 64 code points" }))).annotate({
593
592
  expected: "an object with property names matching the schema",
594
593
  identifier: "MailboxMetadata"
595
594
  }));
596
- const MailboxAddressId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^mbxaddr_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
597
- expected: "a string matching the RegExp ^mbxaddr_[0-9a-hjkmnp-tv-z]{16,24}$",
598
- identifier: "MailboxAddressId"
599
- })).pipe(Schema$1.brand("MailboxAddressId"));
600
- const MailboxDefaultFrom = Schema$1.Struct({
601
- address: Schema$1.String,
602
- displayName: Schema$1.Union([Schema$1.String, Schema$1.Null])
603
- }).annotate({ identifier: "MailboxDefaultFrom" });
595
+ const MailboxEndpointId = Schema$1.String.check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^mbxep_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
596
+ expected: "a string matching the RegExp ^mbxep_[0-9a-hjkmnp-tv-z]{16,24}$",
597
+ identifier: "MailboxEndpointId"
598
+ })).pipe(Schema$1.brand("MailboxEndpointId"));
599
+ var MailboxChannelUnsupportedError = class extends Schema$1.TaggedError()("MailboxChannelUnsupportedError", Schema$1.Struct({
600
+ message: Schema$1.String,
601
+ channel: Schema$1.String
602
+ })) {};
604
603
  const MailboxMetadataPatch = Schema$1.Record(Schema$1.String, Schema$1.Union([Schema$1.String.check(Schema$1.isMaxCodePoints(512).annotate({ expected: "a string with at most 512 code points" })).check(Schema$1.isMaxLength(512).annotate({ expected: "a value with a length of at most 512" })), Schema$1.Null])).check(Schema$1.isPropertyNames(Schema$1.String.check(Schema$1.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema$1.isMaxCodePoints(64).annotate({ expected: "a string with at most 64 code points" }))).annotate({
605
604
  expected: "an object with property names matching the schema",
606
605
  identifier: "MailboxMetadataPatch"
@@ -759,10 +758,11 @@ const MailboxAgentActivity = Schema$1.Struct({
759
758
  events: Schema$1.Struct({ byType: Schema$1.Array(Schema$1.Struct({
760
759
  type: Schema$1.Union([
761
760
  Schema$1.Literal("mailbox.created"),
762
- Schema$1.Literal("address.attached"),
763
- Schema$1.Literal("email.received"),
764
- Schema$1.Literal("email.released"),
765
- Schema$1.Literal("email.sent"),
761
+ Schema$1.Literal("endpoint.attached"),
762
+ Schema$1.Literal("endpoint.detached"),
763
+ Schema$1.Literal("message.received"),
764
+ Schema$1.Literal("message.released"),
765
+ Schema$1.Literal("message.sent"),
766
766
  Schema$1.Literal("thread.created"),
767
767
  Schema$1.Literal("action.proposed"),
768
768
  Schema$1.Literal("action.policy_decided"),
@@ -1072,6 +1072,11 @@ const WebhookDailyDeliveries = Schema$1.Struct({
1072
1072
  exhausted: 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" })),
1073
1073
  cancelled: 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" }))
1074
1074
  }).annotate({ identifier: "WebhookDailyDeliveries" });
1075
+ const WhoamiUser = Schema$1.Struct({
1076
+ id: Schema$1.String,
1077
+ name: Schema$1.String,
1078
+ email: Schema$1.String
1079
+ }).annotate({ identifier: "WhoamiUser" });
1075
1080
  Schema$1.Struct({
1076
1081
  entryPath: Schema$1.String.check(Schema$1.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$", "u")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$" })).check(Schema$1.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })),
1077
1082
  name: Schema$1.String.check(Schema$1.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema$1.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema$1.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })),
@@ -1182,6 +1187,10 @@ Schema$1.Struct({
1182
1187
  targetDailyRecipients: Schema$1.Finite.check(Schema$1.isInt().annotate({ expected: "an integer" })).check(Schema$1.isLessThanOrEqualTo(1e6).annotate({ expected: "a value less than or equal to 1000000" })).check(Schema$1.isGreaterThan(0).annotate({ expected: "a value greater than 0" })),
1183
1188
  note: Schema$1.optionalKey(Schema$1.Union([Schema$1.String.check(Schema$1.isMaxCodePoints(500).annotate({ expected: "a string with at most 500 code points" })).check(Schema$1.isMaxLength(500).annotate({ expected: "a value with a length of at most 500" })), Schema$1.Null]))
1184
1189
  }).annotate({ identifier: "UpdateDomainWarmingPolicyPayload" });
1190
+ Schema$1.Struct({
1191
+ displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([Schema$1.String, Schema$1.Null]), Schema$1.Null])),
1192
+ default: Schema$1.optionalKey(Schema$1.Union([Schema$1.Literal(true), Schema$1.Null]))
1193
+ }).annotate({ identifier: "UpdateMailboxEndpointPayload" });
1185
1194
  Schema$1.Struct({
1186
1195
  displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
1187
1196
  color: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([Schema$1.Union([
@@ -1375,6 +1384,11 @@ const AttachmentList = Schema$1.Struct({ items: Schema$1.Array(Schema$1.Struct({
1375
1384
  isInline: Schema$1.Boolean,
1376
1385
  createdAt: Schema$1.String
1377
1386
  })) }).annotate({ identifier: "AttachmentList" });
1387
+ const WhoamiOrganization = Schema$1.Struct({
1388
+ id: OrganizationId,
1389
+ slug: Schema$1.String,
1390
+ name: Schema$1.String
1391
+ }).annotate({ identifier: "WhoamiOrganization" });
1378
1392
  const BrandFooter = Schema$1.Struct({
1379
1393
  companyName: Schema$1.optionalKey(Schema$1.Union([Schema$1.String.check(Schema$1.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema$1.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })), Schema$1.Null])),
1380
1394
  address: Schema$1.optionalKey(Schema$1.Union([BrandAddress, Schema$1.Null])),
@@ -1939,7 +1953,6 @@ const EmailDomainPage = Schema$1.Struct({
1939
1953
  dkimSelector: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
1940
1954
  dkimPublicKey: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
1941
1955
  isDefault: Schema$1.Boolean,
1942
- defaultSenderId: Schema$1.Union([EmailSenderId, Schema$1.Null]),
1943
1956
  deliverability: DeliverabilityFacts,
1944
1957
  series: SendsSeries,
1945
1958
  createdAt: Schema$1.String,
@@ -1981,42 +1994,10 @@ const EmailDomainDetailed = Schema$1.Struct({
1981
1994
  })),
1982
1995
  verifiedAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
1983
1996
  isDefault: Schema$1.Boolean,
1984
- defaultSenderId: Schema$1.Union([EmailSenderId, Schema$1.Null]),
1985
1997
  deliverability: DeliverabilityFacts,
1986
1998
  createdAt: Schema$1.String,
1987
1999
  updatedAt: Schema$1.String
1988
2000
  }).annotate({ identifier: "EmailDomainDetailed" });
1989
- const EmailSenderPage = Schema$1.Struct({
1990
- items: Schema$1.Array(Schema$1.Struct({
1991
- id: EmailSenderId,
1992
- organizationId: Schema$1.String,
1993
- email: Schema$1.String,
1994
- name: Schema$1.Union([Schema$1.String, Schema$1.Null]),
1995
- domainId: Schema$1.Union([EmailDomainId, Schema$1.Null]),
1996
- verificationStatus: Schema$1.Union([
1997
- Schema$1.Literal("pending"),
1998
- Schema$1.Literal("verified"),
1999
- Schema$1.Literal("failed")
2000
- ]),
2001
- verifiedAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
2002
- verificationToken: Schema$1.Union([Schema$1.String, Schema$1.Null]),
2003
- providerLifecycle: Schema$1.Union([
2004
- Schema$1.Literal("provisioning"),
2005
- Schema$1.Literal("active"),
2006
- Schema$1.Literal("deleting"),
2007
- Schema$1.Literal("failed")
2008
- ]),
2009
- providerFailureCode: Schema$1.Union([Schema$1.String, Schema$1.Null]),
2010
- isDefault: Schema$1.Boolean,
2011
- replyToEmails: Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null]),
2012
- deliverability: DeliverabilityFacts,
2013
- series: SendsSeries,
2014
- isActive: Schema$1.Boolean,
2015
- createdAt: Schema$1.String,
2016
- updatedAt: Schema$1.String
2017
- })),
2018
- nextCursor: Schema$1.Union([Schema$1.String, Schema$1.Null])
2019
- }).annotate({ identifier: "EmailSenderPage" });
2020
2001
  const CustomTrackingStatus = Schema$1.Struct({
2021
2002
  enabled: Schema$1.Boolean,
2022
2003
  customTracking: Schema$1.Union([Schema$1.Struct({
@@ -2197,6 +2178,37 @@ const OnboardingReviewStatus = Schema$1.Struct({
2197
2178
  identities: Schema$1.Array(IdentityClearanceStatus),
2198
2179
  updatedAt: Schema$1.Union([Schema$1.String, Schema$1.Null])
2199
2180
  }).annotate({ identifier: "OnboardingReviewStatus" });
2181
+ const EmailSenderPage = Schema$1.Struct({
2182
+ items: Schema$1.Array(Schema$1.Struct({
2183
+ id: EmailSenderId,
2184
+ organizationId: Schema$1.String,
2185
+ email: Schema$1.String,
2186
+ name: Schema$1.Union([Schema$1.String, Schema$1.Null]),
2187
+ domainId: Schema$1.Union([EmailDomainId, Schema$1.Null]),
2188
+ verificationStatus: Schema$1.Union([
2189
+ Schema$1.Literal("pending"),
2190
+ Schema$1.Literal("verified"),
2191
+ Schema$1.Literal("failed")
2192
+ ]),
2193
+ verifiedAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
2194
+ verificationToken: Schema$1.Union([Schema$1.String, Schema$1.Null]),
2195
+ providerLifecycle: Schema$1.Union([
2196
+ Schema$1.Literal("provisioning"),
2197
+ Schema$1.Literal("active"),
2198
+ Schema$1.Literal("deleting"),
2199
+ Schema$1.Literal("failed")
2200
+ ]),
2201
+ providerFailureCode: Schema$1.Union([Schema$1.String, Schema$1.Null]),
2202
+ isDefault: Schema$1.Boolean,
2203
+ replyToEmails: Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null]),
2204
+ deliverability: DeliverabilityFacts,
2205
+ series: SendsSeries,
2206
+ isActive: Schema$1.Boolean,
2207
+ createdAt: Schema$1.String,
2208
+ updatedAt: Schema$1.String
2209
+ })),
2210
+ nextCursor: Schema$1.Union([Schema$1.String, Schema$1.Null])
2211
+ }).annotate({ identifier: "EmailSenderPage" });
2200
2212
  const SuppressionEntry = Schema$1.Struct({
2201
2213
  id: SuppressionId,
2202
2214
  email: Schema$1.String,
@@ -2295,36 +2307,28 @@ const MailboxSummary = Schema$1.Struct({
2295
2307
  id: MailboxId,
2296
2308
  namespaceId: Schema$1.Union([NamespaceId, Schema$1.Null]),
2297
2309
  slug: Schema$1.String,
2298
- displayName: Schema$1.String,
2310
+ name: Schema$1.String,
2299
2311
  status: MailboxStatus,
2300
2312
  primaryAddress: Schema$1.Union([Schema$1.String, Schema$1.Null]),
2301
2313
  createdAt: Schema$1.String
2302
2314
  }).annotate({ identifier: "MailboxSummary" });
2303
- Schema$1.Struct({
2304
- namespaceId: Schema$1.optionalKey(Schema$1.Union([NamespaceId, Schema$1.Null])),
2305
- displayName: Schema$1.String,
2306
- slug: Schema$1.String,
2307
- addresses: Schema$1.TupleWithRest(Schema$1.Tuple([CreateMailboxAddressPayload]), [CreateMailboxAddressPayload]),
2308
- defaultFrom: Schema$1.optionalKey(Schema$1.Union([Schema$1.Struct({
2309
- address: Schema$1.String,
2310
- displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
2311
- }), Schema$1.Null])),
2312
- metadata: Schema$1.optionalKey(Schema$1.Union([MailboxMetadata, Schema$1.Null]))
2313
- }).annotate({ identifier: "CreateMailboxPayload" });
2314
- const MailboxAddress = Schema$1.Struct({
2315
- id: MailboxAddressId,
2315
+ const CreateMailboxEndpointPayload = Schema$1.Struct({
2316
+ channel: MailboxChannel,
2317
+ address: Schema$1.String,
2318
+ displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
2319
+ }).annotate({ identifier: "CreateMailboxEndpointPayload" });
2320
+ const MailboxEndpoint = Schema$1.Struct({
2321
+ id: MailboxEndpointId,
2316
2322
  address: Schema$1.String,
2323
+ displayName: Schema$1.Union([Schema$1.String, Schema$1.Null]),
2324
+ default: Schema$1.Boolean,
2325
+ channel: Schema$1.Literal("email"),
2317
2326
  source: Schema$1.Union([Schema$1.Literal("samvaHosted"), Schema$1.Literal("verifiedDomain")]),
2318
- domainId: Schema$1.Union([Schema$1.String, Schema$1.Null]),
2319
- displayName: Schema$1.Union([Schema$1.String, Schema$1.Null])
2320
- }).annotate({ identifier: "MailboxAddress" });
2327
+ domainId: Schema$1.Union([Schema$1.String, Schema$1.Null])
2328
+ }).annotate({ identifier: "MailboxEndpoint" });
2321
2329
  Schema$1.Struct({
2322
- displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.String.check(Schema$1.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema$1.Null])),
2323
- metadata: Schema$1.optionalKey(Schema$1.Union([MailboxMetadataPatch, Schema$1.Null])),
2324
- defaultFrom: Schema$1.optionalKey(Schema$1.Union([Schema$1.Struct({
2325
- address: Schema$1.String,
2326
- displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([Schema$1.String, Schema$1.Null]), Schema$1.Null]))
2327
- }), Schema$1.Null]))
2330
+ name: Schema$1.optionalKey(Schema$1.Union([Schema$1.String.check(Schema$1.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema$1.Null])),
2331
+ metadata: Schema$1.optionalKey(Schema$1.Union([MailboxMetadataPatch, Schema$1.Null]))
2328
2332
  }).annotate({ identifier: "UpdateMailboxPayload" });
2329
2333
  const MailboxQuarantinedMessage = Schema$1.Struct({
2330
2334
  id: MessageId,
@@ -2372,6 +2376,7 @@ const MailboxSendOutcome = Schema$1.Struct({
2372
2376
  }).annotate({ identifier: "MailboxSendOutcome" });
2373
2377
  const MailboxDraftSummary = Schema$1.Struct({
2374
2378
  id: MailboxDraftId,
2379
+ channel: MailboxChannel,
2375
2380
  threadId: Schema$1.Union([MailboxThreadId, Schema$1.Null]),
2376
2381
  inReplyToMessageId: Schema$1.Union([MessageId, Schema$1.Null]),
2377
2382
  state: MailboxDraftState,
@@ -2385,10 +2390,11 @@ const MailboxEvent = Schema$1.Struct({
2385
2390
  id: MailboxEventId,
2386
2391
  type: Schema$1.Union([
2387
2392
  Schema$1.Literal("mailbox.created"),
2388
- Schema$1.Literal("address.attached"),
2389
- Schema$1.Literal("email.received"),
2390
- Schema$1.Literal("email.released"),
2391
- Schema$1.Literal("email.sent"),
2393
+ Schema$1.Literal("endpoint.attached"),
2394
+ Schema$1.Literal("endpoint.detached"),
2395
+ Schema$1.Literal("message.received"),
2396
+ Schema$1.Literal("message.released"),
2397
+ Schema$1.Literal("message.sent"),
2392
2398
  Schema$1.Literal("thread.created"),
2393
2399
  Schema$1.Literal("action.proposed"),
2394
2400
  Schema$1.Literal("action.policy_decided"),
@@ -2478,6 +2484,7 @@ const MailboxLabel = Schema$1.Struct({
2478
2484
  Schema$1.Struct({ labels: Schema$1.TupleWithRest(Schema$1.Tuple([MailboxLabelId]), [MailboxLabelId]) }).annotate({ identifier: "MailboxThreadLabels" });
2479
2485
  const MailboxMessageSummary = Schema$1.Struct({
2480
2486
  id: MessageId,
2487
+ channel: MailboxChannel,
2481
2488
  direction: Schema$1.Union([Schema$1.Literal("inbound"), Schema$1.Literal("outbound")]),
2482
2489
  from: MailboxMessageSender,
2483
2490
  to: Schema$1.Array(Schema$1.String),
@@ -2492,6 +2499,20 @@ const MailboxMessage = Schema$1.Struct({
2492
2499
  conversationId: ConversationId,
2493
2500
  direction: Schema$1.Union([Schema$1.Literal("inbound"), Schema$1.Literal("outbound")]),
2494
2501
  from: MailboxMessageSender,
2502
+ sentBy: Schema$1.optionalKey(Schema$1.Union([Schema$1.Struct({
2503
+ kind: Schema$1.Union([
2504
+ Schema$1.Literal("user"),
2505
+ Schema$1.Literal("apiKey"),
2506
+ Schema$1.Literal("extension"),
2507
+ Schema$1.Literal("externalAgent"),
2508
+ Schema$1.Literal("samvaAgent"),
2509
+ Schema$1.Literal("system")
2510
+ ]),
2511
+ id: Schema$1.String,
2512
+ displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
2513
+ }), Schema$1.Null])),
2514
+ occurredAt: Schema$1.String,
2515
+ channel: Schema$1.Literal("email"),
2495
2516
  recipients: Schema$1.Array(MailboxMessageRecipient),
2496
2517
  replyTo: Schema$1.Array(Schema$1.String),
2497
2518
  subject: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
@@ -2510,20 +2531,7 @@ const MailboxMessage = Schema$1.Struct({
2510
2531
  contentType: Schema$1.String,
2511
2532
  size: 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" })),
2512
2533
  isInline: Schema$1.Boolean
2513
- })),
2514
- sentBy: Schema$1.optionalKey(Schema$1.Union([Schema$1.Struct({
2515
- kind: Schema$1.Union([
2516
- Schema$1.Literal("user"),
2517
- Schema$1.Literal("apiKey"),
2518
- Schema$1.Literal("extension"),
2519
- Schema$1.Literal("externalAgent"),
2520
- Schema$1.Literal("samvaAgent"),
2521
- Schema$1.Literal("system")
2522
- ]),
2523
- id: Schema$1.String,
2524
- displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
2525
- }), Schema$1.Null])),
2526
- occurredAt: Schema$1.String
2534
+ }))
2527
2535
  }).annotate({ identifier: "MailboxMessage" });
2528
2536
  const MailboxPolicy = Schema$1.Struct({
2529
2537
  id: MailboxPolicyId,
@@ -2548,6 +2556,8 @@ Schema$1.Struct({
2548
2556
  }).annotate({ identifier: "UpdateMailboxPolicyPayload" });
2549
2557
  const MailboxThreadSummary = Schema$1.Struct({
2550
2558
  id: MailboxThreadId,
2559
+ channel: MailboxChannel,
2560
+ endpointId: Schema$1.Union([MailboxEndpointId, Schema$1.Null]),
2551
2561
  subject: Schema$1.Union([Schema$1.String, Schema$1.Null]),
2552
2562
  preview: Schema$1.Union([Schema$1.String, Schema$1.Null]),
2553
2563
  from: Schema$1.Union([MailboxThreadSender, Schema$1.Null]),
@@ -2580,6 +2590,8 @@ Schema$1.Struct({
2580
2590
  }).annotate({ identifier: "UpdateMailboxThreadPayload" });
2581
2591
  const MailboxThread = Schema$1.Struct({
2582
2592
  id: MailboxThreadId,
2593
+ channel: MailboxChannel,
2594
+ endpointId: Schema$1.Union([MailboxEndpointId, Schema$1.Null]),
2583
2595
  subject: Schema$1.Union([Schema$1.String, Schema$1.Null]),
2584
2596
  preview: Schema$1.Union([Schema$1.String, Schema$1.Null]),
2585
2597
  from: Schema$1.Union([MailboxThreadSender, Schema$1.Null]),
@@ -2943,6 +2955,15 @@ const WebhookStatsResponse = Schema$1.Struct({
2943
2955
  cancelled: 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" })),
2944
2956
  daily: Schema$1.Array(WebhookDailyDeliveries)
2945
2957
  }).annotate({ identifier: "WebhookStatsResponse" });
2958
+ const WhoamiUserCredential = Schema$1.Struct({
2959
+ type: Schema$1.Literal("user"),
2960
+ user: WhoamiUser,
2961
+ role: Schema$1.Union([
2962
+ Schema$1.Literal("member"),
2963
+ Schema$1.Literal("admin"),
2964
+ Schema$1.Literal("owner")
2965
+ ])
2966
+ }).annotate({ identifier: "WhoamiUserCredential" });
2946
2967
  const ApiKeyAccess = Schema$1.Union([Schema$1.Struct({ mode: Schema$1.Literal("full") }), Schema$1.Struct({
2947
2968
  mode: Schema$1.Literal("restricted"),
2948
2969
  resources: ApiKeyResourceAccess,
@@ -2999,6 +3020,7 @@ const UpdateBrand = Schema$1.Struct({
2999
3020
  }).annotate({ identifier: "UpdateBrand" });
3000
3021
  const EmailAttachments = Schema$1.Union([Schema$1.Array(EmailAttachment).check(Schema$1.isMaxLength(10).annotate({ expected: "a value with a length of at most 10" })), Schema$1.Null]).annotate({ identifier: "EmailAttachments" });
3001
3022
  const MailboxSendSnapshot = Schema$1.Struct({
3023
+ channel: Schema$1.Literal("email"),
3002
3024
  draftRevision: Schema$1.Finite.check(Schema$1.isInt().annotate({ expected: "an integer" })).check(Schema$1.isGreaterThan(0).annotate({ expected: "a value greater than 0" })),
3003
3025
  from: Schema$1.String,
3004
3026
  fromName: Schema$1.Union([Schema$1.String, Schema$1.Null]),
@@ -3016,6 +3038,7 @@ const MailboxSendSnapshot = Schema$1.Struct({
3016
3038
  }).annotate({ identifier: "MailboxSendSnapshot" });
3017
3039
  const MailboxDraft = Schema$1.Struct({
3018
3040
  id: MailboxDraftId,
3041
+ channel: Schema$1.Literal("email"),
3019
3042
  threadId: Schema$1.Union([MailboxThreadId, Schema$1.Null]),
3020
3043
  inReplyToMessageId: Schema$1.Union([MessageId, Schema$1.Null]),
3021
3044
  state: MailboxDraftState,
@@ -3024,6 +3047,7 @@ const MailboxDraft = Schema$1.Struct({
3024
3047
  subject: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3025
3048
  createdAt: Schema$1.String,
3026
3049
  updatedAt: Schema$1.String,
3050
+ endpointId: Schema$1.Union([MailboxEndpointId, Schema$1.Null]),
3027
3051
  cc: Schema$1.Array(Schema$1.String),
3028
3052
  bcc: Schema$1.Array(Schema$1.String),
3029
3053
  replyTo: Schema$1.Array(Schema$1.String),
@@ -3032,6 +3056,8 @@ const MailboxDraft = Schema$1.Struct({
3032
3056
  attachments: Schema$1.Array(EmailAttachment).check(Schema$1.isMaxLength(10).annotate({ expected: "a value with a length of at most 10" }))
3033
3057
  }).annotate({ identifier: "MailboxDraft" });
3034
3058
  Schema$1.Struct({
3059
+ channel: Schema$1.optionalKey(Schema$1.Union([Schema$1.Literal("email"), Schema$1.Null])),
3060
+ endpointId: Schema$1.optionalKey(Schema$1.Union([MailboxEndpointId, Schema$1.Null])),
3035
3061
  to: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
3036
3062
  cc: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
3037
3063
  bcc: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
@@ -3051,6 +3077,7 @@ Schema$1.Struct({
3051
3077
  attachments: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(EmailAttachment).check(Schema$1.isMaxLength(10).annotate({ expected: "a value with a length of at most 10" })), Schema$1.Null]))
3052
3078
  }).annotate({ identifier: "ForwardMailboxMessagePayload" });
3053
3079
  Schema$1.Struct({
3080
+ channel: Schema$1.optionalKey(Schema$1.Union([Schema$1.Literal("email"), Schema$1.Null])),
3054
3081
  cc: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
3055
3082
  bcc: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
3056
3083
  text: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
@@ -3058,6 +3085,7 @@ Schema$1.Struct({
3058
3085
  attachments: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(EmailAttachment).check(Schema$1.isMaxLength(10).annotate({ expected: "a value with a length of at most 10" })), Schema$1.Null]))
3059
3086
  }).annotate({ identifier: "ReplyMailboxMessagePayload" });
3060
3087
  Schema$1.Struct({
3088
+ channel: Schema$1.optionalKey(Schema$1.Union([Schema$1.Literal("email"), Schema$1.Null])),
3061
3089
  to: Schema$1.TupleWithRest(Schema$1.Tuple([Schema$1.String]), [Schema$1.String]),
3062
3090
  cc: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
3063
3091
  bcc: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
@@ -3542,18 +3570,24 @@ const MailboxPage = Schema$1.Struct({
3542
3570
  items: Schema$1.Array(MailboxSummary),
3543
3571
  nextCursor: Schema$1.Union([Schema$1.String, Schema$1.Null])
3544
3572
  }).annotate({ identifier: "MailboxPage" });
3573
+ Schema$1.Struct({
3574
+ namespaceId: Schema$1.optionalKey(Schema$1.Union([NamespaceId, Schema$1.Null])),
3575
+ endpoint: CreateMailboxEndpointPayload,
3576
+ name: Schema$1.String,
3577
+ slug: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
3578
+ metadata: Schema$1.optionalKey(Schema$1.Union([MailboxMetadata, Schema$1.Null]))
3579
+ }).annotate({ identifier: "CreateMailboxPayload" });
3545
3580
  const Mailbox = Schema$1.Struct({
3546
3581
  id: MailboxId,
3547
3582
  namespaceId: Schema$1.Union([NamespaceId, Schema$1.Null]),
3548
3583
  slug: Schema$1.String,
3549
- displayName: Schema$1.String,
3584
+ name: Schema$1.String,
3550
3585
  status: MailboxStatus,
3551
3586
  primaryAddress: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3552
3587
  createdAt: Schema$1.String,
3553
3588
  description: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3554
3589
  metadata: MailboxMetadata,
3555
- addresses: Schema$1.Array(MailboxAddress),
3556
- defaultFrom: Schema$1.Union([MailboxDefaultFrom, Schema$1.Null]),
3590
+ endpoints: Schema$1.Array(MailboxEndpoint),
3557
3591
  updatedAt: Schema$1.String
3558
3592
  }).annotate({ identifier: "Mailbox" });
3559
3593
  const MailboxQuarantinePage = Schema$1.Struct({
@@ -3759,6 +3793,13 @@ const ApiKeyWithSecret = Schema$1.Struct({
3759
3793
  access: ApiKeyAccess,
3760
3794
  owner: Schema$1.Union([ApiKeyOwner, Schema$1.Null])
3761
3795
  }).annotate({ identifier: "ApiKeyWithSecret" });
3796
+ const WhoamiApiKeyCredential = Schema$1.Struct({
3797
+ type: Schema$1.Literal("apiKey"),
3798
+ id: Schema$1.String,
3799
+ name: Schema$1.String,
3800
+ start: Schema$1.Union([Schema$1.String, Schema$1.Null]),
3801
+ access: ApiKeyAccess
3802
+ }).annotate({ identifier: "WhoamiApiKeyCredential" });
3762
3803
  const Message = Schema$1.Struct({
3763
3804
  id: MessageId,
3764
3805
  channel: Schema$1.Literal("email"),
@@ -3932,13 +3973,27 @@ const ApiKeyPage = Schema$1.Struct({
3932
3973
  items: Schema$1.Array(ApiKey),
3933
3974
  nextCursor: Schema$1.Union([Schema$1.String, Schema$1.Null])
3934
3975
  }).annotate({ identifier: "ApiKeyPage" });
3935
- const EmailCampaignContent = Schema$1.Struct({
3976
+ const Whoami = Schema$1.Struct({
3977
+ organization: WhoamiOrganization,
3978
+ credential: Schema$1.Union([WhoamiApiKeyCredential, WhoamiUserCredential])
3979
+ }).annotate({ identifier: "Whoami" });
3980
+ const CampaignContent = Schema$1.Struct({
3936
3981
  channel: Schema$1.Literal("email"),
3937
3982
  email: EmailContent,
3938
3983
  conversationId: Schema$1.optionalKey(CampaignConversationRef),
3939
3984
  metadata: Schema$1.optionalKey(CampaignContentMetadata)
3940
- }).annotate({ identifier: "EmailCampaignContent" });
3941
- const EmailSendMessagePayload = Schema$1.Struct({
3985
+ }).annotate({ identifier: "CampaignContent" });
3986
+ const SendMessagePayload = Schema$1.Struct({
3987
+ conversationId: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([ConversationId, Schema$1.Null]), Schema$1.Null])),
3988
+ metadata: Schema$1.optionalKey(MessageMetadata),
3989
+ channel: Schema$1.Literal("email"),
3990
+ to: EmailRecipients,
3991
+ cc: Schema$1.optionalKey(EmailCcRecipients),
3992
+ bcc: Schema$1.optionalKey(EmailBccRecipients),
3993
+ from: Schema$1.optionalKey(EmailSender),
3994
+ email: EmailContent
3995
+ }).annotate({ identifier: "SendMessagePayload" });
3996
+ Schema$1.Struct({
3942
3997
  conversationId: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([ConversationId, Schema$1.Null]), Schema$1.Null])),
3943
3998
  metadata: Schema$1.optionalKey(MessageMetadata),
3944
3999
  channel: Schema$1.Literal("email"),
@@ -3948,13 +4003,13 @@ const EmailSendMessagePayload = Schema$1.Struct({
3948
4003
  from: Schema$1.optionalKey(EmailSender),
3949
4004
  email: EmailContent
3950
4005
  }).annotate({ identifier: "EmailSendMessagePayload" });
3951
- const EmailCampaignContentInput = Schema$1.Struct({
4006
+ const CampaignContentInput = Schema$1.Struct({
3952
4007
  channel: Schema$1.Literal("email"),
3953
4008
  email: EmailDispatchContent,
3954
4009
  conversationId: Schema$1.optionalKey(CampaignConversationRef),
3955
4010
  metadata: Schema$1.optionalKey(CampaignContentMetadata)
3956
- }).annotate({ identifier: "EmailCampaignContentInput" });
3957
- const EmailDispatchSendMessagePayload = Schema$1.Struct({
4011
+ }).annotate({ identifier: "CampaignContentInput" });
4012
+ const DispatchSendMessagePayload = Schema$1.Struct({
3958
4013
  conversationId: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([ConversationId, Schema$1.Null]), Schema$1.Null])),
3959
4014
  metadata: Schema$1.optionalKey(MessageMetadata),
3960
4015
  channel: Schema$1.Literal("email"),
@@ -3963,17 +4018,9 @@ const EmailDispatchSendMessagePayload = Schema$1.Struct({
3963
4018
  bcc: Schema$1.optionalKey(EmailBccRecipients),
3964
4019
  from: Schema$1.optionalKey(EmailSender),
3965
4020
  email: EmailDispatchContent
3966
- }).annotate({ identifier: "EmailDispatchSendMessagePayload" });
4021
+ }).annotate({ identifier: "DispatchSendMessagePayload" });
3967
4022
  const MailboxAction = Schema$1.Union([MailboxSendAction, MailboxNonSendAction]).annotate({ identifier: "MailboxAction" });
3968
4023
  const MailboxPendingAction = Schema$1.Union([MailboxSendAction, MailboxNonSendAction]).annotate({ identifier: "MailboxPendingAction" });
3969
- const CampaignContent = Schema$1.Union([EmailCampaignContent]).annotate({ identifier: "CampaignContent" });
3970
- const SendMessagePayload = Schema$1.Union([EmailSendMessagePayload]).annotate({ identifier: "SendMessagePayload" });
3971
- const CampaignContentInput = Schema$1.Union([EmailCampaignContentInput]).annotate({ identifier: "CampaignContentInput" });
3972
- const DispatchSendMessagePayload = Schema$1.Union([EmailDispatchSendMessagePayload]).annotate({ identifier: "DispatchSendMessagePayload" });
3973
- const MailboxActionPage = Schema$1.Struct({
3974
- items: Schema$1.Array(MailboxAction),
3975
- nextCursor: Schema$1.Union([Schema$1.String, Schema$1.Null])
3976
- }).annotate({ identifier: "MailboxActionPage" });
3977
4024
  const CampaignListItem = Schema$1.Struct({
3978
4025
  id: CampaignId,
3979
4026
  name: Schema$1.String,
@@ -4063,6 +4110,10 @@ const ScheduledMessage = Schema$1.Struct({
4063
4110
  createdAt: Schema$1.String,
4064
4111
  updatedAt: Schema$1.String
4065
4112
  }).annotate({ identifier: "ScheduledMessage" });
4113
+ const MailboxActionPage = Schema$1.Struct({
4114
+ items: Schema$1.Array(MailboxAction),
4115
+ nextCursor: Schema$1.Union([Schema$1.String, Schema$1.Null])
4116
+ }).annotate({ identifier: "MailboxActionPage" });
4066
4117
  const CampaignPage = Schema$1.Struct({
4067
4118
  items: Schema$1.Array(CampaignListItem),
4068
4119
  nextCursor: Schema$1.Union([Schema$1.String, Schema$1.Null])
@@ -5725,23 +5776,6 @@ const EmailSetDefaultDomain404 = ResourceNotFoundError;
5725
5776
  const EmailSetDefaultDomain422 = ValidationError;
5726
5777
  const EmailSetDefaultDomain500 = InternalError;
5727
5778
  const EmailSetDefaultDomain504 = GatewayTimeoutError;
5728
- const EmailSetDomainDefaultSenderPathParams = Schema$1.Struct({ id: EmailDomainId });
5729
- const EmailSetDomainDefaultSenderRequestJson = Schema$1.Struct({ senderId: EmailSenderId });
5730
- const EmailSetDomainDefaultSender200 = SuccessResult;
5731
- const EmailSetDomainDefaultSender401 = UnauthorizedError;
5732
- const EmailSetDomainDefaultSender403 = ForbiddenError;
5733
- const EmailSetDomainDefaultSender404 = ResourceNotFoundError;
5734
- const EmailSetDomainDefaultSender422 = ValidationError;
5735
- const EmailSetDomainDefaultSender500 = InternalError;
5736
- const EmailSetDomainDefaultSender504 = GatewayTimeoutError;
5737
- const EmailClearDomainDefaultSenderPathParams = Schema$1.Struct({ id: EmailDomainId });
5738
- const EmailClearDomainDefaultSender200 = SuccessResult;
5739
- const EmailClearDomainDefaultSender401 = UnauthorizedError;
5740
- const EmailClearDomainDefaultSender403 = ForbiddenError;
5741
- const EmailClearDomainDefaultSender404 = ResourceNotFoundError;
5742
- const EmailClearDomainDefaultSender422 = ValidationError;
5743
- const EmailClearDomainDefaultSender500 = InternalError;
5744
- const EmailClearDomainDefaultSender504 = GatewayTimeoutError;
5745
5779
  const EmailDisableCatchAllPathParams = Schema$1.Struct({ id: EmailDomainId });
5746
5780
  const EmailDisableCatchAll200 = Schema$1.Struct({ success: Schema$1.Literal(true) });
5747
5781
  const EmailDisableCatchAll401 = UnauthorizedError;
@@ -6488,13 +6522,9 @@ const MailboxesList500 = InternalError;
6488
6522
  const MailboxesList504 = GatewayTimeoutError;
6489
6523
  const MailboxesCreateRequestJson = Schema$1.Struct({
6490
6524
  namespaceId: Schema$1.optionalKey(Schema$1.Union([NamespaceId, Schema$1.Null])),
6491
- displayName: Schema$1.String,
6492
- slug: Schema$1.String,
6493
- addresses: Schema$1.TupleWithRest(Schema$1.Tuple([CreateMailboxAddressPayload]), [CreateMailboxAddressPayload]),
6494
- defaultFrom: Schema$1.optionalKey(Schema$1.Union([Schema$1.Struct({
6495
- address: Schema$1.String,
6496
- displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
6497
- }), Schema$1.Null])),
6525
+ endpoint: CreateMailboxEndpointPayload,
6526
+ name: Schema$1.String,
6527
+ slug: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
6498
6528
  metadata: Schema$1.optionalKey(Schema$1.Union([MailboxMetadata, Schema$1.Null]))
6499
6529
  });
6500
6530
  const MailboxesCreate201 = Mailbox;
@@ -6503,7 +6533,7 @@ const MailboxesCreate402 = PaymentRequiredError;
6503
6533
  const MailboxesCreate403 = ForbiddenError;
6504
6534
  const MailboxesCreate404 = ResourceNotFoundError;
6505
6535
  const MailboxesCreate409 = ConflictError;
6506
- const MailboxesCreate422 = ValidationError;
6536
+ const MailboxesCreate422 = Schema$1.Union([ValidationError, MailboxChannelUnsupportedError]);
6507
6537
  const MailboxesCreate500 = InternalError;
6508
6538
  const MailboxesCreate502 = BillingProviderError;
6509
6539
  const MailboxesCreate504 = GatewayTimeoutError;
@@ -6526,12 +6556,8 @@ const MailboxesRemove502 = BillingProviderError;
6526
6556
  const MailboxesRemove504 = GatewayTimeoutError;
6527
6557
  const MailboxesUpdatePathParams = Schema$1.Struct({ id: MailboxId });
6528
6558
  const MailboxesUpdateRequestJson = Schema$1.Struct({
6529
- displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.String.check(Schema$1.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema$1.Null])),
6530
- metadata: Schema$1.optionalKey(Schema$1.Union([MailboxMetadataPatch, Schema$1.Null])),
6531
- defaultFrom: Schema$1.optionalKey(Schema$1.Union([Schema$1.Struct({
6532
- address: Schema$1.String,
6533
- displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([Schema$1.String, Schema$1.Null]), Schema$1.Null]))
6534
- }), Schema$1.Null]))
6559
+ name: Schema$1.optionalKey(Schema$1.Union([Schema$1.String.check(Schema$1.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema$1.Null])),
6560
+ metadata: Schema$1.optionalKey(Schema$1.Union([MailboxMetadataPatch, Schema$1.Null]))
6535
6561
  });
6536
6562
  const MailboxesUpdate200 = Mailbox;
6537
6563
  const MailboxesUpdate401 = UnauthorizedError;
@@ -6597,7 +6623,7 @@ const MailboxesApproveAction403 = Schema$1.Union([
6597
6623
  ]);
6598
6624
  const MailboxesApproveAction404 = ResourceNotFoundError;
6599
6625
  const MailboxesApproveAction409 = Schema$1.Union([MailboxSendConflictError, ConflictError]);
6600
- const MailboxesApproveAction422 = ValidationError;
6626
+ const MailboxesApproveAction422 = Schema$1.Union([MailboxChannelUnsupportedError, ValidationError]);
6601
6627
  const MailboxesApproveAction429 = RateLimitedError;
6602
6628
  const MailboxesApproveAction500 = InternalError;
6603
6629
  const MailboxesApproveAction502 = BillingProviderError;
@@ -6618,7 +6644,7 @@ const MailboxesCancelAction403 = Schema$1.Union([
6618
6644
  ]);
6619
6645
  const MailboxesCancelAction404 = ResourceNotFoundError;
6620
6646
  const MailboxesCancelAction409 = Schema$1.Union([MailboxSendConflictError, ConflictError]);
6621
- const MailboxesCancelAction422 = ValidationError;
6647
+ const MailboxesCancelAction422 = Schema$1.Union([MailboxChannelUnsupportedError, ValidationError]);
6622
6648
  const MailboxesCancelAction429 = RateLimitedError;
6623
6649
  const MailboxesCancelAction500 = InternalError;
6624
6650
  const MailboxesCancelAction502 = BillingProviderError;
@@ -6652,7 +6678,7 @@ const MailboxesRetryAction403 = Schema$1.Union([
6652
6678
  ]);
6653
6679
  const MailboxesRetryAction404 = ResourceNotFoundError;
6654
6680
  const MailboxesRetryAction409 = Schema$1.Union([MailboxSendConflictError, ConflictError]);
6655
- const MailboxesRetryAction422 = ValidationError;
6681
+ const MailboxesRetryAction422 = Schema$1.Union([MailboxChannelUnsupportedError, ValidationError]);
6656
6682
  const MailboxesRetryAction429 = RateLimitedError;
6657
6683
  const MailboxesRetryAction500 = InternalError;
6658
6684
  const MailboxesRetryAction502 = BillingProviderError;
@@ -6685,6 +6711,8 @@ const MailboxesListDrafts500 = InternalError;
6685
6711
  const MailboxesListDrafts504 = GatewayTimeoutError;
6686
6712
  const MailboxesCreateDraftPathParams = Schema$1.Struct({ id: MailboxId });
6687
6713
  const MailboxesCreateDraftRequestJson = Schema$1.Struct({
6714
+ channel: Schema$1.optionalKey(Schema$1.Union([Schema$1.Literal("email"), Schema$1.Null])),
6715
+ endpointId: Schema$1.optionalKey(Schema$1.Union([MailboxEndpointId, Schema$1.Null])),
6688
6716
  to: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
6689
6717
  cc: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
6690
6718
  bcc: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
@@ -6699,7 +6727,7 @@ const MailboxesCreateDraft201 = MailboxDraft;
6699
6727
  const MailboxesCreateDraft401 = UnauthorizedError;
6700
6728
  const MailboxesCreateDraft403 = ForbiddenError;
6701
6729
  const MailboxesCreateDraft404 = ResourceNotFoundError;
6702
- const MailboxesCreateDraft422 = ValidationError;
6730
+ const MailboxesCreateDraft422 = Schema$1.Union([MailboxChannelUnsupportedError, ValidationError]);
6703
6731
  const MailboxesCreateDraft500 = InternalError;
6704
6732
  const MailboxesCreateDraft504 = GatewayTimeoutError;
6705
6733
  const MailboxesGetDraftPathParams = Schema$1.Struct({
@@ -6762,12 +6790,52 @@ const MailboxesSendDraft403 = Schema$1.Union([
6762
6790
  ]);
6763
6791
  const MailboxesSendDraft404 = ResourceNotFoundError;
6764
6792
  const MailboxesSendDraft409 = Schema$1.Union([MailboxSendConflictError, ConflictError]);
6765
- const MailboxesSendDraft422 = ValidationError;
6793
+ const MailboxesSendDraft422 = Schema$1.Union([MailboxChannelUnsupportedError, ValidationError]);
6766
6794
  const MailboxesSendDraft429 = RateLimitedError;
6767
6795
  const MailboxesSendDraft500 = InternalError;
6768
6796
  const MailboxesSendDraft502 = BillingProviderError;
6769
6797
  const MailboxesSendDraft503 = SenderNotReadyError;
6770
6798
  const MailboxesSendDraft504 = GatewayTimeoutError;
6799
+ const MailboxesCreateEndpointPathParams = Schema$1.Struct({ id: MailboxId });
6800
+ const MailboxesCreateEndpointRequestJson = Schema$1.Struct({
6801
+ channel: MailboxChannel,
6802
+ address: Schema$1.String,
6803
+ displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null]))
6804
+ });
6805
+ const MailboxesCreateEndpoint201 = Mailbox;
6806
+ const MailboxesCreateEndpoint401 = UnauthorizedError;
6807
+ const MailboxesCreateEndpoint403 = ForbiddenError;
6808
+ const MailboxesCreateEndpoint404 = ResourceNotFoundError;
6809
+ const MailboxesCreateEndpoint409 = ConflictError;
6810
+ const MailboxesCreateEndpoint422 = Schema$1.Union([ValidationError, MailboxChannelUnsupportedError]);
6811
+ const MailboxesCreateEndpoint500 = InternalError;
6812
+ const MailboxesCreateEndpoint504 = GatewayTimeoutError;
6813
+ const MailboxesRemoveEndpointPathParams = Schema$1.Struct({
6814
+ id: MailboxId,
6815
+ endpointId: MailboxEndpointId
6816
+ });
6817
+ const MailboxesRemoveEndpoint200 = Mailbox;
6818
+ const MailboxesRemoveEndpoint401 = UnauthorizedError;
6819
+ const MailboxesRemoveEndpoint403 = ForbiddenError;
6820
+ const MailboxesRemoveEndpoint404 = ResourceNotFoundError;
6821
+ const MailboxesRemoveEndpoint422 = ValidationError;
6822
+ const MailboxesRemoveEndpoint500 = InternalError;
6823
+ const MailboxesRemoveEndpoint504 = GatewayTimeoutError;
6824
+ const MailboxesUpdateEndpointPathParams = Schema$1.Struct({
6825
+ id: MailboxId,
6826
+ endpointId: MailboxEndpointId
6827
+ });
6828
+ const MailboxesUpdateEndpointRequestJson = Schema$1.Struct({
6829
+ displayName: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([Schema$1.String, Schema$1.Null]), Schema$1.Null])),
6830
+ default: Schema$1.optionalKey(Schema$1.Union([Schema$1.Literal(true), Schema$1.Null]))
6831
+ });
6832
+ const MailboxesUpdateEndpoint200 = Mailbox;
6833
+ const MailboxesUpdateEndpoint401 = UnauthorizedError;
6834
+ const MailboxesUpdateEndpoint403 = ForbiddenError;
6835
+ const MailboxesUpdateEndpoint404 = ResourceNotFoundError;
6836
+ const MailboxesUpdateEndpoint422 = ValidationError;
6837
+ const MailboxesUpdateEndpoint500 = InternalError;
6838
+ const MailboxesUpdateEndpoint504 = GatewayTimeoutError;
6771
6839
  const MailboxesListEventsPathParams = Schema$1.Struct({ id: MailboxId });
6772
6840
  const MailboxesListEventsQuery = Schema$1.Struct({
6773
6841
  limit: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
@@ -6909,6 +6977,7 @@ const MailboxesUpdateLabel504 = GatewayTimeoutError;
6909
6977
  const MailboxesSendMessagePathParams = Schema$1.Struct({ id: MailboxId });
6910
6978
  const MailboxesSendMessageHeaders = Schema$1.Struct({ "idempotency-key": Schema$1.optionalKey(Schema$1.Union([Schema$1.String.annotate({ description: "Optional key that makes a mailbox send idempotent for the calling key or member. Repeating the request with the same key and body returns the original action in its current state. Keep the key after a lost response. Reusing it with different content returns 409. Active actions retain their key; terminal receipts remain replayable for 24 hours." }).check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^[\\s\\S]{1,255}$")).annotate({ expected: "a string matching the RegExp ^[\\s\\S]{1,255}$" })), Schema$1.Null])) });
6911
6979
  const MailboxesSendMessageRequestJson = Schema$1.Struct({
6980
+ channel: Schema$1.optionalKey(Schema$1.Union([Schema$1.Literal("email"), Schema$1.Null])),
6912
6981
  to: Schema$1.TupleWithRest(Schema$1.Tuple([Schema$1.String]), [Schema$1.String]),
6913
6982
  cc: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
6914
6983
  bcc: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
@@ -6929,7 +6998,7 @@ const MailboxesSendMessage403 = Schema$1.Union([
6929
6998
  ]);
6930
6999
  const MailboxesSendMessage404 = ResourceNotFoundError;
6931
7000
  const MailboxesSendMessage409 = Schema$1.Union([MailboxSendConflictError, ConflictError]);
6932
- const MailboxesSendMessage422 = ValidationError;
7001
+ const MailboxesSendMessage422 = Schema$1.Union([MailboxChannelUnsupportedError, ValidationError]);
6933
7002
  const MailboxesSendMessage429 = RateLimitedError;
6934
7003
  const MailboxesSendMessage500 = InternalError;
6935
7004
  const MailboxesSendMessage502 = BillingProviderError;
@@ -7008,7 +7077,7 @@ const MailboxesForward403 = Schema$1.Union([
7008
7077
  ]);
7009
7078
  const MailboxesForward404 = ResourceNotFoundError;
7010
7079
  const MailboxesForward409 = Schema$1.Union([MailboxSendConflictError, ConflictError]);
7011
- const MailboxesForward422 = ValidationError;
7080
+ const MailboxesForward422 = Schema$1.Union([MailboxChannelUnsupportedError, ValidationError]);
7012
7081
  const MailboxesForward429 = RateLimitedError;
7013
7082
  const MailboxesForward500 = InternalError;
7014
7083
  const MailboxesForward502 = BillingProviderError;
@@ -7043,6 +7112,7 @@ const MailboxesReplyPathParams = Schema$1.Struct({
7043
7112
  });
7044
7113
  const MailboxesReplyHeaders = Schema$1.Struct({ "idempotency-key": Schema$1.optionalKey(Schema$1.Union([Schema$1.String.annotate({ description: "Optional key that makes a mailbox send idempotent for the calling key or member. Repeating the request with the same key and body returns the original action in its current state. Keep the key after a lost response. Reusing it with different content returns 409. Active actions retain their key; terminal receipts remain replayable for 24 hours." }).check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^[\\s\\S]{1,255}$")).annotate({ expected: "a string matching the RegExp ^[\\s\\S]{1,255}$" })), Schema$1.Null])) });
7045
7114
  const MailboxesReplyRequestJson = Schema$1.Struct({
7115
+ channel: Schema$1.optionalKey(Schema$1.Union([Schema$1.Literal("email"), Schema$1.Null])),
7046
7116
  cc: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
7047
7117
  bcc: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
7048
7118
  text: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
@@ -7060,7 +7130,7 @@ const MailboxesReply403 = Schema$1.Union([
7060
7130
  ]);
7061
7131
  const MailboxesReply404 = ResourceNotFoundError;
7062
7132
  const MailboxesReply409 = Schema$1.Union([MailboxSendConflictError, ConflictError]);
7063
- const MailboxesReply422 = ValidationError;
7133
+ const MailboxesReply422 = Schema$1.Union([MailboxChannelUnsupportedError, ValidationError]);
7064
7134
  const MailboxesReply429 = RateLimitedError;
7065
7135
  const MailboxesReply500 = InternalError;
7066
7136
  const MailboxesReply502 = BillingProviderError;
@@ -7072,6 +7142,7 @@ const MailboxesReplyAllPathParams = Schema$1.Struct({
7072
7142
  });
7073
7143
  const MailboxesReplyAllHeaders = Schema$1.Struct({ "idempotency-key": Schema$1.optionalKey(Schema$1.Union([Schema$1.String.annotate({ description: "Optional key that makes a mailbox send idempotent for the calling key or member. Repeating the request with the same key and body returns the original action in its current state. Keep the key after a lost response. Reusing it with different content returns 409. Active actions retain their key; terminal receipts remain replayable for 24 hours." }).check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^[\\s\\S]{1,255}$")).annotate({ expected: "a string matching the RegExp ^[\\s\\S]{1,255}$" })), Schema$1.Null])) });
7074
7144
  const MailboxesReplyAllRequestJson = Schema$1.Struct({
7145
+ channel: Schema$1.optionalKey(Schema$1.Union([Schema$1.Literal("email"), Schema$1.Null])),
7075
7146
  cc: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
7076
7147
  bcc: Schema$1.optionalKey(Schema$1.Union([Schema$1.Array(Schema$1.String), Schema$1.Null])),
7077
7148
  text: Schema$1.optionalKey(Schema$1.Union([Schema$1.String, Schema$1.Null])),
@@ -7089,7 +7160,7 @@ const MailboxesReplyAll403 = Schema$1.Union([
7089
7160
  ]);
7090
7161
  const MailboxesReplyAll404 = ResourceNotFoundError;
7091
7162
  const MailboxesReplyAll409 = Schema$1.Union([MailboxSendConflictError, ConflictError]);
7092
- const MailboxesReplyAll422 = ValidationError;
7163
+ const MailboxesReplyAll422 = Schema$1.Union([MailboxChannelUnsupportedError, ValidationError]);
7093
7164
  const MailboxesReplyAll429 = RateLimitedError;
7094
7165
  const MailboxesReplyAll500 = InternalError;
7095
7166
  const MailboxesReplyAll502 = BillingProviderError;
@@ -7429,7 +7500,16 @@ const MessagesList422 = ValidationError;
7429
7500
  const MessagesList500 = InternalError;
7430
7501
  const MessagesList504 = GatewayTimeoutError;
7431
7502
  const MessagesSendHeaders = Schema$1.Struct({ "idempotency-key": Schema$1.optionalKey(Schema$1.Union([Schema$1.String.annotate({ description: "Optional org-scoped key that makes a send idempotent. Repeating a request with the same key and identical payload replays the original 201 response; reusing the key with different content returns 409." }).check(Schema$1.isPattern(/* @__PURE__ */ new RegExp("^[\\s\\S]{1,255}$")).annotate({ expected: "a string matching the RegExp ^[\\s\\S]{1,255}$" })), Schema$1.Null])) });
7432
- const MessagesSendRequestJson = Schema$1.Union([EmailSendMessagePayload]);
7503
+ const MessagesSendRequestJson = Schema$1.Struct({
7504
+ conversationId: Schema$1.optionalKey(Schema$1.Union([Schema$1.Union([ConversationId, Schema$1.Null]), Schema$1.Null])),
7505
+ metadata: Schema$1.optionalKey(MessageMetadata),
7506
+ channel: Schema$1.Literal("email"),
7507
+ to: EmailRecipients,
7508
+ cc: Schema$1.optionalKey(EmailCcRecipients),
7509
+ bcc: Schema$1.optionalKey(EmailBccRecipients),
7510
+ from: Schema$1.optionalKey(EmailSender),
7511
+ email: EmailContent
7512
+ });
7433
7513
  const MessagesSend201 = MessageReceipt;
7434
7514
  const MessagesSend401 = UnauthorizedError;
7435
7515
  const MessagesSend402 = PaymentRequiredError;
@@ -7637,7 +7717,7 @@ const MessagesGetEmail200 = Schema$1.Struct({
7637
7717
  expiresAt: Schema$1.String
7638
7718
  }), Schema$1.Null]),
7639
7719
  createdAt: Schema$1.String,
7640
- receivedAt: Schema$1.Union([Schema$1.String, Schema$1.Null]),
7720
+ receivedAt: Schema$1.Union([Schema$1.String, Schema$1.Null]).annotate({ description: "When Samva's receiving server accepted the email; null for outbound email. The sender's `Date` header plays no part and stays in the raw MIME." }),
7641
7721
  processedAt: Schema$1.Union([Schema$1.String, Schema$1.Null])
7642
7722
  });
7643
7723
  const MessagesGetEmail401 = UnauthorizedError;
@@ -9997,6 +10077,12 @@ const WebhooksTest404 = ResourceNotFoundError;
9997
10077
  const WebhooksTest422 = ValidationError;
9998
10078
  const WebhooksTest500 = InternalError;
9999
10079
  const WebhooksTest504 = GatewayTimeoutError;
10080
+ const WhoamiGet200 = Whoami;
10081
+ const WhoamiGet401 = UnauthorizedError;
10082
+ const WhoamiGet403 = ForbiddenError;
10083
+ const WhoamiGet422 = ValidationError;
10084
+ const WhoamiGet500 = InternalError;
10085
+ const WhoamiGet504 = GatewayTimeoutError;
10000
10086
  const ApiKeySecurity = HttpApiSecurity.apiKey({
10001
10087
  key: "x-api-key",
10002
10088
  in: "header"
@@ -11205,30 +11291,7 @@ var EmailGroup = class extends HttpApiGroup.make("Email").add(HttpApiEndpoint.ge
11205
11291
  EmailSetDefaultDomain500,
11206
11292
  EmailSetDefaultDomain504.pipe(HttpApiSchema.status(504))
11207
11293
  ]
11208
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.setDefaultDomain").annotate(OpenApi.Summary, "Set the default sending domain").annotate(OpenApi.Description, "Marks a verified domain as the organization's default sending domain, atomically clearing any previous default. Omitted-`from` sends resolve through the default domain's default sender."), HttpApiEndpoint.put("emailSetDomainDefaultSender", "/v1/email/domains/:id/default-sender", {
11209
- params: EmailSetDomainDefaultSenderPathParams,
11210
- payload: EmailSetDomainDefaultSenderRequestJson,
11211
- success: EmailSetDomainDefaultSender200,
11212
- error: [
11213
- EmailSetDomainDefaultSender401.pipe(HttpApiSchema.status(401)),
11214
- EmailSetDomainDefaultSender403.pipe(HttpApiSchema.status(403)),
11215
- EmailSetDomainDefaultSender404.pipe(HttpApiSchema.status(404)),
11216
- EmailSetDomainDefaultSender422.pipe(HttpApiSchema.status(422)),
11217
- EmailSetDomainDefaultSender500,
11218
- EmailSetDomainDefaultSender504.pipe(HttpApiSchema.status(504))
11219
- ]
11220
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.setDomainDefaultSender").annotate(OpenApi.Summary, "Set a domain's default sender").annotate(OpenApi.Description, "Sets the default sender used for omitted-`from` sends from this domain. The sender must belong to the domain and be verified and active."), HttpApiEndpoint.delete("emailClearDomainDefaultSender", "/v1/email/domains/:id/default-sender", {
11221
- params: EmailClearDomainDefaultSenderPathParams,
11222
- success: EmailClearDomainDefaultSender200,
11223
- error: [
11224
- EmailClearDomainDefaultSender401.pipe(HttpApiSchema.status(401)),
11225
- EmailClearDomainDefaultSender403.pipe(HttpApiSchema.status(403)),
11226
- EmailClearDomainDefaultSender404.pipe(HttpApiSchema.status(404)),
11227
- EmailClearDomainDefaultSender422.pipe(HttpApiSchema.status(422)),
11228
- EmailClearDomainDefaultSender500,
11229
- EmailClearDomainDefaultSender504.pipe(HttpApiSchema.status(504))
11230
- ]
11231
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.clearDomainDefaultSender").annotate(OpenApi.Summary, "Clear a domain's default sender").annotate(OpenApi.Description, "Removes the domain's default sender so omitted-`from` sends fall through to the organization default sender."), HttpApiEndpoint.post("emailDisableCatchAll", "/v1/email/domains/:id/disable-catch-all", {
11294
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.setDefaultDomain").annotate(OpenApi.Summary, "Set the default sending domain").annotate(OpenApi.Description, "Marks a verified domain as the organization's default sending domain, atomically clearing any previous default. Provisioning and inbound routing prefer the default domain when several apply. It does not choose the `from` of omitted-`from` sends; those use the organization default sender."), HttpApiEndpoint.post("emailDisableCatchAll", "/v1/email/domains/:id/disable-catch-all", {
11232
11295
  params: EmailDisableCatchAllPathParams,
11233
11296
  success: EmailDisableCatchAll200,
11234
11297
  error: [
@@ -11596,7 +11659,7 @@ var EmailGroup = class extends HttpApiGroup.make("Email").add(HttpApiEndpoint.ge
11596
11659
  EmailSetDefaultSender500,
11597
11660
  EmailSetDefaultSender504.pipe(HttpApiSchema.status(504))
11598
11661
  ]
11599
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.setDefaultSender").annotate(OpenApi.Summary, "Set the organization default sender").annotate(OpenApi.Description, "Marks a verified, active sender as the organization default, atomically clearing any previous default. Used for omitted-`from` sends when no default domain sender applies."), HttpApiEndpoint.get("emailCheckSenderVerification", "/v1/email/senders/:id/verification", {
11662
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.setDefaultSender").annotate(OpenApi.Summary, "Set the organization default sender").annotate(OpenApi.Description, "Marks a verified, active sender as the organization default, atomically clearing any previous default. Omitted-`from` sends use it when neither the request nor the template names a `from`; with no default, the organization's sole verified sender is used."), HttpApiEndpoint.get("emailCheckSenderVerification", "/v1/email/senders/:id/verification", {
11600
11663
  params: EmailCheckSenderVerificationPathParams,
11601
11664
  success: EmailCheckSenderVerification200,
11602
11665
  error: [
@@ -11876,7 +11939,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11876
11939
  MailboxesList500,
11877
11940
  MailboxesList504.pipe(HttpApiSchema.status(504))
11878
11941
  ]
11879
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.list").annotate(OpenApi.Summary, "List mailboxes").annotate(OpenApi.Description, "Returns summaries of the mailboxes the caller can read, newest first, filterable by creation time (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Read a mailbox's addresses and metadata with `GET /v1/mailboxes/{id}`."), HttpApiEndpoint.post("mailboxesCreate", "/v1/mailboxes", {
11942
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.list").annotate(OpenApi.Summary, "List mailboxes").annotate(OpenApi.Description, "Returns summaries of the mailboxes the caller can read, newest first, filterable by creation time (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Read a mailbox's endpoints and metadata with `GET /v1/mailboxes/{id}`."), HttpApiEndpoint.post("mailboxesCreate", "/v1/mailboxes", {
11880
11943
  payload: MailboxesCreateRequestJson,
11881
11944
  success: MailboxesCreate201.pipe(HttpApiSchema.status(201)),
11882
11945
  error: [
@@ -11890,7 +11953,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11890
11953
  MailboxesCreate502.pipe(HttpApiSchema.status(502)),
11891
11954
  MailboxesCreate504.pipe(HttpApiSchema.status(504))
11892
11955
  ]
11893
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.create").annotate(OpenApi.Summary, "Create a mailbox").annotate(OpenApi.Description, "Creates a mailbox with its addresses and returns it with status 201; the caller gets an admin grant on it. Each address must be under the organization's Samva-hosted mail domain or a verified domain with receiving enabled. The mailbox receives mail from now on; mail that arrived earlier is not added to it. Conflicts if an address or slug is already in use. Returns 402 when the organization is at its plan's mailbox allowance or at its mailbox storage allowance; incoming mail is still received past the storage allowance."), HttpApiEndpoint.get("mailboxesGet", "/v1/mailboxes/:id", {
11956
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.create").annotate(OpenApi.Summary, "Create a mailbox").annotate(OpenApi.Description, "Creates a mailbox with one endpoint and returns it with status 201; the caller gets an admin grant on it. Email is the channel a mailbox endpoint uses today; another channel is refused (422). An email endpoint's address must be under the organization's Samva-hosted mail domain or a verified domain with receiving enabled, and the mailbox sends from it. The slug defaults to the address's local part. Pass `slug` when that is taken or not a valid slug. The mailbox receives mail from now on; mail that arrived earlier is not added to it. Conflicts if the address or slug is already in use. Returns 402 when the organization is at its plan's mailbox allowance or at its mailbox storage allowance; incoming mail is still received past the storage allowance."), HttpApiEndpoint.get("mailboxesGet", "/v1/mailboxes/:id", {
11894
11957
  params: MailboxesGetPathParams,
11895
11958
  success: MailboxesGet200,
11896
11959
  error: [
@@ -11901,7 +11964,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11901
11964
  MailboxesGet500,
11902
11965
  MailboxesGet504.pipe(HttpApiSchema.status(504))
11903
11966
  ]
11904
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.get").annotate(OpenApi.Summary, "Get a mailbox").annotate(OpenApi.Description, "Returns a mailbox with its addresses, metadata, and the identity it sends from. Its grants are `GET /v1/mailboxes/{id}/grants` and its send policies `GET /v1/mailboxes/{id}/policies`."), HttpApiEndpoint.delete("mailboxesRemove", "/v1/mailboxes/:id", {
11967
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.get").annotate(OpenApi.Summary, "Get a mailbox").annotate(OpenApi.Description, "Returns a mailbox with its endpoints and metadata; each endpoint says whether it is the mailbox's default on its channel. Its grants are `GET /v1/mailboxes/{id}/grants` and its send policies `GET /v1/mailboxes/{id}/policies`."), HttpApiEndpoint.delete("mailboxesRemove", "/v1/mailboxes/:id", {
11905
11968
  params: MailboxesRemovePathParams,
11906
11969
  success: MailboxesRemove200,
11907
11970
  error: [
@@ -11913,7 +11976,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11913
11976
  MailboxesRemove502.pipe(HttpApiSchema.status(502)),
11914
11977
  MailboxesRemove504.pipe(HttpApiSchema.status(504))
11915
11978
  ]
11916
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.remove").annotate(OpenApi.Summary, "Delete a mailbox").annotate(OpenApi.Description, "Deletes a mailbox with its addresses, threads, drafts, and history. The messages it received stay with the organization. The mailbox leaves every API key scope and webhook endpoint filter that named it; a key or endpoint left with no mailbox is disabled."), HttpApiEndpoint.patch("mailboxesUpdate", "/v1/mailboxes/:id", {
11979
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.remove").annotate(OpenApi.Summary, "Delete a mailbox").annotate(OpenApi.Description, "Deletes a mailbox with its endpoints, threads, drafts, and history. The messages it received stay with the organization. The mailbox leaves every API key scope and webhook endpoint filter that named it; a key or endpoint left with no mailbox is disabled."), HttpApiEndpoint.patch("mailboxesUpdate", "/v1/mailboxes/:id", {
11917
11980
  params: MailboxesUpdatePathParams,
11918
11981
  payload: MailboxesUpdateRequestJson,
11919
11982
  success: MailboxesUpdate200,
@@ -11925,7 +11988,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
11925
11988
  MailboxesUpdate500,
11926
11989
  MailboxesUpdate504.pipe(HttpApiSchema.status(504))
11927
11990
  ]
11928
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.update").annotate(OpenApi.Summary, "Update a mailbox").annotate(OpenApi.Description, "Updates the fields you name and keeps the rest. `metadata` merges into the stored metadata by key, and a `null` value deletes that key. `defaultFrom` must be one of the mailbox's addresses."), HttpApiEndpoint.get("mailboxesListActions", "/v1/mailboxes/:id/actions", {
11991
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.update").annotate(OpenApi.Summary, "Update a mailbox").annotate(OpenApi.Description, "Updates the fields you name and keeps the rest. `metadata` merges into the stored metadata by key, and a `null` value deletes that key. Change an endpoint's sender name or default with `PATCH /v1/mailboxes/{id}/endpoints/{endpointId}`."), HttpApiEndpoint.get("mailboxesListActions", "/v1/mailboxes/:id/actions", {
11929
11992
  params: MailboxesListActionsPathParams,
11930
11993
  query: MailboxesListActionsQuery,
11931
11994
  success: MailboxesListActions200,
@@ -12045,7 +12108,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
12045
12108
  MailboxesCreateDraft500,
12046
12109
  MailboxesCreateDraft504.pipe(HttpApiSchema.status(504))
12047
12110
  ]
12048
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.createDraft").annotate(OpenApi.Summary, "Create a draft").annotate(OpenApi.Description, "Saves a draft of a new message, or of a reply when `inReplyToMessageId` names a message in the mailbox, and returns it with status 201. Send it with `POST /v1/mailboxes/{id}/drafts/{draftId}/send`."), HttpApiEndpoint.get("mailboxesGetDraft", "/v1/mailboxes/:id/drafts/:draftId", {
12111
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.createDraft").annotate(OpenApi.Summary, "Create a draft").annotate(OpenApi.Description, "Saves a draft of a new message, or of a reply when `inReplyToMessageId` names a message in the mailbox, and returns it with status 201. Email drafts are the kind a mailbox saves today; another channel is refused (422). Send it with `POST /v1/mailboxes/{id}/drafts/{draftId}/send`."), HttpApiEndpoint.get("mailboxesGetDraft", "/v1/mailboxes/:id/drafts/:draftId", {
12049
12112
  params: MailboxesGetDraftPathParams,
12050
12113
  success: MailboxesGetDraft200,
12051
12114
  error: [
@@ -12097,7 +12160,43 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
12097
12160
  MailboxesSendDraft503.pipe(HttpApiSchema.status(503)),
12098
12161
  MailboxesSendDraft504.pipe(HttpApiSchema.status(504))
12099
12162
  ]
12100
- }).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", {
12163
+ }).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.post("mailboxesCreateEndpoint", "/v1/mailboxes/:id/endpoints", {
12164
+ params: MailboxesCreateEndpointPathParams,
12165
+ payload: MailboxesCreateEndpointRequestJson,
12166
+ success: MailboxesCreateEndpoint201.pipe(HttpApiSchema.status(201)),
12167
+ error: [
12168
+ MailboxesCreateEndpoint401.pipe(HttpApiSchema.status(401)),
12169
+ MailboxesCreateEndpoint403.pipe(HttpApiSchema.status(403)),
12170
+ MailboxesCreateEndpoint404.pipe(HttpApiSchema.status(404)),
12171
+ MailboxesCreateEndpoint409.pipe(HttpApiSchema.status(409)),
12172
+ MailboxesCreateEndpoint422.pipe(HttpApiSchema.status(422)),
12173
+ MailboxesCreateEndpoint500,
12174
+ MailboxesCreateEndpoint504.pipe(HttpApiSchema.status(504))
12175
+ ]
12176
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.createEndpoint").annotate(OpenApi.Summary, "Add an endpoint to a mailbox").annotate(OpenApi.Description, "Adds an endpoint to a mailbox and returns the mailbox with status 201. It follows the same rules as the endpoint of a new mailbox: email is the channel a mailbox endpoint uses today (422 otherwise), the address must be under the organization's Samva-hosted mail domain or a verified domain with receiving enabled, and no mailbox may already hold it (409). Messages sent to it reach the mailbox from now on. It becomes the default on its channel only when the mailbox has no endpoint there yet."), HttpApiEndpoint.delete("mailboxesRemoveEndpoint", "/v1/mailboxes/:id/endpoints/:endpointId", {
12177
+ params: MailboxesRemoveEndpointPathParams,
12178
+ success: MailboxesRemoveEndpoint200,
12179
+ error: [
12180
+ MailboxesRemoveEndpoint401.pipe(HttpApiSchema.status(401)),
12181
+ MailboxesRemoveEndpoint403.pipe(HttpApiSchema.status(403)),
12182
+ MailboxesRemoveEndpoint404.pipe(HttpApiSchema.status(404)),
12183
+ MailboxesRemoveEndpoint422.pipe(HttpApiSchema.status(422)),
12184
+ MailboxesRemoveEndpoint500,
12185
+ MailboxesRemoveEndpoint504.pipe(HttpApiSchema.status(504))
12186
+ ]
12187
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.removeEndpoint").annotate(OpenApi.Summary, "Remove an endpoint from a mailbox").annotate(OpenApi.Description, "Removes an endpoint from a mailbox and returns the mailbox. Messages sent to it stop reaching the mailbox; its existing threads and messages stay, and replies in them leave from the mailbox's default endpoint on their channel. A mailbox keeps at least one endpoint, so removing the last one is refused (422). When the removed endpoint was the default on its channel, the oldest remaining endpoint there becomes the default."), HttpApiEndpoint.patch("mailboxesUpdateEndpoint", "/v1/mailboxes/:id/endpoints/:endpointId", {
12188
+ params: MailboxesUpdateEndpointPathParams,
12189
+ payload: MailboxesUpdateEndpointRequestJson,
12190
+ success: MailboxesUpdateEndpoint200,
12191
+ error: [
12192
+ MailboxesUpdateEndpoint401.pipe(HttpApiSchema.status(401)),
12193
+ MailboxesUpdateEndpoint403.pipe(HttpApiSchema.status(403)),
12194
+ MailboxesUpdateEndpoint404.pipe(HttpApiSchema.status(404)),
12195
+ MailboxesUpdateEndpoint422.pipe(HttpApiSchema.status(422)),
12196
+ MailboxesUpdateEndpoint500,
12197
+ MailboxesUpdateEndpoint504.pipe(HttpApiSchema.status(504))
12198
+ ]
12199
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.updateEndpoint").annotate(OpenApi.Summary, "Update a mailbox endpoint").annotate(OpenApi.Description, "Updates the fields you name and keeps the rest, and returns the mailbox. `displayName` is the name messages sent from the endpoint carry; null falls back to the mailbox's name. `default: true` makes the endpoint the one the mailbox starts new conversations from on its channel; replies always leave from the endpoint of their thread."), HttpApiEndpoint.get("mailboxesListEvents", "/v1/mailboxes/:id/events", {
12101
12200
  params: MailboxesListEventsPathParams,
12102
12201
  query: MailboxesListEventsQuery,
12103
12202
  success: MailboxesListEvents200,
@@ -12109,7 +12208,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
12109
12208
  MailboxesListEvents500,
12110
12209
  MailboxesListEvents504.pipe(HttpApiSchema.status(504))
12111
12210
  ]
12112
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.listEvents").annotate(OpenApi.Summary, "List mailbox events").annotate(OpenApi.Description, "Returns mailbox audit records, newest first, filterable by when they happened (`after`, `before`). Audit event types: `mailbox.created`, `address.attached`, `email.received`, `email.released`, `email.sent`, `thread.created`, `action.proposed`, `action.policy_decided`, `action.approval_requested`, `action.approval_resolved`, `action.accepted`, `action.executed`, `action.failed`. Thread and draft changes have no dedicated audit event types. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page."), HttpApiEndpoint.get("mailboxesListFolders", "/v1/mailboxes/:id/folders", {
12211
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.listEvents").annotate(OpenApi.Summary, "List mailbox events").annotate(OpenApi.Description, "Returns mailbox audit records, newest first, filterable by when they happened (`after`, `before`). Audit event types: `mailbox.created`, `endpoint.attached`, `endpoint.detached`, `message.received`, `message.released`, `message.sent`, `thread.created`, `action.proposed`, `action.policy_decided`, `action.approval_requested`, `action.approval_resolved`, `action.accepted`, `action.executed`, `action.failed`. Thread and draft changes have no dedicated audit event types. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page."), HttpApiEndpoint.get("mailboxesListFolders", "/v1/mailboxes/:id/folders", {
12113
12212
  params: MailboxesListFoldersPathParams,
12114
12213
  success: MailboxesListFolders200,
12115
12214
  error: [
@@ -12235,7 +12334,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
12235
12334
  MailboxesSendMessage503.pipe(HttpApiSchema.status(503)),
12236
12335
  MailboxesSendMessage504.pipe(HttpApiSchema.status(504))
12237
12336
  ]
12238
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.sendMessage").annotate(OpenApi.Summary, "Send a new message").annotate(OpenApi.Description, "Records a send action and returns 202 with its current receipt and a Location for action status. An installation, grant, or policy may require approval; otherwise the send is queued. Observe the same action through acceptance and mailbox completion. A policy refusal returns 403 with the recorded receipt."), HttpApiEndpoint.get("mailboxesGetMessage", "/v1/mailboxes/:id/messages/:messageId", {
12337
+ }).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 endpoint on the channel the body names (email when omitted); a channel the mailbox cannot send on yet is refused (422). Records a send action and returns 202 with its current receipt and a Location for action status. An installation, grant, or policy may require approval; otherwise the send is queued. Observe the same action through acceptance and mailbox completion. A policy refusal returns 403 with the recorded receipt."), HttpApiEndpoint.get("mailboxesGetMessage", "/v1/mailboxes/:id/messages/:messageId", {
12239
12338
  params: MailboxesGetMessagePathParams,
12240
12339
  success: MailboxesGetMessage200,
12241
12340
  error: [
@@ -12246,7 +12345,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
12246
12345
  MailboxesGetMessage500,
12247
12346
  MailboxesGetMessage504.pipe(HttpApiSchema.status(504))
12248
12347
  ]
12249
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.getMessage").annotate(OpenApi.Summary, "Get a mailbox message").annotate(OpenApi.Description, "Returns a message in the mailbox with its text, sanitized HTML, `replyText` (what the sender wrote, without quoted history), authentication verdicts, and attachments."), HttpApiEndpoint.get("mailboxesGetMessageAttachment", "/v1/mailboxes/:id/messages/:messageId/attachments/:attachmentId", {
12348
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.getMessage").annotate(OpenApi.Summary, "Get a mailbox message").annotate(OpenApi.Description, "Returns a message in the mailbox, discriminated by `channel`. An email has its text, sanitized HTML, `replyText` (what the sender wrote, without quoted history), authentication verdicts, and attachments."), HttpApiEndpoint.get("mailboxesGetMessageAttachment", "/v1/mailboxes/:id/messages/:messageId/attachments/:attachmentId", {
12250
12349
  params: MailboxesGetMessageAttachmentPathParams,
12251
12350
  success: MailboxesGetMessageAttachment200,
12252
12351
  error: [
@@ -12300,7 +12399,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
12300
12399
  MailboxesForward503.pipe(HttpApiSchema.status(503)),
12301
12400
  MailboxesForward504.pipe(HttpApiSchema.status(504))
12302
12401
  ]
12303
- }).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", {
12402
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.forward").annotate(OpenApi.Summary, "Forward a message").annotate(OpenApi.Description, "Forwards an email to new recipients as a new conversation from the thread's endpoint, 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", {
12304
12403
  params: MailboxesGetMessageRawPathParams,
12305
12404
  success: MailboxesGetMessageRaw200,
12306
12405
  error: [
@@ -12341,7 +12440,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
12341
12440
  MailboxesReply503.pipe(HttpApiSchema.status(503)),
12342
12441
  MailboxesReply504.pipe(HttpApiSchema.status(504))
12343
12442
  ]
12344
- }).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", {
12443
+ }).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 and from the thread's endpoint. The server sets the recipients, subject, and threading headers. The body's `channel` must match the thread's."), HttpApiEndpoint.post("mailboxesReplyAll", "/v1/mailboxes/:id/messages/:messageId/reply-all", {
12345
12444
  params: MailboxesReplyAllPathParams,
12346
12445
  headers: MailboxesReplyAllHeaders,
12347
12446
  payload: MailboxesReplyAllRequestJson,
@@ -12359,7 +12458,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
12359
12458
  MailboxesReplyAll503.pipe(HttpApiSchema.status(503)),
12360
12459
  MailboxesReplyAll504.pipe(HttpApiSchema.status(504))
12361
12460
  ]
12362
- }).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", {
12461
+ }).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 and from the thread's endpoint."), HttpApiEndpoint.post("mailboxesPause", "/v1/mailboxes/:id/pause", {
12363
12462
  params: MailboxesPausePathParams,
12364
12463
  success: MailboxesPause200,
12365
12464
  error: [
@@ -12581,7 +12680,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
12581
12680
  MailboxesUpdateNote500,
12582
12681
  MailboxesUpdateNote504.pipe(HttpApiSchema.status(504))
12583
12682
  ]
12584
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.updateNote").annotate(OpenApi.Summary, "Update a mailbox note").annotate(OpenApi.Description, "Updates the fields you name and keeps the rest. Only the note's author may.")).annotate(OpenApi.Description, "Mailboxes: addresses, threads, messages, drafts, and governed sends") {};
12683
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.updateNote").annotate(OpenApi.Summary, "Update a mailbox note").annotate(OpenApi.Description, "Updates the fields you name and keeps the rest. Only the note's author may.")).annotate(OpenApi.Description, "Mailboxes: endpoints, threads, messages, drafts, and governed sends") {};
12585
12684
  var MediaGroup = class extends HttpApiGroup.make("Media").add(HttpApiEndpoint.post("mediaCreate", "/v1/media", {
12586
12685
  payload: MediaCreateRequestJson,
12587
12686
  success: MediaCreate201.pipe(HttpApiSchema.status(201)),
@@ -13626,7 +13725,17 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
13626
13725
  WebhooksTest504.pipe(HttpApiSchema.status(504))
13627
13726
  ]
13628
13727
  }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "webhooks.test").annotate(OpenApi.Summary, "Send a test webhook delivery").annotate(OpenApi.Description, "Queues a signed webhook.test event through the normal delivery and retry lifecycle.")).annotate(OpenApi.Description, "Customer event webhook management, testing, and delivery logs") {};
13629
- var SamvaApi = class extends HttpApi.make("SamvaApi").annotate(OpenApi.Title, "Samva API").annotate(OpenApi.Version, "1.0.0").annotate(OpenApi.Description, "Samva is the email API for your app. Send transactional email in one typed call. Delivery events and customer replies come back as signed webhooks, and replies thread to the email they answer.").annotate(OpenApi.Servers, [{ url: "https://api.samva.dev" }]).add(AnalyticsGroup, APIKeysGroup, AttachmentsGroup, BrandsGroup, CampaignsGroup, ContactGroupsGroup, ContactsGroup, ConversationsGroup, CustomFieldsGroup, EmailGroup, ExtensionInstallationsGroup, ExtensionsGroup, FeedbackGroup, MailboxesGroup, MediaGroup, MessagesGroup, ScheduledMessagesGroup, NamespacesGroup, OperationsGroup, OrganizationsGroup, SubscriptionsGroup, TemplatesGroup, UnsubscribeGroupsGroup, WebhooksGroup) {};
13728
+ var WhoamiGroup = class extends HttpApiGroup.make("Whoami").add(HttpApiEndpoint.get("whoamiGet", "/v1/whoami", {
13729
+ success: WhoamiGet200,
13730
+ error: [
13731
+ WhoamiGet401.pipe(HttpApiSchema.status(401)),
13732
+ WhoamiGet403.pipe(HttpApiSchema.status(403)),
13733
+ WhoamiGet422.pipe(HttpApiSchema.status(422)),
13734
+ WhoamiGet500,
13735
+ WhoamiGet504.pipe(HttpApiSchema.status(504))
13736
+ ]
13737
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whoami.get").annotate(OpenApi.Summary, "Get the calling credential").annotate(OpenApi.Description, "Returns the organization the request acts in and the credential it presents: an API key with its name, prefix, and access, or a signed-in user with their role. Any valid credential may call it, whatever its grants.")).annotate(OpenApi.Description, "The organization and credential behind the request.") {};
13738
+ var SamvaApi = class extends HttpApi.make("SamvaApi").annotate(OpenApi.Title, "Samva API").annotate(OpenApi.Version, "1.0.0").annotate(OpenApi.Description, "Samva is the email API for your app. Send transactional email in one typed call. Delivery events and customer replies come back as signed webhooks, and replies thread to the email they answer.").annotate(OpenApi.Servers, [{ url: "https://api.samva.dev" }]).add(AnalyticsGroup, APIKeysGroup, AttachmentsGroup, BrandsGroup, CampaignsGroup, ContactGroupsGroup, ContactsGroup, ConversationsGroup, CustomFieldsGroup, EmailGroup, ExtensionInstallationsGroup, ExtensionsGroup, FeedbackGroup, MailboxesGroup, MediaGroup, MessagesGroup, ScheduledMessagesGroup, NamespacesGroup, OperationsGroup, OrganizationsGroup, SubscriptionsGroup, TemplatesGroup, UnsubscribeGroupsGroup, WebhooksGroup, WhoamiGroup) {};
13630
13739
  //#endregion
13631
13740
  //#region src/effect/internal/client.ts
13632
13741
  const DEFAULT_BASE_URL = "https://api.samva.dev";
@@ -13680,6 +13789,6 @@ const layer = (config) => Layer.effect(Service, make(config));
13680
13789
  const layerFetch = (config) => layer(config).pipe(Layer.provide(FetchHttpClient.layer));
13681
13790
  const raw = Effect.map(Service, (client) => client.raw);
13682
13791
  //#endregion
13683
- export { TrackingRecipientEmail as A, PaymentRequiredError as C, SendFeedback as D, SamvaApi as E, ValidationError as F, UpdateBrand as M, UpdateTemplatePayload as N, SenderNotReadyError as O, UpdateWebhookPayload as P, OnboardingReviewRequiredError as S, ResourceNotFoundError as T, ForbiddenError as _, AnalyticsQueryError as a, MailboxSendConflictError as b, CampaignFooterRequiredError as c, CreateTemplatePayload as d, CreateWebhookPayload as f, FlagDisabledError as g, ExternalServiceError as h, raw as i, UnauthorizedError as j, TestWebhookPayload as k, ConflictError as l, EmailChannelError as m, layer as n, BillingProviderError as o, DeliveryUnavailableError as p, layerFetch as r, BrandAddressRequiredError as s, Service as t, CreateBrand as u, GatewayTimeoutError as v, RateLimitedError as w, MailboxSendRefusedError as x, InternalError as y };
13792
+ export { SendFeedback as A, MailboxSendConflictError as C, RateLimitedError as D, PaymentRequiredError as E, UpdateBrand as F, UpdateTemplatePayload as I, UpdateWebhookPayload as L, TestWebhookPayload as M, TrackingRecipientEmail as N, ResourceNotFoundError as O, UnauthorizedError as P, ValidationError as R, MailboxChannelUnsupportedError as S, OnboardingReviewRequiredError as T, ExternalServiceError as _, AnalyticsQueryError as a, GatewayTimeoutError as b, BillingProviderError as c, ConflictError as d, CreateBrand as f, EmailChannelError as g, DeliveryUnavailableError as h, raw as i, SenderNotReadyError as j, SamvaApi as k, BrandAddressRequiredError as l, CreateWebhookPayload as m, layer as n, ApiKeysCreateRequestJson as o, CreateTemplatePayload as p, layerFetch as r, ApiKeysUpdateRequestJson as s, Service as t, CampaignFooterRequiredError as u, FlagDisabledError as v, MailboxSendRefusedError as w, InternalError as x, ForbiddenError as y };
13684
13793
 
13685
- //# sourceMappingURL=client-CZjhOKPM.js.map
13794
+ //# sourceMappingURL=client-BMUew5Wp.js.map