@natrave/shared-entities 9.8.0 → 9.9.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.
Files changed (40) hide show
  1. package/dist/central-auth/access-audit-events/access-audit-event.entity.d.ts +14 -0
  2. package/dist/central-auth/access-audit-events/access-audit-event.entity.d.ts.map +1 -0
  3. package/dist/central-auth/access-audit-events/access-audit-event.entity.js +101 -0
  4. package/dist/central-auth/access-audit-events/index.d.ts +2 -0
  5. package/dist/central-auth/access-audit-events/index.d.ts.map +1 -0
  6. package/dist/central-auth/access-audit-events/index.js +4 -0
  7. package/dist/central-auth/enums/access-audit-actor-type.enum.d.ts +5 -0
  8. package/dist/central-auth/enums/access-audit-actor-type.enum.d.ts.map +1 -0
  9. package/dist/central-auth/enums/access-audit-actor-type.enum.js +8 -0
  10. package/dist/central-auth/enums/organization-membership-role.enum.d.ts +6 -0
  11. package/dist/central-auth/enums/organization-membership-role.enum.d.ts.map +1 -0
  12. package/dist/central-auth/enums/organization-membership-role.enum.js +9 -0
  13. package/dist/central-auth/enums/organization-membership-scope-type.enum.d.ts +6 -0
  14. package/dist/central-auth/enums/organization-membership-scope-type.enum.d.ts.map +1 -0
  15. package/dist/central-auth/enums/organization-membership-scope-type.enum.js +9 -0
  16. package/dist/central-auth/enums/organization-membership-status.enum.d.ts +5 -0
  17. package/dist/central-auth/enums/organization-membership-status.enum.d.ts.map +1 -0
  18. package/dist/central-auth/enums/organization-membership-status.enum.js +8 -0
  19. package/dist/central-auth/index.d.ts +7 -0
  20. package/dist/central-auth/index.d.ts.map +1 -1
  21. package/dist/central-auth/index.js +11 -0
  22. package/dist/central-auth/organization-membership-scopes/index.d.ts +2 -0
  23. package/dist/central-auth/organization-membership-scopes/index.d.ts.map +1 -0
  24. package/dist/central-auth/organization-membership-scopes/index.js +4 -0
  25. package/dist/central-auth/organization-membership-scopes/organization-membership-scope.entity.d.ts +11 -0
  26. package/dist/central-auth/organization-membership-scopes/organization-membership-scope.entity.d.ts.map +1 -0
  27. package/dist/central-auth/organization-membership-scopes/organization-membership-scope.entity.js +75 -0
  28. package/dist/central-auth/organization-memberships/index.d.ts +2 -0
  29. package/dist/central-auth/organization-memberships/index.d.ts.map +1 -0
  30. package/dist/central-auth/organization-memberships/index.js +4 -0
  31. package/dist/central-auth/organization-memberships/organization-membership.entity.d.ts +21 -0
  32. package/dist/central-auth/organization-memberships/organization-membership.entity.d.ts.map +1 -0
  33. package/dist/central-auth/organization-memberships/organization-membership.entity.js +136 -0
  34. package/dist/central-auth/organizations/organization.entity.d.ts +3 -0
  35. package/dist/central-auth/organizations/organization.entity.d.ts.map +1 -1
  36. package/dist/central-auth/organizations/organization.entity.js +25 -0
  37. package/dist/database-entities/index.d.ts +2 -2
  38. package/dist/database-entities/index.d.ts.map +1 -1
  39. package/dist/database-entities/index.js +6 -0
  40. package/package.json +1 -1
