samva 0.31.0 → 0.33.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 (47) hide show
  1. package/dist/client/sdk.gen.d.ts +77 -10
  2. package/dist/client/sdk.gen.js +244 -16
  3. package/dist/client/types.gen.d.ts +607 -34
  4. package/dist/effect/email.d.ts +3 -0
  5. package/dist/effect/errors.d.ts +1 -1
  6. package/dist/effect/errors.js +2 -2
  7. package/dist/effect/generated/campaigns.d.ts +131 -57
  8. package/dist/effect/generated/campaigns.js +27 -9
  9. package/dist/effect/generated/contact-groups.js +2 -2
  10. package/dist/effect/generated/contacts.js +6 -6
  11. package/dist/effect/generated/email.d.ts +17 -1
  12. package/dist/effect/generated/email.js +12 -8
  13. package/dist/effect/generated/mailboxes.d.ts +969 -16
  14. package/dist/effect/generated/mailboxes.js +264 -12
  15. package/dist/effect/generated/newsletter-issues.d.ts +199 -1
  16. package/dist/effect/generated/newsletter-issues.js +24 -2
  17. package/dist/effect/generated/newsletters.js +1 -1
  18. package/dist/effect/generated/organizations.d.ts +345 -2
  19. package/dist/effect/generated/organizations.js +65 -5
  20. package/dist/effect/generated/scheduled-messages.d.ts +25 -8
  21. package/dist/effect/generated/scheduled-messages.js +17 -9
  22. package/dist/effect/generated/shared.d.ts +90 -9
  23. package/dist/effect/generated/shared.js +14 -10
  24. package/dist/effect/generated/subscriptions.js +1 -1
  25. package/dist/effect/generated/templates.d.ts +307 -1
  26. package/dist/effect/generated/templates.js +38 -4
  27. package/dist/effect/generated/topics.js +2 -2
  28. package/dist/effect/generated/whoami.d.ts +5 -5
  29. package/dist/effect/generated/whoami.js +1 -0
  30. package/dist/effect/generated-metadata.d.ts +40 -0
  31. package/dist/effect/generated-metadata.js +10 -0
  32. package/dist/effect/index.js +2 -2
  33. package/dist/effect/internal/send.d.ts +1 -1
  34. package/dist/effect/mailboxes.d.ts +273 -0
  35. package/dist/effect/mailboxes.js +7 -1
  36. package/dist/effect/organizations.d.ts +6 -0
  37. package/dist/effect/organizations.js +7 -1
  38. package/dist/index.js +2 -2
  39. package/dist/package.js +1 -1
  40. package/dist/promises/client.js +2 -2
  41. package/dist/promises/errors.gen.d.ts +12 -2
  42. package/dist/promises/errors.gen.js +28 -1
  43. package/dist/promises/index.js +2 -2
  44. package/dist/promises/types.gen.d.ts +1 -1
  45. package/dist/service-map.d.ts +25 -0
  46. package/dist/service-map.js +9 -0
  47. package/package.json +8 -8
@@ -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 { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, Cursor, EmailChannelError, EmailDomainId, EmailSenderId, ExternalServiceError, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, MediaId, MessageId, NamespaceId, OperationId, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SendsSeries, TopicId, UnauthorizedError, ValidationError, WebhookEndpointId } from "./shared";
4
+ import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, Cursor, EmailChannelError, EmailDomainId, EmailSenderId, ExternalServiceError, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, MailboxId, MediaId, MessageId, NamespaceId, OperationId, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SendsSeries, TopicId, UnauthorizedError, ValidationError, WebhookEndpointId } from "./shared";
5
5
  export type BlockedEmailId = string & EffectBrand.Brand<"BlockedEmailId">;
6
6
  export declare const BlockedEmailId: Schema.brand<Schema.String, "BlockedEmailId">;
