@sasscore/database 0.0.1
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 +281 -0
- package/dist/connection/index.d.ts +7 -0
- package/dist/connection/index.d.ts.map +1 -0
- package/dist/connection/index.js +7 -0
- package/dist/connection/index.js.map +1 -0
- package/dist/connection/infrastructure/connection.module.d.ts +18 -0
- package/dist/connection/infrastructure/connection.module.d.ts.map +1 -0
- package/dist/connection/infrastructure/connection.module.js +75 -0
- package/dist/connection/infrastructure/connection.module.js.map +1 -0
- package/dist/connection/infrastructure/sequelize.service.d.ts +16 -0
- package/dist/connection/infrastructure/sequelize.service.d.ts.map +1 -0
- package/dist/connection/infrastructure/sequelize.service.js +56 -0
- package/dist/connection/infrastructure/sequelize.service.js.map +1 -0
- package/dist/database.module.d.ts +25 -0
- package/dist/database.module.d.ts.map +1 -0
- package/dist/database.module.js +71 -0
- package/dist/database.module.js.map +1 -0
- package/dist/health/database-health.service.d.ts +12 -0
- package/dist/health/database-health.service.d.ts.map +1 -0
- package/dist/health/database-health.service.js +48 -0
- package/dist/health/database-health.service.js.map +1 -0
- package/dist/health/database-health.types.d.ts +8 -0
- package/dist/health/database-health.types.d.ts.map +1 -0
- package/dist/health/database-health.types.js +2 -0
- package/dist/health/database-health.types.js.map +1 -0
- package/dist/health/health.module.d.ts +3 -0
- package/dist/health/health.module.d.ts.map +1 -0
- package/dist/health/health.module.js +20 -0
- package/dist/health/health.module.js.map +1 -0
- package/dist/health/index.d.ts +12 -0
- package/dist/health/index.d.ts.map +1 -0
- package/dist/health/index.js +9 -0
- package/dist/health/index.js.map +1 -0
- package/dist/health/migration-health.service.d.ts +14 -0
- package/dist/health/migration-health.service.d.ts.map +1 -0
- package/dist/health/migration-health.service.js +43 -0
- package/dist/health/migration-health.service.js.map +1 -0
- package/dist/health/migration-health.types.d.ts +9 -0
- package/dist/health/migration-health.types.d.ts.map +1 -0
- package/dist/health/migration-health.types.js +2 -0
- package/dist/health/migration-health.types.js.map +1 -0
- package/dist/health/outbox-health.service.d.ts +14 -0
- package/dist/health/outbox-health.service.d.ts.map +1 -0
- package/dist/health/outbox-health.service.js +79 -0
- package/dist/health/outbox-health.service.js.map +1 -0
- package/dist/health/outbox-health.types.d.ts +15 -0
- package/dist/health/outbox-health.types.d.ts.map +1 -0
- package/dist/health/outbox-health.types.js +2 -0
- package/dist/health/outbox-health.types.js.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -0
- package/dist/migrations/20260826173000-create-outbox-events.d.ts +5 -0
- package/dist/migrations/20260826173000-create-outbox-events.d.ts.map +1 -0
- package/dist/migrations/20260826173000-create-outbox-events.js +102 -0
- package/dist/migrations/20260826173000-create-outbox-events.js.map +1 -0
- package/dist/migrations/create-migration-registry.d.ts +9 -0
- package/dist/migrations/create-migration-registry.d.ts.map +1 -0
- package/dist/migrations/create-migration-registry.js +37 -0
- package/dist/migrations/create-migration-registry.js.map +1 -0
- package/dist/migrations/index.d.ts +7 -0
- package/dist/migrations/index.d.ts.map +1 -0
- package/dist/migrations/index.js +6 -0
- package/dist/migrations/index.js.map +1 -0
- package/dist/migrations/migration-registry.d.ts +4 -0
- package/dist/migrations/migration-registry.d.ts.map +1 -0
- package/dist/migrations/migration-registry.js +4 -0
- package/dist/migrations/migration-registry.js.map +1 -0
- package/dist/migrations/migration-runner.d.ts +27 -0
- package/dist/migrations/migration-runner.d.ts.map +1 -0
- package/dist/migrations/migration-runner.js +135 -0
- package/dist/migrations/migration-runner.js.map +1 -0
- package/dist/migrations/migration.helpers.d.ts +8 -0
- package/dist/migrations/migration.helpers.d.ts.map +1 -0
- package/dist/migrations/migration.helpers.js +9 -0
- package/dist/migrations/migration.helpers.js.map +1 -0
- package/dist/migrations/migration.types.d.ts +26 -0
- package/dist/migrations/migration.types.d.ts.map +1 -0
- package/dist/migrations/migration.types.js +2 -0
- package/dist/migrations/migration.types.js.map +1 -0
- package/dist/models/base.model.d.ts +17 -0
- package/dist/models/base.model.d.ts.map +1 -0
- package/dist/models/base.model.js +56 -0
- package/dist/models/base.model.js.map +1 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +2 -0
- package/dist/models/index.js.map +1 -0
- package/dist/outbox/application/outbox.processor.d.ts +20 -0
- package/dist/outbox/application/outbox.processor.d.ts.map +1 -0
- package/dist/outbox/application/outbox.processor.js +66 -0
- package/dist/outbox/application/outbox.processor.js.map +1 -0
- package/dist/outbox/application/outbox.publisher.d.ts +17 -0
- package/dist/outbox/application/outbox.publisher.d.ts.map +1 -0
- package/dist/outbox/application/outbox.publisher.js +33 -0
- package/dist/outbox/application/outbox.publisher.js.map +1 -0
- package/dist/outbox/application/ports/event-dispatcher.port.d.ts +7 -0
- package/dist/outbox/application/ports/event-dispatcher.port.d.ts.map +1 -0
- package/dist/outbox/application/ports/event-dispatcher.port.js +2 -0
- package/dist/outbox/application/ports/event-dispatcher.port.js.map +1 -0
- package/dist/outbox/domain/entities/domain-event.entity.d.ts +11 -0
- package/dist/outbox/domain/entities/domain-event.entity.d.ts.map +1 -0
- package/dist/outbox/domain/entities/domain-event.entity.js +15 -0
- package/dist/outbox/domain/entities/domain-event.entity.js.map +1 -0
- package/dist/outbox/domain/entities/outbox-event.types.d.ts +21 -0
- package/dist/outbox/domain/entities/outbox-event.types.d.ts.map +1 -0
- package/dist/outbox/domain/entities/outbox-event.types.js +2 -0
- package/dist/outbox/domain/entities/outbox-event.types.js.map +1 -0
- package/dist/outbox/domain/index.d.ts +5 -0
- package/dist/outbox/domain/index.d.ts.map +1 -0
- package/dist/outbox/domain/index.js +3 -0
- package/dist/outbox/domain/index.js.map +1 -0
- package/dist/outbox/domain/repositories/outbox.repository.interface.d.ts +13 -0
- package/dist/outbox/domain/repositories/outbox.repository.interface.d.ts.map +1 -0
- package/dist/outbox/domain/repositories/outbox.repository.interface.js +2 -0
- package/dist/outbox/domain/repositories/outbox.repository.interface.js.map +1 -0
- package/dist/outbox/domain/value-objects/event-types.d.ts +19 -0
- package/dist/outbox/domain/value-objects/event-types.d.ts.map +1 -0
- package/dist/outbox/domain/value-objects/event-types.js +18 -0
- package/dist/outbox/domain/value-objects/event-types.js.map +1 -0
- package/dist/outbox/event-dispatcher.d.ts +3 -0
- package/dist/outbox/event-dispatcher.d.ts.map +1 -0
- package/dist/outbox/event-dispatcher.js +3 -0
- package/dist/outbox/event-dispatcher.js.map +1 -0
- package/dist/outbox/event.entity.d.ts +4 -0
- package/dist/outbox/event.entity.d.ts.map +1 -0
- package/dist/outbox/event.entity.js +3 -0
- package/dist/outbox/event.entity.js.map +1 -0
- package/dist/outbox/index.d.ts +19 -0
- package/dist/outbox/index.d.ts.map +1 -0
- package/dist/outbox/index.js +17 -0
- package/dist/outbox/index.js.map +1 -0
- package/dist/outbox/infrastructure/dispatch/event-dispatcher.d.ts +21 -0
- package/dist/outbox/infrastructure/dispatch/event-dispatcher.d.ts.map +1 -0
- package/dist/outbox/infrastructure/dispatch/event-dispatcher.js +55 -0
- package/dist/outbox/infrastructure/dispatch/event-dispatcher.js.map +1 -0
- package/dist/outbox/infrastructure/dispatch/flat-handler.registry.d.ts +13 -0
- package/dist/outbox/infrastructure/dispatch/flat-handler.registry.d.ts.map +1 -0
- package/dist/outbox/infrastructure/dispatch/flat-handler.registry.js +46 -0
- package/dist/outbox/infrastructure/dispatch/flat-handler.registry.js.map +1 -0
- package/dist/outbox/infrastructure/outbox.module.d.ts +13 -0
- package/dist/outbox/infrastructure/outbox.module.d.ts.map +1 -0
- package/dist/outbox/infrastructure/outbox.module.js +53 -0
- package/dist/outbox/infrastructure/outbox.module.js.map +1 -0
- package/dist/outbox/infrastructure/persistence/outbox-event.model.d.ts +106 -0
- package/dist/outbox/infrastructure/persistence/outbox-event.model.d.ts.map +1 -0
- package/dist/outbox/infrastructure/persistence/outbox-event.model.js +186 -0
- package/dist/outbox/infrastructure/persistence/outbox-event.model.js.map +1 -0
- package/dist/outbox/infrastructure/persistence/outbox-persistence.module.d.ts +9 -0
- package/dist/outbox/infrastructure/persistence/outbox-persistence.module.d.ts.map +1 -0
- package/dist/outbox/infrastructure/persistence/outbox-persistence.module.js +25 -0
- package/dist/outbox/infrastructure/persistence/outbox-persistence.module.js.map +1 -0
- package/dist/outbox/infrastructure/persistence/sequelize-outbox.repository.d.ts +24 -0
- package/dist/outbox/infrastructure/persistence/sequelize-outbox.repository.d.ts.map +1 -0
- package/dist/outbox/infrastructure/persistence/sequelize-outbox.repository.js +191 -0
- package/dist/outbox/infrastructure/persistence/sequelize-outbox.repository.js.map +1 -0
- package/dist/outbox/outbox-flat-handler.registry.d.ts +4 -0
- package/dist/outbox/outbox-flat-handler.registry.d.ts.map +1 -0
- package/dist/outbox/outbox-flat-handler.registry.js +4 -0
- package/dist/outbox/outbox-flat-handler.registry.js.map +1 -0
- package/dist/outbox/outbox.constants.d.ts +3 -0
- package/dist/outbox/outbox.constants.d.ts.map +1 -0
- package/dist/outbox/outbox.constants.js +3 -0
- package/dist/outbox/outbox.constants.js.map +1 -0
- package/dist/outbox/outbox.module.d.ts +3 -0
- package/dist/outbox/outbox.module.d.ts.map +1 -0
- package/dist/outbox/outbox.module.js +3 -0
- package/dist/outbox/outbox.module.js.map +1 -0
- package/dist/outbox/outbox.processor.d.ts +4 -0
- package/dist/outbox/outbox.processor.d.ts.map +1 -0
- package/dist/outbox/outbox.processor.js +4 -0
- package/dist/outbox/outbox.processor.js.map +1 -0
- package/dist/outbox/outbox.publisher.d.ts +3 -0
- package/dist/outbox/outbox.publisher.d.ts.map +1 -0
- package/dist/outbox/outbox.publisher.js +3 -0
- package/dist/outbox/outbox.publisher.js.map +1 -0
- package/dist/outbox/outbox.repository.d.ts +3 -0
- package/dist/outbox/outbox.repository.d.ts.map +1 -0
- package/dist/outbox/outbox.repository.js +3 -0
- package/dist/outbox/outbox.repository.js.map +1 -0
- package/dist/providers/database.providers.d.ts +4 -0
- package/dist/providers/database.providers.d.ts.map +1 -0
- package/dist/providers/database.providers.js +25 -0
- package/dist/providers/database.providers.js.map +1 -0
- package/dist/providers/database.tokens.d.ts +43 -0
- package/dist/providers/database.tokens.d.ts.map +1 -0
- package/dist/providers/database.tokens.js +43 -0
- package/dist/providers/database.tokens.js.map +1 -0
- package/dist/providers/index.d.ts +3 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +3 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/repositories/index.d.ts +5 -0
- package/dist/repositories/index.d.ts.map +1 -0
- package/dist/repositories/index.js +4 -0
- package/dist/repositories/index.js.map +1 -0
- package/dist/repositories/main.repository.d.ts +163 -0
- package/dist/repositories/main.repository.d.ts.map +1 -0
- package/dist/repositories/main.repository.js +1120 -0
- package/dist/repositories/main.repository.js.map +1 -0
- package/dist/repositories/repository-execution-mode.enum.d.ts +11 -0
- package/dist/repositories/repository-execution-mode.enum.d.ts.map +1 -0
- package/dist/repositories/repository-execution-mode.enum.js +12 -0
- package/dist/repositories/repository-execution-mode.enum.js.map +1 -0
- package/dist/repositories/repository.types.d.ts +65 -0
- package/dist/repositories/repository.types.d.ts.map +1 -0
- package/dist/repositories/repository.types.js +2 -0
- package/dist/repositories/repository.types.js.map +1 -0
- package/dist/repositories/tenant-scope-mode.enum.d.ts +13 -0
- package/dist/repositories/tenant-scope-mode.enum.d.ts.map +1 -0
- package/dist/repositories/tenant-scope-mode.enum.js +14 -0
- package/dist/repositories/tenant-scope-mode.enum.js.map +1 -0
- package/dist/tenancy/domain/ports/tenant-context.port.d.ts +22 -0
- package/dist/tenancy/domain/ports/tenant-context.port.d.ts.map +1 -0
- package/dist/tenancy/domain/ports/tenant-context.port.js +2 -0
- package/dist/tenancy/domain/ports/tenant-context.port.js.map +1 -0
- package/dist/tenancy/index.d.ts +8 -0
- package/dist/tenancy/index.d.ts.map +1 -0
- package/dist/tenancy/index.js +7 -0
- package/dist/tenancy/index.js.map +1 -0
- package/dist/tenancy/infrastructure/cls-tenant-context.adapter.d.ts +26 -0
- package/dist/tenancy/infrastructure/cls-tenant-context.adapter.d.ts.map +1 -0
- package/dist/tenancy/infrastructure/cls-tenant-context.adapter.js +73 -0
- package/dist/tenancy/infrastructure/cls-tenant-context.adapter.js.map +1 -0
- package/dist/tenancy/infrastructure/tenant-context.module.d.ts +7 -0
- package/dist/tenancy/infrastructure/tenant-context.module.d.ts.map +1 -0
- package/dist/tenancy/infrastructure/tenant-context.module.js +32 -0
- package/dist/tenancy/infrastructure/tenant-context.module.js.map +1 -0
- package/dist/tokens.d.ts +6 -0
- package/dist/tokens.d.ts.map +1 -0
- package/dist/tokens.js +6 -0
- package/dist/tokens.js.map +1 -0
- package/dist/transaction-manager/application/transaction-manager.service.d.ts +12 -0
- package/dist/transaction-manager/application/transaction-manager.service.d.ts.map +1 -0
- package/dist/transaction-manager/application/transaction-manager.service.js +29 -0
- package/dist/transaction-manager/application/transaction-manager.service.js.map +1 -0
- package/dist/transaction-manager/domain/ports/transaction-manager.port.d.ts +9 -0
- package/dist/transaction-manager/domain/ports/transaction-manager.port.d.ts.map +1 -0
- package/dist/transaction-manager/domain/ports/transaction-manager.port.js +2 -0
- package/dist/transaction-manager/domain/ports/transaction-manager.port.js.map +1 -0
- package/dist/transaction-manager/index.d.ts +7 -0
- package/dist/transaction-manager/index.d.ts.map +1 -0
- package/dist/transaction-manager/index.js +6 -0
- package/dist/transaction-manager/index.js.map +1 -0
- package/dist/types/database-module-options.d.ts +12 -0
- package/dist/types/database-module-options.d.ts.map +1 -0
- package/dist/types/database-module-options.js +2 -0
- package/dist/types/database-module-options.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +69 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Outbox Event Model
|
|
3
|
+
*
|
|
4
|
+
* Transactional Outbox Pattern
|
|
5
|
+
* Stores domain events in DB for guaranteed delivery
|
|
6
|
+
*
|
|
7
|
+
* Flow:
|
|
8
|
+
* 1. Save aggregate + events in same transaction
|
|
9
|
+
* 2. OutboxProcessor reads pending events
|
|
10
|
+
* 3. Publishes to EventBus
|
|
11
|
+
* 4. Marks as processed
|
|
12
|
+
*
|
|
13
|
+
* Benefits:
|
|
14
|
+
* - 100% consistency (atomic with aggregate)
|
|
15
|
+
* - Guaranteed delivery
|
|
16
|
+
* - Retry logic
|
|
17
|
+
* - Audit trail
|
|
18
|
+
*
|
|
19
|
+
* Note: Uses Model directly (not BaseModel) because:
|
|
20
|
+
* - INTEGER serial id (aligned with rest of SaaS Core schema)
|
|
21
|
+
* - No soft delete needed
|
|
22
|
+
*/
|
|
23
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
24
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
25
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
26
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
27
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
28
|
+
};
|
|
29
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
30
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
31
|
+
};
|
|
32
|
+
import { Table, Column, DataType, Model, CreatedAt, } from 'sequelize-typescript';
|
|
33
|
+
let OutboxEventModel = class OutboxEventModel extends Model {
|
|
34
|
+
};
|
|
35
|
+
__decorate([
|
|
36
|
+
Column({
|
|
37
|
+
type: DataType.INTEGER,
|
|
38
|
+
autoIncrement: true,
|
|
39
|
+
primaryKey: true,
|
|
40
|
+
field: 'id',
|
|
41
|
+
}),
|
|
42
|
+
__metadata("design:type", Number)
|
|
43
|
+
], OutboxEventModel.prototype, "id", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
Column({
|
|
46
|
+
type: DataType.STRING(50),
|
|
47
|
+
allowNull: false,
|
|
48
|
+
field: 'aggregate_type',
|
|
49
|
+
}),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], OutboxEventModel.prototype, "aggregateType", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
Column({
|
|
54
|
+
type: DataType.STRING(255),
|
|
55
|
+
allowNull: false,
|
|
56
|
+
field: 'aggregate_id',
|
|
57
|
+
}),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], OutboxEventModel.prototype, "aggregateId", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
Column({
|
|
62
|
+
type: DataType.STRING(100),
|
|
63
|
+
allowNull: false,
|
|
64
|
+
field: 'event_type',
|
|
65
|
+
}),
|
|
66
|
+
__metadata("design:type", String)
|
|
67
|
+
], OutboxEventModel.prototype, "eventType", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
Column({
|
|
70
|
+
type: DataType.JSONB,
|
|
71
|
+
allowNull: false,
|
|
72
|
+
field: 'payload',
|
|
73
|
+
}),
|
|
74
|
+
__metadata("design:type", Object)
|
|
75
|
+
], OutboxEventModel.prototype, "payload", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
Column({
|
|
78
|
+
type: DataType.INTEGER,
|
|
79
|
+
allowNull: false,
|
|
80
|
+
defaultValue: 1,
|
|
81
|
+
field: 'event_version',
|
|
82
|
+
}),
|
|
83
|
+
__metadata("design:type", Number)
|
|
84
|
+
], OutboxEventModel.prototype, "eventVersion", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
Column({
|
|
87
|
+
type: DataType.STRING(20),
|
|
88
|
+
allowNull: false,
|
|
89
|
+
defaultValue: 'pending',
|
|
90
|
+
field: 'status',
|
|
91
|
+
}),
|
|
92
|
+
__metadata("design:type", String)
|
|
93
|
+
], OutboxEventModel.prototype, "status", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
Column({
|
|
96
|
+
type: DataType.INTEGER,
|
|
97
|
+
allowNull: false,
|
|
98
|
+
defaultValue: 0,
|
|
99
|
+
field: 'retry_count',
|
|
100
|
+
}),
|
|
101
|
+
__metadata("design:type", Number)
|
|
102
|
+
], OutboxEventModel.prototype, "retryCount", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
Column({
|
|
105
|
+
type: DataType.DATE,
|
|
106
|
+
allowNull: true,
|
|
107
|
+
field: 'next_retry_at',
|
|
108
|
+
}),
|
|
109
|
+
__metadata("design:type", Object)
|
|
110
|
+
], OutboxEventModel.prototype, "nextRetryAt", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
Column({
|
|
113
|
+
type: DataType.DATE,
|
|
114
|
+
allowNull: true,
|
|
115
|
+
field: 'processed_at',
|
|
116
|
+
}),
|
|
117
|
+
__metadata("design:type", Object)
|
|
118
|
+
], OutboxEventModel.prototype, "processedAt", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
Column({
|
|
121
|
+
type: DataType.DATE,
|
|
122
|
+
allowNull: true,
|
|
123
|
+
field: 'processing_started_at',
|
|
124
|
+
}),
|
|
125
|
+
__metadata("design:type", Object)
|
|
126
|
+
], OutboxEventModel.prototype, "processingStartedAt", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
Column({
|
|
129
|
+
type: DataType.UUID,
|
|
130
|
+
allowNull: true,
|
|
131
|
+
field: 'correlation_id',
|
|
132
|
+
}),
|
|
133
|
+
__metadata("design:type", Object)
|
|
134
|
+
], OutboxEventModel.prototype, "correlationId", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
Column({
|
|
137
|
+
type: DataType.UUID,
|
|
138
|
+
allowNull: true,
|
|
139
|
+
field: 'causation_id',
|
|
140
|
+
}),
|
|
141
|
+
__metadata("design:type", Object)
|
|
142
|
+
], OutboxEventModel.prototype, "causationId", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
Column({
|
|
145
|
+
type: DataType.TEXT,
|
|
146
|
+
allowNull: true,
|
|
147
|
+
field: 'error',
|
|
148
|
+
}),
|
|
149
|
+
__metadata("design:type", Object)
|
|
150
|
+
], OutboxEventModel.prototype, "error", void 0);
|
|
151
|
+
__decorate([
|
|
152
|
+
CreatedAt,
|
|
153
|
+
Column({
|
|
154
|
+
type: DataType.DATE,
|
|
155
|
+
allowNull: false,
|
|
156
|
+
field: 'created_at',
|
|
157
|
+
}),
|
|
158
|
+
__metadata("design:type", Date)
|
|
159
|
+
], OutboxEventModel.prototype, "createdAt", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
Column({
|
|
162
|
+
type: DataType.DATE,
|
|
163
|
+
allowNull: false,
|
|
164
|
+
field: 'updated_at',
|
|
165
|
+
}),
|
|
166
|
+
__metadata("design:type", Date)
|
|
167
|
+
], OutboxEventModel.prototype, "updatedAt", void 0);
|
|
168
|
+
OutboxEventModel = __decorate([
|
|
169
|
+
Table({
|
|
170
|
+
tableName: 'outbox_events',
|
|
171
|
+
timestamps: true,
|
|
172
|
+
underscored: true,
|
|
173
|
+
indexes: [
|
|
174
|
+
{
|
|
175
|
+
name: 'idx_outbox_status_created',
|
|
176
|
+
fields: ['status', 'created_at'],
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
name: 'idx_outbox_aggregate',
|
|
180
|
+
fields: ['aggregate_type', 'aggregate_id'],
|
|
181
|
+
},
|
|
182
|
+
],
|
|
183
|
+
})
|
|
184
|
+
], OutboxEventModel);
|
|
185
|
+
export { OutboxEventModel };
|
|
186
|
+
//# sourceMappingURL=outbox-event.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outbox-event.model.js","sourceRoot":"","sources":["../../../../outbox/infrastructure/persistence/outbox-event.model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;AAEH,OAAO,EACL,KAAK,EACL,MA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Ae;QAC1B,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE,IAAI;QACjB,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,2BAA2B;gBACjC,MAAM,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC;aACjC;YACD;gBACE,IAAI,EAAE,sBAAsB;gBAC5B,MAAM,EAAE,CAAC,gBAAgB,EAAE,cAAc,CAAC;aAC3C;SACF;KACF,CAAC;GACW,gBAAgB,CAqL5B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registers {@link OutboxEventModel} on the active Sequelize connection.
|
|
3
|
+
* Owned by the outbox package — not `common/modules`.
|
|
4
|
+
*/
|
|
5
|
+
export declare class OutboxPersistenceModule {
|
|
6
|
+
}
|
|
7
|
+
/** @deprecated Use {@link OutboxPersistenceModule} */
|
|
8
|
+
export { OutboxPersistenceModule as OutboxModelModule };
|
|
9
|
+
//# sourceMappingURL=outbox-persistence.module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outbox-persistence.module.d.ts","sourceRoot":"","sources":["../../../../outbox/infrastructure/persistence/outbox-persistence.module.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,qBAIa,uBAAuB;CAAG;AAEvC,sDAAsD;AACtD,OAAO,EAAE,uBAAuB,IAAI,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { Module } from '@nestjs/common';
|
|
8
|
+
import { SequelizeModule } from '@nestjs/sequelize';
|
|
9
|
+
import { OutboxEventModel } from './outbox-event.model.js';
|
|
10
|
+
/**
|
|
11
|
+
* Registers {@link OutboxEventModel} on the active Sequelize connection.
|
|
12
|
+
* Owned by the outbox package — not `common/modules`.
|
|
13
|
+
*/
|
|
14
|
+
let OutboxPersistenceModule = class OutboxPersistenceModule {
|
|
15
|
+
};
|
|
16
|
+
OutboxPersistenceModule = __decorate([
|
|
17
|
+
Module({
|
|
18
|
+
imports: [SequelizeModule.forFeature([OutboxEventModel])],
|
|
19
|
+
exports: [SequelizeModule],
|
|
20
|
+
})
|
|
21
|
+
], OutboxPersistenceModule);
|
|
22
|
+
export { OutboxPersistenceModule };
|
|
23
|
+
/** @deprecated Use {@link OutboxPersistenceModule} */
|
|
24
|
+
export { OutboxPersistenceModule as OutboxModelModule };
|
|
25
|
+
//# sourceMappingURL=outbox-persistence.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outbox-persistence.module.js","sourceRoot":"","sources":["../../../../outbox/infrastructure/persistence/outbox-persistence.module.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;;GAGG;AAKI,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;CAAG,CAAA;AAA1B,uBAAuB;IAJnC,MAAM,CAAC;QACN,OAAO,EAAE,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;QACzD,OAAO,EAAE,CAAC,eAAe,CAAC;KAC3B,CAAC;GACW,uBAAuB,CAAG;;AAEvC,sDAAsD;AACtD,OAAO,EAAE,uBAAuB,IAAI,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Transaction } from 'sequelize';
|
|
2
|
+
import { OutboxEventModel } from './outbox-event.model.js';
|
|
3
|
+
import type { DomainEvent } from '../../domain/entities/domain-event.entity.js';
|
|
4
|
+
import type { OutboxEventRecord } from '../../domain/entities/outbox-event.types.js';
|
|
5
|
+
import type { IOutboxRepository } from '../../domain/repositories/outbox.repository.interface.js';
|
|
6
|
+
/**
|
|
7
|
+
* Sequelize adapter for {@link IOutboxRepository}.
|
|
8
|
+
*/
|
|
9
|
+
export declare class SequelizeOutboxRepository implements IOutboxRepository {
|
|
10
|
+
private readonly logger;
|
|
11
|
+
save(event: DomainEvent, transaction?: Transaction, correlationId?: string, causationId?: string): Promise<void>;
|
|
12
|
+
claimPendingEvents(limit?: number): Promise<OutboxEventRecord[]>;
|
|
13
|
+
markAsProcessed(id: number): Promise<void>;
|
|
14
|
+
markAsFailed(id: number, error: string): Promise<void>;
|
|
15
|
+
/** @internal Operational queries — not part of the domain port. */
|
|
16
|
+
findById(id: number): Promise<OutboxEventModel | null>;
|
|
17
|
+
/** @internal Operational queries — not part of the domain port. */
|
|
18
|
+
findByAggregateId(aggregateId: string): Promise<OutboxEventModel[]>;
|
|
19
|
+
/** @internal Operational queries — not part of the domain port. */
|
|
20
|
+
cleanupProcessed(olderThanHours?: number): Promise<number>;
|
|
21
|
+
}
|
|
22
|
+
/** @deprecated Use {@link SequelizeOutboxRepository} */
|
|
23
|
+
export { SequelizeOutboxRepository as OutboxRepository };
|
|
24
|
+
//# sourceMappingURL=sequelize-outbox.repository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sequelize-outbox.repository.d.ts","sourceRoot":"","sources":["../../../../outbox/infrastructure/persistence/sequelize-outbox.repository.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAkB,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0DAA0D,CAAC;AAuBlG;;GAEG;AACH,qBACa,yBAA0B,YAAW,iBAAiB;IACjE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA8C;IAE/D,IAAI,CACR,KAAK,EAAE,WAAW,EAClB,WAAW,CAAC,EAAE,WAAW,EACzB,aAAa,CAAC,EAAE,MAAM,EACtB,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC;IA0CV,kBAAkB,CAAC,KAAK,SAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAiD7D,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAW1C,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAwC5D,mEAAmE;IAC7D,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAI5D,mEAAmE;IAC7D,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAOzE,mEAAmE;IAC7D,gBAAgB,CAAC,cAAc,SAAK,GAAG,OAAO,CAAC,MAAM,CAAC;CAoB7D;AAED,wDAAwD;AACxD,OAAO,EAAE,yBAAyB,IAAI,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var SequelizeOutboxRepository_1;
|
|
8
|
+
import { Injectable, Logger } from '@nestjs/common';
|
|
9
|
+
import { Op, QueryTypes } from 'sequelize';
|
|
10
|
+
import { OutboxEventModel } from './outbox-event.model.js';
|
|
11
|
+
function toOutboxEventRecord(row) {
|
|
12
|
+
return {
|
|
13
|
+
id: Number(row.id),
|
|
14
|
+
aggregateType: (row.aggregateType ?? row.aggregate_type),
|
|
15
|
+
aggregateId: (row.aggregateId ?? row.aggregate_id),
|
|
16
|
+
eventType: (row.eventType ?? row.event_type),
|
|
17
|
+
payload: row.payload,
|
|
18
|
+
eventVersion: (row.eventVersion ?? row.event_version),
|
|
19
|
+
status: (row.status ?? row.status),
|
|
20
|
+
retryCount: (row.retryCount ?? row.retry_count),
|
|
21
|
+
nextRetryAt: (row.nextRetryAt ?? row.next_retry_at),
|
|
22
|
+
processedAt: (row.processedAt ?? row.processed_at),
|
|
23
|
+
processingStartedAt: (row.processingStartedAt ?? row.processing_started_at),
|
|
24
|
+
correlationId: (row.correlationId ?? row.correlation_id),
|
|
25
|
+
causationId: (row.causationId ?? row.causation_id),
|
|
26
|
+
error: row.error,
|
|
27
|
+
createdAt: (row.createdAt ?? row.created_at),
|
|
28
|
+
updatedAt: (row.updatedAt ?? row.updated_at),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Sequelize adapter for {@link IOutboxRepository}.
|
|
33
|
+
*/
|
|
34
|
+
let SequelizeOutboxRepository = SequelizeOutboxRepository_1 = class SequelizeOutboxRepository {
|
|
35
|
+
logger = new Logger(SequelizeOutboxRepository_1.name);
|
|
36
|
+
async save(event, transaction, correlationId, causationId) {
|
|
37
|
+
try {
|
|
38
|
+
const eventType = event.constructor.EVENT_TYPE || event.constructor.name;
|
|
39
|
+
const now = new Date();
|
|
40
|
+
const created = await OutboxEventModel.create({
|
|
41
|
+
aggregateType: event.aggregateType,
|
|
42
|
+
aggregateId: event.aggregateId,
|
|
43
|
+
eventType,
|
|
44
|
+
payload: event,
|
|
45
|
+
eventVersion: 1,
|
|
46
|
+
status: 'pending',
|
|
47
|
+
retryCount: 0,
|
|
48
|
+
nextRetryAt: null,
|
|
49
|
+
processedAt: null,
|
|
50
|
+
correlationId: correlationId || null,
|
|
51
|
+
causationId: causationId || null,
|
|
52
|
+
error: null,
|
|
53
|
+
createdAt: now,
|
|
54
|
+
updatedAt: now,
|
|
55
|
+
}, { transaction });
|
|
56
|
+
this.logger.debug('OutboxRepository: Event saved', {
|
|
57
|
+
eventId: created.id,
|
|
58
|
+
eventType,
|
|
59
|
+
aggregateId: event.aggregateId,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
const eventType = event.constructor.EVENT_TYPE || event.constructor.name;
|
|
64
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
65
|
+
this.logger.error('OutboxRepository: Failed to save event', {
|
|
66
|
+
eventType,
|
|
67
|
+
aggregateId: event.aggregateId,
|
|
68
|
+
error: message,
|
|
69
|
+
});
|
|
70
|
+
throw error;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
async claimPendingEvents(limit = 100) {
|
|
74
|
+
const safeLimit = Math.max(1, Math.min(Number(limit) || 100, 500));
|
|
75
|
+
const stuckMinutes = 5;
|
|
76
|
+
const sequelize = OutboxEventModel.sequelize;
|
|
77
|
+
if (!sequelize) {
|
|
78
|
+
throw new Error('OutboxEventModel is not bound to a Sequelize instance');
|
|
79
|
+
}
|
|
80
|
+
const results = (await sequelize.query(`
|
|
81
|
+
WITH candidates AS (
|
|
82
|
+
SELECT id
|
|
83
|
+
FROM outbox_events
|
|
84
|
+
WHERE (
|
|
85
|
+
status = 'pending'
|
|
86
|
+
OR (
|
|
87
|
+
status = 'failed'
|
|
88
|
+
AND (next_retry_at IS NULL OR next_retry_at <= NOW())
|
|
89
|
+
)
|
|
90
|
+
OR (
|
|
91
|
+
status = 'processing'
|
|
92
|
+
AND processing_started_at IS NOT NULL
|
|
93
|
+
AND processing_started_at < NOW() - INTERVAL '${stuckMinutes} minutes'
|
|
94
|
+
)
|
|
95
|
+
)
|
|
96
|
+
ORDER BY created_at ASC
|
|
97
|
+
LIMIT :limit
|
|
98
|
+
FOR UPDATE SKIP LOCKED
|
|
99
|
+
)
|
|
100
|
+
UPDATE outbox_events o
|
|
101
|
+
SET
|
|
102
|
+
status = 'processing',
|
|
103
|
+
processing_started_at = NOW(),
|
|
104
|
+
updated_at = NOW()
|
|
105
|
+
FROM candidates c
|
|
106
|
+
WHERE o.id = c.id
|
|
107
|
+
RETURNING o.*;
|
|
108
|
+
`, {
|
|
109
|
+
replacements: { limit: safeLimit },
|
|
110
|
+
type: QueryTypes.SELECT,
|
|
111
|
+
}));
|
|
112
|
+
const claimedRows = Array.isArray(results) ? results : [];
|
|
113
|
+
return claimedRows.map(toOutboxEventRecord);
|
|
114
|
+
}
|
|
115
|
+
async markAsProcessed(id) {
|
|
116
|
+
await OutboxEventModel.update({
|
|
117
|
+
status: 'processed',
|
|
118
|
+
processedAt: new Date(),
|
|
119
|
+
processingStartedAt: null,
|
|
120
|
+
}, { where: { id } });
|
|
121
|
+
}
|
|
122
|
+
async markAsFailed(id, error) {
|
|
123
|
+
const event = await OutboxEventModel.findByPk(id);
|
|
124
|
+
if (!event)
|
|
125
|
+
return;
|
|
126
|
+
const newRetryCount = event.retryCount + 1;
|
|
127
|
+
const baseDelaySeconds = 2;
|
|
128
|
+
const maxRetries = 10;
|
|
129
|
+
let status = 'failed';
|
|
130
|
+
let nextRetryAt = null;
|
|
131
|
+
if (newRetryCount >= maxRetries) {
|
|
132
|
+
status = 'dead_letter';
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
const delaySeconds = Math.pow(2, newRetryCount) * baseDelaySeconds;
|
|
136
|
+
const maxDelaySeconds = 3600;
|
|
137
|
+
const actualDelay = Math.min(delaySeconds, maxDelaySeconds);
|
|
138
|
+
nextRetryAt = new Date();
|
|
139
|
+
nextRetryAt.setSeconds(nextRetryAt.getSeconds() + actualDelay);
|
|
140
|
+
}
|
|
141
|
+
await OutboxEventModel.update({
|
|
142
|
+
status,
|
|
143
|
+
error,
|
|
144
|
+
retryCount: newRetryCount,
|
|
145
|
+
nextRetryAt,
|
|
146
|
+
}, { where: { id } });
|
|
147
|
+
this.logger.warn('OutboxRepository: Event marked as failed', {
|
|
148
|
+
id,
|
|
149
|
+
retryCount: newRetryCount,
|
|
150
|
+
status,
|
|
151
|
+
nextRetryAt,
|
|
152
|
+
error: error?.substring(0, 100),
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
/** @internal Operational queries — not part of the domain port. */
|
|
156
|
+
async findById(id) {
|
|
157
|
+
return OutboxEventModel.findByPk(id);
|
|
158
|
+
}
|
|
159
|
+
/** @internal Operational queries — not part of the domain port. */
|
|
160
|
+
async findByAggregateId(aggregateId) {
|
|
161
|
+
return OutboxEventModel.findAll({
|
|
162
|
+
where: { aggregateId },
|
|
163
|
+
order: [['created_at', 'ASC']],
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
/** @internal Operational queries — not part of the domain port. */
|
|
167
|
+
async cleanupProcessed(olderThanHours = 24) {
|
|
168
|
+
const cutoffDate = new Date();
|
|
169
|
+
cutoffDate.setHours(cutoffDate.getHours() - olderThanHours);
|
|
170
|
+
const result = await OutboxEventModel.destroy({
|
|
171
|
+
where: {
|
|
172
|
+
status: 'processed',
|
|
173
|
+
processedAt: {
|
|
174
|
+
[Op.lt]: cutoffDate,
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
});
|
|
178
|
+
this.logger.log('OutboxRepository: Cleaned up processed events', {
|
|
179
|
+
deleted: result,
|
|
180
|
+
olderThanHours,
|
|
181
|
+
});
|
|
182
|
+
return result;
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
SequelizeOutboxRepository = SequelizeOutboxRepository_1 = __decorate([
|
|
186
|
+
Injectable()
|
|
187
|
+
], SequelizeOutboxRepository);
|
|
188
|
+
export { SequelizeOutboxRepository };
|
|
189
|
+
/** @deprecated Use {@link SequelizeOutboxRepository} */
|
|
190
|
+
export { SequelizeOutboxRepository as OutboxRepository };
|
|
191
|
+
//# sourceMappingURL=sequelize-outbox.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sequelize-outbox.repository.js","sourceRoot":"","sources":["../../../../outbox/infrastructure/persistence/sequelize-outbox.repository.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAe,EAAE,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAK3D,SAAS,mBAAmB,CAAC,GAA4B;IACvD,OAAO;QACL,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;QAClB,aAAa,EAAE,CAAC,GAAG,CAAC,aAAa,IAAI,GAAG,CAAC,cAAc,CAAW;QAClE,WAAW,EAAE,CAAC,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,YAAY,CAAW;QAC5D,SAAS,EAAE,CAAC,GAAG,CAAC,SAAS,IAAI,GAAG,CAAC,UAAU,CAAW;QACtD,OAAO,EAAE,GAAG,CAAC,OAAO;QACpB,YAAY,EAAE,CAAC,GAAG,CAAC,YAAY,IAAI,GAAG,CAAC,aAAa,CAAW;QAC/D,MAAM,EAAE,CAAC,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,MAAM,CAAgC;QACjE,UAAU,EAAE,CAAC,GAAG,CAAC,UAAU,IAAI,GAAG,CAAC,WAAW,CAAW;QACzD,WAAW,E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EAAE,CAAC,EAAE,UAAU;iBACpB;aACF;SACF,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,+CAA+C,EAAE;YAC/D,OAAO,EAAE,MAAM;YACf,cAAc;SACf,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAA;AAxLY,yBAAyB;IADrC,UAAU,EAAE;GACA,yBAAyB,CAwLrC;;AAED,wDAAwD;AACxD,OAAO,EAAE,yBAAyB,IAAI,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** @deprecated Import from `@sasscore/database/outbox` public API. */
|
|
2
|
+
export { OutboxFlatHandlerRegistry, type OutboxFlatHandler, } from './infrastructure/dispatch/flat-handler.registry.js';
|
|
3
|
+
export { OutboxEventHandlerRegistry } from './infrastructure/outbox.module.js';
|
|
4
|
+
//# sourceMappingURL=outbox-flat-handler.registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outbox-flat-handler.registry.d.ts","sourceRoot":"","sources":["../../outbox/outbox-flat-handler.registry.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,OAAO,EACL,yBAAyB,EACzB,KAAK,iBAAiB,GACvB,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** @deprecated Import from `@sasscore/database/outbox` public API. */
|
|
2
|
+
export { OutboxFlatHandlerRegistry, } from './infrastructure/dispatch/flat-handler.registry.js';
|
|
3
|
+
export { OutboxEventHandlerRegistry } from './infrastructure/outbox.module.js';
|
|
4
|
+
//# sourceMappingURL=outbox-flat-handler.registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outbox-flat-handler.registry.js","sourceRoot":"","sources":["../../outbox/outbox-flat-handler.registry.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,OAAO,EACL,yBAAyB,GAE1B,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outbox.constants.d.ts","sourceRoot":"","sources":["../../outbox/outbox.constants.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,OAAO,EAAE,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,uCAAuC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outbox.constants.js","sourceRoot":"","sources":["../../outbox/outbox.constants.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,OAAO,EAAE,WAAW,EAAkB,MAAM,uCAAuC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outbox.module.d.ts","sourceRoot":"","sources":["../../outbox/outbox.module.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,0BAA0B,GAC3B,MAAM,mCAAmC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outbox.module.js","sourceRoot":"","sources":["../../outbox/outbox.module.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,0BAA0B,GAC3B,MAAM,mCAAmC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** @deprecated Import from `domains/database/outbox` barrel instead. */
|
|
2
|
+
export { OutboxProcessor, type OutboxBatchResult } from './application/outbox.processor.js';
|
|
3
|
+
export { OutboxProcessor as OutboxProcessorService } from './application/outbox.processor.js';
|
|
4
|
+
//# sourceMappingURL=outbox.processor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outbox.processor.d.ts","sourceRoot":"","sources":["../../outbox/outbox.processor.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,OAAO,EAAE,eAAe,EAAE,KAAK,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAC5F,OAAO,EAAE,eAAe,IAAI,sBAAsB,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** @deprecated Import from `domains/database/outbox` barrel instead. */
|
|
2
|
+
export { OutboxProcessor } from './application/outbox.processor.js';
|
|
3
|
+
export { OutboxProcessor as OutboxProcessorService } from './application/outbox.processor.js';
|
|
4
|
+
//# sourceMappingURL=outbox.processor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outbox.processor.js","sourceRoot":"","sources":["../../outbox/outbox.processor.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,OAAO,EAAE,eAAe,EAA0B,MAAM,mCAAmC,CAAC;AAC5F,OAAO,EAAE,eAAe,IAAI,sBAAsB,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outbox.publisher.d.ts","sourceRoot":"","sources":["../../outbox/outbox.publisher.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outbox.publisher.js","sourceRoot":"","sources":["../../outbox/outbox.publisher.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,OAAO,EAAE,eAAe,EAA6B,MAAM,mCAAmC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outbox.repository.d.ts","sourceRoot":"","sources":["../../outbox/outbox.repository.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,OAAO,EACL,yBAAyB,EACzB,gBAAgB,GACjB,MAAM,6DAA6D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outbox.repository.js","sourceRoot":"","sources":["../../outbox/outbox.repository.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,OAAO,EACL,yBAAyB,EACzB,gBAAgB,GACjB,MAAM,6DAA6D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database.providers.d.ts","sourceRoot":"","sources":["../../providers/database.providers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAO/C,yFAAyF;AACzF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,EAiB1C,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DATABASE_TOKENS } from './database.tokens.js';
|
|
2
|
+
import { OutboxPublisher } from '../outbox/application/outbox.publisher.js';
|
|
3
|
+
import { OutboxProcessor } from '../outbox/application/outbox.processor.js';
|
|
4
|
+
import { OutboxEventDispatcher } from '../outbox/infrastructure/dispatch/event-dispatcher.js';
|
|
5
|
+
import { SequelizeOutboxRepository } from '../outbox/infrastructure/persistence/sequelize-outbox.repository.js';
|
|
6
|
+
/** Token → implementation bindings for outbox (used by {@link DatabaseOutboxModule}). */
|
|
7
|
+
export const outboxTokenProviders = [
|
|
8
|
+
{
|
|
9
|
+
provide: DATABASE_TOKENS.OUTBOX_REPOSITORY,
|
|
10
|
+
useClass: SequelizeOutboxRepository,
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
provide: DATABASE_TOKENS.OUTBOX_DISPATCHER,
|
|
14
|
+
useExisting: OutboxEventDispatcher,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
provide: DATABASE_TOKENS.OUTBOX_PUBLISHER,
|
|
18
|
+
useExisting: OutboxPublisher,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
provide: DATABASE_TOKENS.OUTBOX_PROCESSOR,
|
|
22
|
+
useExisting: OutboxProcessor,
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
//# sourceMappingURL=database.providers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database.providers.js","sourceRoot":"","sources":["../../providers/database.providers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAC9F,OAAO,EAAE,yBAAyB,EAAE,MAAM,qEAAqE,CAAC;AAEhH,yFAAyF;AACzF,MAAM,CAAC,MAAM,oBAAoB,GAAe;IAC9C;QACE,OAAO,EAAE,eAAe,CAAC,iBAAiB;QAC1C,QAAQ,EAAE,yBAAyB;KACpC;IACD;QACE,OAAO,EAAE,eAAe,CAAC,iBAAiB;QAC1C,WAAW,EAAE,qBAAqB;KACnC;IACD;QACE,OAAO,EAAE,eAAe,CAAC,gBAAgB;QACzC,WAAW,EAAE,eAAe;KAC7B;IACD;QACE,OAAO,EAAE,eAAe,CAAC,gBAAgB;QACzC,WAAW,EAAE,eAAe;KAC7B;CACF,CAAC"}
|