@@ -0,0 +1,14 @@
1
+ import { AccessAuditActorType } from '../enums/access-audit-actor-type.enum';
2
+ export declare class AccessAuditEvent {
3
+ id: string;
4
+ organizationId: number;
5
+ actorType: AccessAuditActorType;
6
+ actorOrganizationUserId: number | null;
7
+ action: string;
8
+ targetMembershipId: number | null;
9
+ before: Record<string, unknown> | null;
10
+ after: Record<string, unknown> | null;
11
+ requestId: string | null;
12
+ createdAt: Date;
13
+ }
14
+ //# sourceMappingURL=access-audit-event.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"access-audit-event.entity.d.ts","sourceRoot":"","sources":["../../../src/central-auth/access-audit-events/access-audit-event.entity.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAqB7E,qBAUa,gBAAgB;IAM3B,EAAE,EAAE,MAAM,CAAC;IAOX,cAAc,EAAE,MAAM,CAAC;IAQvB,SAAS,EAAE,oBAAoB,CAAC;IAQhC,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;IAOvC,MAAM,EAAE,MAAM,CAAC;IAQf,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAOlC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAOvC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAStC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAGzB,SAAS,EAAE,IAAI,CAAC;CACjB"}
@@ -0,0 +1,101 @@
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 { Check, Column, CreateDateColumn, Entity, Index, PrimaryGeneratedColumn } from "typeorm";
12
+ import { AccessAuditActorType } from "../enums/access-audit-actor-type.enum.js";
13
+ const ACTOR_TYPES = Object.values(AccessAuditActorType).map((value) => `'${value}'`).join(", ");
14
+ let AccessAuditEvent = class {
15
+ };
16
+ __decorateClass([
17
+ PrimaryGeneratedColumn("increment", {
18
+ type: "bigint",
19
+ primaryKeyConstraintName: "PK_access_audit_events",
20
+ comment: "Identificador do evento."
21
+ })
22
+ ], AccessAuditEvent.prototype, "id", 2);
23
+ __decorateClass([
24
+ Column({
25
+ name: "organization_id",
26
+ type: "int",
27
+ comment: "Organiza\xE7\xE3o onde a mudan\xE7a aconteceu (sem FK: o hist\xF3rico sobrevive a ela)."
28
+ })
29
+ ], AccessAuditEvent.prototype, "organizationId", 2);
30
+ __decorateClass([
31
+ Column({
32
+ name: "actor_type",
33
+ type: "varchar",
34
+ length: 16,
35
+ comment: "PERSON (uma pessoa logada) ou SYSTEM (carga, exclus\xE3o vinda do Clerk)."
36
+ })
37
+ ], AccessAuditEvent.prototype, "actorType", 2);
38
+ __decorateClass([
39
+ Column({
40
+ name: "actor_organization_user_id",
41
+ type: "int",
42
+ nullable: true,
43
+ comment: "Quem fez, quando actor_type = PERSON (organization_users.id, sem FK)."
44
+ })
45
+ ], AccessAuditEvent.prototype, "actorOrganizationUserId", 2);
46
+ __decorateClass([
47
+ Column({
48
+ type: "varchar",
49
+ length: 64,
50
+ comment: "O que aconteceu, ex.: membership.created, membership.removed, role.changed."
51
+ })
52
+ ], AccessAuditEvent.prototype, "action", 2);
53
+ __decorateClass([
54
+ Column({
55
+ name: "target_membership_id",
56
+ type: "int",
57
+ nullable: true,
58
+ comment: "V\xEDnculo afetado (organization_memberships.id, sem FK)."
59
+ })
60
+ ], AccessAuditEvent.prototype, "targetMembershipId", 2);
61
+ __decorateClass([
62
+ Column({
63
+ type: "jsonb",
64
+ nullable: true,
65
+ comment: "V\xEDnculo antes da mudan\xE7a; nulo na cria\xE7\xE3o."
66
+ })
67
+ ], AccessAuditEvent.prototype, "before", 2);
68
+ __decorateClass([
69
+ Column({
70
+ type: "jsonb",
71
+ nullable: true,
72
+ comment: "V\xEDnculo depois da mudan\xE7a; nulo na remo\xE7\xE3o."
73
+ })
74
+ ], AccessAuditEvent.prototype, "after", 2);
75
+ __decorateClass([
76
+ Column({
77
+ name: "request_id",
78
+ type: "varchar",
79
+ length: 64,
80
+ nullable: true,
81
+ comment: "Correlation id do pedido que causou a mudan\xE7a, quando houver."
82
+ })
83
+ ], AccessAuditEvent.prototype, "requestId", 2);
84
+ __decorateClass([
85
+ CreateDateColumn({ name: "created_at", type: "timestamptz", comment: "Quando aconteceu." })
86
+ ], AccessAuditEvent.prototype, "createdAt", 2);
87
+ AccessAuditEvent = __decorateClass([
88
+ Entity("access_audit_events"),
89
+ Index("IDX_access_audit_events_org_created_at", ["organizationId", "createdAt"]),
90
+ Index("IDX_access_audit_events_membership", ["targetMembershipId"], {
91
+ where: '"target_membership_id" IS NOT NULL'
92
+ }),
93
+ Check("CHK_access_audit_events_actor_type", `"actor_type" IN (${ACTOR_TYPES})`),
94
+ Check(
95
+ "CHK_access_audit_events_actor",
96
+ `("actor_type" = 'PERSON' AND "actor_organization_user_id" IS NOT NULL) OR ("actor_type" = 'SYSTEM' AND "actor_organization_user_id" IS NULL)`
97
+ )
98
+ ], AccessAuditEvent);
99
+ export {
100
+ AccessAuditEvent
101
+ };
@@ -0,0 +1,2 @@
1
+ export { AccessAuditEvent } from './access-audit-event.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/central-auth/access-audit-events/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { AccessAuditEvent } from "./access-audit-event.entity.js";
2
+ export {
3
+ AccessAuditEvent
4
+ };
@@ -0,0 +1,5 @@
1
+ export declare enum AccessAuditActorType {
2
+ PERSON = "PERSON",
3
+ SYSTEM = "SYSTEM"
4
+ }
5
+ //# sourceMappingURL=access-audit-actor-type.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"access-audit-actor-type.enum.d.ts","sourceRoot":"","sources":["../../../src/central-auth/enums/access-audit-actor-type.enum.ts"],"names":[],"mappings":"AAKA,oBAAY,oBAAoB;IAE9B,MAAM,WAAW;IAEjB,MAAM,WAAW;CAClB"}
@@ -0,0 +1,8 @@
1
+ var AccessAuditActorType = /* @__PURE__ */ ((AccessAuditActorType2) => {
2
+ AccessAuditActorType2["PERSON"] = "PERSON";
3
+ AccessAuditActorType2["SYSTEM"] = "SYSTEM";
4
+ return AccessAuditActorType2;
5
+ })(AccessAuditActorType || {});
6
+ export {
7
+ AccessAuditActorType
8
+ };
@@ -0,0 +1,6 @@
1
+ export declare enum OrganizationMembershipRole {
2
+ ADMIN = "ADMIN",
3
+ COORDINATION = "COORDINATION",
4
+ SCOREKEEPER = "SCOREKEEPER"
5
+ }
6
+ //# sourceMappingURL=organization-membership-role.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization-membership-role.enum.d.ts","sourceRoot":"","sources":["../../../src/central-auth/enums/organization-membership-role.enum.ts"],"names":[],"mappings":"AAKA,oBAAY,0BAA0B;IAEpC,KAAK,UAAU;IAEf,YAAY,iBAAiB;IAE7B,WAAW,gBAAgB;CAC5B"}
@@ -0,0 +1,9 @@
1
+ var OrganizationMembershipRole = /* @__PURE__ */ ((OrganizationMembershipRole2) => {
2
+ OrganizationMembershipRole2["ADMIN"] = "ADMIN";
3
+ OrganizationMembershipRole2["COORDINATION"] = "COORDINATION";
4
+ OrganizationMembershipRole2["SCOREKEEPER"] = "SCOREKEEPER";
5
+ return OrganizationMembershipRole2;
6
+ })(OrganizationMembershipRole || {});
7
+ export {
8
+ OrganizationMembershipRole
9
+ };
@@ -0,0 +1,6 @@
1
+ export declare enum OrganizationMembershipScopeType {
2
+ CATEGORY_GROUP = "CATEGORY_GROUP",
3
+ TOURNAMENT = "TOURNAMENT",
4
+ MATCH = "MATCH"
5
+ }
6
+ //# sourceMappingURL=organization-membership-scope-type.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization-membership-scope-type.enum.d.ts","sourceRoot":"","sources":["../../../src/central-auth/enums/organization-membership-scope-type.enum.ts"],"names":[],"mappings":"AAKA,oBAAY,+BAA+B;IAEzC,cAAc,mBAAmB;IAEjC,UAAU,eAAe;IAEzB,KAAK,UAAU;CAChB"}
@@ -0,0 +1,9 @@
1
+ var OrganizationMembershipScopeType = /* @__PURE__ */ ((OrganizationMembershipScopeType2) => {
2
+ OrganizationMembershipScopeType2["CATEGORY_GROUP"] = "CATEGORY_GROUP";
3
+ OrganizationMembershipScopeType2["TOURNAMENT"] = "TOURNAMENT";
4
+ OrganizationMembershipScopeType2["MATCH"] = "MATCH";
5
+ return OrganizationMembershipScopeType2;
6
+ })(OrganizationMembershipScopeType || {});
7
+ export {
8
+ OrganizationMembershipScopeType
9
+ };
@@ -0,0 +1,5 @@
1
+ export declare enum OrganizationMembershipStatus {
2
+ ACTIVE = "ACTIVE",
3
+ SUSPENDED = "SUSPENDED"
4
+ }
5
+ //# sourceMappingURL=organization-membership-status.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization-membership-status.enum.d.ts","sourceRoot":"","sources":["../../../src/central-auth/enums/organization-membership-status.enum.ts"],"names":[],"mappings":"AAKA,oBAAY,4BAA4B;IAEtC,MAAM,WAAW;IAEjB,SAAS,cAAc;CACxB"}
@@ -0,0 +1,8 @@
1
+ var OrganizationMembershipStatus = /* @__PURE__ */ ((OrganizationMembershipStatus2) => {
2
+ OrganizationMembershipStatus2["ACTIVE"] = "ACTIVE";
3
+ OrganizationMembershipStatus2["SUSPENDED"] = "SUSPENDED";
4
+ return OrganizationMembershipStatus2;
5
+ })(OrganizationMembershipStatus || {});
6
+ export {
7
+ OrganizationMembershipStatus
8
+ };
@@ -1,7 +1,14 @@
1
+ export * from './access-audit-events';
2
+ export { AccessAuditActorType } from './enums/access-audit-actor-type.enum';
3
+ export { OrganizationMembershipRole } from './enums/organization-membership-role.enum';
4
+ export { OrganizationMembershipScopeType } from './enums/organization-membership-scope-type.enum';
5
+ export { OrganizationMembershipStatus } from './enums/organization-membership-status.enum';
1
6
  export { OrganizationStatus } from './enums/organization-status.enum';
