@hg-ts/repository 0.2.23 → 0.2.24
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/dist/repositories/base.event.repository.d.ts +4 -6
- package/dist/repositories/base.event.repository.d.ts.map +1 -1
- package/dist/repositories/base.event.repository.js.map +1 -1
- package/dist/repositories/event.repository.d.ts +12 -0
- package/dist/repositories/event.repository.d.ts.map +1 -0
- package/dist/repositories/event.repository.js +8 -0
- package/dist/repositories/event.repository.js.map +1 -0
- package/dist/repositories/index.d.ts +1 -0
- package/dist/repositories/index.d.ts.map +1 -1
- package/dist/repositories/index.js +1 -0
- package/dist/repositories/index.js.map +1 -1
- package/package.json +11 -11
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { DomainEvent } from '@hg-ts/domain';
|
|
2
2
|
import { AggregateAlreadyExistsException, AggregateNotFoundException } from '../exceptions';
|
|
3
3
|
import { BaseRepository } from './base.repository';
|
|
4
|
-
import {
|
|
5
|
-
export
|
|
6
|
-
entityId: string;
|
|
7
|
-
entityName: string;
|
|
8
|
-
};
|
|
9
|
-
export declare abstract class BaseEventRepository extends BaseRepository<DomainEvent, EventFindOptions> {
|
|
4
|
+
import { EventFindOptions, EventRepository } from './event.repository';
|
|
5
|
+
export declare abstract class BaseEventRepository extends BaseRepository<DomainEvent, EventFindOptions> implements EventRepository {
|
|
10
6
|
getNextId(): Promise<string>;
|
|
11
7
|
update(_entity: DomainEvent | DomainEvent[]): Promise<void>;
|
|
12
8
|
delete(_entity: DomainEvent | DomainEvent[]): Promise<void>;
|
|
13
9
|
clear(): Promise<void>;
|
|
10
|
+
abstract findUnpublished(options: EventFindOptions): Promise<DomainEvent[]>;
|
|
11
|
+
abstract deleteUnpublished(events: DomainEvent[]): Promise<void>;
|
|
14
12
|
protected getNotFoundException(id: string): AggregateNotFoundException;
|
|
15
13
|
protected getAlreadyExistsException(id: string): AggregateAlreadyExistsException;
|
|
16
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.event.repository.d.ts","sourceRoot":"","sources":["../../src/repositories/base.event.repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EACN,+BAA+B,EAK/B,0BAA0B,EAC1B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,
|
|
1
|
+
{"version":3,"file":"base.event.repository.d.ts","sourceRoot":"","sources":["../../src/repositories/base.event.repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EACN,+BAA+B,EAK/B,0BAA0B,EAC1B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EACN,gBAAgB,EAChB,eAAe,EACf,MAAM,oBAAoB,CAAC;AAE5B,8BAAsB,mBACrB,SAAQ,cAAc,CAAC,WAAW,EAAE,gBAAgB,CAAE,YAAW,eAAe;IAC1D,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC;IAI5B,MAAM,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3D,MAAM,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3D,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;aAI5B,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;aAElE,iBAAiB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;cAEpD,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,0BAA0B;cAI5D,yBAAyB,CAAC,EAAE,EAAE,MAAM,GAAG,+BAA+B;CAGzF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.event.repository.js","sourceRoot":"","sources":["../../src/repositories/base.event.repository.ts"],"names":[],"mappings":";;;AAAA,0CAA4C;AAE5C,8CAOuB;AACvB,uDAAmD;
|
|
1
|
+
{"version":3,"file":"base.event.repository.js","sourceRoot":"","sources":["../../src/repositories/base.event.repository.ts"],"names":[],"mappings":";;;AAAA,0CAA4C;AAE5C,8CAOuB;AACvB,uDAAmD;AAMnD,MAAsB,mBACrB,SAAQ,gCAA6C;IACrC,KAAK,CAAC,SAAS;QAC9B,OAAO,oBAAW,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC;IAEe,KAAK,CAAC,MAAM,CAAC,OAAoC;QAChE,MAAM,IAAI,oDAAuC,EAAE,CAAC;IACrD,CAAC;IAEe,KAAK,CAAC,MAAM,CAAC,OAAoC;QAChE,MAAM,IAAI,oDAAuC,EAAE,CAAC;IACrD,CAAC;IAEe,KAAK,CAAC,KAAK;QAC1B,MAAM,IAAI,oDAAuC,EAAE,CAAC;IACrD,CAAC;IAMkB,oBAAoB,CAAC,EAAU;QACjD,MAAM,IAAI,4CAA+B,CAAC,EAAE,CAAC,CAAC;IAC/C,CAAC;IAEkB,yBAAyB,CAAC,EAAU;QACtD,MAAM,IAAI,iDAAoC,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACD;AA7BD,kDA6BC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DomainEvent } from '@hg-ts/domain';
|
|
2
|
+
import { BaseFindOptions, Repository } from './repository';
|
|
3
|
+
export type EventFindOptions = BaseFindOptions<DomainEvent> & {
|
|
4
|
+
entityId: string;
|
|
5
|
+
entityName: string;
|
|
6
|
+
limit: number;
|
|
7
|
+
};
|
|
8
|
+
export declare abstract class EventRepository extends Repository<DomainEvent, EventFindOptions> {
|
|
9
|
+
abstract findUnpublished(options: EventFindOptions): Promise<DomainEvent[]>;
|
|
10
|
+
abstract deleteUnpublished(events: DomainEvent[]): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=event.repository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.repository.d.ts","sourceRoot":"","sources":["../../src/repositories/event.repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EACN,eAAe,EACf,UAAU,EACV,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAAC,WAAW,CAAC,GAAG;IAC7D,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,8BAAsB,eACrB,SAAQ,UAAU,CAAC,WAAW,EAAE,gBAAgB,CAAC;aACjC,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;aAElE,iBAAiB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CACvE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventRepository = void 0;
|
|
4
|
+
const repository_1 = require("./repository");
|
|
5
|
+
class EventRepository extends repository_1.Repository {
|
|
6
|
+
}
|
|
7
|
+
exports.EventRepository = EventRepository;
|
|
8
|
+
//# sourceMappingURL=event.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.repository.js","sourceRoot":"","sources":["../../src/repositories/event.repository.ts"],"names":[],"mappings":";;;AACA,6CAGsB;AAQtB,MAAsB,eACrB,SAAQ,uBAAyC;CAIjD;AALD,0CAKC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/repositories/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AAEzC,cAAc,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/repositories/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AAEzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC"}
|
|
@@ -5,4 +5,5 @@ tslib_1.__exportStar(require("./base.repository"), exports);
|
|
|
5
5
|
tslib_1.__exportStar(require("./repository"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./base.memory.repository"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./base.event.repository"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./event.repository"), exports);
|
|
8
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/repositories/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC;AAClC,uDAA6B;AAC7B,mEAAyC;AAEzC,kEAAwC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/repositories/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC;AAClC,uDAA6B;AAC7B,mEAAyC;AAEzC,kEAAwC;AACxC,6DAAmC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hg-ts/repository",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.24",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dist/index.js"
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
"test:dev": "yarn build:dev --onSuccess \"yarn test\""
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@hg-ts-config/typescript": "0.2.
|
|
21
|
-
"@hg-ts/domain": "0.2.
|
|
22
|
-
"@hg-ts/events": "0.2.
|
|
23
|
-
"@hg-ts/exception": "0.2.
|
|
24
|
-
"@hg-ts/linter": "0.2.
|
|
25
|
-
"@hg-ts/tests": "0.2.
|
|
26
|
-
"@hg-ts/types": "0.2.
|
|
20
|
+
"@hg-ts-config/typescript": "0.2.24",
|
|
21
|
+
"@hg-ts/domain": "0.2.24",
|
|
22
|
+
"@hg-ts/events": "0.2.24",
|
|
23
|
+
"@hg-ts/exception": "0.2.24",
|
|
24
|
+
"@hg-ts/linter": "0.2.24",
|
|
25
|
+
"@hg-ts/tests": "0.2.24",
|
|
26
|
+
"@hg-ts/types": "0.2.24",
|
|
27
27
|
"@types/node": "22.10.6",
|
|
28
28
|
"@types/uuid": "10.0.0",
|
|
29
29
|
"eslint": "9.18.0",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"uuid": "11.1.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@hg-ts/domain": "0.2.
|
|
39
|
-
"@hg-ts/events": "0.2.
|
|
40
|
-
"@hg-ts/exception": "0.2.
|
|
38
|
+
"@hg-ts/domain": "0.2.24",
|
|
39
|
+
"@hg-ts/events": "0.2.24",
|
|
40
|
+
"@hg-ts/exception": "0.2.24",
|
|
41
41
|
"reflect-metadata": "*",
|
|
42
42
|
"tslib": "*"
|
|
43
43
|
}
|