samva 0.19.0 → 0.20.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 (44) hide show
  1. package/dist/client/sdk.gen.d.ts +56 -14
  2. package/dist/client/sdk.gen.js +186 -34
  3. package/dist/client/types.gen.d.ts +325 -65
  4. package/dist/effect/campaigns.d.ts +35 -3
  5. package/dist/effect/contacts.d.ts +24 -4
  6. package/dist/effect/email.d.ts +22 -6
  7. package/dist/effect/errors.d.ts +1 -1
  8. package/dist/effect/errors.js +2 -2
  9. package/dist/effect/generated/campaigns.d.ts +73 -4
  10. package/dist/effect/generated/campaigns.js +18 -1
  11. package/dist/effect/generated/contacts.d.ts +131 -1
  12. package/dist/effect/generated/contacts.js +17 -2
  13. package/dist/effect/generated/email.d.ts +162 -1
  14. package/dist/effect/generated/email.js +31 -11
  15. package/dist/effect/generated/journeys.d.ts +13 -61
  16. package/dist/effect/generated/journeys.js +5 -5
  17. package/dist/effect/generated/mailboxes.d.ts +274 -78
  18. package/dist/effect/generated/mailboxes.js +28 -20
  19. package/dist/effect/generated/messages.d.ts +4 -1
  20. package/dist/effect/generated/messages.js +2 -1
  21. package/dist/effect/generated/namespaces.d.ts +432 -2
  22. package/dist/effect/generated/namespaces.js +91 -4
  23. package/dist/effect/generated/shared.d.ts +34 -29
  24. package/dist/effect/generated/shared.js +25 -22
  25. package/dist/effect/generated/templates.d.ts +44 -1
  26. package/dist/effect/generated/templates.js +9 -3
  27. package/dist/effect/generated-metadata.d.ts +15 -4
  28. package/dist/effect/generated-metadata.js +3 -4
  29. package/dist/effect/index.js +2 -2
  30. package/dist/effect/journeys.d.ts +4 -4
  31. package/dist/effect/mailboxes.d.ts +11 -11
  32. package/dist/effect/messages.d.ts +3 -0
  33. package/dist/effect/namespaces.d.ts +29 -0
  34. package/dist/effect/namespaces.js +7 -1
  35. package/dist/effect/templates.d.ts +12 -1
  36. package/dist/index.js +2 -2
  37. package/dist/package.js +1 -1
  38. package/dist/promises/errors.gen.d.ts +2 -12
  39. package/dist/promises/errors.gen.js +1 -26
  40. package/dist/promises/index.js +2 -2
  41. package/dist/promises/types.gen.d.ts +1 -1
  42. package/dist/service-map.d.ts +15 -0
  43. package/dist/service-map.js +16 -0
  44. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import { ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, ConflictError, ConversationId, CreateMailboxEndpointPayload, Cursor, EmailAttachment, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, MailboxActionDecision, MailboxActionId, MailboxChannel, MailboxChannelUnsupportedError, MailboxDraftId, MailboxEndpointId, MailboxGrantRole, MailboxId, MailboxLabelId, MailboxMetadata, MailboxMetadataPatch, MailboxPolicyId, MailboxPolicyOutcomeKind, MailboxSendConflictError, MailboxSendMode, MailboxSendOutcome, MailboxSendReceipt, MailboxSendRefusedError, MailboxThreadFolder, MailboxThreadId, MailboxThreadPriority, MediaId, MessageId, NamespaceId, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, SkippedRecipient, SuccessResponse, UnauthorizedError, UserId, ValidationError } from "./shared.js";