2
7
  export { OrganizationType } from './enums/organization-type.enum';
3
8
  export { OrganizationUserAuthProvider } from './enums/organization-user-auth-provider.enum';
4
9
  export { OrganizationUserStatus } from './enums/organization-user-status.enum';
10
+ export * from './organization-membership-scopes';
11
+ export * from './organization-memberships';
5
12
  export * from './organization-user-billing-infos';
6
13
  export * from './organization-users';
7
14
  export * from './organizations';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/central-auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,cAAc,mCAAmC,CAAC;AAClD,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/central-auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,EAAE,+BAA+B,EAAE,MAAM,iDAAiD,CAAC;AAClG,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
@@ -1,12 +1,23 @@
1
+ export * from "./access-audit-events/index.js";
2
+ import { AccessAuditActorType } from "./enums/access-audit-actor-type.enum.js";
3
+ import { OrganizationMembershipRole } from "./enums/organization-membership-role.enum.js";
4
+ import { OrganizationMembershipScopeType } from "./enums/organization-membership-scope-type.enum.js";
5
+ import { OrganizationMembershipStatus } from "./enums/organization-membership-status.enum.js";
1
6
  import { OrganizationStatus } from "./enums/organization-status.enum.js";
2
7
  import { OrganizationType } from "./enums/organization-type.enum.js";
3
8
  import { OrganizationUserAuthProvider } from "./enums/organization-user-auth-provider.enum.js";
4
9
  import { OrganizationUserStatus } from "./enums/organization-user-status.enum.js";
10
+ export * from "./organization-membership-scopes/index.js";
11
+ export * from "./organization-memberships/index.js";
5
12
  export * from "./organization-user-billing-infos/index.js";
6
13
  export * from "./organization-users/index.js";
7
14
  export * from "./organizations/index.js";
8
15
  export * from "./phone-numbers/index.js";
