@natrave/shared-entities 1.4.105 → 1.4.107

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.
@@ -5,9 +5,9 @@ import { Address, Facility, FacilityImage, FacilityOwner, Field, FieldImage } fr
5
5
  import { TeamPlayerMergeHistory } from '../history-logs';
6
6
  import { NotificationToken } from '../notifications';
7
7
  import { Payment, PaymentProvider, UserPaymentProvider } from '../payments';
8
- import { Player, PlayerPosition } from '../players';
8
+ import { Player, PlayerPersonalData, 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, TournamentPublicationChargeRule, TournamentRegistrationRequest, TournamentTeam, TournamentTeamContactAttempt } from '../tournaments';
11
11
  import { UserDomainEvent, UserEventView } from '../user-events';
12
- export declare const DATABASE_ENTITIES: (typeof FacilityImage | typeof Facility | typeof FieldImage | typeof Field | typeof Address | typeof TournamentFacility | typeof OrganizationUserBillingInfo | typeof OrganizationUser | typeof Organization | typeof TournamentPayment | typeof PhoneNumber | typeof TournamentAllowedPhone | typeof Tournament | typeof FacilityOwner | 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 TournamentContact | typeof Coupon | typeof CouponUsage | typeof TournamentCoupon | typeof TournamentFormatConfig | typeof TournamentMatchGoal | typeof TournamentMatch | typeof TournamentMatchCard | typeof TournamentPenaltyShootout | typeof TournamentGroup | typeof TournamentBracketSlot | typeof TournamentMatchRule | typeof TournamentMatchSchema | typeof TournamentMatchAvailability | typeof UserPaymentProvider | typeof PaymentProvider | typeof Payment | typeof TournamentPlayerRule | typeof TournamentPrizeRule | typeof TournamentBracket | typeof TournamentPublicationChargeRule | typeof UserDomainEvent | typeof UserEventView)[];
12
+ export declare const DATABASE_ENTITIES: (typeof FacilityImage | typeof Facility | typeof FieldImage | typeof Field | typeof Address | typeof TournamentFacility | typeof OrganizationUserBillingInfo | typeof OrganizationUser | typeof Organization | typeof TournamentPayment | typeof PhoneNumber | typeof TournamentAllowedPhone | typeof Tournament | typeof FacilityOwner | typeof PasswordReset | typeof NotificationToken | typeof User | typeof UserAuthProvider | typeof RefreshToken | typeof Player | typeof TournamentRegistrationRequest | typeof UserVerification | typeof PlayerPersonalData | typeof PlayerPosition | typeof PlayerTeam | typeof TeamJoinRequest | typeof TeamPlayerMergeHistory | typeof Team | typeof TournamentPlayer | typeof TournamentTeam | typeof TeamModality | typeof TournamentTeamContactAttempt | typeof TeamTrophy | typeof TournamentContact | typeof Coupon | typeof CouponUsage | typeof TournamentCoupon | typeof TournamentFormatConfig | typeof TournamentMatchGoal | typeof TournamentMatch | typeof TournamentMatchCard | typeof TournamentPenaltyShootout | typeof TournamentGroup | typeof TournamentBracketSlot | typeof TournamentMatchRule | typeof TournamentMatchSchema | typeof TournamentMatchAvailability | typeof UserPaymentProvider | typeof PaymentProvider | typeof Payment | typeof TournamentPlayerRule | typeof TournamentPrizeRule | typeof TournamentBracket | typeof TournamentPublicationChargeRule | typeof UserDomainEvent | typeof UserEventView)[];
13
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,Y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ityOwner, Field, FieldImage } fr
10
10
  import { TeamPlayerMergeHistory } from "../history-logs/index.js";
11
11
  import { NotificationToken } from "../notifications/index.js";
12
12
  import { Payment, PaymentProvider, UserPaymentProvider } from "../payments/index.js";
13
- import { Player, PlayerPosition } from "../players/index.js";
13
+ import { Player, PlayerPersonalData, PlayerPosition } from "../players/index.js";
14
14
  import { PlayerTeam, Team, TeamJoinRequest, TeamModality, TeamTrophy } from "../teams/index.js";