1
+ import { ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, ConflictError, ConversationId, CreateMailboxEndpointPayload, Cursor, EmailAttachment, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, MailboxActionDecision, MailboxActionId, MailboxChannel, MailboxDraftId, MailboxEndpointId, MailboxGrantRole, MailboxId, MailboxLabelId, MailboxMetadata, MailboxMetadataPatch, MailboxPolicyId, MailboxPolicyOutcomeKind, MailboxSendConflictError, MailboxSendMode, MailboxSendOutcome, MailboxSendReceipt, MailboxSendRefusedError, MailboxThreadFolder, MailboxThreadId, MailboxThreadPriority, MediaId, MessageId, NamespaceId, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, SkippedRecipient, SuccessResponse, UnauthorizedError, UserId, ValidationError } from "./shared.js";
2
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
3
3
  import * as Schema from "effect/Schema";
4
4
  //#region src/effect/generated/mailboxes.ts
@@ -696,10 +696,10 @@ const MailboxesCreateRequestJson = /* @__PURE__ */ Schema.Struct({
696
696
  const MailboxesCreate201 = Mailbox;
697
697
  const MailboxesCreate401 = UnauthorizedError;
698
698
  const MailboxesCreate402 = PaymentRequiredError;
699
- const MailboxesCreate403 = ForbiddenError;
699
+ const MailboxesCreate403 = /* @__PURE__ */ Schema.Union([FlagDisabledError, ForbiddenError]);
700
700
  const MailboxesCreate404 = ResourceNotFoundError;
701
701
  const MailboxesCreate409 = ConflictError;
702
- const MailboxesCreate422 = /* @__PURE__ */ Schema.Union([ValidationError, MailboxChannelUnsupportedError]);
702
+ const MailboxesCreate422 = ValidationError;
703
703
  const MailboxesCreate500 = InternalError;
704
704
  const MailboxesCreate502 = BillingProviderError;
705
705
  const MailboxesCreate504 = GatewayTimeoutError;
@@ -783,13 +783,14 @@ const MailboxesApproveAction202 = MailboxPendingAction;
783
783
  const MailboxesApproveAction401 = UnauthorizedError;
784
784
  const MailboxesApproveAction402 = PaymentRequiredError;
785
785
  const MailboxesApproveAction403 = /* @__PURE__ */ Schema.Union([
786
+ FlagDisabledError,
786
787
  MailboxSendRefusedError,
787
788
  OnboardingReviewRequiredError,
788
789
  ForbiddenError
789
790
  ]);
790
791
  const MailboxesApproveAction404 = ResourceNotFoundError;
791
792
  const MailboxesApproveAction409 = /* @__PURE__ */ Schema.Union([MailboxSendConflictError, ConflictError]);
792
- const MailboxesApproveAction422 = /* @__PURE__ */ Schema.Union([MailboxChannelUnsupportedError, ValidationError]);
793
+ const MailboxesApproveAction422 = ValidationError;
793
794
  const MailboxesApproveAction429 = RateLimitedError;
794
795
  const MailboxesApproveAction500 = InternalError;
795
796
  const MailboxesApproveAction502 = BillingProviderError;
@@ -804,13 +805,14 @@ const MailboxesCancelAction202 = MailboxPendingSendReceipt;
804
805
  const MailboxesCancelAction401 = UnauthorizedError;
805
806
  const MailboxesCancelAction402 = PaymentRequiredError;
806
807
  const MailboxesCancelAction403 = /* @__PURE__ */ Schema.Union([
808
+ FlagDisabledError,
807
809
  MailboxSendRefusedError,
808
810
  OnboardingReviewRequiredError,
809
811
  ForbiddenError
810
812
  ]);
811
813
  const MailboxesCancelAction404 = ResourceNotFoundError;
812
814
  const MailboxesCancelAction409 = /* @__PURE__ */ Schema.Union([MailboxSendConflictError, ConflictError]);
813
- const MailboxesCancelAction422 = /* @__PURE__ */ Schema.Union([MailboxChannelUnsupportedError, ValidationError]);
815
+ const MailboxesCancelAction422 = ValidationError;
814
816
  const MailboxesCancelAction429 = RateLimitedError;
815
817
  const MailboxesCancelAction500 = InternalError;
816
818
  const MailboxesCancelAction502 = BillingProviderError;
@@ -838,13 +840,14 @@ const MailboxesRetryAction202 = MailboxPendingSendReceipt;
838
840
  const MailboxesRetryAction401 = UnauthorizedError;
839
841
  const MailboxesRetryAction402 = PaymentRequiredError;
840
842
  const MailboxesRetryAction403 = /* @__PURE__ */ Schema.Union([
843
+ FlagDisabledError,
841
844
  MailboxSendRefusedError,
842
845
  OnboardingReviewRequiredError,
843
846
  ForbiddenError
844
847
  ]);
845
848
  const MailboxesRetryAction404 = ResourceNotFoundError;
846
849
  const MailboxesRetryAction409 = /* @__PURE__ */ Schema.Union([MailboxSendConflictError, ConflictError]);
847
- const MailboxesRetryAction422 = /* @__PURE__ */ Schema.Union([MailboxChannelUnsupportedError, ValidationError]);
850
+ const MailboxesRetryAction422 = ValidationError;
848
851
  const MailboxesRetryAction429 = RateLimitedError;
849
852
  const MailboxesRetryAction500 = InternalError;
850
853
  const MailboxesRetryAction502 = BillingProviderError;
@@ -893,7 +896,7 @@ const MailboxesCreateDraft201 = MailboxDraft;
893
896
  const MailboxesCreateDraft401 = UnauthorizedError;
894
897
  const MailboxesCreateDraft403 = ForbiddenError;
895
898
  const MailboxesCreateDraft404 = ResourceNotFoundError;
896
- const MailboxesCreateDraft422 = /* @__PURE__ */ Schema.Union([MailboxChannelUnsupportedError, ValidationError]);
899
+ const MailboxesCreateDraft422 = ValidationError;
897
900
  const MailboxesCreateDraft500 = InternalError;
898
901
  const MailboxesCreateDraft504 = GatewayTimeoutError;
899
902
  const MailboxesGetDraftPathParams = /* @__PURE__ */ Schema.Struct({
@@ -950,13 +953,14 @@ const MailboxesSendDraft202 = MailboxPendingSendReceipt;
950
953
  const MailboxesSendDraft401 = UnauthorizedError;
951
954
  const MailboxesSendDraft402 = PaymentRequiredError;
952
955
  const MailboxesSendDraft403 = /* @__PURE__ */ Schema.Union([
956
+ FlagDisabledError,
953
957
  MailboxSendRefusedError,
954
958
  OnboardingReviewRequiredError,
955
959
  ForbiddenError
956
960
  ]);
957
961
  const MailboxesSendDraft404 = ResourceNotFoundError;
958
962
  const MailboxesSendDraft409 = /* @__PURE__ */ Schema.Union([MailboxSendConflictError, ConflictError]);
959
- const MailboxesSendDraft422 = /* @__PURE__ */ Schema.Union([MailboxChannelUnsupportedError, ValidationError]);
963
+ const MailboxesSendDraft422 = ValidationError;
960
964
  const MailboxesSendDraft429 = RateLimitedError;
961
965
  const MailboxesSendDraft500 = InternalError;
962
966
  const MailboxesSendDraft502 = BillingProviderError;
@@ -970,10 +974,10 @@ const MailboxesCreateEndpointRequestJson = /* @__PURE__ */ Schema.Struct({
970
974
  });
971
975
  const MailboxesCreateEndpoint201 = Mailbox;
972
976
  const MailboxesCreateEndpoint401 = UnauthorizedError;
973
- const MailboxesCreateEndpoint403 = ForbiddenError;
977
+ const MailboxesCreateEndpoint403 = /* @__PURE__ */ Schema.Union([FlagDisabledError, ForbiddenError]);
974
978
  const MailboxesCreateEndpoint404 = ResourceNotFoundError;
975
979
  const MailboxesCreateEndpoint409 = ConflictError;
976
- const MailboxesCreateEndpoint422 = /* @__PURE__ */ Schema.Union([ValidationError, MailboxChannelUnsupportedError]);
980
+ const MailboxesCreateEndpoint422 = ValidationError;
977
981
  const MailboxesCreateEndpoint500 = InternalError;
978
982
  const MailboxesCreateEndpoint504 = GatewayTimeoutError;
979
983
  const MailboxesRemoveEndpointPathParams = /* @__PURE__ */ Schema.Struct({
@@ -1158,13 +1162,14 @@ const MailboxesSendMessage202 = MailboxPendingSendReceipt;
1158
1162
  const MailboxesSendMessage401 = UnauthorizedError;
1159
1163
  const MailboxesSendMessage402 = PaymentRequiredError;
1160
1164
  const MailboxesSendMessage403 = /* @__PURE__ */ Schema.Union([
1165
+ FlagDisabledError,
1161
1166
  MailboxSendRefusedError,
1162
1167
  OnboardingReviewRequiredError,
1163
1168
  ForbiddenError
1164
1169
  ]);
1165
1170
  const MailboxesSendMessage404 = ResourceNotFoundError;
1166
1171
  const MailboxesSendMessage409 = /* @__PURE__ */ Schema.Union([MailboxSendConflictError, ConflictError]);
1167
- const MailboxesSendMessage422 = /* @__PURE__ */ Schema.Union([MailboxChannelUnsupportedError, ValidationError]);
1172
+ const MailboxesSendMessage422 = ValidationError;
1168
1173
  const MailboxesSendMessage429 = RateLimitedError;
1169
1174
  const MailboxesSendMessage500 = InternalError;
1170
1175
  const MailboxesSendMessage502 = BillingProviderError;
@@ -1237,13 +1242,14 @@ const MailboxesForward202 = MailboxPendingSendReceipt;
1237
1242
  const MailboxesForward401 = UnauthorizedError;
1238
1243
  const MailboxesForward402 = PaymentRequiredError;
1239
1244
  const MailboxesForward403 = /* @__PURE__ */ Schema.Union([
1245
+ FlagDisabledError,
1240
1246
  MailboxSendRefusedError,
1241
1247
  OnboardingReviewRequiredError,
1242
1248
  ForbiddenError
1243
1249
  ]);
1244
1250
  const MailboxesForward404 = ResourceNotFoundError;
1245
1251
  const MailboxesForward409 = /* @__PURE__ */ Schema.Union([MailboxSendConflictError, ConflictError]);
1246
- const MailboxesForward422 = /* @__PURE__ */ Schema.Union([MailboxChannelUnsupportedError, ValidationError]);
1252
+ const MailboxesForward422 = ValidationError;
1247
1253
  const MailboxesForward429 = RateLimitedError;
1248
1254
  const MailboxesForward500 = InternalError;
1249
1255
  const MailboxesForward502 = BillingProviderError;
@@ -1290,13 +1296,14 @@ const MailboxesReply202 = MailboxPendingSendReceipt;
1290
1296
  const MailboxesReply401 = UnauthorizedError;
1291
1297
  const MailboxesReply402 = PaymentRequiredError;
1292
1298
  const MailboxesReply403 = /* @__PURE__ */ Schema.Union([
1299
+ FlagDisabledError,
1293
1300
  MailboxSendRefusedError,
1294
1301
  OnboardingReviewRequiredError,
1295
1302
  ForbiddenError
1296
1303
  ]);
1297
1304
  const MailboxesReply404 = ResourceNotFoundError;
1298
1305
  const MailboxesReply409 = /* @__PURE__ */ Schema.Union([MailboxSendConflictError, ConflictError]);
1299
- const MailboxesReply422 = /* @__PURE__ */ Schema.Union([MailboxChannelUnsupportedError, ValidationError]);
1306
+ const MailboxesReply422 = ValidationError;
1300
1307
  const MailboxesReply429 = RateLimitedError;
1301
1308
  const MailboxesReply500 = InternalError;
1302
1309
  const MailboxesReply502 = BillingProviderError;
@@ -1320,13 +1327,14 @@ const MailboxesReplyAll202 = MailboxPendingSendReceipt;
1320
1327
  const MailboxesReplyAll401 = UnauthorizedError;
1321
1328
  const MailboxesReplyAll402 = PaymentRequiredError;
1322
1329
  const MailboxesReplyAll403 = /* @__PURE__ */ Schema.Union([
1330
+ FlagDisabledError,
1323
1331
  MailboxSendRefusedError,
1324
1332
  OnboardingReviewRequiredError,
1325
1333
  ForbiddenError
1326
1334
  ]);
1327
1335
  const MailboxesReplyAll404 = ResourceNotFoundError;
1328
1336
  const MailboxesReplyAll409 = /* @__PURE__ */ Schema.Union([MailboxSendConflictError, ConflictError]);
1329
- const MailboxesReplyAll422 = /* @__PURE__ */ Schema.Union([MailboxChannelUnsupportedError, ValidationError]);
1337
+ const MailboxesReplyAll422 = ValidationError;
1330
1338
  const MailboxesReplyAll429 = RateLimitedError;
1331
1339
  const MailboxesReplyAll500 = InternalError;
1332
1340
  const MailboxesReplyAll502 = BillingProviderError;
@@ -1611,7 +1619,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
1611
1619
  MailboxesCreate502.pipe(HttpApiSchema.status(502)),
1612
1620
  MailboxesCreate504.pipe(HttpApiSchema.status(504))
1613
1621
  ]
1614
- }).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", {
1622
+ }).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. 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. A phone endpoint's address is a number the organization connected on that channel, in E.164 form. The slug defaults to the address's local part, or a phone number's digits. 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", {
1615
1623
  params: MailboxesGetPathParams,
1616
1624
  success: MailboxesGet200,
1617
1625
  error: [
@@ -1766,7 +1774,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
1766
1774
  MailboxesCreateDraft500,
1767
1775
  MailboxesCreateDraft504.pipe(HttpApiSchema.status(504))
1768
1776
  ]
1769
- }).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", {
1777
+ }).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. A phone channel's draft holds a recipient number and text. Send it with `POST /v1/mailboxes/{id}/drafts/{draftId}/send`."), HttpApiEndpoint.get("mailboxesGetDraft", "/v1/mailboxes/:id/drafts/:draftId", {
1770
1778
  params: MailboxesGetDraftPathParams,