9
16
  export {
17
+ AccessAuditActorType,
18
+ OrganizationMembershipRole,
19
+ OrganizationMembershipScopeType,
20
+ OrganizationMembershipStatus,
10
21
  OrganizationStatus,
11
22
  OrganizationType,
12
23
  OrganizationUserAuthProvider,
@@ -0,0 +1,2 @@
1
+ export { OrganizationMembershipScope } from './organization-membership-scope.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/central-auth/organization-membership-scopes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { OrganizationMembershipScope } from "./organization-membership-scope.entity.js";
2
+ export {
3
+ OrganizationMembershipScope
4
+ };
@@ -0,0 +1,11 @@
1
+ import { OrganizationMembershipScopeType } from '../enums/organization-membership-scope-type.enum';
2
+ import { OrganizationMembership } from '../organization-memberships/organization-membership.entity';
3
+ export declare class OrganizationMembershipScope {
4
+ id: number;
5
+ membershipId: number;
6
+ scopeType: OrganizationMembershipScopeType;
7
+ scopeId: number;
8
+ createdAt: Date;
9
+ membership: OrganizationMembership;
10
+ }
11
+ //# sourceMappingURL=organization-membership-scope.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization-membership-scope.entity.d.ts","sourceRoot":"","sources":["../../../src/central-auth/organization-membership-scopes/organization-membership-scope.entity.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,+BAA+B,EAAE,MAAM,kDAAkD,CAAC;AACnG,OAAO,EAAE,sBAAsB,EAAE,MAAM,4DAA4D,CAAC;AAiBpG,qBAKa,2BAA2B;IAKtC,EAAE,EAAE,MAAM,CAAC;IAOX,YAAY,EAAE,MAAM,CAAC;IAQrB,SAAS,EAAE,+BAA+B,CAAC;IAO3C,OAAO,EAAE,MAAM,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;IAShB,UAAU,EAAE,sBAAsB,CAAC;CACpC"}
@@ -0,0 +1,75 @@
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
+ Check,
13
+ Column,
14
+ CreateDateColumn,
15
+ Entity,
16
+ Index,
17
+ JoinColumn,
18
+ ManyToOne,
19
+ PrimaryGeneratedColumn
20
+ } from "typeorm";
21
+ import { OrganizationMembershipScopeType } from "../enums/organization-membership-scope-type.enum.js";
22
+ import { OrganizationMembership } from "../organization-memberships/organization-membership.entity.js";
23
+ const SCOPE_TYPES = Object.values(OrganizationMembershipScopeType).map((value) => `'${value}'`).join(", ");
24
+ let OrganizationMembershipScope = class {
25
+ };
26
+ __decorateClass([
27
+ PrimaryGeneratedColumn({
28
+ primaryKeyConstraintName: "PK_organization_membership_scopes",
29
+ comment: "Identificador do escopo."
30
+ })
31
+ ], OrganizationMembershipScope.prototype, "id", 2);
32
+ __decorateClass([
33
+ Column({
34
+ name: "membership_id",
35
+ type: "int",
36
+ comment: "FK organization_memberships.id (CASCADE): o v\xEDnculo."
37
+ })
38
+ ], OrganizationMembershipScope.prototype, "membershipId", 2);
39
+ __decorateClass([
40
+ Column({
41
+ name: "scope_type",
42
+ type: "varchar",
43
+ length: 20,
44
+ comment: "CATEGORY_GROUP (campeonato), TOURNAMENT (categoria) ou MATCH (partida)."
45
+ })
46
+ ], OrganizationMembershipScope.prototype, "scopeType", 2);
47
+ __decorateClass([
48
+ Column({
49
+ name: "scope_id",
50
+ type: "int",
51
+ comment: "Id do campeonato, da categoria ou da partida, conforme scope_type."
52
+ })
53
+ ], OrganizationMembershipScope.prototype, "scopeId", 2);
54
+ __decorateClass([
55
+ CreateDateColumn({ name: "created_at", type: "timestamptz", comment: "Cria\xE7\xE3o do escopo." })
56
+ ], OrganizationMembershipScope.prototype, "createdAt", 2);
57
+ __decorateClass([
58
+ ManyToOne(() => OrganizationMembership, (membership) => membership.scopes, {
59
+ onDelete: "CASCADE"
60
+ }),
61
+ JoinColumn({
62
+ name: "membership_id",
63
+ foreignKeyConstraintName: "FK_organization_membership_scopes_membership"
64
+ })
65
+ ], OrganizationMembershipScope.prototype, "membership", 2);
66
+ OrganizationMembershipScope = __decorateClass([
67
+ Entity("organization_membership_scopes"),
68
+ Index("UQ_organization_membership_scopes_scope", ["membershipId", "scopeType", "scopeId"], {
69
+ unique: true
70
+ }),
71
+ Check("CHK_organization_membership_scopes_type", `"scope_type" IN (${SCOPE_TYPES})`)
72
+ ], OrganizationMembershipScope);
73
+ export {
74
+ OrganizationMembershipScope
75
+ };
@@ -0,0 +1,2 @@
1
+ export { OrganizationMembership } from './organization-membership.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/central-auth/organization-memberships/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { OrganizationMembership } from "./organization-membership.entity.js";
2
+ export {
3
+ OrganizationMembership
4
+ };
@@ -0,0 +1,21 @@
1
+ import { OrganizationMembershipRole } from '../enums/organization-membership-role.enum';
2
+ import { OrganizationMembershipStatus } from '../enums/organization-membership-status.enum';
3
+ import { OrganizationMembershipScope } from '../organization-membership-scopes/organization-membership-scope.entity';
4
+ import { OrganizationUser } from '../organization-users/organization-user.entity';
5
+ import { Organization } from '../organizations/organization.entity';
6
+ export declare class OrganizationMembership {
7
+ id: number;
8
+ organizationId: number;
9
+ organizationUserId: number;
10
+ role: OrganizationMembershipRole;
11
+ status: OrganizationMembershipStatus;
12
+ createdByOrganizationUserId: number | null;
13
+ createdAt: Date;
14
+ updatedAt: Date;
15
+ deletedAt: Date | null;
16
+ organization: Organization;
17
+ organizationUser: OrganizationUser;
18
+ createdBy: OrganizationUser | null;
19
+ scopes: OrganizationMembershipScope[];
20
+ }
21
+ //# sourceMappingURL=organization-membership.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization-membership.entity.d.ts","sourceRoot":"","sources":["../../../src/central-auth/organization-memberships/organization-membership.entity.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EAAE,2BAA2B,EAAE,MAAM,wEAAwE,CAAC;AACrH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AA6BpE,qBAca,sBAAsB;IAKjC,EAAE,EAAE,MAAM,CAAC;IAOX,cAAc,EAAE,MAAM,CAAC;IAOvB,kBAAkB,EAAE,MAAM,CAAC;IAO3B,IAAI,EAAE,0BAA0B,CAAC;IAQjC,MAAM,EAAE,4BAA4B,CAAC;IASrC,2BAA2B,EAAE,MAAM,GAAG,IAAI,CAAC;IAG3C,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAQhB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAOvB,YAAY,EAAE,YAAY,CAAC;IAO3B,gBAAgB,EAAE,gBAAgB,CAAC;IAOnC,SAAS,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAGnC,MAAM,EAAE,2BAA2B,EAAE,CAAC;CACvC"}
@@ -0,0 +1,136 @@
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
+ Check,
13
+ Column,
14
+ CreateDateColumn,
15
+ DeleteDateColumn,
16
+ Entity,
17
+ Index,
18
+ JoinColumn,
19
+ ManyToOne,
20
+ OneToMany,
21
+ PrimaryGeneratedColumn,
22
+ UpdateDateColumn
23
+ } from "typeorm";
24
+ import { OrganizationMembershipRole } from "../enums/organization-membership-role.enum.js";
25
+ import { OrganizationMembershipStatus } from "../enums/organization-membership-status.enum.js";
26
+ import { OrganizationMembershipScope } from "../organization-membership-scopes/organization-membership-scope.entity.js";
27
+ import { OrganizationUser } from "../organization-users/organization-user.entity.js";
28
+ import { Organization } from "../organizations/organization.entity.js";
29
+ const quoted = (values) => values.map((value) => `'${value}'`).join(", ");
30
+ const ROLES = quoted(Object.values(OrganizationMembershipRole));
31
+ const STATUSES = quoted(Object.values(OrganizationMembershipStatus));
32
+ let OrganizationMembership = class {
33
+ };
34
+ __decorateClass([
35
+ PrimaryGeneratedColumn({
36
+ primaryKeyConstraintName: "PK_organization_memberships",
37
+ comment: "Identificador do v\xEDnculo."
38
+ })
39
+ ], OrganizationMembership.prototype, "id", 2);
40
+ __decorateClass([
41
+ Column({
42
+ name: "organization_id",
43
+ type: "int",
44
+ comment: "FK organizations.id (CASCADE): a organiza\xE7\xE3o."
45
+ })
46
+ ], OrganizationMembership.prototype, "organizationId", 2);
47
+ __decorateClass([
48
+ Column({
49
+ name: "organization_user_id",
50
+ type: "int",
51
+ comment: "FK organization_users.id (CASCADE): a pessoa."
52
+ })
53
+ ], OrganizationMembership.prototype, "organizationUserId", 2);
54
+ __decorateClass([
55
+ Column({
56
+ type: "varchar",
57
+ length: 16,
58
+ comment: "Perfil na organiza\xE7\xE3o: ADMIN, COORDINATION (Coordena\xE7\xE3o) ou SCOREKEEPER (Mes\xE1rio)."
59
+ })
60
+ ], OrganizationMembership.prototype, "role", 2);
61
+ __decorateClass([
62
+ Column({
63
+ type: "varchar",
64
+ length: 16,
65
+ default: OrganizationMembershipStatus.ACTIVE,
66
+ comment: "ACTIVE ou SUSPENDED (suspenso pela organiza\xE7\xE3o, sem acesso)."
67
+ })
68
+ ], OrganizationMembership.prototype, "status", 2);
69
+ __decorateClass([
70
+ Column({
71
+ name: "created_by_organization_user_id",
72
+ type: "int",
73
+ nullable: true,
74
+ comment: "FK organization_users.id (SET NULL): quem deu o acesso. Nulo na carga inicial e em quem criou a organiza\xE7\xE3o."
75
+ })
76
+ ], OrganizationMembership.prototype, "createdByOrganizationUserId", 2);
77
+ __decorateClass([
78
+ CreateDateColumn({ name: "created_at", type: "timestamptz", comment: "Cria\xE7\xE3o do v\xEDnculo." })
79
+ ], OrganizationMembership.prototype, "createdAt", 2);
80
+ __decorateClass([
81
+ UpdateDateColumn({
82
+ name: "updated_at",
83
+ type: "timestamptz",
84
+ comment: "\xDAltima mudan\xE7a no v\xEDnculo."
85
+ })
86
+ ], OrganizationMembership.prototype, "updatedAt", 2);
87
+ __decorateClass([
88
+ DeleteDateColumn({
89
+ name: "deleted_at",
90
+ type: "timestamptz",
91
+ nullable: true,
92
+ comment: "Quando a pessoa saiu da organiza\xE7\xE3o (soft delete); nulo enquanto vale."
93
+ })
94
+ ], OrganizationMembership.prototype, "deletedAt", 2);
95
+ __decorateClass([
96
+ ManyToOne(() => Organization, { onDelete: "CASCADE" }),
97
+ JoinColumn({
98
+ name: "organization_id",
99
+ foreignKeyConstraintName: "FK_organization_memberships_organization"
100
+ })
101
+ ], OrganizationMembership.prototype, "organization", 2);
102
+ __decorateClass([
103
+ ManyToOne(() => OrganizationUser, { onDelete: "CASCADE" }),
104
+ JoinColumn({
105
+ name: "organization_user_id",
106
+ foreignKeyConstraintName: "FK_organization_memberships_user"
107
+ })
108
+ ], OrganizationMembership.prototype, "organizationUser", 2);
109
+ __decorateClass([
110
+ ManyToOne(() => OrganizationUser, { onDelete: "SET NULL", nullable: true }),
111
+ JoinColumn({
112
+ name: "created_by_organization_user_id",
113
+ foreignKeyConstraintName: "FK_organization_memberships_created_by"
114
+ })
115
+ ], OrganizationMembership.prototype, "createdBy", 2);
116
+ __decorateClass([
117
+ OneToMany(() => OrganizationMembershipScope, (scope) => scope.membership)
118
+ ], OrganizationMembership.prototype, "scopes", 2);
119
+ OrganizationMembership = __decorateClass([
120
+ Entity("organization_memberships"),
121
+ Index("UQ_organization_memberships_org_user", ["organizationId", "organizationUserId"], {
122
+ unique: true,
123
+ where: '"deleted_at" IS NULL'
124
+ }),
125
+ Index("IDX_organization_memberships_user", ["organizationUserId"], {
126
+ where: '"deleted_at" IS NULL'
127
+ }),
128
+ Index("IDX_organization_memberships_created_by", ["createdByOrganizationUserId"], {
129
+ where: '"created_by_organization_user_id" IS NOT NULL'
130
+ }),
131
+ Check("CHK_organization_memberships_role", `"role" IN (${ROLES})`),
132
+ Check("CHK_organization_memberships_status", `"status" IN (${STATUSES})`)
133
+ ], OrganizationMembership);
134
+ export {
135
+ OrganizationMembership
136
+ };
@@ -14,9 +14,12 @@ export declare class Organization implements IOrganization {
14
14
  status: OrganizationStatus;
15
15
  externalId: string | null;
16
16
  isActualOrganization: boolean;
17
+ accessVersion: number;
18
+ createdByOrganizationUserId: number | null;
17
19
  createdAt: Date;
18
20
  updatedAt: Date;
19
21
  deletedAt: Date | null;
22
+ createdBy: OrganizationUser | null;
20
23
  users: OrganizationUser[];
21
24
  tournaments: Tournament[];
22
25
  tournamentCategoryGroups: TournamentCategoryGroup[];
@@ -1 +1 @@
1
- {"version":3,"file":"organization.entity.d.ts","sourceRoot":"","sources":["../../../src/central-auth/organizations/organization.entity.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAa9D,qBAaa,YAAa,YAAW,aAAa;IAEhD,EAAE,EAAE,MAAM,CAAC;IAOX,IAAI,EAAE,MAAM,CAAC;IAQb,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAGxB,KAAK,EAAE,MAAM,CAAC;IASd,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAOrB,IAAI,EAAE,gBAAgB,CAAC;IAOvB,MAAM,EAAE,kBAAkB,CAAC;IAU3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ1B,oBAAoB,EAAE,OAAO,CAAC;IAO9B,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAQhB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAQvB,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAM1B,WAAW,EAAE,UAAU,EAAE,CAAC;IAM1B,wBAAwB,EAAE,uBAAuB,EAAE,CAAC;IAMpD,YAAY,EAAE,WAAW,EAAE,CAAC;CAC7B"}
1
+ {"version":3,"file":"organization.entity.d.ts","sourceRoot":"","sources":["../../../src/central-auth/organizations/organization.entity.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,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__decorateClass([
85
87
  comment: "Indica se a organiza\xE7\xE3o \xE9 uma entidade real ou apenas pai de um usu\xE1rio."
86
88
  })
87
89
  ], Organization.prototype, "isActualOrganization", 2);
