@natrave/shared-entities 1.4.81 → 1.4.82
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/database-entities/index.d.ts +2 -1
- package/dist/database-entities/index.d.ts.map +1 -1
- package/dist/database-entities/index.js +4 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/user-events/enums/domain-entity-type.enum.d.ts +4 -0
- package/dist/user-events/enums/domain-entity-type.enum.d.ts.map +1 -0
- package/dist/user-events/enums/domain-entity-type.enum.js +7 -0
- package/dist/user-events/enums/index.d.ts +5 -0
- package/dist/user-events/enums/index.d.ts.map +1 -0
- package/dist/user-events/enums/index.js +10 -0
- package/dist/user-events/enums/user-domain-event-type.enum.d.ts +4 -0
- package/dist/user-events/enums/user-domain-event-type.enum.d.ts.map +1 -0
- package/dist/user-events/enums/user-domain-event-type.enum.js +7 -0
- package/dist/user-events/enums/user-event-display-type.enum.d.ts +4 -0
- package/dist/user-events/enums/user-event-display-type.enum.d.ts.map +1 -0
- package/dist/user-events/enums/user-event-display-type.enum.js +7 -0
- package/dist/user-events/enums/user-event-view-status.enum.d.ts +5 -0
- package/dist/user-events/enums/user-event-view-status.enum.d.ts.map +1 -0
- package/dist/user-events/enums/user-event-view-status.enum.js +8 -0
- package/dist/user-events/index.d.ts +4 -0
- package/dist/user-events/index.d.ts.map +1 -0
- package/dist/user-events/index.js +3 -0
- package/dist/user-events/user-domain-events/index.d.ts +2 -0
- package/dist/user-events/user-domain-events/index.d.ts.map +1 -0
- package/dist/user-events/user-domain-events/index.js +4 -0
- package/dist/user-events/user-domain-events/user-domain-event.entity.d.ts +14 -0
- package/dist/user-events/user-domain-events/user-domain-event.entity.d.ts.map +1 -0
- package/dist/user-events/user-domain-events/user-domain-event.entity.js +61 -0
- package/dist/user-events/user-event-views/index.d.ts +2 -0
- package/dist/user-events/user-event-views/index.d.ts.map +1 -0
- package/dist/user-events/user-event-views/index.js +4 -0
- package/dist/user-events/user-event-views/user-event-view.entity.d.ts +22 -0
- package/dist/user-events/user-event-views/user-event-view.entity.d.ts.map +1 -0
- package/dist/user-events/user-event-views/user-event-view.entity.js +91 -0
- package/package.json +1 -1
|
@@ -8,5 +8,6 @@ import { Payment, PaymentProvider, UserPaymentProvider } from '../payments';
|
|
|
8
8
|
import { Player, PlayerPosition } from '../players';
|
|
9
9
|
import { PlayerTeam, Team, TeamJoinRequest, TeamModality, TeamTrophy } from '../teams';
|
|
10
10
|
import { Tournament, TournamentAllowedPhone, TournamentBracket, TournamentBracketSlot, TournamentContact, TournamentCoupon, TournamentFacility, TournamentFormatConfig, TournamentGroup, TournamentMatch, TournamentMatchAvailability, TournamentMatchCard, TournamentMatchGoal, TournamentMatchRule, TournamentMatchSchema, TournamentPayment, TournamentPenaltyShootout, TournamentPlayer, TournamentPlayerRule, TournamentPrizeRule, TournamentRegistrationRequest, TournamentTeam, TournamentTeamContactAttempt } from '../tournaments';
|
|
11
|
-
|
|
11
|
+
import { UserDomainEvent, UserEventView } from '../user-events';
|
|
12
|
+
export declare const DATABASE_ENTITIES: (typeof OrganizationUser | typeof Organization | typeof PhoneNumber | typeof TournamentAllowedPhone | typeof Tournament | typeof PasswordReset | typeof NotificationToken | typeof User | typeof UserAuthProvider | typeof RefreshToken | typeof Player | typeof TournamentRegistrationRequest | typeof UserVerification | typeof PlayerPosition | typeof PlayerTeam | typeof TeamJoinRequest | typeof TeamPlayerMergeHistory | typeof Team | typeof TournamentPlayer | typeof TournamentTeam | typeof TeamModality | typeof TournamentTeamContactAttempt | typeof TeamTrophy | typeof FacilityImage | typeof Facility | typeof FieldImage | typeof Field | typeof Address | typeof TournamentFacility | typeof FacilityOwner | typeof TournamentContact | typeof Coupon | typeof CouponUsage | typeof TournamentCoupon | typeof TournamentFormatConfig | typeof TournamentMatchRule | typeof TournamentMatchSchema | typeof TournamentMatchAvailability | typeof UserPaymentProvider | typeof PaymentProvider | typeof Payment | typeof TournamentPayment | typeof TournamentPlayerRule | typeof TournamentPrizeRule | typeof TournamentGroup | typeof TournamentMatch | typeof TournamentBracket | typeof TournamentBracketSlot | typeof TournamentMatchGoal | typeof TournamentMatchCard | typeof TournamentPenaltyShootout | typeof UserDomainEvent | typeof UserEventView)[];
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/database-entities/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,IAAI,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACvF,OAAO,EACL,UAAU,EACV,sBAAsB,EACtB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,6BAA6B,EAE7B,cAAc,EACd,4BAA4B,EAC7B,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/database-entities/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,IAAI,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACvF,OAAO,EACL,UAAU,EACV,sBAAsB,EACtB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,6BAA6B,EAE7B,cAAc,EACd,4BAA4B,EAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEhE,eAAO,MAAM,iBAAiB,mzCAuD7B,CAAC"}
|
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
TournamentTeam,
|
|
34
34
|
TournamentTeamContactAttempt
|
|
35
35
|
} from "../tournaments/index.js";
|
|
36
|
+
import { UserDomainEvent, UserEventView } from "../user-events/index.js";
|
|
36
37
|
const DATABASE_ENTITIES = [
|
|
37
38
|
Address,
|
|
38
39
|
Coupon,
|
|
@@ -85,7 +86,9 @@ const DATABASE_ENTITIES = [
|
|
|
85
86
|
PhoneNumber,
|
|
86
87
|
TournamentAllowedPhone,
|
|
87
88
|
TeamTrophy,
|
|
88
|
-
TournamentBracketSlot
|
|
89
|
+
TournamentBracketSlot,
|
|
90
|
+
UserDomainEvent,
|
|
91
|
+
UserEventView
|
|
89
92
|
];
|
|
90
93
|
export {
|
|
91
94
|
DATABASE_ENTITIES
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAE9B,cAAc,YAAY,CAAC;AAE3B,cAAc,YAAY,CAAC;AAE3B,cAAc,cAAc,CAAC;AAE7B,cAAc,WAAW,CAAC;AAE1B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,iBAAiB,CAAC;AAEhC,cAAc,WAAW,CAAC;AAE1B,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,cAAc,cAAc,CAAC;AAE7B,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAE9B,cAAc,YAAY,CAAC;AAE3B,cAAc,YAAY,CAAC;AAE3B,cAAc,cAAc,CAAC;AAE7B,cAAc,WAAW,CAAC;AAE1B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,iBAAiB,CAAC;AAEhC,cAAc,WAAW,CAAC;AAE1B,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,cAAc,cAAc,CAAC;AAE7B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -10,6 +10,7 @@ export * from "./teams/index.js";
|
|
|
10
10
|
import { DATABASE_ENTITIES } from "./database-entities/index.js";
|
|
11
11
|
export * from "./backoffice/index.js";
|
|
12
12
|
export * from "./history-logs/index.js";
|
|
13
|
+
export * from "./user-events/index.js";
|
|
13
14
|
export {
|
|
14
15
|
DATABASE_ENTITIES
|
|
15
16
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domain-entity-type.enum.d.ts","sourceRoot":"","sources":["../../../src/user-events/enums/domain-entity-type.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,gBAAgB;IAC1B,UAAU,eAAe;CAC1B"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { UserDomainEventType } from './user-domain-event-type.enum';
|
|
2
|
+
export { DomainEntityType } from './domain-entity-type.enum';
|
|
3
|
+
export { UserEventDisplayType } from './user-event-display-type.enum';
|
|
4
|
+
export { UserEventViewStatus } from './user-event-view-status.enum';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/user-events/enums/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UserDomainEventType } from "./user-domain-event-type.enum.js";
|
|
2
|
+
import { DomainEntityType } from "./domain-entity-type.enum.js";
|
|
3
|
+
import { UserEventDisplayType } from "./user-event-display-type.enum.js";
|
|
4
|
+
import { UserEventViewStatus } from "./user-event-view-status.enum.js";
|
|
5
|
+
export {
|
|
6
|
+
DomainEntityType,
|
|
7
|
+
UserDomainEventType,
|
|
8
|
+
UserEventDisplayType,
|
|
9
|
+
UserEventViewStatus
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-domain-event-type.enum.d.ts","sourceRoot":"","sources":["../../../src/user-events/enums/user-domain-event-type.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,mBAAmB;IAC7B,2BAA2B,gCAAgC;CAC5D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-event-display-type.enum.d.ts","sourceRoot":"","sources":["../../../src/user-events/enums/user-event-display-type.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,oBAAoB;IAC9B,UAAU,eAAe;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-event-view-status.enum.d.ts","sourceRoot":"","sources":["../../../src/user-events/enums/user-event-view-status.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,mBAAmB;IAC7B,OAAO,YAAY;IACnB,KAAK,UAAU;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/user-events/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/user-events/user-domain-events/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { User } from '../../app-auth';
|
|
2
|
+
import { DomainEntityType, UserDomainEventType } from '../enums';
|
|
3
|
+
export declare class UserDomainEvent {
|
|
4
|
+
id: string;
|
|
5
|
+
userId: string;
|
|
6
|
+
type: UserDomainEventType;
|
|
7
|
+
entityType: DomainEntityType;
|
|
8
|
+
entityId: string;
|
|
9
|
+
occurredAt: Date;
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
updatedAt: Date;
|
|
12
|
+
user: User;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=user-domain-event.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-domain-event.entity.d.ts","sourceRoot":"","sources":["../../../src/user-events/user-domain-events/user-domain-event.entity.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEjE,qBAIa,eAAe;IAE1B,EAAE,EAAE,MAAM,CAAC;IAGX,MAAM,EAAE,MAAM,CAAC;IAGf,IAAI,EAAE,mBAAmB,CAAC;IAG1B,UAAU,EAAE,gBAAgB,CAAC;IAG7B,QAAQ,EAAE,MAAM,CAAC;IAGjB,UAAU,EAAE,IAAI,CAAC;IAGjB,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;IAIhB,IAAI,EAAE,IAAI,CAAC;CACZ"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result) __defProp(target, key, result);
|
|
9
|
+
return result;
|
|
10
|
+
};
|
|
11
|
+
import {
|
|
12
|
+
Column,
|
|
13
|
+
CreateDateColumn,
|
|
14
|
+
Entity,
|
|
15
|
+
Index,
|
|
16
|
+
JoinColumn,
|
|
17
|
+
ManyToOne,
|
|
18
|
+
PrimaryGeneratedColumn,
|
|
19
|
+
UpdateDateColumn
|
|
20
|
+
} from "typeorm";
|
|
21
|
+
import { User } from "../../app-auth/index.js";
|
|
22
|
+
import { DomainEntityType, UserDomainEventType } from "../enums/index.js";
|
|
23
|
+
let UserDomainEvent = class {
|
|
24
|
+
};
|
|
25
|
+
__decorateClass([
|
|
26
|
+
PrimaryGeneratedColumn({ type: "bigint" })
|
|
27
|
+
], UserDomainEvent.prototype, "id", 2);
|
|
28
|
+
__decorateClass([
|
|
29
|
+
Column({ name: "user_id", type: "bigint" })
|
|
30
|
+
], UserDomainEvent.prototype, "userId", 2);
|
|
31
|
+
__decorateClass([
|
|
32
|
+
Column({ name: "type", type: "enum", enum: UserDomainEventType })
|
|
33
|
+
], UserDomainEvent.prototype, "type", 2);
|
|
34
|
+
__decorateClass([
|
|
35
|
+
Column({ name: "entity_type", type: "enum", enum: DomainEntityType })
|
|
36
|
+
], UserDomainEvent.prototype, "entityType", 2);
|
|
37
|
+
__decorateClass([
|
|
38
|
+
Column({ name: "entity_id", type: "bigint" })
|
|
39
|
+
], UserDomainEvent.prototype, "entityId", 2);
|
|
40
|
+
__decorateClass([
|
|
41
|
+
Column({ name: "occurred_at", type: "timestamptz", default: () => "now()" })
|
|
42
|
+
], UserDomainEvent.prototype, "occurredAt", 2);
|
|
43
|
+
__decorateClass([
|
|
44
|
+
CreateDateColumn({ name: "created_at", type: "timestamptz", default: () => "now()" })
|
|
45
|
+
], UserDomainEvent.prototype, "createdAt", 2);
|
|
46
|
+
__decorateClass([
|
|
47
|
+
UpdateDateColumn({ name: "updated_at", type: "timestamptz", default: () => "now()" })
|
|
48
|
+
], UserDomainEvent.prototype, "updatedAt", 2);
|
|
49
|
+
__decorateClass([
|
|
50
|
+
ManyToOne(() => User),
|
|
51
|
+
JoinColumn({ name: "user_id" })
|
|
52
|
+
], UserDomainEvent.prototype, "user", 2);
|
|
53
|
+
UserDomainEvent = __decorateClass([
|
|
54
|
+
Entity({ name: "user_domain_events" }),
|
|
55
|
+
Index(["userId"]),
|
|
56
|
+
Index(["type"]),
|
|
57
|
+
Index(["userId", "type", "entityType", "entityId", "occurredAt"])
|
|
58
|
+
], UserDomainEvent);
|
|
59
|
+
export {
|
|
60
|
+
UserDomainEvent
|
|
61
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/user-events/user-event-views/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { User } from '../../app-auth';
|
|
2
|
+
import { UserEventDisplayType, UserEventViewStatus } from '../enums';
|
|
3
|
+
import { UserDomainEvent } from '../user-domain-events';
|
|
4
|
+
export declare class UserEventView {
|
|
5
|
+
id: string;
|
|
6
|
+
userId: string;
|
|
7
|
+
userDomainEventId: string;
|
|
8
|
+
viewKey: string;
|
|
9
|
+
displayType: UserEventDisplayType;
|
|
10
|
+
status: UserEventViewStatus;
|
|
11
|
+
priority: number;
|
|
12
|
+
dedupeKey: string;
|
|
13
|
+
availableFrom: Date | null;
|
|
14
|
+
expiresAt: Date | null;
|
|
15
|
+
shownAt: Date | null;
|
|
16
|
+
dismissedAt: Date | null;
|
|
17
|
+
createdAt: Date;
|
|
18
|
+
updatedAt: Date;
|
|
19
|
+
user: User;
|
|
20
|
+
userDomainEvent: UserDomainEvent;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=user-event-view.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-event-view.entity.d.ts","sourceRoot":"","sources":["../../../src/user-events/user-event-views/user-event-view.entity.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,qBAMa,aAAa;IAExB,EAAE,EAAE,MAAM,CAAC;IAGX,MAAM,EAAE,MAAM,CAAC;IAGf,iBAAiB,EAAE,MAAM,CAAC;IAG1B,OAAO,EAAE,MAAM,CAAC;IAGhB,WAAW,EAAE,oBAAoB,CAAC;IAQlC,MAAM,EAAE,mBAAmB,CAAC;IAG5B,QAAQ,EAAE,MAAM,CAAC;IAIjB,SAAS,EAAE,MAAM,CAAC;IAGlB,aAAa,EAAE,IAAI,GAAG,IAAI,CAAC;IAG3B,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAGvB,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;IAGrB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IAGzB,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;IAIhB,IAAI,EAAE,IAAI,CAAC;IAIX,eAAe,EAAE,eAAe,CAAC;CAClC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result) __defProp(target, key, result);
|
|
9
|
+
return result;
|
|
10
|
+
};
|
|
11
|
+
import {
|
|
12
|
+
Column,
|
|
13
|
+
CreateDateColumn,
|
|
14
|
+
Entity,
|
|
15
|
+
Index,
|
|
16
|
+
JoinColumn,
|
|
17
|
+
ManyToOne,
|
|
18
|
+
PrimaryGeneratedColumn,
|
|
19
|
+
UpdateDateColumn
|
|
20
|
+
} from "typeorm";
|
|
21
|
+
import { User } from "../../app-auth/index.js";
|
|
22
|
+
import { UserEventDisplayType, UserEventViewStatus } from "../enums/index.js";
|
|
23
|
+
import { UserDomainEvent } from "../user-domain-events/index.js";
|
|
24
|
+
let UserEventView = class {
|
|
25
|
+
};
|
|
26
|
+
__decorateClass([
|
|
27
|
+
PrimaryGeneratedColumn({ type: "bigint" })
|
|
28
|
+
], UserEventView.prototype, "id", 2);
|
|
29
|
+
__decorateClass([
|
|
30
|
+
Column({ name: "user_id", type: "bigint" })
|
|
31
|
+
], UserEventView.prototype, "userId", 2);
|
|
32
|
+
__decorateClass([
|
|
33
|
+
Column({ name: "user_domain_event_id", type: "bigint" })
|
|
34
|
+
], UserEventView.prototype, "userDomainEventId", 2);
|
|
35
|
+
__decorateClass([
|
|
36
|
+
Column({ name: "view_key", type: "varchar", length: 100 })
|
|
37
|
+
], UserEventView.prototype, "viewKey", 2);
|
|
38
|
+
__decorateClass([
|
|
39
|
+
Column({ name: "display_type", type: "enum", enum: UserEventDisplayType })
|
|
40
|
+
], UserEventView.prototype, "displayType", 2);
|
|
41
|
+
__decorateClass([
|
|
42
|
+
Column({
|
|
43
|
+
name: "status",
|
|
44
|
+
type: "enum",
|
|
45
|
+
enum: UserEventViewStatus,
|
|
46
|
+
default: UserEventViewStatus.PENDING
|
|
47
|
+
})
|
|
48
|
+
], UserEventView.prototype, "status", 2);
|
|
49
|
+
__decorateClass([
|
|
50
|
+
Column({ name: "priority", type: "int", default: 0 })
|
|
51
|
+
], UserEventView.prototype, "priority", 2);
|
|
52
|
+
__decorateClass([
|
|
53
|
+
Column({ name: "dedupe_key", type: "varchar", length: 200 })
|
|
54
|
+
], UserEventView.prototype, "dedupeKey", 2);
|
|
55
|
+
__decorateClass([
|
|
56
|
+
Column({ name: "available_from", type: "timestamptz", nullable: true })
|
|
57
|
+
], UserEventView.prototype, "availableFrom", 2);
|
|
58
|
+
__decorateClass([
|
|
59
|
+
Column({ name: "expires_at", type: "timestamptz", nullable: true })
|
|
60
|
+
], UserEventView.prototype, "expiresAt", 2);
|
|
61
|
+
__decorateClass([
|
|
62
|
+
Column({ name: "shown_at", type: "timestamptz", nullable: true })
|
|
63
|
+
], UserEventView.prototype, "shownAt", 2);
|
|
64
|
+
__decorateClass([
|
|
65
|
+
Column({ name: "dismissed_at", type: "timestamptz", nullable: true })
|
|
66
|
+
], UserEventView.prototype, "dismissedAt", 2);
|
|
67
|
+
__decorateClass([
|
|
68
|
+
CreateDateColumn({ name: "created_at", type: "timestamptz", default: () => "now()" })
|
|
69
|
+
], UserEventView.prototype, "createdAt", 2);
|
|
70
|
+
__decorateClass([
|
|
71
|
+
UpdateDateColumn({ name: "updated_at", type: "timestamptz", default: () => "now()" })
|
|
72
|
+
], UserEventView.prototype, "updatedAt", 2);
|
|
73
|
+
__decorateClass([
|
|
74
|
+
ManyToOne(() => User),
|
|
75
|
+
JoinColumn({ name: "user_id" })
|
|
76
|
+
], UserEventView.prototype, "user", 2);
|
|
77
|
+
__decorateClass([
|
|
78
|
+
ManyToOne(() => UserDomainEvent, { onDelete: "CASCADE" }),
|
|
79
|
+
JoinColumn({ name: "user_domain_event_id" })
|
|
80
|
+
], UserEventView.prototype, "userDomainEvent", 2);
|
|
81
|
+
UserEventView = __decorateClass([
|
|
82
|
+
Entity({ name: "user_event_views" }),
|
|
83
|
+
Index(["dedupeKey"], { unique: true }),
|
|
84
|
+
Index(["userId", "status"]),
|
|
85
|
+
Index(["userDomainEventId"]),
|
|
86
|
+
Index(["userId", "status", "priority", "createdAt"]),
|
|
87
|
+
Index(["userId", "status", "availableFrom", "expiresAt"])
|
|
88
|
+
], UserEventView);
|
|
89
|
+
export {
|
|
90
|
+
UserEventView
|
|
91
|
+
};
|