@volontariapp/database 3.4.0-snap-08cd30a → 3.4.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.
@@ -1,8 +1,8 @@
1
1
  import { BaseEntity } from '../../core/base.entity.js';
2
+ import { ExpectedEventState } from '../types/expected-event-state.interface.js';
2
3
  export declare class GatherStateEntity extends BaseEntity {
3
4
  correlationId: string;
4
5
  triggerEvent: string;
5
- expectedEvents: string[];
6
- receivedEvents: string[];
6
+ eventsState: Record<string, ExpectedEventState>;
7
7
  }
8
8
  //# sourceMappingURL=gather-state.entity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gather-state.entity.d.ts","sourceRoot":"","sources":["../../../src/gather/entities/gather-state.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,qBAAa,iBAAkB,SAAQ,UAAU;IAC/C,aAAa,EAAG,MAAM,CAAC;IACvB,YAAY,EAAG,MAAM,CAAC;IACtB,cAAc,EAAG,MAAM,EAAE,CAAC;IAC1B,cAAc,EAAE,MAAM,EAAE,CAAM;CAC/B"}
1
+ {"version":3,"file":"gather-state.entity.d.ts","sourceRoot":"","sources":["../../../src/gather/entities/gather-state.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAEhF,qBAAa,iBAAkB,SAAQ,UAAU;IAC/C,aAAa,EAAG,MAAM,CAAC;IACvB,YAAY,EAAG,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAM;CACtD"}
@@ -2,7 +2,6 @@ import { BaseEntity } from '../../core/base.entity.js';
2
2
  export class GatherStateEntity extends BaseEntity {
3
3
  correlationId;
4
4
  triggerEvent;
5
- expectedEvents;
6
- receivedEvents = [];
5
+ eventsState = {};
7
6
  }
8
7
  //# sourceMappingURL=gather-state.entity.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"gather-state.entity.js","sourceRoot":"","sources":["../../../src/gather/entities/gather-state.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,MAAM,OAAO,iBAAkB,SAAQ,UAAU;IAC/C,aAAa,CAAU;IACvB,YAAY,CAAU;IACtB,cAAc,CAAY;IAC1B,cAAc,GAAa,EAAE,CAAC;CAC/B"}
1
+ {"version":3,"file":"gather-state.entity.js","sourceRoot":"","sources":["../../../src/gather/entities/gather-state.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGvD,MAAM,OAAO,iBAAkB,SAAQ,UAAU;IAC/C,aAAa,CAAU;IACvB,YAAY,CAAU;IACtB,WAAW,GAAuC,EAAE,CAAC;CACtD"}
@@ -1,3 +1,4 @@
1
1
  export * from './models/gather-state.model.js';
2
2
  export * from './entities/gather-state.entity.js';
3
+ export * from './types/index.js';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/gather/index.ts"],"names":[],"mappings":"AAMA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/gather/index.ts"],"names":[],"mappings":"AAMA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,kBAAkB,CAAC"}
@@ -4,4 +4,5 @@ import { GatherStateModel } from './models/gather-state.model.js';
4
4
  databaseMapper.registerBidirectional(GatherStateModel, GatherStateEntity);
5
5
  export * from './models/gather-state.model.js';
6
6
  export * from './entities/gather-state.entity.js';
7
+ export * from './types/index.js';
7
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/gather/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,cAAc,CAAC,qBAAqB,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;AAE1E,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/gather/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,cAAc,CAAC,qBAAqB,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;AAE1E,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,kBAAkB,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { BaseModel } from '../../core/base.model.js';
2
+ import { ExpectedEventState } from '../types/expected-event-state.interface.js';
2
3
  export declare class GatherStateModel extends BaseModel {
3
4
  correlationId: string;
4
5
  triggerEvent: string;
5
- expectedEvents: string[];
6
- receivedEvents: string[];
6
+ eventsState: Record<string, ExpectedEventState>;
7
7
  }
8
8
  //# sourceMappingURL=gather-state.model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gather-state.model.d.ts","sourceRoot":"","sources":["../../../src/gather/models/gather-state.model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,qBACa,gBAAiB,SAAQ,SAAS;IAG7C,aAAa,EAAG,MAAM,CAAC;IAGvB,YAAY,EAAG,MAAM,CAAC;IAGtB,cAAc,EAAG,MAAM,EAAE,CAAC;IAG1B,cAAc,EAAE,MAAM,EAAE,CAAM;CAC/B"}
1
+ {"version":3,"file":"gather-state.model.d.ts","sourceRoot":"","sources":["../../../src/gather/models/gather-state.model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAEhF,qBACa,gBAAiB,SAAQ,SAAS;IAE7C,aAAa,EAAG,MAAM,CAAC;IAGvB,YAAY,EAAG,MAAM,CAAC;IAGtB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAM;CACtD"}
@@ -7,17 +7,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- import { Column, Entity, Index } from 'typeorm';
10
+ import { Column, Entity, PrimaryColumn } from 'typeorm';
11
11
  import { BaseModel } from '../../core/base.model.js';
12
12
  let GatherStateModel = class GatherStateModel extends BaseModel {
13
13
  correlationId;
14
14
  triggerEvent;
15
- expectedEvents;
16
- receivedEvents = [];
15
+ eventsState = {};
17
16
  };
18
17
  __decorate([
19
- Index('idx_gather_state_correlation_id'),
20
- Column({ name: 'correlation_id', type: 'uuid' }),
18
+ PrimaryColumn({ name: 'correlation_id', type: 'uuid' }),
21
19
  __metadata("design:type", String)
22
20
  ], GatherStateModel.prototype, "correlationId", void 0);
23
21
  __decorate([
@@ -25,13 +23,9 @@ __decorate([
25
23
  __metadata("design:type", String)
26
24
  ], GatherStateModel.prototype, "triggerEvent", void 0);
27
25
  __decorate([
28
- Column({ name: 'expected_events', type: 'text', array: true }),
29
- __metadata("design:type", Array)
30
- ], GatherStateModel.prototype, "expectedEvents", void 0);
31
- __decorate([
32
- Column({ name: 'received_events', type: 'text', array: true, default: [] }),
33
- __metadata("design:type", Array)
34
- ], GatherStateModel.prototype, "receivedEvents", void 0);
26
+ Column({ type: 'jsonb', default: {} }),
27
+ __metadata("design:type", Object)
28
+ ], GatherStateModel.prototype, "eventsState", void 0);
35
29
  GatherStateModel = __decorate([
36
30
  Entity('gather_state')
37
31
  ], GatherStateModel);
@@ -1 +1 @@
1
- {"version":3,"file":"gather-state.model.js","sourceRoot":"","sources":["../../../src/gather/models/gather-state.model.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAG9C,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,SAAS;IAG7C,aAAa,CAAU;IAGvB,YAAY,CAAU;IAGtB,cAAc,CAAY;IAG1B,cAAc,GAAa,EAAE,CAAC;CAC/B,CAAA;AAVC;IAFC,KAAK,CAAC,iCAAiC,CAAC;IACxC,MAAM,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uDAC1B;AAGvB;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sDAC1B;AAGtB;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;wDACrC;AAG1B;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;wDAC9C;AAZnB,gBAAgB;IAD5B,MAAM,CAAC,cAAc,CAAC;GACV,gBAAgB,CAa5B"}
1
+ {"version":3,"file":"gather-state.model.js","sourceRoot":"","sources":["../../../src/gather/models/gather-state.model.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAI9C,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,SAAS;IAE7C,aAAa,CAAU;IAGvB,YAAY,CAAU;IAGtB,WAAW,GAAuC,EAAE,CAAC;CACtD,CAAA;AAPC;IADC,aAAa,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uDACjC;AAGvB;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sDAC1B;AAGtB;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;qDACc;AAR1C,gBAAgB;IAD5B,MAAM,CAAC,cAAc,CAAC;GACV,gBAAgB,CAS5B"}
@@ -0,0 +1,6 @@
1
+ export declare enum EventStatus {
2
+ PENDING = "PENDING",
3
+ SUCCESS = "SUCCESS",
4
+ FAILED = "FAILED"
5
+ }
6
+ //# sourceMappingURL=event-status.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-status.enum.d.ts","sourceRoot":"","sources":["../../../src/gather/types/event-status.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACrB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,MAAM,WAAW;CAClB"}
@@ -0,0 +1,7 @@
1
+ export var EventStatus;
2
+ (function (EventStatus) {
3
+ EventStatus["PENDING"] = "PENDING";
4
+ EventStatus["SUCCESS"] = "SUCCESS";
5
+ EventStatus["FAILED"] = "FAILED";
6
+ })(EventStatus || (EventStatus = {}));
7
+ //# sourceMappingURL=event-status.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-status.enum.js","sourceRoot":"","sources":["../../../src/gather/types/event-status.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;AACnB,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB"}
@@ -0,0 +1,8 @@
1
+ import { EventStatus } from './event-status.enum.js';
2
+ export interface ExpectedEventState {
3
+ eventType: string;
4
+ status: EventStatus;
5
+ updatedAt: string;
6
+ errorReason?: string;
7
+ }
8
+ //# sourceMappingURL=expected-event-state.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expected-event-state.interface.d.ts","sourceRoot":"","sources":["../../../src/gather/types/expected-event-state.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=expected-event-state.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expected-event-state.interface.js","sourceRoot":"","sources":["../../../src/gather/types/expected-event-state.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export * from './event-status.enum.js';
2
+ export * from './expected-event-state.interface.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/gather/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,qCAAqC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './event-status.enum.js';
2
+ export * from './expected-event-state.interface.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/gather/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,qCAAqC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volontariapp/database",
3
- "version": "3.4.0-snap-08cd30a",
3
+ "version": "3.4.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true