90
+ __decorateClass([
91
+ Column({
92
+ name: "access_version",
93
+ type: "int",
94
+ default: 1,
95
+ comment: "Vers\xE3o do acesso da organiza\xE7\xE3o: sobe a cada mudan\xE7a de v\xEDnculo; invalida cache."
96
+ })
97
+ ], Organization.prototype, "accessVersion", 2);
98
+ __decorateClass([
99
+ Column({
100
+ name: "created_by_organization_user_id",
101
+ type: "int",
102
+ nullable: true,
103
+ comment: "FK organization_users.id (SET NULL): quem criou a organiza\xE7\xE3o. Na carga, a pessoa da organiza\xE7\xE3o."
104
+ })
105
+ ], Organization.prototype, "createdByOrganizationUserId", 2);
88
106
  __decorateClass([
89
107
  CreateDateColumn({
90
108
  name: "created_at",
@@ -107,6 +125,13 @@ __decorateClass([
107
125
  comment: "Data de exclus\xE3o l\xF3gica (soft delete) do registro; nulo quando ativo."
108
126
  })
109
127
  ], Organization.prototype, "deletedAt", 2);
128
+ __decorateClass([
129
+ ManyToOne(() => OrganizationUser, { onDelete: "SET NULL", nullable: true }),
130
+ JoinColumn({
131
+ name: "created_by_organization_user_id",
132
+ foreignKeyConstraintName: "FK_organizations_created_by"
133
+ })
134
+ ], Organization.prototype, "createdBy", 2);
110
135
  __decorateClass([
111
136
  OneToMany(() => OrganizationUser, (user) => user.organization)
112
137
  ], Organization.prototype, "users", 2);
@@ -1,6 +1,6 @@
1
1
  import { PasswordReset, RefreshToken, User, UserAuthProvider, UserLocality, UserOnboardingIntent, UserVerification } from '../app-auth';
2
2
  import { BillingAccount, BillingEvent, BillingInvoice, BillingInvoiceLineItem, BillingMatchUsage, BillingPayment, BillingPlan, BillingProduct, BillingProviderWebhookEvent, BillingSubscription, BillingSubscriptionGrant, BillingSubscriptionItem } from '../billing';
3
- import { Organization, OrganizationUser, OrganizationUserBillingInfo, PhoneNumber } from '../central-auth';
3
+ import { AccessAuditEvent, Organization, OrganizationMembership, OrganizationMembershipScope, OrganizationUser, OrganizationUserBillingInfo, PhoneNumber } from '../central-auth';
4
4
  import { Coupon, CouponUsage } from '../coupons';
5
5
  import { Address, City, Facility, FacilityImage, FacilityOwner, Field, FieldImage } from '../facilities';
6
6
  import { FeedActivity, FeedActivityReaction, FeedActivitySubject, FeedArtRewarm, FeedMedia, FeedOutbox, FeedPoll, FeedPollOption, FeedPollVote, FeedPost, FeedPostAttachment, FeedPostRevision, FeedReport } from '../feed';
@@ -15,5 +15,5 @@ import { Promotion, PromotionAdvertiser, PromotionContact, PromotionCreative, Pr
15
15
  import { PlayerTeam, Team, TeamAccessCode, TeamFollow, TeamJoinRequest, TeamKit, TeamModality, TeamSponsor, TeamTrophy } from '../teams';
16
16
  import { CategoryBroadcastSetting, Referee, RegulationExtraction, Tournament, TournamentAllowedPhone, TournamentBillingOutbox, TournamentBracket, TournamentBracketSlot, TournamentCategoryGroup, TournamentContact, TournamentCoupon, TournamentCreationDraft, TournamentFacility, TournamentFollow, TournamentFormatConfig, TournamentGroup, TournamentGroupContact, TournamentMatch, TournamentMatchAvailability, TournamentMatchCard, TournamentMatchGoal, TournamentMatchKit, TournamentMatchObservation, TournamentMatchPlayerNumber, TournamentMatchReferee, TournamentMatchRule, TournamentMatchSchema, TournamentMatchSubstitution, TournamentMatchTimeout, TournamentPayment, TournamentPenaltyShootout, TournamentPlayer, TournamentPlayerRule, TournamentPointsAdjustment, TournamentPrizeRule, TournamentPublicationChargeRule, TournamentRegistrationRequest, TournamentRegistrationRequirement, TournamentRegulationFieldStatus, TournamentRound, TournamentTeam, TournamentTeamInvitation, TournamentTeamMemberNote, TournamentTieBreakConfig } from '../tournaments';
17
17
  import { UserDomainEvent, UserEventView } from '../user-events';
18
- export declare const DATABASE_ENTITIES: (typeof PasswordReset | typeof Notification | typeof User | typeof NotificationDelivery | typeof NotificationDispatchLog | typeof PushDeviceToken | typeof UserNotificationPreference | typeof TeamPlayerMergeHistory | typeof Team | typeof PlayerTeam | typeof Player | typeof TournamentMatchGoal | typeof TournamentTeam | typeof TournamentMatch | typeof TournamentPlayer | typeof TournamentMatchKit | typeof TournamentMatchSubstitution | typeof TournamentMatchTimeout | typeof TournamentPenaltyShootout | typeof CategoryBroadcastSetting | typeof Tournament | typeof TournamentMatchReferee | typeof Referee | typeof RegulationExtraction | typeof TournamentAllowedPhone | typeof PhoneNumber | typeof TournamentBillingOutbox | typeof TournamentGroupContact | typeof TournamentCategoryGroup | typeof Organization | typeof TournamentContact | typeof Coupon | typeof CouponUsage | typeof TournamentCoupon | typeof TournamentCreationDraft | typeof City | typeof FacilityImage | typeof Facility | typeof FacilityOwner | typeof Field | typeof FieldImage | typeof TournamentFacility | typeof TournamentFollow | typeof TournamentFormatConfig | typeof TournamentMatchObservation | typeof TournamentMatchPlayerNumber | typeof TournamentMatchRule | typeof TournamentMatchSchema | typeof TournamentMatchAvailability | typeof UserPaymentProvider | typeof PaymentProvider | typeof Payment | typeof TournamentPayment | typeof OrganizationUser | typeof TournamentPlayerRule | typeof TournamentPointsAdjustment | typeof TournamentPrizeRule | typeof TournamentPublicationChargeRule | typeof TournamentRegistrationRequest | typeof TournamentRegistrationRequirement | typeof TournamentRegulationFieldStatus | typeof TournamentRound | typeof TournamentTeamInvitation | typeof TournamentTeamMemberNote | typeof TournamentTieBreakConfig | typeof Address | typeof OrganizationUserBillingInfo | typeof TournamentGroup | typeof TournamentBracket | typeof TournamentBracketSlot | typeof TeamTrophy | typeof TournamentMatchCard | typeof TeamAccessCode | typeof TeamJoinRequest | typeof TeamKit | typeof TeamModality | typeof TeamSponsor | typeof TeamFollow | typeof PlayerPosition | typeof PlayerPersonalData | typeof UserAuthProvider | typeof RefreshToken | typeof UserLocality | typeof UserOnboardingIntent | typeof UserVerification | typeof BillingProduct | typeof BillingPlan | typeof BillingSubscriptionGrant | typeof BillingSubscription | typeof BillingSubscriptionItem | typeof BillingAccount | typeof BillingEvent | typeof BillingInvoice | typeof BillingInvoiceLineItem | typeof BillingMatchUsage | typeof BillingPayment | typeof BillingProviderWebhookEvent | typeof FeedActivityReaction | typeof FeedActivity | typeof FeedActivitySubject | typeof FeedArtRewarm | typeof FeedMedia | typeof FeedOutbox | typeof FeedPostAttachment | typeof FeedPost | typeof FeedPoll | typeof FeedPostRevision | typeof FeedPollOption | typeof FeedPollVote | typeof FeedReport | typeof FinanceAuditEvent | typeof FinanceEntryItem | typeof FinanceEntry | typeof FinanceLedger | typeof FriendlyBoardPreference | typeof FriendlyMatchAttendance | typeof FriendlyMatch | typeof FriendlyMatchExtra | typeof FriendlyMatchGoal | typeof FriendlyMatchMvp | typeof FriendlyMvpVote | typeof FriendlyOpenChallengeExtra | typeof FriendlyChallenge | typeof FriendlyStaffCommand | typeof FriendlyScoreEvent | typeof FriendlyChallengeExtra | typeof FriendlyHistory | typeof FriendlyRequest | typeof FriendlyStaffCommandEffect | typeof MemberTeamIdentity | typeof MemberTournamentIdentity | typeof PromotionContact | typeof Promotion | typeof PromotionCreative | typeof PromotionTarget | typeof PromotionAdvertiser | typeof PromotionEvent | typeof PromotionUserState | typeof UserDomainEvent | typeof UserEventView)[];
18
+ export declare const DATABASE_ENTITIES: (typeof PasswordReset | typeof Notification | typeof User | typeof NotificationDelivery | typeof NotificationDispatchLog | typeof PushDeviceToken | typeof UserNotificationPreference | typeof TeamPlayerMergeHistory | typeof Team | typeof PlayerTeam | typeof Player | typeof TournamentMatchGoal | typeof TournamentTeam | typeof TournamentMatch | typeof TournamentPlayer | typeof TournamentMatchKit | typeof TournamentMatchSubstitution | typeof TournamentMatchTimeout | typeof TournamentPenaltyShootout | typeof AccessAuditEvent | typeof CategoryBroadcastSetting | typeof Tournament | typeof TournamentMatchReferee | typeof Referee | typeof RegulationExtraction | typeof TournamentAllowedPhone | typeof PhoneNumber | typeof TournamentBillingOutbox | typeof TournamentGroupContact | typeof TournamentCategoryGroup | typeof Organization | typeof TournamentContact | typeof Coupon | typeof CouponUsage | typeof TournamentCoupon | typeof TournamentCreationDraft | typeof FacilityImage | typeof Facility | typeof FieldImage | typeof Field | typeof Address | typeof TournamentFacility | typeof OrganizationUserBillingInfo | typeof City | typeof FacilityOwner | typeof TournamentFollow | typeof TournamentFormatConfig | typeof TournamentMatchObservation | typeof TournamentMatchPlayerNumber | typeof TournamentMatchRule | typeof TournamentMatchSchema | typeof TournamentMatchAvailability | typeof UserPaymentProvider | typeof PaymentProvider | typeof Payment | typeof TournamentPayment | typeof OrganizationUser | typeof TournamentPlayerRule | typeof TournamentPointsAdjustment | typeof TournamentPrizeRule | typeof TournamentPublicationChargeRule | typeof TournamentRegistrationRequest | typeof TournamentRegistrationRequirement | typeof TournamentRegulationFieldStatus | typeof TournamentRound | typeof TournamentTeamInvitation | typeof TournamentTeamMemberNote | typeof TournamentTieBreakConfig | typeof OrganizationMembership | typeof OrganizationMembershipScope | typeof TournamentGroup | typeof TournamentBracket | typeof TournamentBracketSlot | typeof TeamTrophy | typeof TournamentMatchCard | typeof TeamAccessCode | typeof TeamJoinRequest | typeof TeamKit | typeof TeamModality | typeof TeamSponsor | typeof TeamFollow | typeof PlayerPosition | typeof PlayerPersonalData | typeof UserAuthProvider | typeof RefreshToken | typeof UserLocality | typeof UserOnboardingIntent | typeof UserVerification | typeof BillingProduct | typeof BillingPlan | typeof BillingSubscriptionGrant | typeof BillingSubscription | typeof BillingSubscriptionItem | typeof BillingAccount | typeof BillingEvent | typeof BillingInvoice | typeof BillingInvoiceLineItem | typeof BillingMatchUsage | typeof BillingPayment | typeof BillingProviderWebhookEvent | typeof FeedActivityReaction | typeof FeedActivity | typeof FeedActivitySubject | typeof FeedArtRewarm | typeof FeedMedia | typeof FeedOutbox | typeof FeedPostAttachment | typeof FeedPost | typeof FeedPoll | typeof FeedPostRevision | typeof FeedPollOption | typeof FeedPollVote | typeof FeedReport | typeof FinanceAuditEvent | typeof FinanceEntryItem | typeof FinanceEntry | typeof FinanceLedger | typeof FriendlyBoardPreference | typeof FriendlyMatchAttendance | typeof FriendlyMatch | typeof FriendlyMatchExtra | typeof FriendlyMatchGoal | typeof FriendlyMatchMvp | typeof FriendlyMvpVote | typeof FriendlyOpenChallengeExtra | typeof FriendlyChallenge | typeof FriendlyStaffCommand | typeof FriendlyScoreEvent | typeof FriendlyChallengeExtra | typeof FriendlyHistory | typeof FriendlyRequest | typeof FriendlyStaffCommandEffect | typeof MemberTeamIdentity | typeof MemberTournamentIdentity | typeof PromotionContact | typeof Promotion | typeof PromotionCreative | typeof PromotionTarget | typeof PromotionAdvertiser | typeof PromotionEvent | typeof PromotionUserState | typeof UserDomainEvent | typeof UserEventView)[];
19
19
  //# 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,EACL,aAAa,EACb,YAAY,EACZ,IAAI,EACJ,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,cAAc,EACd,YAAY,EACZ,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,cAAc,EACd,2BAA2B,EAC3B,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,2BAA2B,EAC3B,WAAW,EACZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EACL,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,aAAa,EACb,KAAK,EACL,UAAU,EACX,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,EACb,SAAS,EACT,UAAU,EACV,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,kBAAkB,EAClB,gBAAg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Ae,EACf,sBAAsB,EACtB,eAAe,EACf,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,EAC1B,2BAA2B,EAC3B,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,2BAA2B,EAC3B,sBAAsB,EACtB,iBAAiB,EACjB,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,0BAA0B,EAC1B,mBAAmB,EACnB,+BAA+B,EAC/B,6BAA6B,EAC7B,iCAAiC,EAEjC,+BAA+B,EAC/B,eAAe,EAEf,cAAc,EACd,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEhE,eAAO,MAAM,iBAAiB,2qHAiJ7B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/database-entities/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,YAAY,EACZ,IAAI,EACJ,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,cAAc,EACd,YAAY,EACZ,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,cAAc,EACd,2BAA2B,EAC3B,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,sBAAsB,EACtB,2BAA2B,EAC3B,gBAAgB,EAChB,2BAA2B,EAC3B,WAAW,EACZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EACL,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,aAAa,EACb,KAAK,EACL,UAAU,EACX,MAAM,eAA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EACV,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EACf,sBAAsB,EACtB,eAAe,EACf,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,EAC1B,2BAA2B,EAC3B,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,2BAA2B,EAC3B,sBAAsB,EACtB,iBAAiB,EACjB,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,0BAA0B,EAC1B,mBAAmB,EACnB,+BAA+B,EAC/B,6BAA6B,EAC7B,iCAAiC,EAEjC,+BAA+B,EAC/B,eAAe,EAEf,cAAc,EACd,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEhE,eAAO,MAAM,iBAAiB,0wHAoJ7B,CAAC"}
@@ -22,7 +22,10 @@ import {
22
22
  BillingSubscriptionItem
23
23
  } from "../billing/index.js";
24
24
  import {
25
+ AccessAuditEvent,
25
26
  Organization,
27
+ OrganizationMembership,
28
+ OrganizationMembershipScope,
26
29
  OrganizationUser,
27
30
  OrganizationUserBillingInfo,
28
31
  PhoneNumber
@@ -191,7 +194,10 @@ const DATABASE_ENTITIES = [
191
194
  FinanceEntry,
192
195
  FinanceEntryItem,
193
196
  FinanceAuditEvent,
197
+ AccessAuditEvent,
194
198
  Organization,
199
+ OrganizationMembership,
200
+ OrganizationMembershipScope,
195
201
  OrganizationUser,
196
202
  OrganizationUserBillingInfo,
197
203
  PasswordReset,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natrave/shared-entities",
3
- "version": "9.8.0",
3
+ "version": "9.9.0",
4
4
  "description": "Entidades compartilhadass da NaTrave",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",