samva 0.32.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.
@@ -530,7 +530,7 @@ export declare class Email {
530
530
  /**
531
531
  * Enable inbound email for a domain
532
532
  *
533
- * 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.
533
+ * 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.
534
534
  */
535
535
  static enableReceiving<ThrowOnError extends boolean = false>(parameters: {
536
536
  id: EmailDomainId;
@@ -542,7 +542,7 @@ export declare class Email {
542
542
  /**
543
543
  * Get receiving setup status
544
544
  *
545
- * 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.
545
+ * 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.
546
546
  */
547
547
  static getReceivingStatus<ThrowOnError extends boolean = false>(parameters: {
548
548
  id: EmailDomainId;
@@ -699,7 +699,7 @@ export declare class Email {
699
699
  /**
700
700
  * Enable catch-all receiving
701
701
  *
702
- * 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.
702
+ * 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.
703
703
  */
704
704
  static enableCatchAll<ThrowOnError extends boolean = false>(parameters: {
705
705
  id: EmailDomainId;
@@ -716,7 +716,7 @@ export declare class Email {
716
716
  /**
717
717
  * Get catch-all configuration
718
718
  *
719
- * Returns the catch-all receiving configuration for a domain, including the webhook endpoint that receives its inbound mail and its email counts.
719
+ * Returns the catch-all receiving configuration for a domain, including its webhook endpoint, unknown-address mailbox (null means drop), and email counts.
720
720
  */
721
721
  static getCatchAllConfig<ThrowOnError extends boolean = false>(parameters: {
722
722
  domainId: EmailDomainId;
@@ -724,11 +724,12 @@ export declare class Email {
724
724
  /**
725
725
  * Update catch-all configuration
726
726
  *
727
- * Updates a domain's catch-all receiving configuration: the webhook endpoint that receives its inbound mail.
727
+ * 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.
728
728
  */
729
729
  static updateCatchAllConfig<ThrowOnError extends boolean = false>(parameters: {
730
730
  domainId: EmailDomainId;
731
731
  endpointId?: WebhookEndpointId | null | undefined;
732
+ unknownRecipientMailboxId?: MailboxId | null | undefined;
732
733
  }, options?: Options<never, ThrowOnError>): RequestResult<EmailUpdateCatchAllConfigResponses, EmailUpdateCatchAllConfigErrors, ThrowOnError>;
733
734
  /**
734
735
  * Get catch-all statistics
@@ -3832,7 +3833,7 @@ export declare class Mailboxes {
3832
3833
  /**
3833
3834
  * Resume a mailbox send
3834
3835
  *
3835
- * Resumes the same action only after its previous execution is confirmed ended and safe continuation is possible. Only an authorized person who proposed the send or can approve actions may retry. Automatic waits need no manual Retry. This does not grant new approval, reset the original deadline, replace the message identity, or resubmit an accepted or uncertain send.
3836
+ * Resumes the same eligible action while preserving its content, message identity, existing retry delays and original deadline. A queued action can resume while cleanup from an ended send attempt waits. A send attempt that is still running or whose status is unknown cannot be retried. Only an authorized person who proposed the send or can approve actions may retry. Automatic waits need no manual Retry. This does not grant new approval or resubmit an accepted or uncertain send.
3836
3837
  */
3837
3838
  static retryAction<ThrowOnError extends boolean = false>(parameters: {
3838
3839
  id: MailboxId;
@@ -1569,7 +1569,7 @@ var Email = class {
1569
1569
  /**
1570
1570
  * Enable inbound email for a domain
1571
1571
  *
1572
- * 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.
1572
+ * 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.
1573
1573
  */
1574
1574
  static enableReceiving(parameters, options) {
1575
1575
  const params = buildClientParams([parameters], [{ args: [
@@ -1617,7 +1617,7 @@ var Email = class {
1617
1617
  /**
1618
1618
  * Get receiving setup status
1619
1619
  *
1620
- * 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.
1620
+ * 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.
1621
1621
  */
1622
1622
  static getReceivingStatus(parameters, options) {
1623
1623
  const params = buildClientParams([parameters], [{ args: [{
@@ -2103,7 +2103,7 @@ var Email = class {
2103
2103
  /**
2104
2104
  * Enable catch-all receiving
2105
2105
  *
2106
- * 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.
2106
+ * 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.
2107
2107
  */
2108
2108
  static enableCatchAll(parameters, options) {
2109
2109
  const params = buildClientParams([parameters], [{ args: [{
@@ -2157,7 +2157,7 @@ var Email = class {
2157
2157
  /**
2158
2158
  * Get catch-all configuration
2159
2159
  *
2160
- * Returns the catch-all receiving configuration for a domain, including the webhook endpoint that receives its inbound mail and its email counts.
2160
+ * Returns the catch-all receiving configuration for a domain, including its webhook endpoint, unknown-address mailbox (null means drop), and email counts.
2161
2161
  */
2162
2162
  static getCatchAllConfig(parameters, options) {
2163
2163
  const params = buildClientParams([parameters], [{ args: [{
@@ -2178,16 +2178,23 @@ var Email = class {
2178
2178
  /**
2179
2179
  * Update catch-all configuration
2180
2180
  *
2181
- * Updates a domain's catch-all receiving configuration: the webhook endpoint that receives its inbound mail.
2181
+ * 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.
2182
2182
  */
2183
2183
  static updateCatchAllConfig(parameters, options) {
2184
- const params = buildClientParams([parameters], [{ args: [{
2185
- in: "body",
2186
- key: "domainId"
2187
- }, {
2188
- in: "body",
2189
- key: "endpointId"
2190
- }] }]);
2184
+ const params = buildClientParams([parameters], [{ args: [
2185
+ {
2186
+ in: "body",
2187
+ key: "domainId"
2188
+ },
2189
+ {
2190
+ in: "body",
2191
+ key: "endpointId"
2192
+ },
2193
+ {
2194
+ in: "body",
2195
+ key: "unknownRecipientMailboxId"
2196
+ }
2197
+ ] }]);
2191
2198
  return requestWithPolicy(options?.client ?? client, "emailUpdateCatchAllConfig", options, (headers) => (options?.client ?? client).patch({
2192
2199
  security: [{
2193
2200
  name: "x-api-key",
@@ -11879,7 +11886,7 @@ var Mailboxes = class {
11879
11886
  /**
11880
11887
  * Resume a mailbox send
11881
11888
  *
11882
- * Resumes the same action only after its previous execution is confirmed ended and safe continuation is possible. Only an authorized person who proposed the send or can approve actions may retry. Automatic waits need no manual Retry. This does not grant new approval, reset the original deadline, replace the message identity, or resubmit an accepted or uncertain send.
11889
+ * Resumes the same eligible action while preserving its content, message identity, existing retry delays and original deadline. A queued action can resume while cleanup from an ended send attempt waits. A send attempt that is still running or whose status is unknown cannot be retried. Only an authorized person who proposed the send or can approve actions may retry. Automatic waits need no manual Retry. This does not grant new approval or resubmit an accepted or uncertain send.
11883
11890
  */
11884
11891
  static retryAction(parameters, options) {
11885
11892
  const params = buildClientParams([parameters], [{ args: [{
@@ -3324,6 +3324,10 @@ export type DomainConnectCompleteResult = {
3324
3324
  status: "applied" | "cancelled" | "failed" | "invalid";
3325
3325
  };
3326
3326
  export type EmailDomainDetailed = {
3327
+ /**
3328
+ * 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.
3329
+ */
3330
+ unknownRecipientMailboxId: MailboxId | null;
3327
3331
  id: EmailDomainId;
3328
3332
  domain: string;
3329
3333
  phase: "dns-setup" | "provisioning" | "verifying" | "ready" | "degraded" | "failed";
@@ -3470,6 +3474,10 @@ export type EmailDomainProvisioningExecution = {
3470
3474
  };
3471
3475
  export type EmailDomainPage = {
3472
3476
  items: Array<{
3477
+ /**
3478
+ * 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.
3479
+ */
3480
+ unknownRecipientMailboxId: MailboxId | null;
3473
3481
  id: EmailDomainId;
3474
3482
  domain: string;
3475
3483
  phase: "dns-setup" | "provisioning" | "verifying" | "ready" | "degraded" | "failed";
@@ -7667,6 +7675,10 @@ export type EmailGetCatchAllConfigResponses = {
7667
7675
  * Success
7668
7676
  */
7669
7677
  200: {
7678
+ /**
7679
+ * 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.
7680
+ */
7681
+ unknownRecipientMailboxId: MailboxId | null;
7670
7682
  enabled: boolean;
7671
7683
  endpointId: WebhookEndpointId | null;
7672
7684
  emailCount: number;
@@ -7678,6 +7690,10 @@ export type EmailUpdateCatchAllConfigData = {
7678
7690
  body: {
7679
7691
  domainId: EmailDomainId;
7680
7692
  endpointId?: WebhookEndpointId | null | undefined;
7693
+ /**
7694
+ * 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.
7695
+ */
7696
+ unknownRecipientMailboxId?: MailboxId | null | undefined;
7681
7697
  };
7682
7698
  path?: never;
7683
7699
  query?: never;
@@ -39,6 +39,7 @@ export declare const listDomains: ((input?: {
39
39
  readonly namespaceId?: string | null | undefined;
40
40
  } | undefined) => import("effect/Stream").Stream<{
41
41
  readonly items: readonly {
42
+ readonly unknownRecipientMailboxId: (string & import("effect/Brand").Brand<"MailboxId">) | null;
42
43
  readonly id: string & import("effect/Brand").Brand<"EmailDomainId">;
43
44
  readonly domain: string;
44
45
  readonly phase: "degraded" | "dns-setup" | "failed" | "provisioning" | "ready" | "verifying";
@@ -64,6 +65,7 @@ export declare const listDomains: ((input?: {
64
65
  readonly sendable?: true | null | undefined;
65
66
  readonly namespaceId?: string | null | undefined;
66
67
  } | undefined) => import("effect/Stream").Stream<{
68
+ readonly unknownRecipientMailboxId: (string & import("effect/Brand").Brand<"MailboxId">) | null;
67
69
  readonly id: string & import("effect/Brand").Brand<"EmailDomainId">;
68
70
  readonly domain: string;
69
71
  readonly phase: "degraded" | "dns-setup" | "failed" | "provisioning" | "ready" | "verifying";
@@ -325,6 +327,7 @@ export declare const getCatchAllConfig: (input: {
325
327
  export declare const updateCatchAllConfig: (input: {
326
328
  readonly domainId: string;
327
329
  readonly endpointId?: string | null | undefined;
330
+ readonly unknownRecipientMailboxId?: string | null | undefined;
328
331
  }, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"emailUpdateCatchAllConfig">;
329
332
  export declare const getCatchAllStats: (input: {
330
333
  readonly domainId: string;
@@ -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;
@@ -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,
@@ -1975,7 +1975,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
1975
1975
  MailboxesRetryAction503.pipe(HttpApiSchema.status(503)),
1976
1976
  MailboxesRetryAction504.pipe(HttpApiSchema.status(504))
1977
1977
  ]
1978
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.retryAction").annotate(OpenApi.Summary, "Resume a mailbox send").annotate(OpenApi.Description, "Resumes the same action only after its previous execution is confirmed ended and safe continuation is possible. Only an authorized person who proposed the send or can approve actions may retry. Automatic waits need no manual Retry. This does not grant new approval, reset the original deadline, replace the message identity, or resubmit an accepted or uncertain send."), HttpApiEndpoint.get("mailboxesGetAgentActivity", "/v1/mailboxes/:id/agent-activity", {
1978
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.retryAction").annotate(OpenApi.Summary, "Resume a mailbox send").annotate(OpenApi.Description, "Resumes the same eligible action while preserving its content, message identity, existing retry delays and original deadline. A queued action can resume while cleanup from an ended send attempt waits. A send attempt that is still running or whose status is unknown cannot be retried. Only an authorized person who proposed the send or can approve actions may retry. Automatic waits need no manual Retry. This does not grant new approval or resubmit an accepted or uncertain send."), HttpApiEndpoint.get("mailboxesGetAgentActivity", "/v1/mailboxes/:id/agent-activity", {
1979
1979
  params: MailboxesGetAgentActivityPathParams,
1980
1980
  query: MailboxesGetAgentActivityQuery,
1981
1981
  success: MailboxesGetAgentActivity200,
@@ -598,7 +598,7 @@ const TemplatesRenderPublication500 = InternalError;
598
598
  const TemplatesRenderPublication504 = GatewayTimeoutError;
599
599
  const TemplatesGetGitRepositoryPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: TemplateId }))();
600
600
  const TemplatesGetGitRepository200 = /* @__PURE__ */ (() => Schema.Struct({
601
- remote: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/" })),
601
+ remote: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/|^http:\\/\\/127\\.0\\.0\\.1:(?:[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\/git\\/[a-z0-9-]+\\/[a-z0-9-]+\\.git$", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/|^http:\\/\\/127\\.0\\.0\\.1:(?:[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\/git\\/[a-z0-9-]+\\/[a-z0-9-]+\\.git$" })),
602
602
  defaultBranch: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" }))
603
603
  }))();
604
604
  const TemplatesGetGitRepository401 = UnauthorizedError;
@@ -612,7 +612,7 @@ const TemplatesGetGitRepository504 = GatewayTimeoutError;
612
612
  const TemplatesIssueGitCredentialPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: TemplateId }))();
613
613
  const TemplatesIssueGitCredentialRequestJson = /* @__PURE__ */ (() => Schema.Struct({ scope: Schema.Union([Schema.Literal("read"), Schema.Literal("write")]) }))();
614
614
  const TemplatesIssueGitCredential200 = /* @__PURE__ */ (() => Schema.Struct({
615
- remote: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/" })),
615
+ remote: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/|^http:\\/\\/127\\.0\\.0\\.1:(?:[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\/git\\/[a-z0-9-]+\\/[a-z0-9-]+\\.git$", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/|^http:\\/\\/127\\.0\\.0\\.1:(?:[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\/git\\/[a-z0-9-]+\\/[a-z0-9-]+\\.git$" })),
616
616
  username: Schema.Literal("x-access-token"),
617
617
  password: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
618
618
  expiresAt: Schema.String
package/dist/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "0.32.0";
2
+ var version = "0.33.0";
3
3
  export { version };
4
4
 
5
5
  //# sourceMappingURL=package.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "samva",
3
- "version": "0.32.0",
3
+ "version": "0.33.0",
4
4
  "description": "TypeScript SDK for the Samva email API",
5
5
  "keywords": [
6
6
  "api-client",
@@ -232,7 +232,7 @@
232
232
  "typecheck": "effect-tsgo tsrs --noEmit && effect-tsgo tsrs --noEmit -p codegen/tsconfig.json && effect-tsgo tsrs --noEmit -p tests/tsconfig.json && effect-tsgo tsrs --noEmit --project tests/parity/tsconfig.json"
233
233
  },
234
234
  "dependencies": {
235
- "@samva/webhooks": "0.32.0"
235
+ "@samva/webhooks": "0.33.0"
236
236
  },
237
237
  "devDependencies": {
238
238
  "@effect/openapi-generator": "4.0.6",