15
15
  import {
16
16
  Tournament,
@@ -85,6 +85,7 @@ const DATABASE_ENTITIES = [
85
85
  TournamentContact,
86
86
  TournamentTeamContactAttempt,
87
87
  Player,
88
+ PlayerPersonalData,
88
89
  PlayerPosition,
89
90
  Team,
90
91
  PlayerTeam,
@@ -1,3 +1,4 @@
1
1
  export * from './player-position';
2
+ export * from './player-personal-data';
2
3
  export * from './players';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/players/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/players/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,WAAW,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export * from "./player-position/index.js";
2
+ export * from "./player-personal-data/index.js";
2
3
  export * from "./players/index.js";
@@ -0,0 +1,2 @@
1
+ export { PlayerPersonalData } from './player-personal-data.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/players/player-personal-data/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { PlayerPersonalData } from "./player-personal-data.entity.js";
2
+ export {
3
+ PlayerPersonalData
4
+ };
@@ -0,0 +1,19 @@
1
+ import { User } from '../../app-auth';
2
+ import { Player } from '../players';
3
+ export declare class PlayerPersonalData {
4
+ id: number;
5
+ playerId: number;
6
+ birthDate: string | null;
7
+ cpfEncrypted: string | null;
8
+ cpfHash: string | null;
9
+ collectedAt: Date | null;
10
+ migratedAt: Date | null;
11
+ migratedToUserId: string | null;
12
+ deletedAt: Date | null;
13
+ createdAt: Date;
14
+ updatedAt: Date;
15
+ player: Player;
16
+ migratedToUser: User | null;
17
+ prepareData(): void;
18
+ }
19
+ //# sourceMappingURL=player-personal-data.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"player-personal-data.entity.d.ts","sourceRoot":"","sources":["../../../src/players/player-personal-data/player-personal-data.entity.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,qBA2Ba,kBAAkB;IAI7B,EAAE,EAAE,MAAM,CAAC;IAOX,QAAQ,EAAE,MAAM,CAAC;IAQjB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAQzB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAS5B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAQvB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IAQzB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;IAQxB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAQhC,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAOvB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAKhB,MAAM,EAAE,MAAM,CAAC;IAIf,cAAc,EAAE,IAAI,GAAG,IAAI,CAAC;IAI5B,WAAW,IAAI,IAAI;CAUpB"}
@@ -0,0 +1,165 @@
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
+ BeforeInsert,
13
+ BeforeUpdate,
14
+ Check,
15
+ Column,
16
+ CreateDateColumn,
17
+ DeleteDateColumn,
18
+ Entity,
19
+ Index,
20
+ JoinColumn,
21
+ ManyToOne,
22
+ OneToOne,
23
+ PrimaryGeneratedColumn,
24
+ UpdateDateColumn
25
+ } from "typeorm";
26
+ import { User } from "../../app-auth/index.js";
27
+ import { Player } from "../players/index.js";
28
+ let PlayerPersonalData = class {
29
+ prepareData() {
30
+ if (this.cpfEncrypted) {
31
+ this.cpfEncrypted = this.cpfEncrypted.trim();
32
+ }
33
+ if (this.cpfHash) {
34
+ const normalizedHash = this.cpfHash.trim().toLowerCase();
35
+ this.cpfHash = /^[a-f0-9]{64}$/.test(normalizedHash) ? normalizedHash : null;
36
+ }
37
+ }
38
+ };
39
+ __decorateClass([
40
+ PrimaryGeneratedColumn({
41
+ comment: "Identificador \xFAnico dos dados pessoais do jogador."
42
+ })
43
+ ], PlayerPersonalData.prototype, "id", 2);
44
+ __decorateClass([
45
+ Column({
46
+ name: "player_id",
47
+ type: "int",
48
+ comment: "FK players.id."
49
+ })
50
+ ], PlayerPersonalData.prototype, "playerId", 2);
51
+ __decorateClass([
52
+ Column({
53
+ name: "birth_date",
54
+ type: "date",
55
+ nullable: true,
56
+ comment: "Data de nascimento do jogador (YYYY-MM-DD)."
57
+ })
58
+ ], PlayerPersonalData.prototype, "birthDate", 2);
59
+ __decorateClass([
60
+ Column({
61
+ name: "cpf_encrypted",
62
+ type: "text",
63
+ nullable: true,
64
+ comment: "CPF criptografado (ex.: AES-256-GCM)."
65
+ })
66
+ ], PlayerPersonalData.prototype, "cpfEncrypted", 2);
67
+ __decorateClass([
68
+ Column({
69
+ name: "cpf_hash",
70
+ type: "char",
71
+ length: 64,
72
+ nullable: true,
73
+ comment: "Hash SHA-256 do CPF normalizado com pepper para busca/compara\xE7\xE3o."
74
+ })
75
+ ], PlayerPersonalData.prototype, "cpfHash", 2);
76
+ __decorateClass([
77
+ Column({
78
+ name: "collected_at",
79
+ type: "timestamptz",
80
+ nullable: true,
81
+ comment: "Data/hora em que os dados pessoais foram coletados."
82
+ })
83
+ ], PlayerPersonalData.prototype, "collectedAt", 2);
84
+ __decorateClass([
85
+ Column({
86
+ name: "migrated_at",
87
+ type: "timestamptz",
88
+ nullable: true,
89
+ comment: "Data/hora em que os dados foram migrados para users."
90
+ })
91
+ ], PlayerPersonalData.prototype, "migratedAt", 2);
92
+ __decorateClass([
93
+ Column({
94
+ name: "migrated_to_user_id",
95
+ type: "uuid",
96
+ nullable: true,
97
+ comment: "FK users.id que recebeu os dados ap\xF3s migra\xE7\xE3o."
98
+ })
99
+ ], PlayerPersonalData.prototype, "migratedToUserId", 2);
100
+ __decorateClass([
101
+ DeleteDateColumn({
102
+ name: "deleted_at",
103
+ type: "timestamptz",
104
+ nullable: true,
105
+ comment: "Soft delete para reten\xE7\xE3o/auditoria."
106
+ })
107
+ ], PlayerPersonalData.prototype, "deletedAt", 2);
108
+ __decorateClass([
109
+ CreateDateColumn({
110
+ name: "created_at",
111
+ type: "timestamptz",
112
+ comment: "Data/hora de cria\xE7\xE3o do registro."
113
+ })
114
+ ], PlayerPersonalData.prototype, "createdAt", 2);
115
+ __decorateClass([
116
+ UpdateDateColumn({
117
+ name: "updated_at",
118
+ type: "timestamptz",
119
+ comment: "Data/hora da \xFAltima atualiza\xE7\xE3o do registro."
120
+ })
121
+ ], PlayerPersonalData.prototype, "updatedAt", 2);
122
+ __decorateClass([
123
+ OneToOne(() => Player, (player) => player.personalData, { onDelete: "CASCADE" }),
124
+ JoinColumn({ name: "player_id" })
125
+ ], PlayerPersonalData.prototype, "player", 2);
126
+ __decorateClass([
127
+ ManyToOne(() => User, { onDelete: "SET NULL" }),
128
+ JoinColumn({ name: "migrated_to_user_id" })
129
+ ], PlayerPersonalData.prototype, "migratedToUser", 2);
130
+ __decorateClass([
131
+ BeforeInsert(),
132
+ BeforeUpdate()
133
+ ], PlayerPersonalData.prototype, "prepareData", 1);
134
+ PlayerPersonalData = __decorateClass([
135
+ Entity("player_personal_data"),
136
+ Check(
137
+ "CHK_player_personal_data_cpf_hash_format",
138
+ `"cpf_hash" IS NULL OR "cpf_hash" ~ '^[a-f0-9]{64}$'`
139
+ ),
140
+ Check(
141
+ "CHK_player_personal_data_migration_user",
142
+ '"migrated_at" IS NULL OR "migrated_to_user_id" IS NOT NULL'
143
+ ),
144
+ Check(
145
+ "CHK_player_personal_data_birth_date",
146
+ '"birth_date" IS NULL OR "birth_date" <= CURRENT_DATE'
147
+ ),
148
+ Index("IDX_player_personal_data_player_id", ["playerId"]),
149
+ Index("IDX_player_personal_data_deleted_at", ["deletedAt"]),
150
+ Index("IDX_player_personal_data_migrated_at", ["migratedAt"]),
151
+ Index("IDX_player_personal_data_cpf_hash_lookup", ["cpfHash"], {
152
+ where: '"deleted_at" IS NULL AND "migrated_at" IS NULL AND "cpf_hash" IS NOT NULL'
153
+ }),
154
+ Index("UX_player_personal_data_player_active", ["playerId"], {
155
+ unique: true,
156
+ where: '"deleted_at" IS NULL'
157
+ }),
158
+ Index("UX_player_personal_data_cpf_hash_active", ["cpfHash"], {
159
+ unique: true,
160
+ where: '"deleted_at" IS NULL AND "migrated_at" IS NULL AND "cpf_hash" IS NOT NULL'
161
+ })
162
+ ], PlayerPersonalData);
163
+ export {
164
+ PlayerPersonalData
165
+ };
@@ -1,5 +1,6 @@
1
1
  import { User } from '../../app-auth';
2
2
  import { PlayerTeam, TeamJoinRequest } from '../../teams';
3
+ import { PlayerPersonalData } from '../player-personal-data';
3
4
  import { PlayerPosition } from '../player-position';
4
5
  import { PreferredLeg } from './enums/preferred-leg.enum';
5
6
  export declare class Player {
@@ -14,6 +15,7 @@ export declare class Player {
14
15
  positions: PlayerPosition[];
15
16
  teamMemberships: PlayerTeam[];
16
17
  joinRequests: TeamJoinRequest[];
18
+ personalData: PlayerPersonalData | null;
17
19
  prepareData(): void;
18
20
  }
19
21
  //# sourceMappingURL=player.entity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"player.entity.d.ts","sourceRoot":"","sources":["../../../src/players/players/player.entity.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,qBAGa,MAAM;IAEjB,EAAE,EAAE,MAAM,CAAC;IAGX,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAGtB,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;IAQhB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAQvB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAQxB,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IASlC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAUlB,SAAS,EAAE,cAAc,EAAE,CAAC;IAG5B,eAAe,EAAE,UAAU,EAAE,CAAC;IAG9B,YAAY,EAAE,eAAe,EAAE,CAAC;IAMhC,WAAW,IAAI,IAAI;CAKpB"}
1
+ {"version":3,"file":"player.entity.d.ts","sourceRoot":"","sources":["../../../src/players/players/player.entity.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,qBAGa,MAAM;IAEjB,EAAE,EAAE,MAAM,CAAC;IAGX,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAGtB,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;IAQhB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAQvB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAQxB,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IASlC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAUlB,SAAS,EAAE,cAAc,EAAE,CAAC;IAG5B,eAAe,EAAE,UAAU,EAAE,CAAC;IAG9B,YAAY,EAAE,eAAe,EAAE,CAAC;IAGhC,YAAY,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAMxC,WAAW,IAAI,IAAI;CAKpB"}
@@ -25,6 +25,7 @@ import {
25
25
  } from "typeorm";
26
26
  import { User } from "../../app-auth/index.js";
27
27
  import { PlayerTeam, TeamJoinRequest } from "../../teams/index.js";
28
+ import { PlayerPersonalData } from "../player-personal-data/index.js";
28
29
  import { PlayerPosition } from "../player-position/index.js";
29
30
  import { PreferredLeg } from "./enums/preferred-leg.enum.js";
30
31
  let Player = class {
@@ -93,6 +94,9 @@ __decorateClass([
93
94
  __decorateClass([
94
95
  OneToMany(() => TeamJoinRequest, (tjr) => tjr.player)
95
96
  ], Player.prototype, "joinRequests", 2);
97
+ __decorateClass([
98
+ OneToOne(() => PlayerPersonalData, (personalData) => personalData.player)
99
+ ], Player.prototype, "personalData", 2);
96
100
  __decorateClass([
97
101
  BeforeInsert()
98
102
  ], Player.prototype, "prepareData", 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natrave/shared-entities",
3
- "version": "1.4.105",
3
+ "version": "1.4.107",
4
4
  "description": "Entidades compartilhadass da NaTrave",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",
@@ -47,7 +47,7 @@
47
47
  "@natrave/facility-service-types": "^0.0.9",
48
48
  "@natrave/notification-service-types": "^1.1.73",
49
49
  "@natrave/tournaments-service-types": "^1.4.4",
50
- "@natrave/user-domain-events": "^0.1.9",
50
+ "@natrave/user-domain-events": "^0.1.10",
51
51
  "reflect-metadata": "^0.2.2",
52
52
  "typeorm": "^0.3.28"
53
53
  },