samva 0.32.0 → 0.34.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
@@ -2926,7 +2927,7 @@ export declare class Webhooks {
2926
2927
  /**
2927
2928
  * List webhook delivery logs
2928
2929
  *
2929
- * Returns a webhook endpoint's deliveries, newest first, each naming the event type and time it was made for, with its nested attempt diagnostics. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
2930
+ * Returns a webhook endpoint's deliveries, newest first, each naming the event type and time it was made for, with its nested attempt diagnostics. A replay of a terminal delivery records a skipped replay receipt without another HTTP request or a change to its automatic retry lifecycle. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
2930
2931
  */
2931
2932
  static getLogs<ThrowOnError extends boolean = false>(parameters: {
2932
2933
  id: WebhookEndpointId;
@@ -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",
@@ -8944,7 +8951,7 @@ var Webhooks = class {
8944
8951
  /**
8945
8952
  * List webhook delivery logs
8946
8953
  *
8947
- * Returns a webhook endpoint's deliveries, newest first, each naming the event type and time it was made for, with its nested attempt diagnostics. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
8954
+ * Returns a webhook endpoint's deliveries, newest first, each naming the event type and time it was made for, with its nested attempt diagnostics. A replay of a terminal delivery records a skipped replay receipt without another HTTP request or a change to its automatic retry lifecycle. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
8948
8955
  */
8949
8956
  static getLogs(parameters, options) {
8950
8957
  const params = buildClientParams([parameters], [{ args: [
@@ -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: [{
@@ -1401,9 +1401,10 @@ export type WebhookDeliveryPage = {
1401
1401
  attempts: Array<{
1402
1402
  id: WebhookAttemptId;
1403
1403
  deliveryId: WebhookDeliveryId;
1404
- kind: "automatic" | "manual";
1404
+ kind: "automatic" | "manual" | "replay";
1405
+ queueMessageId: string | null;
1405
1406
  attemptNumber: number;
1406
- classification: "success" | "http-error" | "network-error" | "timeout" | "cancelled";
1407
+ classification: "success" | "http-error" | "network-error" | "timeout" | "cancelled" | "skipped";
1407
1408
  attemptedAt: string;
1408
1409
  responseStatus: number | null;
1409
1410
  responseHeaders: {
@@ -3324,6 +3325,10 @@ export type DomainConnectCompleteResult = {
3324
3325
  status: "applied" | "cancelled" | "failed" | "invalid";
3325
3326
  };
3326
3327
  export type EmailDomainDetailed = {
3328
+ /**
3329
+ * 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.
3330
+ */
3331
+ unknownRecipientMailboxId: MailboxId | null;
3327
3332
  id: EmailDomainId;
3328
3333
  domain: string;
3329
3334
  phase: "dns-setup" | "provisioning" | "verifying" | "ready" | "degraded" | "failed";
@@ -3470,6 +3475,10 @@ export type EmailDomainProvisioningExecution = {
3470
3475
  };
3471
3476
  export type EmailDomainPage = {
3472
3477
  items: Array<{
3478
+ /**
3479
+ * 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.
3480
+ */
3481
+ unknownRecipientMailboxId: MailboxId | null;
3473
3482
  id: EmailDomainId;
3474
3483
  domain: string;
3475
3484
  phase: "dns-setup" | "provisioning" | "verifying" | "ready" | "degraded" | "failed";
@@ -7667,6 +7676,10 @@ export type EmailGetCatchAllConfigResponses = {
7667
7676
  * Success
7668
7677
  */
7669
7678
  200: {
7679
+ /**
7680
+ * 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.
7681
+ */
7682
+ unknownRecipientMailboxId: MailboxId | null;
7670
7683
  enabled: boolean;
7671
7684
  endpointId: WebhookEndpointId | null;
7672
7685
  emailCount: number;
@@ -7678,6 +7691,10 @@ export type EmailUpdateCatchAllConfigData = {
7678
7691
  body: {
7679
7692
  domainId: EmailDomainId;
7680
7693
  endpointId?: WebhookEndpointId | null | undefined;
7694
+ /**
7695
+ * 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.
7696
+ */
7697
+ unknownRecipientMailboxId?: MailboxId | null | undefined;
7681
7698
  };
7682
7699
  path?: never;
7683
7700
  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
@@ -130,9 +130,10 @@ export type WebhookDeliveryPage = {
130
130
  readonly attempts: ReadonlyArray<{
131
131
  readonly id: WebhookAttemptId;
132
132
  readonly deliveryId: WebhookDeliveryId;
133
- readonly kind: "automatic" | "manual";
133
+ readonly kind: "automatic" | "manual" | "replay";
134
+ readonly queueMessageId: string | null;
134
135
  readonly attemptNumber: number;
135
- readonly classification: "success" | "http-error" | "network-error" | "timeout" | "cancelled";
136
+ readonly classification: "success" | "http-error" | "network-error" | "timeout" | "cancelled" | "skipped";
136
137
  readonly attemptedAt: string;
137
138
  readonly responseStatus: number | null;
138
139
  readonly responseHeaders: {
@@ -162,9 +163,10 @@ export declare const WebhookDeliveryPage: Schema.Struct<{
162
163
  readonly attempts: Schema.$Array<Schema.Struct<{
163
164
  readonly id: Schema.brand<Schema.String, "WebhookAttemptId">;
164
165
  readonly deliveryId: Schema.brand<Schema.String, "WebhookDeliveryId">;
165
- readonly kind: Schema.Union<readonly [Schema.Literal<"automatic">, Schema.Literal<"manual">]>;
166
+ readonly kind: Schema.Union<readonly [Schema.Literal<"automatic">, Schema.Literal<"manual">, Schema.Literal<"replay">]>;
167
+ readonly queueMessageId: Schema.Union<readonly [Schema.String, Schema.Null]>;
166
168
  readonly attemptNumber: Schema.Finite;
167
- readonly classification: Schema.Union<readonly [Schema.Literal<"success">, Schema.Literal<"http-error">, Schema.Literal<"network-error">, Schema.Literal<"timeout">, Schema.Literal<"cancelled">]>;
169
+ readonly classification: Schema.Union<readonly [Schema.Literal<"success">, Schema.Literal<"http-error">, Schema.Literal<"network-error">, Schema.Literal<"timeout">, Schema.Literal<"cancelled">, Schema.Literal<"skipped">]>;
168
170
  readonly attemptedAt: Schema.String;
169
171
  readonly responseStatus: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
170
172
  readonly responseHeaders: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>;
@@ -518,9 +520,10 @@ export declare const WebhooksGetLogs200: Schema.Struct<{
518
520
  readonly attempts: Schema.$Array<Schema.Struct<{
519
521
  readonly id: Schema.brand<Schema.String, "WebhookAttemptId">;
520
522
  readonly deliveryId: Schema.brand<Schema.String, "WebhookDeliveryId">;
521
- readonly kind: Schema.Union<readonly [Schema.Literal<"automatic">, Schema.Literal<"manual">]>;
523
+ readonly kind: Schema.Union<readonly [Schema.Literal<"automatic">, Schema.Literal<"manual">, Schema.Literal<"replay">]>;
524
+ readonly queueMessageId: Schema.Union<readonly [Schema.String, Schema.Null]>;
522
525
  readonly attemptNumber: Schema.Finite;
523
- readonly classification: Schema.Union<readonly [Schema.Literal<"success">, Schema.Literal<"http-error">, Schema.Literal<"network-error">, Schema.Literal<"timeout">, Schema.Literal<"cancelled">]>;
526
+ readonly classification: Schema.Union<readonly [Schema.Literal<"success">, Schema.Literal<"http-error">, Schema.Literal<"network-error">, Schema.Literal<"timeout">, Schema.Literal<"cancelled">, Schema.Literal<"skipped">]>;
524
527
  readonly attemptedAt: Schema.String;
525
528
  readonly responseStatus: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
526
529
  readonly responseHeaders: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>;
@@ -948,9 +951,10 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
948
951
  readonly attempts: Schema.$Array<Schema.Struct<{
949
952
  readonly id: Schema.brand<Schema.String, "WebhookAttemptId">;
950
953
  readonly deliveryId: Schema.brand<Schema.String, "WebhookDeliveryId">;
951
- readonly kind: Schema.Union<readonly [Schema.Literal<"automatic">, Schema.Literal<"manual">]>;
954
+ readonly kind: Schema.Union<readonly [Schema.Literal<"automatic">, Schema.Literal<"manual">, Schema.Literal<"replay">]>;
955
+ readonly queueMessageId: Schema.Union<readonly [Schema.String, Schema.Null]>;
952
956
  readonly attemptNumber: Schema.Finite;
953
- readonly classification: Schema.Union<readonly [Schema.Literal<"success">, Schema.Literal<"http-error">, Schema.Literal<"network-error">, Schema.Literal<"timeout">, Schema.Literal<"cancelled">]>;
957
+ readonly classification: Schema.Union<readonly [Schema.Literal<"success">, Schema.Literal<"http-error">, Schema.Literal<"network-error">, Schema.Literal<"timeout">, Schema.Literal<"cancelled">, Schema.Literal<"skipped">]>;
954
958
  readonly attemptedAt: Schema.String;
955
959
  readonly responseStatus: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
956
960
  readonly responseHeaders: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>;
@@ -166,14 +166,20 @@ const WebhookDeliveryPage = /* @__PURE__ */ (() => Schema.Struct({
166
166
  attempts: Schema.Array(Schema.Struct({
167
167
  id: WebhookAttemptId,
168
168
  deliveryId: WebhookDeliveryId,
169
- kind: Schema.Union([Schema.Literal("automatic"), Schema.Literal("manual")]),
169
+ kind: Schema.Union([
170
+ Schema.Literal("automatic"),
171
+ Schema.Literal("manual"),
172
+ Schema.Literal("replay")
173
+ ]),
174
+ queueMessageId: Schema.Union([Schema.String, Schema.Null]),
170
175
  attemptNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })),
171
176
  classification: Schema.Union([
172
177
  Schema.Literal("success"),
173
178
  Schema.Literal("http-error"),
174
179
  Schema.Literal("network-error"),
175
180
  Schema.Literal("timeout"),
176
- Schema.Literal("cancelled")
181
+ Schema.Literal("cancelled"),
182
+ Schema.Literal("skipped")
177
183
  ]),
178
184
  attemptedAt: Schema.String,
179
185
  responseStatus: Schema.Union([Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })), Schema.Null]),
@@ -503,7 +509,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
503
509
  WebhooksGetLogs500,
504
510
  WebhooksGetLogs504.pipe(HttpApiSchema.status(504))
505
511
  ]
506
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "webhooks.getLogs").annotate(OpenApi.Summary, "List webhook delivery logs").annotate(OpenApi.Description, "Returns a webhook endpoint's deliveries, newest first, each naming the event type and time it was made for, with its nested attempt diagnostics. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page."), HttpApiEndpoint.post("webhooksRegenerateSecret", "/v1/webhooks/:id/rotate-secret", {
512
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "webhooks.getLogs").annotate(OpenApi.Summary, "List webhook delivery logs").annotate(OpenApi.Description, "Returns a webhook endpoint's deliveries, newest first, each naming the event type and time it was made for, with its nested attempt diagnostics. A replay of a terminal delivery records a skipped replay receipt without another HTTP request or a change to its automatic retry lifecycle. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page."), HttpApiEndpoint.post("webhooksRegenerateSecret", "/v1/webhooks/:id/rotate-secret", {
507
513
  params: WebhooksRegenerateSecretPathParams,
508
514
  success: WebhooksRegenerateSecret200,
509
515
  error: [
@@ -152,9 +152,10 @@ export declare const getLogs: ((input: {
152
152
  readonly attempts: readonly {
153
153
  readonly id: string & import("effect/Brand").Brand<"WebhookAttemptId">;
154
154
  readonly deliveryId: string & import("effect/Brand").Brand<"WebhookDeliveryId">;
155
- readonly kind: "automatic" | "manual";
155
+ readonly kind: "automatic" | "manual" | "replay";
156
+ readonly queueMessageId: string | null;
156
157
  readonly attemptNumber: number;
157
- readonly classification: "cancelled" | "http-error" | "network-error" | "success" | "timeout";
158
+ readonly classification: "cancelled" | "http-error" | "network-error" | "skipped" | "success" | "timeout";
158
159
  readonly attemptedAt: string;
159
160
  readonly responseStatus: number | null;
160
161
  readonly responseHeaders: {
@@ -187,9 +188,10 @@ export declare const getLogs: ((input: {
187
188
  readonly attempts: readonly {
188
189
  readonly id: string & import("effect/Brand").Brand<"WebhookAttemptId">;
189
190
  readonly deliveryId: string & import("effect/Brand").Brand<"WebhookDeliveryId">;
190
- readonly kind: "automatic" | "manual";
191
+ readonly kind: "automatic" | "manual" | "replay";
192
+ readonly queueMessageId: string | null;
191
193
  readonly attemptNumber: number;
192
- readonly classification: "cancelled" | "http-error" | "network-error" | "success" | "timeout";
194
+ readonly classification: "cancelled" | "http-error" | "network-error" | "skipped" | "success" | "timeout";
193
195
  readonly attemptedAt: string;
194
196
  readonly responseStatus: number | null;
195
197
  readonly responseHeaders: {
package/dist/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "0.32.0";
2
+ var version = "0.34.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.34.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.34.0"
236
236
  },
237
237
  "devDependencies": {
238
238
  "@effect/openapi-generator": "4.0.6",