7
7
  export type SuccessResult = {
@@ -344,6 +344,7 @@ export declare const ReceivingStatus: Schema.Struct<{
344
344
  }>;
345
345
  export type EmailDomainPage = {
346
346
  readonly items: ReadonlyArray<{
347
+ readonly unknownRecipientMailboxId: MailboxId | null;
347
348
  readonly id: EmailDomainId;
348
349
  readonly domain: string;
349
350
  readonly phase: "dns-setup" | "provisioning" | "verifying" | "ready" | "degraded" | "failed";
@@ -360,6 +361,7 @@ export type EmailDomainPage = {
360
361
  };
361
362
  export declare const EmailDomainPage: Schema.Struct<{
362
363
  readonly items: Schema.$Array<Schema.Struct<{
364
+ readonly unknownRecipientMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
363
365
  readonly id: Schema.brand<Schema.String, "EmailDomainId">;
364
366
  readonly domain: Schema.String;
365
367
  readonly phase: Schema.Union<readonly [Schema.Literal<"dns-setup">, Schema.Literal<"provisioning">, Schema.Literal<"verifying">, Schema.Literal<"ready">, Schema.Literal<"degraded">, Schema.Literal<"failed">]>;
@@ -380,6 +382,7 @@ export declare const EmailDomainPage: Schema.Struct<{
380
382
  readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
381
383
  }>;
382
384
  export type EmailDomainDetailed = {
385
+ readonly unknownRecipientMailboxId: MailboxId | null;
383
386
  readonly id: EmailDomainId;
384
387
  readonly domain: string;
385
388
  readonly phase: "dns-setup" | "provisioning" | "verifying" | "ready" | "degraded" | "failed";
@@ -401,6 +404,7 @@ export type EmailDomainDetailed = {
401
404
  readonly updatedAt: string;
402
405
  };
403
406
  export declare const EmailDomainDetailed: Schema.Struct<{
407
+ readonly unknownRecipientMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
404
408
  readonly id: Schema.brand<Schema.String, "EmailDomainId">;
405
409
  readonly domain: Schema.String;
406
410
  readonly phase: Schema.Union<readonly [Schema.Literal<"dns-setup">, Schema.Literal<"provisioning">, Schema.Literal<"verifying">, Schema.Literal<"ready">, Schema.Literal<"degraded">, Schema.Literal<"failed">]>;
@@ -1320,12 +1324,14 @@ export declare const EmailGetCatchAllConfigQuery: Schema.Struct<{
1320
1324
  readonly domainId: Schema.brand<Schema.String, "EmailDomainId">;
1321
1325
  }>;
1322
1326
  export type EmailGetCatchAllConfig200 = {
1327
+ readonly unknownRecipientMailboxId: MailboxId | null;
1323
1328
  readonly enabled: boolean;
1324
1329
  readonly endpointId: WebhookEndpointId | null;
1325
1330
  readonly emailCount: number;
1326
1331
  readonly lastEmailAt: string | null;
1327
1332
  };
1328
1333
  export declare const EmailGetCatchAllConfig200: Schema.Struct<{
1334
+ readonly unknownRecipientMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
1329
1335
  readonly enabled: Schema.Boolean;
1330
1336
  readonly endpointId: Schema.Union<readonly [Schema.brand<Schema.String, "WebhookEndpointId">, Schema.Null]>;
1331
1337
  readonly emailCount: Schema.Finite;
@@ -1346,10 +1352,12 @@ export declare const EmailGetCatchAllConfig504: typeof GatewayTimeoutError;
1346
1352
  export type EmailUpdateCatchAllConfigRequestJson = {
1347
1353
  readonly domainId: EmailDomainId;
1348
1354
  readonly endpointId?: WebhookEndpointId | null;
1355
+ readonly unknownRecipientMailboxId?: MailboxId | null;
1349
1356
  };
1350
1357
  export declare const EmailUpdateCatchAllConfigRequestJson: Schema.Struct<{
1351
1358
  readonly domainId: Schema.brand<Schema.String, "EmailDomainId">;
1352
1359
  readonly endpointId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "WebhookEndpointId">, Schema.Null]>>;
1360
+ readonly unknownRecipientMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>>;
1353
1361
  }>;
1354
1362
  export type EmailUpdateCatchAllConfig200 = {
1355
1363
  readonly success: true;
@@ -1430,6 +1438,7 @@ export declare const EmailListDomainsQuery: Schema.Struct<{
1430
1438
  export type EmailListDomains200 = EmailDomainPage;
1431
1439
  export declare const EmailListDomains200: Schema.Struct<{
1432
1440
  readonly items: Schema.$Array<Schema.Struct<{
1441
+ readonly unknownRecipientMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
1433
1442
  readonly id: Schema.brand<Schema.String, "EmailDomainId">;
1434
1443
  readonly domain: Schema.String;
1435
1444
  readonly phase: Schema.Union<readonly [Schema.Literal<"dns-setup">, Schema.Literal<"provisioning">, Schema.Literal<"verifying">, Schema.Literal<"ready">, Schema.Literal<"degraded">, Schema.Literal<"failed">]>;
@@ -1477,6 +1486,7 @@ export declare const EmailAddDomainRequestJson: Schema.Struct<{
1477
1486
  }>;
1478
1487
  export type EmailAddDomain201 = EmailDomainDetailed;
1479
1488
  export declare const EmailAddDomain201: Schema.Struct<{
1489
+ readonly unknownRecipientMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
1480
1490
  readonly id: Schema.brand<Schema.String, "EmailDomainId">;
1481
1491
  readonly domain: Schema.String;
1482
1492
  readonly phase: Schema.Union<readonly [Schema.Literal<"dns-setup">, Schema.Literal<"provisioning">, Schema.Literal<"verifying">, Schema.Literal<"ready">, Schema.Literal<"degraded">, Schema.Literal<"failed">]>;
@@ -1530,6 +1540,7 @@ export declare const EmailGetDomainByIdPathParams: Schema.Struct<{
1530
1540
  }>;
1531
1541
  export type EmailGetDomainById200 = EmailDomainDetailed;
1532
1542
  export declare const EmailGetDomainById200: Schema.Struct<{
1543
+ readonly unknownRecipientMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
1533
1544
  readonly id: Schema.brand<Schema.String, "EmailDomainId">;
1534
1545
  readonly domain: Schema.String;
1535
1546
  readonly phase: Schema.Union<readonly [Schema.Literal<"dns-setup">, Schema.Literal<"provisioning">, Schema.Literal<"verifying">, Schema.Literal<"ready">, Schema.Literal<"degraded">, Schema.Literal<"failed">]>;
@@ -4104,6 +4115,7 @@ declare const EmailGroup_base: HttpApiGroup.HttpApiGroup<"Email", HttpApiEndpoin
4104
4115
  }>, Schema.Null]>>;
4105
4116
  readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
4106
4117
  }>>, never, Schema.toCodecJson<Schema.Struct<{
4118
+ readonly unknownRecipientMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
4107
4119
  readonly id: Schema.brand<Schema.String, "EmailDomainId">;
4108
4120
  readonly domain: Schema.String;
4109
4121
  readonly phase: Schema.Union<readonly [Schema.Literal<"dns-setup">, Schema.Literal<"provisioning">, Schema.Literal<"verifying">, Schema.Literal<"ready">, Schema.Literal<"degraded">, Schema.Literal<"failed">]>;
@@ -6757,6 +6769,7 @@ declare const EmailGroup_base: HttpApiGroup.HttpApiGroup<"Email", HttpApiEndpoin
6757
6769
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"emailGetCatchAllConfig", "GET", "/v1/email/catch-all/config", never, Schema.toCodecStringTree<Schema.Struct<{
6758
6770
  readonly domainId: Schema.brand<Schema.String, "EmailDomainId">;
6759
6771
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
6772
+ readonly unknownRecipientMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
6760
6773
  readonly enabled: Schema.Boolean;
6761
6774
  readonly endpointId: Schema.Union<readonly [Schema.brand<Schema.String, "WebhookEndpointId">, Schema.Null]>;
6762
6775
  readonly emailCount: Schema.Finite;
@@ -7143,6 +7156,7 @@ declare const EmailGroup_base: HttpApiGroup.HttpApiGroup<"Email", HttpApiEndpoin
7143
7156
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"emailGetDomainById", "GET", "/v1/email/domains/:id", Schema.toCodecStringTree<Schema.Struct<{
7144
7157
  readonly id: Schema.brand<Schema.String, "EmailDomainId">;
7145
7158
  }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
7159
+ readonly unknownRecipientMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
7146
7160
  readonly id: Schema.brand<Schema.String, "EmailDomainId">;
7147
7161
  readonly domain: Schema.String;
7148
7162
  readonly phase: Schema.Union<readonly [Schema.Literal<"dns-setup">, Schema.Literal<"provisioning">, Schema.Literal<"verifying">, Schema.Literal<"ready">, Schema.Literal<"degraded">, Schema.Literal<"failed">]>;
@@ -8366,6 +8380,7 @@ declare const EmailGroup_base: HttpApiGroup.HttpApiGroup<"Email", HttpApiEndpoin
8366
8380
  readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
8367
8381
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
8368
8382
  readonly items: Schema.$Array<Schema.Struct<{
8383
+ readonly unknownRecipientMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
8369
8384
  readonly id: Schema.brand<Schema.String, "EmailDomainId">;
8370
8385
  readonly domain: Schema.String;
8371
8386
  readonly phase: Schema.Union<readonly [Schema.Literal<"dns-setup">, Schema.Literal<"provisioning">, Schema.Literal<"verifying">, Schema.Literal<"ready">, Schema.Literal<"degraded">, Schema.Literal<"failed">]>;
@@ -10173,6 +10188,7 @@ declare const EmailGroup_base: HttpApiGroup.HttpApiGroup<"Email", HttpApiEndpoin
10173
10188
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"emailUpdateCatchAllConfig", "PATCH", "/v1/email/catch-all/config", never, never, Schema.toCodecJson<Schema.Struct<{
10174
10189
  readonly domainId: Schema.brand<Schema.String, "EmailDomainId">;
10175
10190
  readonly endpointId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "WebhookEndpointId">, Schema.Null]>>;
10191
+ readonly unknownRecipientMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>>;
10176
10192
  }>>, never, Schema.toCodecJson<Schema.Struct<{
10177
10193
  readonly success: Schema.Literal<true>;
10178
10194
  }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
@@ -1,4 +1,4 @@
1
- import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, Cursor, EmailChannelError, EmailDomainId, EmailSenderId, ExternalServiceError, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, MediaId, MessageId, NamespaceId, OperationId, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SendsSeries, TopicId, UnauthorizedError, ValidationError, WebhookEndpointId } from "./shared.js";
1
+ import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, Cursor, EmailChannelError, EmailDomainId, EmailSenderId, ExternalServiceError, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, MailboxId, MediaId, MessageId, NamespaceId, OperationId, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SendsSeries, TopicId, UnauthorizedError, ValidationError, WebhookEndpointId } from "./shared.js";
2
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
3
3
  import * as Schema from "effect/Schema";
4
4
  // src/effect/generated/email.ts
@@ -299,6 +299,7 @@ const ReceivingStatus = /* @__PURE__ */ (() => Schema.Struct({
299
299
  }).annotate({ identifier: "ReceivingStatus" }))();
300
300
  const EmailDomainPage = /* @__PURE__ */ (() => Schema.Struct({
301
301
  items: Schema.Array(Schema.Struct({
302
+ unknownRecipientMailboxId: Schema.Union([MailboxId, Schema.Null]).annotate({ description: "The active mailbox on this domain that receives unknown addresses when catch-all has no webhook endpoint, or null to drop them without a bounce." }),
302
303
  id: EmailDomainId,
303
304
  domain: Schema.String,
304
305
  phase: Schema.Union([
@@ -321,6 +322,7 @@ const EmailDomainPage = /* @__PURE__ */ (() => Schema.Struct({
321
322
  nextCursor: Schema.Union([Schema.String, Schema.Null])
322
323
  }).annotate({ identifier: "EmailDomainPage" }))();
323
324
  const EmailDomainDetailed = /* @__PURE__ */ (() => Schema.Struct({
325
+ unknownRecipientMailboxId: Schema.Union([MailboxId, Schema.Null]).annotate({ description: "The active mailbox on this domain that receives unknown addresses when catch-all has no webhook endpoint, or null to drop them without a bounce." }),
324
326
  id: EmailDomainId,
325
327
  domain: Schema.String,
326
328
  phase: Schema.Union([
@@ -916,6 +918,7 @@ const EmailGetBlockLogs500 = InternalError;
916
918
  const EmailGetBlockLogs504 = GatewayTimeoutError;
917
919
  const EmailGetCatchAllConfigQuery = /* @__PURE__ */ (() => Schema.Struct({ domainId: EmailDomainId }))();
918
920
  const EmailGetCatchAllConfig200 = /* @__PURE__ */ (() => Schema.Struct({
921
+ unknownRecipientMailboxId: Schema.Union([MailboxId, Schema.Null]).annotate({ description: "The active mailbox on this domain that receives unknown addresses when catch-all has no webhook endpoint, or null to drop them without a bounce." }),
919
922
  enabled: Schema.Boolean,
920
923
  endpointId: Schema.Union([WebhookEndpointId, Schema.Null]),
921
924
  emailCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
@@ -929,7 +932,8 @@ const EmailGetCatchAllConfig500 = InternalError;
929
932
  const EmailGetCatchAllConfig504 = GatewayTimeoutError;
930
933
  const EmailUpdateCatchAllConfigRequestJson = /* @__PURE__ */ (() => Schema.Struct({
931
934
  domainId: EmailDomainId,
932
- endpointId: Schema.optionalKey(Schema.Union([WebhookEndpointId, Schema.Null]))
935
+ endpointId: Schema.optionalKey(Schema.Union([WebhookEndpointId, Schema.Null])),
936
+ unknownRecipientMailboxId: Schema.optionalKey(Schema.Union([MailboxId, Schema.Null]).annotate({ description: "An active mailbox in this organization with an email address on this domain. Receives unknown addresses only when catch-all has no webhook endpoint. Null drops unknown addresses without a bounce; omission leaves the setting unchanged." }))
933
937
  }))();
934
938
  const EmailUpdateCatchAllConfig200 = /* @__PURE__ */ (() => Schema.Struct({ success: Schema.Literal(true) }))();
935
939
  const EmailUpdateCatchAllConfig401 = UnauthorizedError;
@@ -1459,7 +1463,7 @@ const EmailAddSenderHeaders = /* @__PURE__ */ (() => Schema.Struct({ "idempotenc
1459
1463
  const EmailAddSenderRequestJson = /* @__PURE__ */ (() => Schema.Struct({
1460
1464
  email: Schema.String,
1461
1465
  domainId: Schema.optionalKey(Schema.Union([EmailDomainId, Schema.Null])),
1462
- name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1466
+ name: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })), Schema.Null])),
1463
1467
  replyToEmails: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1464
1468
  namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null]))
1465
1469
  }))();
@@ -1719,7 +1723,7 @@ var EmailGroup = class extends HttpApiGroup.make("Email").add(HttpApiEndpoint.ge
1719
1723
  EmailGetCatchAllConfig500,
1720
1724
  EmailGetCatchAllConfig504.pipe(HttpApiSchema.status(504))
1721
1725
  ]
1722
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.getCatchAllConfig").annotate(OpenApi.Summary, "Get catch-all configuration").annotate(OpenApi.Description, "Returns the catch-all receiving configuration for a domain, including the webhook endpoint that receives its inbound mail and its email counts."), HttpApiEndpoint.patch("emailUpdateCatchAllConfig", "/v1/email/catch-all/config", {
1726
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.getCatchAllConfig").annotate(OpenApi.Summary, "Get catch-all configuration").annotate(OpenApi.Description, "Returns the catch-all receiving configuration for a domain, including its webhook endpoint, unknown-address mailbox (null means drop), and email counts."), HttpApiEndpoint.patch("emailUpdateCatchAllConfig", "/v1/email/catch-all/config", {
1723
1727
  payload: EmailUpdateCatchAllConfigRequestJson,
1724
1728
  success: EmailUpdateCatchAllConfig200,
1725
1729
  error: [
@@ -1730,7 +1734,7 @@ var EmailGroup = class extends HttpApiGroup.make("Email").add(HttpApiEndpoint.ge
1730
1734
  EmailUpdateCatchAllConfig500,
1731
1735
  EmailUpdateCatchAllConfig504.pipe(HttpApiSchema.status(504))
1732
1736
  ]
1733
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.updateCatchAllConfig").annotate(OpenApi.Summary, "Update catch-all configuration").annotate(OpenApi.Description, "Updates a domain's catch-all receiving configuration: the webhook endpoint that receives its inbound mail."), HttpApiEndpoint.get("emailGetCatchAllStats", "/v1/email/catch-all/stats", {
1737
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.updateCatchAllConfig").annotate(OpenApi.Summary, "Update catch-all configuration").annotate(OpenApi.Description, "Updates a domain's catch-all webhook endpoint or unknown-address mailbox. The mailbox must be active, in the same organization, and have an email address on the domain. Omitted fields stay unchanged; `unknownRecipientMailboxId: null` drops unknown addresses without a bounce. A webhook endpoint takes precedence over the unknown-address setting."), HttpApiEndpoint.get("emailGetCatchAllStats", "/v1/email/catch-all/stats", {
1734
1738
  query: EmailGetCatchAllStatsQuery,
1735
1739
  success: EmailGetCatchAllStats200,
1736
1740
  error: [
@@ -1963,7 +1967,7 @@ var EmailGroup = class extends HttpApiGroup.make("Email").add(HttpApiEndpoint.ge
1963
1967
  EmailEnableCatchAll502.pipe(HttpApiSchema.status(502)),
1964
1968
  EmailEnableCatchAll504.pipe(HttpApiSchema.status(504))
1965
1969
  ]
1966
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.enableCatchAll").annotate(OpenApi.Summary, "Enable catch-all receiving").annotate(OpenApi.Description, "Enables catch-all inbound receiving for a verified domain. `endpointId` is one of the organization's webhook endpoints; every address on the domain delivers `message.received` to it. Omit it to deliver through forwarding rules alone, which needs at least one active forwarding rule covering the domain. Mail that matches neither a rule nor an endpoint is rejected as an unknown recipient. Responds with 201."), HttpApiEndpoint.post("emailEnableReceiving", "/v1/email/domains/:id/enable-receiving", {
1970
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.enableCatchAll").annotate(OpenApi.Summary, "Enable catch-all receiving").annotate(OpenApi.Description, "Enables catch-all inbound receiving for a verified domain without requiring a destination. `endpointId` is one of the organization's webhook endpoints; every address on the domain delivers `message.received` to it. Without an endpoint, forwarding rules and active mailboxes receive matching addresses. Unknown addresses reach `unknownRecipientMailboxId` when configured, otherwise they are dropped without a bounce. Responds with 201."), HttpApiEndpoint.post("emailEnableReceiving", "/v1/email/domains/:id/enable-receiving", {
1967
1971
  params: EmailEnableReceivingPathParams,
1968
1972
  payload: EmailEnableReceivingRequestJson,
1969
1973
  success: EmailEnableReceiving200,
@@ -1975,7 +1979,7 @@ var EmailGroup = class extends HttpApiGroup.make("Email").add(HttpApiEndpoint.ge
1975
1979
  EmailEnableReceiving500,
1976
1980
  EmailEnableReceiving504.pipe(HttpApiSchema.status(504))
1977
1981
  ]
1978
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.enableReceiving").annotate(OpenApi.Summary, "Enable inbound email for a domain").annotate(OpenApi.Description, "Enables inbound receiving for a verified domain and returns the recipient addresses it accepts. Set `catchAll` to route every address on the domain; that needs a destination: a webhook endpoint, supplied as `endpointId` or already configured on the domain, or at least one active forwarding rule that covers the domain. Mail that matches neither is rejected, never accepted and dropped."), HttpApiEndpoint.get("emailGetReceivingStatus", "/v1/email/domains/:id/receiving-status", {
1982
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.enableReceiving").annotate(OpenApi.Summary, "Enable inbound email for a domain").annotate(OpenApi.Description, "Enables inbound receiving for a verified domain and returns the recipient addresses it accepts. Set `catchAll` to accept every address on the domain. No destination is required to enable receiving. With no webhook endpoint, mail reaches matching forwarding rules and active mailboxes; unknown addresses reach `unknownRecipientMailboxId` when configured, otherwise they are dropped without a bounce."), HttpApiEndpoint.get("emailGetReceivingStatus", "/v1/email/domains/:id/receiving-status", {
1979
1983
  params: EmailGetReceivingStatusPathParams,
1980
1984
  success: EmailGetReceivingStatus200,
1981
1985
  error: [
@@ -1986,7 +1990,7 @@ var EmailGroup = class extends HttpApiGroup.make("Email").add(HttpApiEndpoint.ge
1986
1990
  EmailGetReceivingStatus500,
1987
1991
  EmailGetReceivingStatus504.pipe(HttpApiSchema.status(504))
1988
1992
  ]
1989
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.getReceivingStatus").annotate(OpenApi.Summary, "Get receiving setup status").annotate(OpenApi.Description, "Reports each prerequisite for receiving a domain's mail at Samva, in order: sending verified, a destination (a webhook endpoint or an active forwarding rule), receiving enabled, and the inbound MX record. The MX answer is a live DNS lookup that names the current target when mail is routed elsewhere."), HttpApiEndpoint.post("emailDetectRegistrar", "/v1/email/domains/:id/registrar", {
1993
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.getReceivingStatus").annotate(OpenApi.Summary, "Get receiving setup status").annotate(OpenApi.Description, "Reports sending verification, configured destinations (webhook endpoint, forwarding rules, and mailboxes), receiving enablement, and the inbound MX record. Receiving can be enabled before a destination is configured. The MX answer is a live DNS lookup that names the current target when mail is routed elsewhere."), HttpApiEndpoint.post("emailDetectRegistrar", "/v1/email/domains/:id/registrar", {
1990
1994
  params: EmailDetectRegistrarPathParams,
1991
1995
  payload: EmailDetectRegistrarRequestJson,
1992
1996
  success: EmailDetectRegistrar200,