@volontariapp/database 1.6.0 → 1.7.0-snap-16968b2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Added job-outbox and event-queue
8
+
3
9
  ## 1.6.0
4
10
 
5
11
  ### Minor Changes
@@ -15,7 +21,6 @@
15
21
  - Updated dependencies []:
16
22
  - @volontariapp/logger@0.2.3
17
23
 
18
-
19
24
  ## 1.3.0
20
25
 
21
26
  ### Minor Changes
@@ -0,0 +1,10 @@
1
+ import { OutboxEntity } from './outbox.entity.js';
2
+ export declare class EventQueueEntity extends OutboxEntity {
3
+ version: number;
4
+ payload: {
5
+ before?: any;
6
+ after: any;
7
+ };
8
+ processedAt?: Date;
9
+ }
10
+ //# sourceMappingURL=event-queue.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-queue.entity.d.ts","sourceRoot":"","sources":["../../../src/outbox/entities/event-queue.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,qBAAa,gBAAiB,SAAQ,YAAY;IAEhD,OAAO,EAAG,MAAM,CAAC;IAGjB,OAAO,EAAG;QACR,MAAM,CAAC,EAAE,GAAG,CAAC;QACb,KAAK,EAAE,GAAG,CAAC;KACZ,CAAC;IAGF,WAAW,CAAC,EAAE,IAAI,CAAC;CACpB"}
@@ -0,0 +1,7 @@
1
+ import { OutboxEntity } from './outbox.entity.js';
2
+ export class EventQueueEntity extends OutboxEntity {
3
+ version;
4
+ payload;
5
+ processedAt;
6
+ }
7
+ //# sourceMappingURL=event-queue.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-queue.entity.js","sourceRoot":"","sources":["../../../src/outbox/entities/event-queue.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,OAAO,gBAAiB,SAAQ,YAAY;IAEhD,OAAO,CAAU;IAGjB,OAAO,CAGL;IAGF,WAAW,CAAQ;CACpB"}
@@ -0,0 +1,7 @@
1
+ import { OutboxEntity } from './outbox.entity.js';
2
+ export declare class JobsOutboxEntity extends OutboxEntity {
3
+ target: string;
4
+ payload: any;
5
+ scheduledAt?: Date;
6
+ }
7
+ //# sourceMappingURL=jobs-outbox.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jobs-outbox.entity.d.ts","sourceRoot":"","sources":["../../../src/outbox/entities/jobs-outbox.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,qBAAa,gBAAiB,SAAQ,YAAY;IAChD,MAAM,EAAG,MAAM,CAAC;IAEhB,OAAO,EAAE,GAAG,CAAC;IAEb,WAAW,CAAC,EAAE,IAAI,CAAC;CACpB"}
@@ -0,0 +1,7 @@
1
+ import { OutboxEntity } from './outbox.entity.js';
2
+ export class JobsOutboxEntity extends OutboxEntity {
3
+ target;
4
+ payload;
5
+ scheduledAt;
6
+ }
7
+ //# sourceMappingURL=jobs-outbox.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jobs-outbox.entity.js","sourceRoot":"","sources":["../../../src/outbox/entities/jobs-outbox.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,OAAO,gBAAiB,SAAQ,YAAY;IAChD,MAAM,CAAU;IAEhB,OAAO,CAAM;IAEb,WAAW,CAAQ;CACpB"}
@@ -0,0 +1,10 @@
1
+ import { OutboxModel } from './outbox.model.js';
2
+ export declare class EventQueueModel extends OutboxModel {
3
+ version: number;
4
+ payload: {
5
+ before?: any;
6
+ after: any;
7
+ };
8
+ processedAt?: Date;
9
+ }
10
+ //# sourceMappingURL=event-queue.model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-queue.model.d.ts","sourceRoot":"","sources":["../../../src/outbox/models/event-queue.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,qBACa,eAAgB,SAAQ,WAAW;IAG9C,OAAO,EAAG,MAAM,CAAC;IAIjB,OAAO,EAAG;QACR,MAAM,CAAC,EAAE,GAAG,CAAC;QACb,KAAK,EAAE,GAAG,CAAC;KACZ,CAAC;IAIF,WAAW,CAAC,EAAE,IAAI,CAAC;CACpB"}
@@ -0,0 +1,33 @@
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 __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { OutboxModel } from './outbox.model.js';
11
+ import { Column, Entity } from 'typeorm';
12
+ let EventQueueModel = class EventQueueModel extends OutboxModel {
13
+ version;
14
+ payload;
15
+ processedAt;
16
+ };
17
+ __decorate([
18
+ Column({ type: 'number' }),
19
+ __metadata("design:type", Number)
20
+ ], EventQueueModel.prototype, "version", void 0);
21
+ __decorate([
22
+ Column({ type: 'json' }),
23
+ __metadata("design:type", Object)
24
+ ], EventQueueModel.prototype, "payload", void 0);
25
+ __decorate([
26
+ Column({ name: 'processed_at', type: 'timestamp', nullable: true }),
27
+ __metadata("design:type", Date)
28
+ ], EventQueueModel.prototype, "processedAt", void 0);
29
+ EventQueueModel = __decorate([
30
+ Entity('event_queue')
31
+ ], EventQueueModel);
32
+ export { EventQueueModel };
33
+ //# sourceMappingURL=event-queue.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-queue.model.js","sourceRoot":"","sources":["../../../src/outbox/models/event-queue.model.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAGlC,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,WAAW;IAG9C,OAAO,CAAU;IAIjB,OAAO,CAGL;IAIF,WAAW,CAAQ;CACpB,CAAA;AAZC;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;;gDACV;AAIjB;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gDAIvB;AAIF;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACtD,IAAI;oDAAC;AAdR,eAAe;IAD3B,MAAM,CAAC,aAAa,CAAC;GACT,eAAe,CAe3B"}
@@ -0,0 +1,7 @@
1
+ import { OutboxModel } from './outbox.model.js';
2
+ export declare class JobsOutboxModel extends OutboxModel {
3
+ target: string;
4
+ payload: any;
5
+ scheduledAt?: Date;
6
+ }
7
+ //# sourceMappingURL=jobs-outbox.model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jobs-outbox.model.d.ts","sourceRoot":"","sources":["../../../src/outbox/models/jobs-outbox.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,qBACa,eAAgB,SAAQ,WAAW;IAG9C,MAAM,EAAG,MAAM,CAAC;IAGhB,OAAO,EAAE,GAAG,CAAC;IAGb,WAAW,CAAC,EAAE,IAAI,CAAC;CACpB"}
@@ -0,0 +1,33 @@
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 __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { OutboxModel } from './outbox.model.js';
11
+ import { Column, Entity } from 'typeorm';
12
+ let JobsOutboxModel = class JobsOutboxModel extends OutboxModel {
13
+ target;
14
+ payload;
15
+ scheduledAt;
16
+ };
17
+ __decorate([
18
+ Column({ type: 'varchar', length: 100 }),
19
+ __metadata("design:type", String)
20
+ ], JobsOutboxModel.prototype, "target", void 0);
21
+ __decorate([
22
+ Column({ type: 'json' }),
23
+ __metadata("design:type", Object)
24
+ ], JobsOutboxModel.prototype, "payload", void 0);
25
+ __decorate([
26
+ Column({ name: 'scheduled_at', type: 'timestamp' }),
27
+ __metadata("design:type", Date)
28
+ ], JobsOutboxModel.prototype, "scheduledAt", void 0);
29
+ JobsOutboxModel = __decorate([
30
+ Entity('jobs_outbox')
31
+ ], JobsOutboxModel);
32
+ export { JobsOutboxModel };
33
+ //# sourceMappingURL=jobs-outbox.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jobs-outbox.model.js","sourceRoot":"","sources":["../../../src/outbox/models/jobs-outbox.model.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAGlC,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,WAAW;IAG9C,MAAM,CAAU;IAGhB,OAAO,CAAM;IAGb,WAAW,CAAQ;CACpB,CAAA;AAPC;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;+CACzB;AAGhB;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gDACZ;AAGb;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;8BACtC,IAAI;oDAAC;AATR,eAAe;IAD3B,MAAM,CAAC,aAAa,CAAC;GACT,eAAe,CAU3B"}
@@ -0,0 +1,6 @@
1
+ import { EventQueueEntity } from '../entities/event-queue.entity.js';
2
+ import { EventQueueModel } from '../models/event-queue.model.js';
3
+ import { OutboxWriter } from './outbox.writer.js';
4
+ export declare class EventQueueWriter extends OutboxWriter<EventQueueModel, EventQueueEntity> {
5
+ }
6
+ //# sourceMappingURL=event-outbox.writer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-outbox.writer.d.ts","sourceRoot":"","sources":["../../../src/outbox/writer/event-outbox.writer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,qBAAa,gBAAiB,SAAQ,YAAY,CAAC,eAAe,EAAE,gBAAgB,CAAC;CAAG"}
@@ -0,0 +1,4 @@
1
+ import { OutboxWriter } from './outbox.writer.js';
2
+ export class EventQueueWriter extends OutboxWriter {
3
+ }
4
+ //# sourceMappingURL=event-outbox.writer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-outbox.writer.js","sourceRoot":"","sources":["../../../src/outbox/writer/event-outbox.writer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,OAAO,gBAAiB,SAAQ,YAA+C;CAAG"}
@@ -0,0 +1,6 @@
1
+ import { JobsOutboxEntity } from '../entities/jobs-outbox.entity.js';
2
+ import { JobsOutboxModel } from '../models/jobs-outbox.model.js';
3
+ import { OutboxWriter } from './outbox.writer.js';
4
+ export declare class JobsOutboxWriter extends OutboxWriter<JobsOutboxModel, JobsOutboxEntity> {
5
+ }
6
+ //# sourceMappingURL=job-outbox.writer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"job-outbox.writer.d.ts","sourceRoot":"","sources":["../../../src/outbox/writer/job-outbox.writer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,qBAAa,gBAAiB,SAAQ,YAAY,CAAC,eAAe,EAAE,gBAAgB,CAAC;CAAG"}
@@ -0,0 +1,4 @@
1
+ import { OutboxWriter } from './outbox.writer.js';
2
+ export class JobsOutboxWriter extends OutboxWriter {
3
+ }
4
+ //# sourceMappingURL=job-outbox.writer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"job-outbox.writer.js","sourceRoot":"","sources":["../../../src/outbox/writer/job-outbox.writer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,OAAO,gBAAiB,SAAQ,YAA+C;CAAG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volontariapp/database",
3
- "version": "1.6.0",
3
+ "version": "1.7.0-snap-16968b2",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true