1771
1779
  success: MailboxesGetDraft200,
1772
1780
  error: [
@@ -1831,7 +1839,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
1831
1839
  MailboxesCreateEndpoint500,
1832
1840
  MailboxesCreateEndpoint504.pipe(HttpApiSchema.status(504))
1833
1841
  ]
1834
- }).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", {
1842
+ }).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: an email address must be under the organization's Samva-hosted mail domain or a verified domain with receiving enabled, a phone number must be one the organization connected on that channel, 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", {
1835
1843
  params: MailboxesRemoveEndpointPathParams,
1836
1844
  success: MailboxesRemoveEndpoint200,
1837
1845
  error: [
@@ -1992,7 +2000,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
1992
2000
  MailboxesSendMessage503.pipe(HttpApiSchema.status(503)),
1993
2001
  MailboxesSendMessage504.pipe(HttpApiSchema.status(504))
1994
2002
  ]
1995
- }).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", {
2003
+ }).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 mailbox with no endpoint on that channel is refused (422). A message to a number joins the mailbox's thread with that number when it has one. 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", {
1996
2004
  params: MailboxesGetMessagePathParams,
1997
2005
  success: MailboxesGetMessage200,
1998
2006
  error: [
@@ -2098,7 +2106,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
2098
2106
  MailboxesReply503.pipe(HttpApiSchema.status(503)),
2099
2107
  MailboxesReply504.pipe(HttpApiSchema.status(504))
2100
2108
  ]
