@tgoliveira/outpost 1.2.2 → 2.0.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.
- package/AGENTS.md +172 -18
- package/README.md +17 -12
- package/dist/adapters/drizzle/index.cjs +194 -15
- package/dist/adapters/drizzle/index.cjs.map +1 -1
- package/dist/adapters/drizzle/index.d.cts +124 -7
- package/dist/adapters/drizzle/index.d.ts +124 -7
- package/dist/adapters/drizzle/index.js +194 -15
- package/dist/adapters/drizzle/index.js.map +1 -1
- package/dist/adapters/index.cjs +148 -38
- package/dist/adapters/index.cjs.map +1 -1
- package/dist/adapters/index.d.cts +21 -13
- package/dist/adapters/index.d.ts +21 -13
- package/dist/adapters/index.js +149 -39
- package/dist/adapters/index.js.map +1 -1
- package/dist/admin/index.cjs +10 -3
- package/dist/admin/index.cjs.map +1 -1
- package/dist/admin/index.d.cts +7 -7
- package/dist/admin/index.d.ts +7 -7
- package/dist/admin/index.js +10 -3
- package/dist/admin/index.js.map +1 -1
- package/dist/{fake-BY6t7UXb.d.cts → fake-B6OIEdod.d.ts} +6 -4
- package/dist/{fake-en-oOdg0.d.ts → fake-CpQc9p0N.d.cts} +6 -4
- package/dist/http/index.cjs.map +1 -1
- package/dist/http/index.d.cts +6 -6
- package/dist/http/index.d.ts +6 -6
- package/dist/http/index.js.map +1 -1
- package/dist/{index-c6caPsUG.d.ts → index-B4F7euCt.d.cts} +53 -21
- package/dist/{index-BO0GiZmP.d.cts → index-Cn1YsmGe.d.ts} +53 -21
- package/dist/index.cjs +509 -146
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -15
- package/dist/index.d.ts +17 -15
- package/dist/index.js +509 -148
- package/dist/index.js.map +1 -1
- package/dist/modules/ui/index.cjs +3 -3
- package/dist/modules/ui/index.cjs.map +1 -1
- package/dist/modules/ui/index.js +3 -3
- package/dist/modules/ui/index.js.map +1 -1
- package/dist/modules/ui/pages/admin/admin-config-page.cjs +2 -2
- package/dist/modules/ui/pages/admin/admin-config-page.cjs.map +1 -1
- package/dist/modules/ui/pages/admin/admin-config-page.js +2 -2
- package/dist/modules/ui/pages/admin/admin-config-page.js.map +1 -1
- package/dist/modules/ui/pages/admin/admin-panel-page.cjs +1 -1
- package/dist/modules/ui/pages/admin/admin-panel-page.js +1 -1
- package/dist/modules/ui/pages/index.cjs +3 -3
- package/dist/modules/ui/pages/index.cjs.map +1 -1
- package/dist/modules/ui/pages/index.js +3 -3
- package/dist/modules/ui/pages/index.js.map +1 -1
- package/dist/{outpost-client-BItbgqIo.d.ts → outpost-client-BX3SsOFb.d.ts} +50 -21
- package/dist/{outpost-client-BlVf4gjo.d.cts → outpost-client-DhQgZY16.d.cts} +50 -21
- package/dist/react/index.cjs +3 -3
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +3 -3
- package/dist/react/index.js.map +1 -1
- package/dist/repositories-DJYu4nGV.d.ts +322 -0
- package/dist/repositories-sMN6RHZJ.d.cts +322 -0
- package/dist/{services-CfTEsetF.d.ts → services-DZwZjDn_.d.cts} +9 -3
- package/dist/{services-CQINhAGo.d.cts → services-PoM2bxjP.d.ts} +9 -3
- package/dist/{template-DxI_p2Ny.d.cts → template-Dl1_ciRo.d.ts} +24 -4
- package/dist/{template-CREUq7bB.d.ts → template-Dny_7Ymi.d.cts} +24 -4
- package/dist/testing/index.cjs +200 -15
- package/dist/testing/index.cjs.map +1 -1
- package/dist/testing/index.d.cts +26 -7
- package/dist/testing/index.d.ts +26 -7
- package/dist/testing/index.js +200 -15
- package/dist/testing/index.js.map +1 -1
- package/dist/{webhook-kp6CiXk-.d.cts → webhook-B158Vi6p.d.cts} +20 -4
- package/dist/{webhook-kp6CiXk-.d.ts → webhook-B158Vi6p.d.ts} +20 -4
- package/dist/workers/index.cjs +471 -85
- package/dist/workers/index.cjs.map +1 -1
- package/dist/workers/index.d.cts +5 -5
- package/dist/workers/index.d.ts +5 -5
- package/dist/workers/index.js +471 -85
- package/dist/workers/index.js.map +1 -1
- package/package.json +6 -3
- package/dist/repositories-CHIOFGn3.d.cts +0 -182
- package/dist/repositories-WyhvxzyY.d.ts +0 -182
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { E as Encryptor, C as ConfigOverrides, R as RateLimitConfig, T as TemplateRenderer, M as MxResolver } from './template-
|
|
2
|
-
export { A as AttachmentPolicy, a as AttachmentSpec, D as DEFAULT_ATTACHMENT_POLICY, b as DEFAULT_DOMAIN_VALIDATION, c as DEFAULT_RETENTION, d as DEFAULT_RETRY, e as DEFAULT_SANITIZE_LIMITS, f as DomainValidationConfig, g as MxCache, h as RateBudget, i as RecipientHasher, j as RenderedTemplate, k as ResolvedConfig, l as RetentionPolicy, m as RetryConfig, S as SanitizeLimits, n as
|
|
3
|
-
import { O as Outpost } from './outpost-client-
|
|
4
|
-
export { A as AuthContext, a as Authenticate, C as CreatedApiKey, E as EnqueueInput, b as EnqueueMessage, c as EnqueueResult, G as GetMessage, I as IngestWebhook, d as IngestWebhookResult, L as ListMessages, M as ManageApiKey, e as ManageSuppression, f as MessageView, R as ReplayMessage, g as generateApiKeySecret, h as hashApiKey, t as toView } from './outpost-client-
|
|
5
|
-
import { O as OutboxRepository, S as SuppressionRepository, A as AuditRepository, a as ApiKeyRepository, W as WebhookEventRepository } from './repositories-
|
|
6
|
-
export { b as API_SCOPES, c as ApiKey, d as ApiScope, e as AuditEvent, f as AuditEventType, L as ListMessagesQuery, M as MessageStatePatch, N as NewApiKey,
|
|
7
|
-
import { E as EmailProvider, T as Telemetry, L as Logger, C as Clock, I as IdGenerator, a as RateLimiter } from './services-
|
|
8
|
-
export { b as LogLevel, P as ProviderReceipt, c as RateLimitScope, R as RawWebhook } from './services-
|
|
9
|
-
export { D as DispatchableMessage, L as LIFECYCLE_STATES, a as LifecycleState, M as Message, b as MessageBody, S as Sealed, T as TERMINAL_STATES, W as WebhookEvent, c as WebhookEventType, d as canTransition, i as isTerminal, s as shouldSuppressOn, w as webhookToState } from './webhook-
|
|
10
|
-
export { C as CoreDeps, D as DispatchMessage, a as DispatchOutcome, P as PurgeReport, b as PurgeRetention } from './index-
|
|
1
|
+
import { E as Encryptor, C as ConfigOverrides, R as RateLimitConfig, T as TemplateRenderer, M as MxResolver } from './template-Dny_7Ymi.cjs';
|
|
2
|
+
export { A as AttachmentPolicy, a as AttachmentSpec, D as DEFAULT_ATTACHMENT_POLICY, b as DEFAULT_DOMAIN_VALIDATION, c as DEFAULT_RETENTION, d as DEFAULT_RETRY, e as DEFAULT_SANITIZE_LIMITS, f as DomainValidationConfig, g as MxCache, h as RateBudget, i as RecipientHasher, j as RenderedTemplate, k as ResolvedConfig, l as RetentionPolicy, m as RetryConfig, S as SanitizeLimits, n as SealColumn, o as SealContext, p as assertBodyWithinLimits, q as assertNoHeaderInjection, r as backoffMs, s as extractDomain, t as isExhausted, u as nextAttemptAt, v as normalizeBatchPauseMs, w as purgeCutoff, x as resolveConfig, y as sanitizeHeaders, z as sanitizeRecipient, B as sanitizeSubject, F as stripDangerousHtml, G as validateAttachment, H as validateRecipient, I as validateSyntax, J as waitForBatchPause } from './template-Dny_7Ymi.cjs';
|
|
3
|
+
import { O as Outpost } from './outpost-client-DhQgZY16.cjs';
|
|
4
|
+
export { A as AuthContext, a as Authenticate, C as CreatedApiKey, E as EnqueueInput, b as EnqueueMessage, c as EnqueueResult, G as GetMessage, I as IngestWebhook, d as IngestWebhookResult, L as ListMessages, M as ManageApiKey, e as ManageSuppression, f as MessageView, R as ReplayMessage, g as generateApiKeySecret, h as hashApiKey, t as toView } from './outpost-client-DhQgZY16.cjs';
|
|
5
|
+
import { O as OutboxRepository, S as SuppressionRepository, A as AuditRepository, a as ApiKeyRepository, W as WebhookEventRepository } from './repositories-sMN6RHZJ.cjs';
|
|
6
|
+
export { b as API_SCOPES, c as ApiKey, d as ApiScope, e as AuditEvent, f as AuditEventType, E as EnqueueAuditWrite, g as EnqueueWriteResult, L as ListMessagesQuery, M as MessageStatePatch, N as NewApiKey, h as NewAuditEvent, i as NewMessage, j as SUPPRESSION_REASONS, k as SendingClaim, l as StoredWebhookEvent, m as SuppressionEntry, n as SuppressionReason, o as WebhookDisposition, p as WebhookIdentityQuery, q as WebhookRecordMeta, r as hasScope, s as isKeyActive } from './repositories-sMN6RHZJ.cjs';
|
|
7
|
+
import { E as EmailProvider, T as Telemetry, L as Logger, C as Clock, I as IdGenerator, a as RateLimiter } from './services-DZwZjDn_.cjs';
|
|
8
|
+
export { b as LogLevel, P as ProviderReceipt, c as RateLimitScope, R as RawWebhook } from './services-DZwZjDn_.cjs';
|
|
9
|
+
export { D as DispatchableMessage, L as LIFECYCLE_STATES, a as LifecycleState, M as Message, b as MessageBody, S as Sealed, T as TERMINAL_STATES, W as WebhookEvent, c as WebhookEventType, d as canTransition, i as isTerminal, s as shouldSuppressOn, w as webhookToState } from './webhook-B158Vi6p.cjs';
|
|
10
|
+
export { C as CoreDeps, D as DispatchMessage, a as DispatchOutcome, P as PurgeReport, b as PurgeRetention } from './index-B4F7euCt.cjs';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Encryption posture (TDR §5.4). Pick one:
|
|
@@ -54,7 +54,8 @@ interface OutpostOptions extends ConfigOverrides {
|
|
|
54
54
|
/**
|
|
55
55
|
* Key for the deterministic recipient HMAC (TDR §5.4). REQUIRED — it backs
|
|
56
56
|
* suppression matching and recipient-keyed lookups even when encryption is
|
|
57
|
-
* off.
|
|
57
|
+
* off. The constructor requires at least 16 bytes and does not measure
|
|
58
|
+
* entropy. Keep the key outside the database.
|
|
58
59
|
*/
|
|
59
60
|
recipientHmacKey: string | Buffer;
|
|
60
61
|
/** Encryption-at-rest posture. Defaults to `{ mode: "none" }`. */
|
|
@@ -127,9 +128,10 @@ declare class WebhookVerificationError extends OutpostError {
|
|
|
127
128
|
constructor(message?: string);
|
|
128
129
|
}
|
|
129
130
|
/**
|
|
130
|
-
* Raised by `EmailProvider` implementations.
|
|
131
|
-
*
|
|
132
|
-
*
|
|
131
|
+
* Raised by `EmailProvider` implementations. Classification uses the stored
|
|
132
|
+
* pair, not one field alone: `errorClass === "transient"` with
|
|
133
|
+
* `code === "provider_transient"`, or `errorClass === "permanent"` with
|
|
134
|
+
* `code === "provider_permanent"`.
|
|
133
135
|
*/
|
|
134
136
|
declare class ProviderError extends OutpostError {
|
|
135
137
|
readonly errorClass: ErrorClass;
|
|
@@ -147,7 +149,7 @@ declare class ProviderError extends OutpostError {
|
|
|
147
149
|
cause?: unknown;
|
|
148
150
|
}): ProviderError;
|
|
149
151
|
}
|
|
150
|
-
/**
|
|
152
|
+
/** True only when `errorClass === "transient"` and `code === "provider_transient"`. */
|
|
151
153
|
declare function isTransient(err: unknown): boolean;
|
|
152
154
|
|
|
153
155
|
export { ApiKeyRepository, AuditRepository, Clock, ConfigOverrides, EmailProvider, type EncryptionOptions, Encryptor, type ErrorClass, ForbiddenError, IdGenerator, InvalidStateTransitionError, Logger, MxResolver, NotFoundError, OutboxRepository, Outpost, OutpostError, type OutpostOptions, ProviderError, RateLimitConfig, RateLimiter, SuppressionRepository, Telemetry, TemplateRenderer, UnauthorizedError, ValidationError, WebhookEventRepository, WebhookVerificationError, createOutpost, isTransient };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { E as Encryptor, C as ConfigOverrides, R as RateLimitConfig, T as TemplateRenderer, M as MxResolver } from './template-
|
|
2
|
-
export { A as AttachmentPolicy, a as AttachmentSpec, D as DEFAULT_ATTACHMENT_POLICY, b as DEFAULT_DOMAIN_VALIDATION, c as DEFAULT_RETENTION, d as DEFAULT_RETRY, e as DEFAULT_SANITIZE_LIMITS, f as DomainValidationConfig, g as MxCache, h as RateBudget, i as RecipientHasher, j as RenderedTemplate, k as ResolvedConfig, l as RetentionPolicy, m as RetryConfig, S as SanitizeLimits, n as
|
|
3
|
-
import { O as Outpost } from './outpost-client-
|
|
4
|
-
export { A as AuthContext, a as Authenticate, C as CreatedApiKey, E as EnqueueInput, b as EnqueueMessage, c as EnqueueResult, G as GetMessage, I as IngestWebhook, d as IngestWebhookResult, L as ListMessages, M as ManageApiKey, e as ManageSuppression, f as MessageView, R as ReplayMessage, g as generateApiKeySecret, h as hashApiKey, t as toView } from './outpost-client-
|
|
5
|
-
import { O as OutboxRepository, S as SuppressionRepository, A as AuditRepository, a as ApiKeyRepository, W as WebhookEventRepository } from './repositories-
|
|
6
|
-
export { b as API_SCOPES, c as ApiKey, d as ApiScope, e as AuditEvent, f as AuditEventType, L as ListMessagesQuery, M as MessageStatePatch, N as NewApiKey,
|
|
7
|
-
import { E as EmailProvider, T as Telemetry, L as Logger, C as Clock, I as IdGenerator, a as RateLimiter } from './services-
|
|
8
|
-
export { b as LogLevel, P as ProviderReceipt, c as RateLimitScope, R as RawWebhook } from './services-
|
|
9
|
-
export { D as DispatchableMessage, L as LIFECYCLE_STATES, a as LifecycleState, M as Message, b as MessageBody, S as Sealed, T as TERMINAL_STATES, W as WebhookEvent, c as WebhookEventType, d as canTransition, i as isTerminal, s as shouldSuppressOn, w as webhookToState } from './webhook-
|
|
10
|
-
export { C as CoreDeps, D as DispatchMessage, a as DispatchOutcome, P as PurgeReport, b as PurgeRetention } from './index-
|
|
1
|
+
import { E as Encryptor, C as ConfigOverrides, R as RateLimitConfig, T as TemplateRenderer, M as MxResolver } from './template-Dl1_ciRo.js';
|
|
2
|
+
export { A as AttachmentPolicy, a as AttachmentSpec, D as DEFAULT_ATTACHMENT_POLICY, b as DEFAULT_DOMAIN_VALIDATION, c as DEFAULT_RETENTION, d as DEFAULT_RETRY, e as DEFAULT_SANITIZE_LIMITS, f as DomainValidationConfig, g as MxCache, h as RateBudget, i as RecipientHasher, j as RenderedTemplate, k as ResolvedConfig, l as RetentionPolicy, m as RetryConfig, S as SanitizeLimits, n as SealColumn, o as SealContext, p as assertBodyWithinLimits, q as assertNoHeaderInjection, r as backoffMs, s as extractDomain, t as isExhausted, u as nextAttemptAt, v as normalizeBatchPauseMs, w as purgeCutoff, x as resolveConfig, y as sanitizeHeaders, z as sanitizeRecipient, B as sanitizeSubject, F as stripDangerousHtml, G as validateAttachment, H as validateRecipient, I as validateSyntax, J as waitForBatchPause } from './template-Dl1_ciRo.js';
|
|
3
|
+
import { O as Outpost } from './outpost-client-BX3SsOFb.js';
|
|
4
|
+
export { A as AuthContext, a as Authenticate, C as CreatedApiKey, E as EnqueueInput, b as EnqueueMessage, c as EnqueueResult, G as GetMessage, I as IngestWebhook, d as IngestWebhookResult, L as ListMessages, M as ManageApiKey, e as ManageSuppression, f as MessageView, R as ReplayMessage, g as generateApiKeySecret, h as hashApiKey, t as toView } from './outpost-client-BX3SsOFb.js';
|
|
5
|
+
import { O as OutboxRepository, S as SuppressionRepository, A as AuditRepository, a as ApiKeyRepository, W as WebhookEventRepository } from './repositories-DJYu4nGV.js';
|
|
6
|
+
export { b as API_SCOPES, c as ApiKey, d as ApiScope, e as AuditEvent, f as AuditEventType, E as EnqueueAuditWrite, g as EnqueueWriteResult, L as ListMessagesQuery, M as MessageStatePatch, N as NewApiKey, h as NewAuditEvent, i as NewMessage, j as SUPPRESSION_REASONS, k as SendingClaim, l as StoredWebhookEvent, m as SuppressionEntry, n as SuppressionReason, o as WebhookDisposition, p as WebhookIdentityQuery, q as WebhookRecordMeta, r as hasScope, s as isKeyActive } from './repositories-DJYu4nGV.js';
|
|
7
|
+
import { E as EmailProvider, T as Telemetry, L as Logger, C as Clock, I as IdGenerator, a as RateLimiter } from './services-PoM2bxjP.js';
|
|
8
|
+
export { b as LogLevel, P as ProviderReceipt, c as RateLimitScope, R as RawWebhook } from './services-PoM2bxjP.js';
|
|
9
|
+
export { D as DispatchableMessage, L as LIFECYCLE_STATES, a as LifecycleState, M as Message, b as MessageBody, S as Sealed, T as TERMINAL_STATES, W as WebhookEvent, c as WebhookEventType, d as canTransition, i as isTerminal, s as shouldSuppressOn, w as webhookToState } from './webhook-B158Vi6p.js';
|
|
10
|
+
export { C as CoreDeps, D as DispatchMessage, a as DispatchOutcome, P as PurgeReport, b as PurgeRetention } from './index-Cn1YsmGe.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Encryption posture (TDR §5.4). Pick one:
|
|
@@ -54,7 +54,8 @@ interface OutpostOptions extends ConfigOverrides {
|
|
|
54
54
|
/**
|
|
55
55
|
* Key for the deterministic recipient HMAC (TDR §5.4). REQUIRED — it backs
|
|
56
56
|
* suppression matching and recipient-keyed lookups even when encryption is
|
|
57
|
-
* off.
|
|
57
|
+
* off. The constructor requires at least 16 bytes and does not measure
|
|
58
|
+
* entropy. Keep the key outside the database.
|
|
58
59
|
*/
|
|
59
60
|
recipientHmacKey: string | Buffer;
|
|
60
61
|
/** Encryption-at-rest posture. Defaults to `{ mode: "none" }`. */
|
|
@@ -127,9 +128,10 @@ declare class WebhookVerificationError extends OutpostError {
|
|
|
127
128
|
constructor(message?: string);
|
|
128
129
|
}
|
|
129
130
|
/**
|
|
130
|
-
* Raised by `EmailProvider` implementations.
|
|
131
|
-
*
|
|
132
|
-
*
|
|
131
|
+
* Raised by `EmailProvider` implementations. Classification uses the stored
|
|
132
|
+
* pair, not one field alone: `errorClass === "transient"` with
|
|
133
|
+
* `code === "provider_transient"`, or `errorClass === "permanent"` with
|
|
134
|
+
* `code === "provider_permanent"`.
|
|
133
135
|
*/
|
|
134
136
|
declare class ProviderError extends OutpostError {
|
|
135
137
|
readonly errorClass: ErrorClass;
|
|
@@ -147,7 +149,7 @@ declare class ProviderError extends OutpostError {
|
|
|
147
149
|
cause?: unknown;
|
|
148
150
|
}): ProviderError;
|
|
149
151
|
}
|
|
150
|
-
/**
|
|
152
|
+
/** True only when `errorClass === "transient"` and `code === "provider_transient"`. */
|
|
151
153
|
declare function isTransient(err: unknown): boolean;
|
|
152
154
|
|
|
153
155
|
export { ApiKeyRepository, AuditRepository, Clock, ConfigOverrides, EmailProvider, type EncryptionOptions, Encryptor, type ErrorClass, ForbiddenError, IdGenerator, InvalidStateTransitionError, Logger, MxResolver, NotFoundError, OutboxRepository, Outpost, OutpostError, type OutpostOptions, ProviderError, RateLimitConfig, RateLimiter, SuppressionRepository, Telemetry, TemplateRenderer, UnauthorizedError, ValidationError, WebhookEventRepository, WebhookVerificationError, createOutpost, isTransient };
|