@nestarc/webhook 0.9.0 → 0.10.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/README.md +76 -25
- package/dist/adapters/fetch-http-client.d.ts.map +1 -1
- package/dist/adapters/fetch-http-client.js +1 -1
- package/dist/adapters/fetch-http-client.js.map +1 -1
- package/dist/adapters/plaintext-secret-vault.d.ts.map +1 -1
- package/dist/adapters/plaintext-secret-vault.js +12 -2
- package/dist/adapters/plaintext-secret-vault.js.map +1 -1
- package/dist/adapters/prisma-delivery.repository.d.ts +8 -4
- package/dist/adapters/prisma-delivery.repository.d.ts.map +1 -1
- package/dist/adapters/prisma-delivery.repository.js +134 -77
- package/dist/adapters/prisma-delivery.repository.js.map +1 -1
- package/dist/adapters/prisma-endpoint.repository.d.ts +4 -3
- package/dist/adapters/prisma-endpoint.repository.d.ts.map +1 -1
- package/dist/adapters/prisma-endpoint.repository.js +39 -6
- package/dist/adapters/prisma-endpoint.repository.js.map +1 -1
- package/dist/index.d.ts +11 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/interfaces/webhook-delivery.interface.d.ts +6 -2
- package/dist/interfaces/webhook-delivery.interface.d.ts.map +1 -1
- package/dist/interfaces/webhook-endpoint.interface.d.ts +11 -2
- package/dist/interfaces/webhook-endpoint.interface.d.ts.map +1 -1
- package/dist/interfaces/webhook-options.interface.d.ts +8 -6
- package/dist/interfaces/webhook-options.interface.d.ts.map +1 -1
- package/dist/ports/webhook-delivery.repository.d.ts +28 -10
- package/dist/ports/webhook-delivery.repository.d.ts.map +1 -1
- package/dist/ports/webhook-endpoint.repository.d.ts +24 -4
- package/dist/ports/webhook-endpoint.repository.d.ts.map +1 -1
- package/dist/ports/webhook-event.repository.d.ts +3 -1
- package/dist/ports/webhook-event.repository.d.ts.map +1 -1
- package/dist/ports/webhook-http-client.d.ts +4 -0
- package/dist/ports/webhook-http-client.d.ts.map +1 -1
- package/dist/ports/webhook-secret-vault.d.ts +1 -0
- package/dist/ports/webhook-secret-vault.d.ts.map +1 -1
- package/dist/webhook.admin.service.d.ts +4 -3
- package/dist/webhook.admin.service.d.ts.map +1 -1
- package/dist/webhook.admin.service.js +5 -2
- package/dist/webhook.admin.service.js.map +1 -1
- package/dist/webhook.circuit-breaker.d.ts +6 -4
- package/dist/webhook.circuit-breaker.d.ts.map +1 -1
- package/dist/webhook.circuit-breaker.js +10 -8
- package/dist/webhook.circuit-breaker.js.map +1 -1
- package/dist/webhook.constants.d.ts +9 -2
- package/dist/webhook.constants.d.ts.map +1 -1
- package/dist/webhook.constants.js +11 -4
- package/dist/webhook.constants.js.map +1 -1
- package/dist/webhook.delivery-worker.d.ts +4 -0
- package/dist/webhook.delivery-worker.d.ts.map +1 -1
- package/dist/webhook.delivery-worker.js +49 -22
- package/dist/webhook.delivery-worker.js.map +1 -1
- package/dist/webhook.dispatcher.d.ts +1 -0
- package/dist/webhook.dispatcher.d.ts.map +1 -1
- package/dist/webhook.dispatcher.js +13 -6
- package/dist/webhook.dispatcher.js.map +1 -1
- package/dist/webhook.endpoint-admin.service.d.ts +4 -1
- package/dist/webhook.endpoint-admin.service.d.ts.map +1 -1
- package/dist/webhook.endpoint-admin.service.js +36 -9
- package/dist/webhook.endpoint-admin.service.js.map +1 -1
- package/dist/webhook.module.d.ts.map +1 -1
- package/dist/webhook.module.js +22 -13
- package/dist/webhook.module.js.map +1 -1
- package/package.json +4 -4
- package/src/sql/create-webhook-tables.sql +1 -1
- package/src/sql/migrations/v0.9.0.sql +32 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WebhookEndpointRepository } from '../ports/webhook-endpoint.repository';
|
|
1
|
+
import { ResolvedCreateEndpointInput, ResolvedRotateEndpointSecretInput, WebhookEndpointRepository } from '../ports/webhook-endpoint.repository';
|
|
2
2
|
import { EndpointRecord, EndpointRecordWithSecret, UpdateEndpointDto } from '../interfaces/webhook-endpoint.interface';
|
|
3
3
|
import { WebhookSecretVault } from '../ports/webhook-secret-vault';
|
|
4
4
|
export declare class PrismaEndpointRepository implements WebhookEndpointRepository {
|
|
@@ -7,14 +7,15 @@ export declare class PrismaEndpointRepository implements WebhookEndpointReposito
|
|
|
7
7
|
constructor(prisma: any, vault?: WebhookSecretVault | undefined);
|
|
8
8
|
findMatchingEndpoints(eventType: string, tenantId: string | undefined): Promise<EndpointRecord[]>;
|
|
9
9
|
findMatchingEndpointsInTransaction(tx: any, eventType: string, tenantId: string | undefined): Promise<EndpointRecord[]>;
|
|
10
|
-
createEndpoint(
|
|
10
|
+
createEndpoint(input: ResolvedCreateEndpointInput): Promise<EndpointRecordWithSecret>;
|
|
11
11
|
getEndpoint(id: string): Promise<EndpointRecord | null>;
|
|
12
12
|
listEndpoints(tenantId?: string): Promise<EndpointRecord[]>;
|
|
13
13
|
updateEndpoint(id: string, dto: UpdateEndpointDto): Promise<EndpointRecord | null>;
|
|
14
|
+
rotateSecret(id: string, input: ResolvedRotateEndpointSecretInput): Promise<EndpointRecord | null>;
|
|
14
15
|
deleteEndpoint(id: string): Promise<boolean>;
|
|
15
16
|
resetFailures(endpointId: string): Promise<void>;
|
|
16
17
|
incrementFailures(endpointId: string): Promise<number>;
|
|
17
|
-
disableEndpoint(endpointId: string, reason: string): Promise<
|
|
18
|
+
disableEndpoint(endpointId: string, reason: string): Promise<boolean>;
|
|
18
19
|
recoverEligibleEndpoints(cooldownMinutes: number): Promise<number>;
|
|
19
20
|
}
|
|
20
21
|
//# sourceMappingURL=prisma-endpoint.repository.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prisma-endpoint.repository.d.ts","sourceRoot":"","sources":["../../src/adapters/prisma-endpoint.repository.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"prisma-endpoint.repository.d.ts","sourceRoot":"","sources":["../../src/adapters/prisma-endpoint.repository.ts"],"names":[],"mappings":"AACA,OAAO,EACL,2BA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AAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAStD,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAQrE,wBAAwB,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAazE"}
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.PrismaEndpointRepository = void 0;
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
|
+
const webhook_constants_1 = require("../webhook.constants");
|
|
14
15
|
/** Public columns — excludes secret */
|
|
15
16
|
const ENDPOINT_COLUMNS = `
|
|
16
17
|
id, url, events, active, description, metadata,
|
|
@@ -62,11 +63,13 @@ let PrismaEndpointRepository = class PrismaEndpointRepository {
|
|
|
62
63
|
AND ($1 = ANY(events) OR '*' = ANY(events))`, eventType);
|
|
63
64
|
return rows;
|
|
64
65
|
}
|
|
65
|
-
async createEndpoint(
|
|
66
|
-
const encryptedSecret = this.vault
|
|
66
|
+
async createEndpoint(input) {
|
|
67
|
+
const encryptedSecret = this.vault
|
|
68
|
+
? await this.vault.encrypt(input.secret)
|
|
69
|
+
: input.secret;
|
|
67
70
|
const [endpoint] = await this.prisma.$queryRawUnsafe(`INSERT INTO webhook_endpoints (url, secret, events, description, metadata, tenant_id)
|
|
68
71
|
VALUES ($1, $2, $3::varchar[], $4, $5::jsonb, $6::uuid)
|
|
69
|
-
RETURNING ${ENDPOINT_COLUMNS_WITH_SECRET}`, url, encryptedSecret, events, description, metadata ? JSON.stringify(metadata) : null, tenantId);
|
|
72
|
+
RETURNING ${ENDPOINT_COLUMNS_WITH_SECRET}`, input.url, encryptedSecret, input.events, input.description, input.metadata ? JSON.stringify(input.metadata) : null, input.tenantId);
|
|
70
73
|
return endpoint;
|
|
71
74
|
}
|
|
72
75
|
async getEndpoint(id) {
|
|
@@ -115,6 +118,19 @@ let PrismaEndpointRepository = class PrismaEndpointRepository {
|
|
|
115
118
|
const results = await this.prisma.$queryRawUnsafe(query, ...values);
|
|
116
119
|
return results[0] ?? null;
|
|
117
120
|
}
|
|
121
|
+
async rotateSecret(id, input) {
|
|
122
|
+
const encryptedSecret = this.vault
|
|
123
|
+
? await this.vault.encrypt(input.secret)
|
|
124
|
+
: input.secret;
|
|
125
|
+
const results = await this.prisma.$queryRawUnsafe(`UPDATE webhook_endpoints
|
|
126
|
+
SET previous_secret = secret,
|
|
127
|
+
secret = $1,
|
|
128
|
+
previous_secret_expires_at = $2,
|
|
129
|
+
updated_at = NOW()
|
|
130
|
+
WHERE id = $3::uuid
|
|
131
|
+
RETURNING ${ENDPOINT_COLUMNS}`, encryptedSecret, input.previousSecretExpiresAt, id);
|
|
132
|
+
return results[0] ?? null;
|
|
133
|
+
}
|
|
118
134
|
async deleteEndpoint(id) {
|
|
119
135
|
const result = await this.prisma.$executeRaw `
|
|
120
136
|
DELETE FROM webhook_endpoints WHERE id = ${id}::uuid`;
|
|
@@ -123,8 +139,23 @@ let PrismaEndpointRepository = class PrismaEndpointRepository {
|
|
|
123
139
|
async resetFailures(endpointId) {
|
|
124
140
|
await this.prisma.$executeRaw `
|
|
125
141
|
UPDATE webhook_endpoints
|
|
126
|
-
SET consecutive_failures = 0,
|
|
127
|
-
|
|
142
|
+
SET consecutive_failures = 0,
|
|
143
|
+
active = CASE
|
|
144
|
+
WHEN disabled_reason = ${webhook_constants_1.ENDPOINT_DISABLED_REASON_CONSECUTIVE_FAILURES_EXCEEDED}
|
|
145
|
+
THEN true
|
|
146
|
+
ELSE active
|
|
147
|
+
END,
|
|
148
|
+
disabled_at = CASE
|
|
149
|
+
WHEN disabled_reason = ${webhook_constants_1.ENDPOINT_DISABLED_REASON_CONSECUTIVE_FAILURES_EXCEEDED}
|
|
150
|
+
THEN NULL
|
|
151
|
+
ELSE disabled_at
|
|
152
|
+
END,
|
|
153
|
+
disabled_reason = CASE
|
|
154
|
+
WHEN disabled_reason = ${webhook_constants_1.ENDPOINT_DISABLED_REASON_CONSECUTIVE_FAILURES_EXCEEDED}
|
|
155
|
+
THEN NULL
|
|
156
|
+
ELSE disabled_reason
|
|
157
|
+
END,
|
|
158
|
+
updated_at = NOW()
|
|
128
159
|
WHERE id = ${endpointId}::uuid`;
|
|
129
160
|
}
|
|
130
161
|
async incrementFailures(endpointId) {
|
|
@@ -136,10 +167,11 @@ let PrismaEndpointRepository = class PrismaEndpointRepository {
|
|
|
136
167
|
return updated.consecutive_failures;
|
|
137
168
|
}
|
|
138
169
|
async disableEndpoint(endpointId, reason) {
|
|
139
|
-
await this.prisma.$executeRaw `
|
|
170
|
+
const updated = await this.prisma.$executeRaw `
|
|
140
171
|
UPDATE webhook_endpoints
|
|
141
172
|
SET active = false, disabled_at = NOW(), disabled_reason = ${reason}, updated_at = NOW()
|
|
142
173
|
WHERE id = ${endpointId}::uuid AND active = true`;
|
|
174
|
+
return updated > 0;
|
|
143
175
|
}
|
|
144
176
|
async recoverEligibleEndpoints(cooldownMinutes) {
|
|
145
177
|
const cooldownInterval = `${cooldownMinutes} minutes`;
|
|
@@ -149,6 +181,7 @@ let PrismaEndpointRepository = class PrismaEndpointRepository {
|
|
|
149
181
|
disabled_at = NULL, disabled_reason = NULL, updated_at = NOW()
|
|
150
182
|
WHERE active = false
|
|
151
183
|
AND disabled_at IS NOT NULL
|
|
184
|
+
AND disabled_reason = ${webhook_constants_1.ENDPOINT_DISABLED_REASON_CONSECUTIVE_FAILURES_EXCEEDED}
|
|
152
185
|
AND disabled_at + ${cooldownInterval}::interval <= NOW()
|
|
153
186
|
RETURNING id`;
|
|
154
187
|
return recovered.length;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prisma-endpoint.repository.js","sourceRoot":"","sources":["../../src/adapters/prisma-endpoint.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;
|
|
1
|
+
{"version":3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tD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,WAAW,CAAA;;mEAEkB,MAAM;mBACtD,UAAU,0BAA0B,CAAC;QACpD,OAAO,OAAO,GAAG,CAAC,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,wBAAwB,CAAC,eAAuB;QACpD,MAAM,gBAAgB,GAAG,GAAG,eAAe,UAAU,CAAC;QACtD,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAkB;;;;;;gCAMnC,0EAAsD;4BAC1D,gBAAgB;mBACzB,CAAC;QAChB,OAAO,SAAS,CAAC,MAAM,CAAC;IAC1B,CAAC;CACF,CAAA;AA1NY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;;GACA,wBAAwB,CA0NpC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
export { WebhookModule } from './webhook.module';
|
|
2
2
|
export { WebhookService } from './webhook.service';
|
|
3
|
+
/** @internal Wired automatically by WebhookModule. Exported for advanced testing/custom integration only. */
|
|
3
4
|
export { WebhookDeliveryWorker } from './webhook.delivery-worker';
|
|
5
|
+
/** @internal Wired automatically by WebhookModule. Exported for advanced testing/custom integration only. */
|
|
4
6
|
export { WebhookDispatcher } from './webhook.dispatcher';
|
|
7
|
+
/** @internal Wired automatically by WebhookModule. Exported for advanced testing/custom integration only. */
|
|
5
8
|
export { WebhookRetryPolicy } from './webhook.retry-policy';
|
|
6
9
|
export { WebhookSigner, type SignatureHeaders } from './webhook.signer';
|
|
10
|
+
/** @internal Wired automatically by WebhookModule. Exported for advanced testing/custom integration only. */
|
|
7
11
|
export { WebhookCircuitBreaker } from './webhook.circuit-breaker';
|
|
8
12
|
export { WebhookEvent } from './webhook.event';
|
|
9
13
|
export { WebhookEndpointAdminService } from './webhook.endpoint-admin.service';
|
|
10
14
|
export { WebhookDeliveryAdminService } from './webhook.delivery-admin.service';
|
|
11
|
-
/** @deprecated Use WebhookEndpointAdminService and WebhookDeliveryAdminService */
|
|
15
|
+
/** @deprecated since v0.2.0. Will be removed in v1.0.0. Use {@link WebhookEndpointAdminService} and {@link WebhookDeliveryAdminService}. */
|
|
12
16
|
export { WebhookAdminService } from './webhook.admin.service';
|
|
13
17
|
export type { WebhookEventRepository } from './ports/webhook-event.repository';
|
|
14
|
-
export type { WebhookEndpointRepository } from './ports/webhook-endpoint.repository';
|
|
15
|
-
export type { WebhookDeliveryRepository, PendingDelivery, } from './ports/webhook-delivery.repository';
|
|
18
|
+
export type { WebhookEndpointRepository, ResolvedCreateEndpointInput, ResolvedRotateEndpointSecretInput, } from './ports/webhook-endpoint.repository';
|
|
19
|
+
export type { WebhookDeliveryRepository, ClaimedDelivery, PendingDelivery, WebhookTransaction, } from './ports/webhook-delivery.repository';
|
|
16
20
|
export type { WebhookHttpClient } from './ports/webhook-http-client';
|
|
17
21
|
export type { WebhookSecretVault } from './ports/webhook-secret-vault';
|
|
18
22
|
export { PrismaEventRepository } from './adapters/prisma-event.repository';
|
|
@@ -21,8 +25,9 @@ export { PrismaDeliveryRepository } from './adapters/prisma-delivery.repository'
|
|
|
21
25
|
export { FetchHttpClient } from './adapters/fetch-http-client';
|
|
22
26
|
export { PlaintextSecretVault } from './adapters/plaintext-secret-vault';
|
|
23
27
|
export type { WebhookModuleOptions, WebhookModuleAsyncOptions, WebhookOptionsFactory, DeliveryOptions, CircuitBreakerOptions, PollingOptions, DeliveryFailedContext, DeliveryFailureKind, EndpointDisabledContext, } from './interfaces/webhook-options.interface';
|
|
24
|
-
export type { EndpointRecord, EndpointRecordWithSecret, CreateEndpointDto, UpdateEndpointDto, } from './interfaces/webhook-endpoint.interface';
|
|
25
|
-
export type { DeliveryStatus, DeliveryRecord, DeliveryAttemptRecord, EventRecord, DeliveryResult, DeliveryLogFilters, } from './interfaces/webhook-delivery.interface';
|
|
26
|
-
export { WEBHOOK_MODULE_OPTIONS, WEBHOOK_EVENT_REPOSITORY, WEBHOOK_ENDPOINT_REPOSITORY, WEBHOOK_DELIVERY_REPOSITORY, WEBHOOK_HTTP_CLIENT, DEFAULT_BACKOFF_SCHEDULE, DEFAULT_DELIVERY_TIMEOUT, DEFAULT_MAX_RETRIES, DEFAULT_POLLING_INTERVAL, DEFAULT_POLLING_BATCH_SIZE, DEFAULT_CIRCUIT_BREAKER_THRESHOLD, DEFAULT_CIRCUIT_BREAKER_COOLDOWN_MINUTES, DEFAULT_STALE_SENDING_MINUTES, } from './webhook.constants';
|
|
28
|
+
export type { EndpointRecord, EndpointRecordWithSecret, CreateEndpointDto, UpdateEndpointDto, RotateEndpointSecretDto, } from './interfaces/webhook-endpoint.interface';
|
|
29
|
+
export type { DeliveryStatus, DeliveryAttemptStatus, DeliveryRecord, DeliveryAttemptRecord, EventRecord, DeliveryResult, DeliveryLogFilters, } from './interfaces/webhook-delivery.interface';
|
|
30
|
+
export { WEBHOOK_MODULE_OPTIONS, WEBHOOK_EVENT_REPOSITORY, WEBHOOK_ENDPOINT_REPOSITORY, WEBHOOK_DELIVERY_REPOSITORY, WEBHOOK_HTTP_CLIENT, WEBHOOK_SECRET_VAULT, DEFAULT_BACKOFF_SCHEDULE, DEFAULT_DELIVERY_TIMEOUT, DEFAULT_MAX_RETRIES, DEFAULT_POLLING_INTERVAL, DEFAULT_POLLING_BATCH_SIZE, DEFAULT_CIRCUIT_BREAKER_THRESHOLD, DEFAULT_CIRCUIT_BREAKER_COOLDOWN_MINUTES, ENDPOINT_DISABLED_REASON_CONSECUTIVE_FAILURES_EXCEEDED, DEFAULT_STALE_SENDING_MINUTES, } from './webhook.constants';
|
|
31
|
+
export type { EndpointDisabledReason } from './webhook.constants';
|
|
27
32
|
export { validateWebhookUrl, resolveAndValidateHost, WebhookUrlValidationError, type WebhookUrlValidationReason, } from './webhook.url-validator';
|
|
28
33
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d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wB,EACxB,mBAAmB,EACnB,wBAAwB,EACxB,0BAA0B,EAC1B,iCAAiC,EACjC,wCAAwC,EACxC,sDAAsD,EACtD,6BAA6B,GAC9B,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAGlE,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,yBAAyB,EACzB,KAAK,0BAA0B,GAChC,MAAM,yBAAyB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WebhookUrlValidationError = exports.resolveAndValidateHost = exports.validateWebhookUrl = exports.DEFAULT_STALE_SENDING_MINUTES = exports.DEFAULT_CIRCUIT_BREAKER_COOLDOWN_MINUTES = exports.DEFAULT_CIRCUIT_BREAKER_THRESHOLD = exports.DEFAULT_POLLING_BATCH_SIZE = exports.DEFAULT_POLLING_INTERVAL = exports.DEFAULT_MAX_RETRIES = exports.DEFAULT_DELIVERY_TIMEOUT = exports.DEFAULT_BACKOFF_SCHEDULE = exports.WEBHOOK_HTTP_CLIENT = exports.WEBHOOK_DELIVERY_REPOSITORY = exports.WEBHOOK_ENDPOINT_REPOSITORY = exports.WEBHOOK_EVENT_REPOSITORY = exports.WEBHOOK_MODULE_OPTIONS = exports.PlaintextSecretVault = exports.FetchHttpClient = exports.PrismaDeliveryRepository = exports.PrismaEndpointRepository = exports.PrismaEventRepository = exports.WebhookAdminService = exports.WebhookDeliveryAdminService = exports.WebhookEndpointAdminService = exports.WebhookEvent = exports.WebhookCircuitBreaker = exports.WebhookSigner = exports.WebhookRetryPolicy = exports.WebhookDispatcher = exports.WebhookDeliveryWorker = exports.WebhookService = exports.WebhookModule = void 0;
|
|
3
|
+
exports.WebhookUrlValidationError = exports.resolveAndValidateHost = exports.validateWebhookUrl = exports.DEFAULT_STALE_SENDING_MINUTES = exports.ENDPOINT_DISABLED_REASON_CONSECUTIVE_FAILURES_EXCEEDED = exports.DEFAULT_CIRCUIT_BREAKER_COOLDOWN_MINUTES = exports.DEFAULT_CIRCUIT_BREAKER_THRESHOLD = exports.DEFAULT_POLLING_BATCH_SIZE = exports.DEFAULT_POLLING_INTERVAL = exports.DEFAULT_MAX_RETRIES = exports.DEFAULT_DELIVERY_TIMEOUT = exports.DEFAULT_BACKOFF_SCHEDULE = exports.WEBHOOK_SECRET_VAULT = exports.WEBHOOK_HTTP_CLIENT = exports.WEBHOOK_DELIVERY_REPOSITORY = exports.WEBHOOK_ENDPOINT_REPOSITORY = exports.WEBHOOK_EVENT_REPOSITORY = exports.WEBHOOK_MODULE_OPTIONS = exports.PlaintextSecretVault = exports.FetchHttpClient = exports.PrismaDeliveryRepository = exports.PrismaEndpointRepository = exports.PrismaEventRepository = exports.WebhookAdminService = exports.WebhookDeliveryAdminService = exports.WebhookEndpointAdminService = exports.WebhookEvent = exports.WebhookCircuitBreaker = exports.WebhookSigner = exports.WebhookRetryPolicy = exports.WebhookDispatcher = exports.WebhookDeliveryWorker = exports.WebhookService = exports.WebhookModule = void 0;
|
|
4
4
|
// Module
|
|
5
5
|
var webhook_module_1 = require("./webhook.module");
|
|
6
6
|
Object.defineProperty(exports, "WebhookModule", { enumerable: true, get: function () { return webhook_module_1.WebhookModule; } });
|
|
7
7
|
// Core services
|
|
8
8
|
var webhook_service_1 = require("./webhook.service");
|
|
9
9
|
Object.defineProperty(exports, "WebhookService", { enumerable: true, get: function () { return webhook_service_1.WebhookService; } });
|
|
10
|
+
/** @internal Wired automatically by WebhookModule. Exported for advanced testing/custom integration only. */
|
|
10
11
|
var webhook_delivery_worker_1 = require("./webhook.delivery-worker");
|
|
11
12
|
Object.defineProperty(exports, "WebhookDeliveryWorker", { enumerable: true, get: function () { return webhook_delivery_worker_1.WebhookDeliveryWorker; } });
|
|
13
|
+
/** @internal Wired automatically by WebhookModule. Exported for advanced testing/custom integration only. */
|
|
12
14
|
var webhook_dispatcher_1 = require("./webhook.dispatcher");
|
|
13
15
|
Object.defineProperty(exports, "WebhookDispatcher", { enumerable: true, get: function () { return webhook_dispatcher_1.WebhookDispatcher; } });
|
|
16
|
+
/** @internal Wired automatically by WebhookModule. Exported for advanced testing/custom integration only. */
|
|
14
17
|
var webhook_retry_policy_1 = require("./webhook.retry-policy");
|
|
15
18
|
Object.defineProperty(exports, "WebhookRetryPolicy", { enumerable: true, get: function () { return webhook_retry_policy_1.WebhookRetryPolicy; } });
|
|
16
19
|
var webhook_signer_1 = require("./webhook.signer");
|
|
17
20
|
Object.defineProperty(exports, "WebhookSigner", { enumerable: true, get: function () { return webhook_signer_1.WebhookSigner; } });
|
|
21
|
+
/** @internal Wired automatically by WebhookModule. Exported for advanced testing/custom integration only. */
|
|
18
22
|
var webhook_circuit_breaker_1 = require("./webhook.circuit-breaker");
|
|
19
23
|
Object.defineProperty(exports, "WebhookCircuitBreaker", { enumerable: true, get: function () { return webhook_circuit_breaker_1.WebhookCircuitBreaker; } });
|
|
20
24
|
var webhook_event_1 = require("./webhook.event");
|
|
@@ -24,7 +28,7 @@ var webhook_endpoint_admin_service_1 = require("./webhook.endpoint-admin.service
|
|
|
24
28
|
Object.defineProperty(exports, "WebhookEndpointAdminService", { enumerable: true, get: function () { return webhook_endpoint_admin_service_1.WebhookEndpointAdminService; } });
|
|
25
29
|
var webhook_delivery_admin_service_1 = require("./webhook.delivery-admin.service");
|
|
26
30
|
Object.defineProperty(exports, "WebhookDeliveryAdminService", { enumerable: true, get: function () { return webhook_delivery_admin_service_1.WebhookDeliveryAdminService; } });
|
|
27
|
-
/** @deprecated Use WebhookEndpointAdminService and WebhookDeliveryAdminService */
|
|
31
|
+
/** @deprecated since v0.2.0. Will be removed in v1.0.0. Use {@link WebhookEndpointAdminService} and {@link WebhookDeliveryAdminService}. */
|
|
28
32
|
var webhook_admin_service_1 = require("./webhook.admin.service");
|
|
29
33
|
Object.defineProperty(exports, "WebhookAdminService", { enumerable: true, get: function () { return webhook_admin_service_1.WebhookAdminService; } });
|
|
30
34
|
// Default adapters
|
|
@@ -45,6 +49,7 @@ Object.defineProperty(exports, "WEBHOOK_EVENT_REPOSITORY", { enumerable: true, g
|
|
|
45
49
|
Object.defineProperty(exports, "WEBHOOK_ENDPOINT_REPOSITORY", { enumerable: true, get: function () { return webhook_constants_1.WEBHOOK_ENDPOINT_REPOSITORY; } });
|
|
46
50
|
Object.defineProperty(exports, "WEBHOOK_DELIVERY_REPOSITORY", { enumerable: true, get: function () { return webhook_constants_1.WEBHOOK_DELIVERY_REPOSITORY; } });
|
|
47
51
|
Object.defineProperty(exports, "WEBHOOK_HTTP_CLIENT", { enumerable: true, get: function () { return webhook_constants_1.WEBHOOK_HTTP_CLIENT; } });
|
|
52
|
+
Object.defineProperty(exports, "WEBHOOK_SECRET_VAULT", { enumerable: true, get: function () { return webhook_constants_1.WEBHOOK_SECRET_VAULT; } });
|
|
48
53
|
Object.defineProperty(exports, "DEFAULT_BACKOFF_SCHEDULE", { enumerable: true, get: function () { return webhook_constants_1.DEFAULT_BACKOFF_SCHEDULE; } });
|
|
49
54
|
Object.defineProperty(exports, "DEFAULT_DELIVERY_TIMEOUT", { enumerable: true, get: function () { return webhook_constants_1.DEFAULT_DELIVERY_TIMEOUT; } });
|
|
50
55
|
Object.defineProperty(exports, "DEFAULT_MAX_RETRIES", { enumerable: true, get: function () { return webhook_constants_1.DEFAULT_MAX_RETRIES; } });
|
|
@@ -52,7 +57,9 @@ Object.defineProperty(exports, "DEFAULT_POLLING_INTERVAL", { enumerable: true, g
|
|
|
52
57
|
Object.defineProperty(exports, "DEFAULT_POLLING_BATCH_SIZE", { enumerable: true, get: function () { return webhook_constants_1.DEFAULT_POLLING_BATCH_SIZE; } });
|
|
53
58
|
Object.defineProperty(exports, "DEFAULT_CIRCUIT_BREAKER_THRESHOLD", { enumerable: true, get: function () { return webhook_constants_1.DEFAULT_CIRCUIT_BREAKER_THRESHOLD; } });
|
|
54
59
|
Object.defineProperty(exports, "DEFAULT_CIRCUIT_BREAKER_COOLDOWN_MINUTES", { enumerable: true, get: function () { return webhook_constants_1.DEFAULT_CIRCUIT_BREAKER_COOLDOWN_MINUTES; } });
|
|
60
|
+
Object.defineProperty(exports, "ENDPOINT_DISABLED_REASON_CONSECUTIVE_FAILURES_EXCEEDED", { enumerable: true, get: function () { return webhook_constants_1.ENDPOINT_DISABLED_REASON_CONSECUTIVE_FAILURES_EXCEEDED; } });
|
|
55
61
|
Object.defineProperty(exports, "DEFAULT_STALE_SENDING_MINUTES", { enumerable: true, get: function () { return webhook_constants_1.DEFAULT_STALE_SENDING_MINUTES; } });
|
|
62
|
+
// URL validation
|
|
56
63
|
var webhook_url_validator_1 = require("./webhook.url-validator");
|
|
57
64
|
Object.defineProperty(exports, "validateWebhookUrl", { enumerable: true, get: function () { return webhook_url_validator_1.validateWebhookUrl; } });
|
|
58
65
|
Object.defineProperty(exports, "resolveAndValidateHost", { enumerable: true, get: function () { return webhook_url_validator_1.resolveAndValidateHost; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,SAAS;AACT,mDAAiD;AAAxC,+GAAA,aAAa,OAAA;AAEtB,gBAAgB;AAChB,qDAAmD;AAA1C,iHAAA,cAAc,OAAA;AACvB,qEAAkE;AAAzD,gIAAA,qBAAqB,OAAA;AAC9B,2DAAyD;AAAhD,uHAAA,iBAAiB,OAAA;AAC1B,+DAA4D;AAAnD,0HAAA,kBAAkB,OAAA;AAC3B,mDAAwE;AAA/D,+GAAA,aAAa,OAAA;AACtB,qEAAkE;AAAzD,gIAAA,qBAAqB,OAAA;AAC9B,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AAErB,iBAAiB;AACjB,mFAA+E;AAAtE,6IAAA,2BAA2B,OAAA;AACpC,mFAA+E;AAAtE,6IAAA,2BAA2B,OAAA;AACpC,
|
|
1
|
+
{"version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iCAAiC,OAAA;AACjC,6IAAA,wCAAwC,OAAA;AACxC,2JAAA,sDAAsD,OAAA;AACtD,kIAAA,6BAA6B,OAAA;AAI/B,iBAAiB;AACjB,iEAKiC;AAJ/B,2HAAA,kBAAkB,OAAA;AAClB,+HAAA,sBAAsB,OAAA;AACtB,kIAAA,yBAAyB,OAAA"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
export type DeliveryStatus = 'PENDING' | 'SENDING' | 'SENT' | 'FAILED';
|
|
2
|
+
export type DeliveryAttemptStatus = Exclude<DeliveryStatus, 'SENDING'>;
|
|
2
3
|
export interface DeliveryRecord {
|
|
3
4
|
id: string;
|
|
4
5
|
eventId: string;
|
|
5
6
|
endpointId: string;
|
|
6
|
-
|
|
7
|
+
/** Destination URL used for this delivery. Uses the queued snapshot when available. */
|
|
8
|
+
destinationUrl: string;
|
|
9
|
+
/** Null when the endpoint is global rather than tenant-scoped. */
|
|
10
|
+
tenantId: string | null;
|
|
7
11
|
status: DeliveryStatus;
|
|
8
12
|
attempts: number;
|
|
9
13
|
maxAttempts: number;
|
|
@@ -19,7 +23,7 @@ export interface DeliveryAttemptRecord {
|
|
|
19
23
|
id: string;
|
|
20
24
|
deliveryId: string;
|
|
21
25
|
attemptNumber: number;
|
|
22
|
-
status:
|
|
26
|
+
status: DeliveryAttemptStatus;
|
|
23
27
|
responseStatus: number | null;
|
|
24
28
|
responseBody: string | null;
|
|
25
29
|
responseBodyTruncated: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook-delivery.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/webhook-delivery.interface.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEvE,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB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SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -9,7 +9,7 @@ export interface EndpointRecord {
|
|
|
9
9
|
consecutiveFailures: number;
|
|
10
10
|
disabledAt: Date | null;
|
|
11
11
|
disabledReason: string | null;
|
|
12
|
-
previousSecretExpiresAt
|
|
12
|
+
previousSecretExpiresAt: Date | null;
|
|
13
13
|
createdAt: Date;
|
|
14
14
|
updatedAt: Date;
|
|
15
15
|
}
|
|
@@ -20,8 +20,10 @@ export interface EndpointRecordWithSecret extends EndpointRecord {
|
|
|
20
20
|
export interface CreateEndpointDto {
|
|
21
21
|
url: string;
|
|
22
22
|
events: string[];
|
|
23
|
-
|
|
23
|
+
/** Pass `'auto'` or omit the field to generate a secure base64 signing secret. */
|
|
24
|
+
secret?: string;
|
|
24
25
|
description?: string;
|
|
26
|
+
/** JSON-serializable metadata stored as jsonb. Dates become strings; BigInt is not supported. */
|
|
25
27
|
metadata?: Record<string, unknown>;
|
|
26
28
|
tenantId?: string;
|
|
27
29
|
}
|
|
@@ -29,7 +31,14 @@ export interface UpdateEndpointDto {
|
|
|
29
31
|
url?: string;
|
|
30
32
|
events?: string[];
|
|
31
33
|
description?: string;
|
|
34
|
+
/** JSON-serializable metadata stored as jsonb. Dates become strings; BigInt is not supported. */
|
|
32
35
|
metadata?: Record<string, unknown>;
|
|
33
36
|
active?: boolean;
|
|
34
37
|
}
|
|
38
|
+
export interface RotateEndpointSecretDto {
|
|
39
|
+
/** Pass `'auto'` or omit the field to generate a secure base64 signing secret. */
|
|
40
|
+
secret?: string;
|
|
41
|
+
/** Keep the previous secret valid until this timestamp so queued receivers can overlap during rotation. */
|
|
42
|
+
previousSecretExpiresAt: Date;
|
|
43
|
+
}
|
|
35
44
|
//# sourceMappingURL=webhook-endpoint.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook-endpoint.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/webhook-endpoint.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACzC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,uBAAuB,
|
|
1
|
+
{"version":3,"file":"webhook-endpoint.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/webhook-endpoint.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AW,uBAAuB;IACtC,kFAAkF;IAClF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2GAA2G;IAC3G,uBAAuB,EAAE,IAAI,CAAC;CAC/B"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { ModuleMetadata, Type } from '@nestjs/common';
|
|
1
|
+
import { InjectionToken, ModuleMetadata, OptionalFactoryDependency, Type } from '@nestjs/common';
|
|
2
2
|
import { WebhookEventRepository } from '../ports/webhook-event.repository';
|
|
3
3
|
import { WebhookEndpointRepository } from '../ports/webhook-endpoint.repository';
|
|
4
4
|
import { WebhookDeliveryRepository } from '../ports/webhook-delivery.repository';
|
|
5
5
|
import { WebhookHttpClient } from '../ports/webhook-http-client';
|
|
6
6
|
import { WebhookSecretVault } from '../ports/webhook-secret-vault';
|
|
7
|
+
import type { EndpointDisabledReason } from '../webhook.constants';
|
|
7
8
|
import { WebhookUrlValidationReason } from '../webhook.url-validator';
|
|
8
9
|
export interface DeliveryOptions {
|
|
9
10
|
timeout?: number;
|
|
10
11
|
maxRetries?: number;
|
|
12
|
+
/** @deprecated Retry backoff is currently fixed to the default exponential schedule. */
|
|
11
13
|
backoff?: 'exponential';
|
|
12
14
|
jitter?: boolean;
|
|
13
15
|
}
|
|
@@ -40,7 +42,7 @@ export interface DeliveryFailedContext {
|
|
|
40
42
|
maxAttempts: number;
|
|
41
43
|
lastError: string | null;
|
|
42
44
|
responseStatus: number | null;
|
|
43
|
-
/** High-level classification.
|
|
45
|
+
/** High-level classification. Built-in workers set this in v0.8.0+; optional for custom/legacy producers. */
|
|
44
46
|
failureKind?: DeliveryFailureKind;
|
|
45
47
|
/** Set only when `failureKind === 'url_validation'` — structured reason from `WebhookUrlValidationError`. */
|
|
46
48
|
validationReason?: WebhookUrlValidationReason;
|
|
@@ -54,12 +56,12 @@ export interface EndpointDisabledContext {
|
|
|
54
56
|
/** Null when the endpoint is not scoped to a tenant. */
|
|
55
57
|
tenantId: string | null;
|
|
56
58
|
url: string;
|
|
57
|
-
reason:
|
|
59
|
+
reason: EndpointDisabledReason;
|
|
58
60
|
consecutiveFailures: number;
|
|
59
61
|
}
|
|
60
|
-
export interface WebhookModuleOptions {
|
|
62
|
+
export interface WebhookModuleOptions<TPrisma = unknown> {
|
|
61
63
|
/** PrismaClient instance — used by default Prisma adapters. Not needed if all custom repositories are provided. */
|
|
62
|
-
prisma?:
|
|
64
|
+
prisma?: TPrisma;
|
|
63
65
|
delivery?: DeliveryOptions;
|
|
64
66
|
circuitBreaker?: CircuitBreakerOptions;
|
|
65
67
|
polling?: PollingOptions;
|
|
@@ -82,7 +84,7 @@ export interface WebhookOptionsFactory {
|
|
|
82
84
|
}
|
|
83
85
|
export interface WebhookModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
|
|
84
86
|
useFactory?: (...args: any[]) => Promise<WebhookModuleOptions> | WebhookModuleOptions;
|
|
85
|
-
inject?:
|
|
87
|
+
inject?: Array<InjectionToken | OptionalFactoryDependency>;
|
|
86
88
|
useClass?: Type<WebhookOptionsFactory>;
|
|
87
89
|
useExisting?: Type<WebhookOptionsFactory>;
|
|
88
90
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook-options.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/webhook-options.interface.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"webhook-options.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/webhook-options.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,cAAc,EACd,yBAAyB,EACzB,IAAI,EACL,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO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AAG,EAAE,KAAK,OAAO,CAAC,oBAAoB,CAAC,GAAG,oBAAoB,CAAC;IACtF,MAAM,CAAC,EAAE,KAAK,CAAC,cAAc,GAAG,yBAAyB,CAAC,CAAC;IAC3D,QAAQ,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACvC,WAAW,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;CAC3C"}
|
|
@@ -1,29 +1,47 @@
|
|
|
1
1
|
import { DeliveryAttemptRecord, DeliveryLogFilters, DeliveryRecord, DeliveryResult } from '../interfaces/webhook-delivery.interface';
|
|
2
|
-
|
|
2
|
+
declare const webhookTransactionBrand: unique symbol;
|
|
3
|
+
/** Opaque transaction token created by repository adapters. */
|
|
4
|
+
export type WebhookTransaction = {
|
|
5
|
+
readonly [webhookTransactionBrand]: 'WebhookTransaction';
|
|
6
|
+
};
|
|
7
|
+
/** A delivery row claimed by the worker but not yet enriched with endpoint/event data. */
|
|
8
|
+
export interface ClaimedDelivery {
|
|
3
9
|
id: string;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
tenant_id: string | null;
|
|
10
|
+
eventId: string;
|
|
11
|
+
endpointId: string;
|
|
7
12
|
attempts: number;
|
|
8
|
-
|
|
13
|
+
maxAttempts: number;
|
|
14
|
+
}
|
|
15
|
+
/** A claimed delivery enriched with endpoint URL, signing secrets, and event payload. Ready to dispatch. */
|
|
16
|
+
export interface PendingDelivery extends ClaimedDelivery {
|
|
17
|
+
tenantId: string | null;
|
|
9
18
|
url: string;
|
|
10
19
|
secret: string;
|
|
11
|
-
additionalSecrets
|
|
12
|
-
|
|
20
|
+
additionalSecrets: string[];
|
|
21
|
+
eventType: string;
|
|
13
22
|
payload: Record<string, unknown>;
|
|
14
23
|
}
|
|
15
24
|
export interface WebhookDeliveryRepository {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Creates queued delivery rows inside the provided transaction.
|
|
27
|
+
* No-op when endpointIds is empty.
|
|
28
|
+
*/
|
|
29
|
+
createDeliveriesInTransaction(tx: WebhookTransaction, eventId: string, endpointIds: string[], maxAttempts: number): Promise<void>;
|
|
30
|
+
/** Runs the callback in one repository transaction. Pass the tx only to other *InTransaction port methods. */
|
|
31
|
+
runInTransaction<T>(fn: (tx: WebhookTransaction) => Promise<T>): Promise<T>;
|
|
32
|
+
/** Atomically claims pending rows and returns the minimal delivery identity needed for enrichment. */
|
|
33
|
+
claimPendingDeliveries(batchSize: number): Promise<ClaimedDelivery[]>;
|
|
19
34
|
enrichDeliveries(deliveryIds: string[]): Promise<PendingDelivery[]>;
|
|
20
35
|
markSent(deliveryId: string, attempts: number, result: DeliveryResult): Promise<void>;
|
|
21
36
|
markFailed(deliveryId: string, attempts: number, result: DeliveryResult): Promise<void>;
|
|
22
37
|
markRetry(deliveryId: string, attempts: number, nextAt: Date, result: DeliveryResult): Promise<void>;
|
|
38
|
+
/** @returns number of stale SENDING deliveries recovered or failed. */
|
|
23
39
|
recoverStaleSending(stalenessMinutes: number): Promise<number>;
|
|
24
40
|
getDeliveryLogs(endpointId: string, filters?: DeliveryLogFilters): Promise<DeliveryRecord[]>;
|
|
41
|
+
/** @returns attempts sorted by attemptNumber ASC. */
|
|
25
42
|
getDeliveryAttempts(deliveryId: string): Promise<DeliveryAttemptRecord[]>;
|
|
26
43
|
retryDelivery(deliveryId: string): Promise<boolean>;
|
|
27
44
|
createTestDelivery(eventId: string, endpointId: string): Promise<void>;
|
|
28
45
|
}
|
|
46
|
+
export {};
|
|
29
47
|
//# sourceMappingURL=webhook-delivery.repository.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook-delivery.repository.d.ts","sourceRoot":"","sources":["../../src/ports/webhook-delivery.repository.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,cAAc,EACf,MAAM,0CAA0C,CAAC;AAElD,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,
|
|
1
|
+
{"version":3,"file":"webhook-delivery.repository.d.ts","sourceRoot":"","sources":["../../src/ports/webhook-delivery.repository.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,cAAc,EACf,MAAM,0CAA0C,CAAC;AAElD,OAAO,CAAC,MAAM,uBAAuB,EAAE,OAAO,MAAM,CAAC;AAErD,+DAA+D;AAC/D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,CAAC,uBAAuB,CAAC,EAAE,oBAAoB,CAAC;CAC1D,CAAC;AAEF,0FAA0F;AAC1F,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,4GAA4G;AAC5G,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,6BAA6B,CAC3B,EAAE,EAAE,kBAAkB,EACtB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EAAE,EACrB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB,8GAA8G;IAC9G,gBAAgB,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,kBAAkB,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAE5E,sGAAsG;IACtG,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;IACtE,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;IAEpE,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtF,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxF,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErG,uEAAuE;IACvE,mBAAmB,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/D,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IAC7F,qDAAqD;IACrD,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAAC;IAC1E,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACpD,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACxE"}
|
|
@@ -1,15 +1,35 @@
|
|
|
1
|
-
import { EndpointRecord, EndpointRecordWithSecret, UpdateEndpointDto } from '../interfaces/webhook-endpoint.interface';
|
|
1
|
+
import { EndpointRecord, EndpointRecordWithSecret, RotateEndpointSecretDto, UpdateEndpointDto } from '../interfaces/webhook-endpoint.interface';
|
|
2
|
+
import { WebhookTransaction } from './webhook-delivery.repository';
|
|
3
|
+
export interface ResolvedCreateEndpointInput {
|
|
4
|
+
url: string;
|
|
5
|
+
secret: string;
|
|
6
|
+
events: string[];
|
|
7
|
+
description: string | null;
|
|
8
|
+
metadata: Record<string, unknown> | null;
|
|
9
|
+
tenantId: string | null;
|
|
10
|
+
}
|
|
11
|
+
export interface ResolvedRotateEndpointSecretInput extends Required<RotateEndpointSecretDto> {
|
|
12
|
+
}
|
|
2
13
|
export interface WebhookEndpointRepository {
|
|
3
14
|
findMatchingEndpoints(eventType: string, tenantId: string | undefined): Promise<EndpointRecord[]>;
|
|
4
|
-
|
|
5
|
-
|
|
15
|
+
/** Use only with a transaction object received from WebhookDeliveryRepository.runInTransaction(). */
|
|
16
|
+
findMatchingEndpointsInTransaction(tx: WebhookTransaction, eventType: string, tenantId: string | undefined): Promise<EndpointRecord[]>;
|
|
17
|
+
createEndpoint(input: ResolvedCreateEndpointInput): Promise<EndpointRecordWithSecret>;
|
|
6
18
|
getEndpoint(id: string): Promise<EndpointRecord | null>;
|
|
7
19
|
listEndpoints(tenantId?: string): Promise<EndpointRecord[]>;
|
|
8
20
|
updateEndpoint(id: string, dto: UpdateEndpointDto): Promise<EndpointRecord | null>;
|
|
21
|
+
rotateSecret(id: string, input: ResolvedRotateEndpointSecretInput): Promise<EndpointRecord | null>;
|
|
22
|
+
/**
|
|
23
|
+
* @returns true if a row was deleted, false if the endpoint did not exist.
|
|
24
|
+
* May reject when existing delivery rows still reference the endpoint.
|
|
25
|
+
*/
|
|
9
26
|
deleteEndpoint(id: string): Promise<boolean>;
|
|
10
27
|
resetFailures(endpointId: string): Promise<void>;
|
|
28
|
+
/** Atomically increments consecutive failures and returns the new value. */
|
|
11
29
|
incrementFailures(endpointId: string): Promise<number>;
|
|
12
|
-
|
|
30
|
+
/** @returns true when the endpoint transitioned from active to inactive. */
|
|
31
|
+
disableEndpoint(endpointId: string, reason: string): Promise<boolean>;
|
|
32
|
+
/** @returns number of endpoints recovered after cooldown. */
|
|
13
33
|
recoverEligibleEndpoints(cooldownMinutes: number): Promise<number>;
|
|
14
34
|
}
|
|
15
35
|
//# sourceMappingURL=webhook-endpoint.repository.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook-endpoint.repository.d.ts","sourceRoot":"","sources":["../../src/ports/webhook-endpoint.repository.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,wBAAwB,EACxB,iBAAiB,EAClB,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"webhook-endpoint.repository.d.ts","sourceRoot":"","sources":["../../src/ports/webhook-endpoint.repository.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,wBAAwB,EACxB,uBAAuB,EACvB,iBAAiB,EAClB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,MAAM,WAAW,2BAA2B;IAC1C,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACzC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,iCACf,SAAQ,QAAQ,CAAC,uBAAuB,CAAC;CAAG;AAE9C,MAAM,WAAW,yBAAyB;IACxC,qBAAqB,CACnB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,GAAG,SAAS,GAC3B,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IAE7B,qGAAqG;IACrG,kCAAkC,CAChC,EAAE,EAAE,kBAAkB,EACtB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,GAAG,SAAS,GAC3B,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IAE7B,cAAc,CAAC,KAAK,EAAE,2BAA2B,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAEtF,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACxD,aAAa,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IAC5D,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACnF,YAAY,CACV,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,iCAAiC,GACvC,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAClC;;;OAGG;IACH,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE7C,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,4EAA4E;IAC5E,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACvD,4EAA4E;IAC5E,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACtE,6DAA6D;IAC7D,wBAAwB,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACpE"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { WebhookTransaction } from './webhook-delivery.repository';
|
|
1
2
|
export interface WebhookEventRepository {
|
|
2
3
|
saveEvent(eventType: string, payload: Record<string, unknown>, tenantId: string | null): Promise<string>;
|
|
3
|
-
|
|
4
|
+
/** Use only with a transaction object received from WebhookDeliveryRepository.runInTransaction(). */
|
|
5
|
+
saveEventInTransaction(tx: WebhookTransaction, eventType: string, payload: Record<string, unknown>, tenantId: string | null): Promise<string>;
|
|
4
6
|
}
|
|
5
7
|
//# sourceMappingURL=webhook-event.repository.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook-event.repository.d.ts","sourceRoot":"","sources":["../../src/ports/webhook-event.repository.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,SAAS,CACP,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,QAAQ,EAAE,MAAM,GAAG,IAAI,GACtB,OAAO,CAAC,MAAM,CAAC,CAAC;IAEnB,sBAAsB,CACpB,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"webhook-event.repository.d.ts","sourceRoot":"","sources":["../../src/ports/webhook-event.repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,MAAM,WAAW,sBAAsB;IACrC,SAAS,CACP,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,QAAQ,EAAE,MAAM,GAAG,IAAI,GACtB,OAAO,CAAC,MAAM,CAAC,CAAC;IAEnB,qGAAqG;IACrG,sBAAsB,CACpB,EAAE,EAAE,kBAAkB,EACtB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,QAAQ,EAAE,MAAM,GAAG,IAAI,GACtB,OAAO,CAAC,MAAM,CAAC,CAAC;CACpB"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { DeliveryResult } from '../interfaces/webhook-delivery.interface';
|
|
2
2
|
export interface WebhookHttpClient {
|
|
3
|
+
/**
|
|
4
|
+
* @param timeout milliseconds before the request is aborted.
|
|
5
|
+
* @returns DeliveryResult with success false on timeout/network failure; implementations should not throw for HTTP failures.
|
|
6
|
+
*/
|
|
3
7
|
post(url: string, headers: Record<string, string>, body: string, timeout: number): Promise<DeliveryResult>;
|
|
4
8
|
}
|
|
5
9
|
//# sourceMappingURL=webhook-http-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook-http-client.d.ts","sourceRoot":"","sources":["../../src/ports/webhook-http-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAE1E,MAAM,WAAW,iBAAiB;IAChC,IAAI,CACF,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,cAAc,CAAC,CAAC;CAC5B"}
|
|
1
|
+
{"version":3,"file":"webhook-http-client.d.ts","sourceRoot":"","sources":["../../src/ports/webhook-http-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAE1E,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,IAAI,CACF,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,cAAc,CAAC,CAAC;CAC5B"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Port for encrypting/decrypting endpoint signing secrets at rest.
|
|
3
3
|
* Implement this interface to provide custom encryption (e.g. AES-256-GCM).
|
|
4
4
|
* The default PlaintextSecretVault passes values through unchanged.
|
|
5
|
+
* Throws are propagated to callers; implementations should retry transient KMS/network failures internally.
|
|
5
6
|
*/
|
|
6
7
|
export interface WebhookSecretVault {
|
|
7
8
|
encrypt(plainSecret: string): Promise<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook-secret-vault.d.ts","sourceRoot":"","sources":["../../src/ports/webhook-secret-vault.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"webhook-secret-vault.d.ts","sourceRoot":"","sources":["../../src/ports/webhook-secret-vault.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9C,OAAO,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACnD"}
|