2101
- }).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", {
2109
+ }).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. On a phone channel the reply goes to the number on the other side of the thread."), HttpApiEndpoint.post("mailboxesReplyAll", "/v1/mailboxes/:id/messages/:messageId/reply-all", {
2102
2110
  params: MailboxesReplyAllPathParams,
2103
2111
  headers: MailboxesReplyAllHeaders,
2104
2112
  payload: MailboxesReplyAllRequestJson,
@@ -2116,7 +2124,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
2116
2124
  MailboxesReplyAll503.pipe(HttpApiSchema.status(503)),
2117
2125
  MailboxesReplyAll504.pipe(HttpApiSchema.status(504))
2118
2126
  ]
2119
- }).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", {
2127
+ }).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. A phone thread has one other side, so it answers like a reply."), HttpApiEndpoint.post("mailboxesPause", "/v1/mailboxes/:id/pause", {
2120
2128
  params: MailboxesPausePathParams,
2121
2129
  success: MailboxesPause200,
2122
2130
  error: [
@@ -1,7 +1,7 @@
1
1
  import type * as EffectBrand from "effect/Brand";
2
2
  import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
3
3
  import * as Schema from "effect/Schema";
4
- import { ApiKeyId, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, ConflictError, ContactId, ConversationId, Cursor, DeliveryUnavailableError, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailRecipients, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, MediaId, MessageId, MessageMetadata, MessagePage, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, SkippedRecipient, UnauthorizedError, UserId, ValidationError } from "./shared";
4
+ import { ApiKeyId, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, ConflictError, ContactId, ConversationId, Cursor, DeliveryUnavailableError, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailRecipients, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, MediaId, MessageId, MessageMetadata, MessagePage, NamespaceId, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, SkippedRecipient, UnauthorizedError, UserId, ValidationError } from "./shared";
5
5
  export type MessageSender = {
6
6
  readonly address: string;
7
7
  readonly name: string | null;
@@ -401,6 +401,7 @@ export type MessagesListQuery = {
401
401
  readonly conversationId?: ConversationId | null;
402
402
  readonly contactId?: ContactId | null;
403
403
  readonly from?: string | null;
404
+ readonly namespaceId?: NamespaceId | null;
404
405
  readonly after?: string | null;
405
406
  readonly before?: string | null;
406
407
  };
@@ -413,6 +414,7 @@ export declare const MessagesListQuery: Schema.Struct<{
413
414
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
414
415
  readonly contactId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
415
416
  readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
417
+ readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
416
418
  readonly after: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
417
419
  readonly before: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
418
420
  }>;
@@ -1731,6 +1733,7 @@ declare const MessagesGroup_base: HttpApiGroup.HttpApiGroup<"Messages", HttpApiE
1731
1733
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
1732
1734
  readonly contactId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
1733
1735
  readonly from: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1736
+ readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
1734
1737
  readonly after: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1735
1738
  readonly before: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1736
1739
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
@@ -1,4 +1,4 @@
1
- import { ApiKeyId, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, ConflictError, ContactId, ConversationId, Cursor, DeliveryUnavailableError, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailRecipients, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, MediaId, MessageId, MessageMetadata, MessagePage, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, SkippedRecipient, UnauthorizedError, UserId, ValidationError } from "./shared.js";
1
+ import { ApiKeyId, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, ConflictError, ContactId, ConversationId, Cursor, DeliveryUnavailableError, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailRecipients, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, MediaId, MessageId, MessageMetadata, MessagePage, NamespaceId, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, SkippedRecipient, UnauthorizedError, UserId, ValidationError } from "./shared.js";
2
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
3
3
  import * as Schema from "effect/Schema";
4
4
  //#region src/effect/generated/messages.ts
@@ -262,6 +262,7 @@ const MessagesListQuery = /* @__PURE__ */ Schema.Struct({
262
262
  conversationId: Schema.optionalKey(Schema.Union([ConversationId, Schema.Null])),
263
263
  contactId: Schema.optionalKey(Schema.Union([ContactId, Schema.Null])),
264
264
  from: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
265
+ namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null]).annotate({ description: "Only this namespace's messages. A key scoped to a namespace always lists its own." })),
265
266
  after: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
266
267
  before: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
267
268
  });