@natrave/shared-entities 7.32.0 → 7.34.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 (25) hide show
  1. package/dist/database-entities/index.d.ts +2 -2
  2. package/dist/database-entities/index.d.ts.map +1 -1
  3. package/dist/database-entities/index.js +2 -1
  4. package/dist/feed/feed-activities/feed-activity.entity.d.ts +2 -0
  5. package/dist/feed/feed-activities/feed-activity.entity.d.ts.map +1 -1
  6. package/dist/feed/feed-activities/feed-activity.entity.js +4 -0
  7. package/dist/feed/feed-activity-reactions/feed-activity-reaction.entity.d.ts +12 -0
  8. package/dist/feed/feed-activity-reactions/feed-activity-reaction.entity.d.ts.map +1 -0
  9. package/dist/feed/feed-activity-reactions/feed-activity-reaction.entity.js +92 -0
  10. package/dist/feed/feed-activity-reactions/index.d.ts +2 -0
  11. package/dist/feed/feed-activity-reactions/index.d.ts.map +1 -0
  12. package/dist/feed/feed-activity-reactions/index.js +4 -0
  13. package/dist/feed/index.d.ts +1 -0
  14. package/dist/feed/index.d.ts.map +1 -1
  15. package/dist/feed/index.js +1 -0
  16. package/dist/tournaments/tournament-matches/enums/match-creation-source.enum.d.ts +5 -0
  17. package/dist/tournaments/tournament-matches/enums/match-creation-source.enum.d.ts.map +1 -0
  18. package/dist/tournaments/tournament-matches/enums/match-creation-source.enum.js +8 -0
  19. package/dist/tournaments/tournament-matches/index.d.ts +1 -0
  20. package/dist/tournaments/tournament-matches/index.d.ts.map +1 -1
  21. package/dist/tournaments/tournament-matches/index.js +2 -0
  22. package/dist/tournaments/tournament-matches/tournament-match.entity.d.ts +5 -2
  23. package/dist/tournaments/tournament-matches/tournament-match.entity.d.ts.map +1 -1
  24. package/dist/tournaments/tournament-matches/tournament-match.entity.js +22 -4
  25. package/package.json +1 -1
@@ -3,7 +3,7 @@ import { BillingAccount, BillingEvent, BillingInvoice, BillingInvoiceLineItem, B
3
3
  import { Organization, 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
- import { FeedActivity, FeedActivitySubject, FeedOutbox } from '../feed';
6
+ import { FeedActivity, FeedActivityReaction, FeedActivitySubject, FeedOutbox } from '../feed';
7
7
  import { TeamPlayerMergeHistory } from '../history-logs';
8
8
  import { Notification, NotificationDelivery, NotificationDispatchLog, PushDeviceToken, UserNotificationPreference } from '../notifications';
9
9
  import { Payment, PaymentProvider, UserPaymentProvider } from '../payments';
@@ -11,5 +11,5 @@ import { Player, PlayerPersonalData, PlayerPosition } from '../players';
11
11
  import { PlayerTeam, Team, TeamAccessCode, TeamJoinRequest, TeamModality, TeamTrophy } from '../teams';
12
12
  import { RegulationExtraction, Tournament, TournamentAllowedPhone, TournamentBillingOutbox, TournamentBracket, TournamentBracketSlot, TournamentCategoryGroup, TournamentContact, TournamentCoupon, TournamentCreationDraft, TournamentFacility, TournamentFollow, TournamentFormatConfig, TournamentGroup, TournamentGroupContact, TournamentMatch, TournamentMatchAvailability, TournamentMatchCard, TournamentMatchGoal, TournamentMatchRule, TournamentMatchSchema, TournamentMatchSubstitution, TournamentPayment, TournamentPenaltyShootout, TournamentPlayer, TournamentPlayerRule, TournamentPrizeRule, TournamentPublicationChargeRule, TournamentRegistrationRequest, TournamentRegistrationRequirement, TournamentRegulationFieldStatus, TournamentTeam, TournamentTeamInvitation, TournamentTieBreakConfig } from '../tournaments';
13
13
  import { UserDomainEvent, UserEventView } from '../user-events';
14
- 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 TournamentMatchSubstitution | typeof TournamentPenaltyShootout | typeof RegulationExtraction | typeof Tournament | 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 TournamentMatchRule | typeof TournamentMatchSchema | typeof TournamentMatchAvailability | typeof UserPaymentProvider | typeof PaymentProvider | typeof Payment | typeof TournamentPayment | typeof OrganizationUser | typeof TournamentPlayerRule | typeof TournamentPrizeRule | typeof TournamentPublicationChargeRule | typeof TournamentRegistrationRequest | typeof TournamentRegistrationRequirement | typeof TournamentRegulationFieldStatus | typeof TournamentTeamInvitation | typeof TournamentTieBreakConfig | typeof Address | typeof OrganizationUserBillingInfo | typeof TournamentGroup | typeof TournamentBracket | typeof TournamentBracketSlot | typeof TeamTrophy | typeof TournamentMatchCard | typeof TeamAccessCode | typeof TeamJoinRequest | typeof TeamModality | typeof PlayerPosition | typeof PlayerPersonalData | typeof UserAuthProvider | typeof RefreshToken | typeof UserOnboardingIntent | typeof UserVerification | typeof BillingProduct | typeof BillingPlan | typeof BillingSubscriptionItem | typeof BillingSubscription | typeof BillingAccount | typeof BillingEvent | typeof BillingInvoice | typeof BillingInvoiceLineItem | typeof BillingPayment | typeof BillingProviderWebhookEvent | typeof FeedActivitySubject | typeof FeedActivity | typeof FeedOutbox | typeof UserDomainEvent | typeof UserEventView)[];
14
+ 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 TournamentMatchSubstitution | typeof TournamentPenaltyShootout | typeof RegulationExtraction | typeof Tournament | 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 TournamentMatchRule | typeof TournamentMatchSchema | typeof TournamentMatchAvailability | typeof UserPaymentProvider | typeof PaymentProvider | typeof Payment | typeof TournamentPayment | typeof OrganizationUser | typeof TournamentPlayerRule | typeof TournamentPrizeRule | typeof TournamentPublicationChargeRule | typeof TournamentRegistrationRequest | typeof TournamentRegistrationRequirement | typeof TournamentRegulationFieldStatus | typeof TournamentTeamInvitation | typeof TournamentTieBreakConfig | typeof Address | typeof OrganizationUserBillingInfo | typeof TournamentGroup | typeof TournamentBracket | typeof TournamentBracketSlot | typeof TeamTrophy | typeof TournamentMatchCard | typeof TeamAccessCode | typeof TeamJoinRequest | typeof TeamModality | typeof PlayerPosition | typeof PlayerPersonalData | typeof UserAuthProvider | typeof RefreshToken | typeof UserOnboardingIntent | typeof UserVerification | typeof BillingProduct | typeof BillingPlan | typeof BillingSubscriptionItem | typeof BillingSubscription | typeof BillingAccount | typeof BillingEvent | typeof BillingInvoice | typeof BillingInvoiceLineItem | typeof BillingPayment | typeof BillingProviderWebhookEvent | typeof FeedActivityReaction | typeof FeedActivity | typeof FeedActivitySubject | typeof FeedOutbox | typeof UserDomainEvent | typeof UserEventView)[];
15
15
  //# 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,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,aAA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AA2B,EAC3B,iBAAiB,EACjB,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,+BAA+B,EAC/B,6BAA6B,EAC7B,iCAAiC,EAEjC,+BAA+B,EAE/B,cAAc,EACd,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEhE,eAAO,MAAM,iBAAiB,+vEAyF7B,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,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,cAAc,EACd,YAAY,EACZ,cAAc,EACd,sBAAsB,EACtB,cAAc,EACd,WAAW,EACX,cAAc,EACd,2BAA2B,EAC3B,mBAAmB,EACnB,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,EAAE,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC9F,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,uBAAuB,EACvB,eAAe,EACf,0BAA0B,EAC3B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACxE,OAAO,EACL,UAAU,EACV,IAAI,EACJ,cAAc,EACd,eAAe,EACf,YAAY,EACZ,UAAU,EACX,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,oBAAoB,EACpB,UAAU,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,mBAAmB,EACnB,qBAAqB,EACrB,2BAA2B,EAC3B,iBAAiB,EACjB,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,+BAA+B,EAC/B,6BAA6B,EAC7B,iCAAiC,EAEjC,+BAA+B,EAE/B,cAAc,EACd,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEhE,eAAO,MAAM,iBAAiB,6xEA0F7B,CAAC"}
@@ -34,7 +34,7 @@ import {
34
34
  Field,
35
35
  FieldImage
36
36
  } from "../facilities/index.js";
37
- import { FeedActivity, FeedActivitySubject, FeedOutbox } from "../feed/index.js";
37
+ import { FeedActivity, FeedActivityReaction, FeedActivitySubject, FeedOutbox } from "../feed/index.js";
38
38
  import { TeamPlayerMergeHistory } from "../history-logs/index.js";
39
39
  import {
40
40
  Notification,
@@ -113,6 +113,7 @@ const DATABASE_ENTITIES = [
113
113
  Field,
114
114
  FieldImage,
115
115
  FeedActivity,
116
+ FeedActivityReaction,
116
117
  FeedActivitySubject,
117
118
  FeedOutbox,
118
119
  Organization,
@@ -1,4 +1,5 @@
1
1
  import { FeedVisibility } from '../enums';
2
+ import { FeedActivityReaction } from '../feed-activity-reactions';
2
3
  import { FeedActivitySubject } from '../feed-activity-subjects';
3
4
  export declare class FeedActivity {
4
5
  id: string;
@@ -12,5 +13,6 @@ export declare class FeedActivity {
12
13
  createdAt: Date;
13
14
  sourceEventId: string | null;
14
15
  subjects: FeedActivitySubject[];
16
+ reactions: FeedActivityReaction[];
15
17
  }
16
18
  //# sourceMappingURL=feed-activity.entity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feed-activity.entity.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-activities/feed-activity.entity.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAWhE,qBAMa,YAAY;IAKvB,EAAE,EAAE,MAAM,CAAC;IAQX,IAAI,EAAE,MAAM,CAAC;IAOb,OAAO,EAAE,MAAM,CAAC;IAOhB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAUjC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAS9B,UAAU,EAAE,cAAc,CAAC;IAU3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAOzB,UAAU,EAAE,IAAI,CAAC;IAQjB,SAAS,EAAE,IAAI,CAAC;IAShB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAK7B,QAAQ,EAAE,mBAAmB,EAAE,CAAC;CACjC"}
1
+ {"version":3,"file":"feed-activity.entity.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-activities/feed-activity.entity.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAWhE,qBAMa,YAAY;IAKvB,EAAE,EAAE,MAAM,CAAC;IAQX,IAAI,EAAE,MAAM,CAAC;IAOb,OAAO,EAAE,MAAM,CAAC;IAOhB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAUjC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAS9B,UAAU,EAAE,cAAc,CAAC;IAU3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAOzB,UAAU,EAAE,IAAI,CAAC;IAQjB,SAAS,EAAE,IAAI,CAAC;IAShB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAK7B,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAGhC,SAAS,EAAE,oBAAoB,EAAE,CAAC;CACnC"}
@@ -17,6 +17,7 @@ import {
17
17
  PrimaryGeneratedColumn
18
18
  } from "typeorm";
19
19
  import { FeedVisibility } from "../enums/index.js";
20
+ import { FeedActivityReaction } from "../feed-activity-reactions/index.js";
20
21
  import { FeedActivitySubject } from "../feed-activity-subjects/index.js";
21
22
  let FeedActivity = class {
22
23
  };
@@ -100,6 +101,9 @@ __decorateClass([
100
101
  __decorateClass([
101
102
  OneToMany(() => FeedActivitySubject, (subject) => subject.activity)
102
103
  ], FeedActivity.prototype, "subjects", 2);
104
+ __decorateClass([
105
+ OneToMany(() => FeedActivityReaction, (reaction) => reaction.activity)
106
+ ], FeedActivity.prototype, "reactions", 2);
103
107
  FeedActivity = __decorateClass([
104
108
  Entity("feed_activities"),
105
109
  Index("IDX_feed_activities_occurred_at", ["occurredAt"]),
@@ -0,0 +1,12 @@
1
+ import { User } from '../../app-auth';
2
+ import { FeedActivity } from '../feed-activities';
3
+ export declare class FeedActivityReaction {
4
+ activityId: string;
5
+ userId: string;
6
+ reaction: string;
7
+ createdAt: Date;
8
+ updatedAt: Date;
9
+ activity: FeedActivity;
10
+ user: User;
11
+ }
12
+ //# sourceMappingURL=feed-activity-reaction.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feed-activity-reaction.entity.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-activity-reactions/feed-activity-reaction.entity.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAiBlD,qBASa,oBAAoB;IAO/B,UAAU,EAAE,MAAM,CAAC;IAQnB,MAAM,EAAE,MAAM,CAAC;IAQf,QAAQ,EAAE,MAAM,CAAC;IAQjB,SAAS,EAAE,IAAI,CAAC;IAQhB,SAAS,EAAE,IAAI,CAAC;IAShB,QAAQ,EAAE,YAAY,CAAC;IAOvB,IAAI,EAAE,IAAI,CAAC;CACZ"}
@@ -0,0 +1,92 @@
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
+ PrimaryColumn,
20
+ UpdateDateColumn
21
+ } from "typeorm";
22
+ import { User } from "../../app-auth/index.js";
23
+ import { FeedActivity } from "../feed-activities/index.js";
24
+ let FeedActivityReaction = class {
25
+ };
26
+ __decorateClass([
27
+ PrimaryColumn({
28
+ name: "activity_id",
29
+ type: "bigint",
30
+ primaryKeyConstraintName: "PK_feed_activity_reactions",
31
+ comment: "FK feed_activities.id."
32
+ })
33
+ ], FeedActivityReaction.prototype, "activityId", 2);
34
+ __decorateClass([
35
+ PrimaryColumn({
36
+ name: "user_id",
37
+ type: "uuid",
38
+ primaryKeyConstraintName: "PK_feed_activity_reactions",
39
+ comment: "FK users.id. Uma rea\xE7\xE3o por usu\xE1rio por card."
40
+ })
41
+ ], FeedActivityReaction.prototype, "userId", 2);
42
+ __decorateClass([
43
+ Column({
44
+ type: "varchar",
45
+ length: 40,
46
+ comment: "Chave est\xE1vel da rea\xE7\xE3o (ex.: GOLACO). Validade por tipo de card \xE9 do cat\xE1logo em c\xF3digo."
47
+ })
48
+ ], FeedActivityReaction.prototype, "reaction", 2);
49
+ __decorateClass([
50
+ CreateDateColumn({
51
+ name: "created_at",
52
+ type: "timestamptz",
53
+ default: () => "now()",
54
+ comment: "Data/hora da primeira rea\xE7\xE3o do usu\xE1rio neste card."
55
+ })
56
+ ], FeedActivityReaction.prototype, "createdAt", 2);
57
+ __decorateClass([
58
+ UpdateDateColumn({
59
+ name: "updated_at",
60
+ type: "timestamptz",
61
+ default: () => "now()",
62
+ comment: "Data/hora da \xFAltima troca de rea\xE7\xE3o do usu\xE1rio neste card."
63
+ })
64
+ ], FeedActivityReaction.prototype, "updatedAt", 2);
65
+ __decorateClass([
66
+ ManyToOne(() => FeedActivity, (activity) => activity.reactions, { onDelete: "CASCADE" }),
67
+ JoinColumn({
68
+ name: "activity_id",
69
+ foreignKeyConstraintName: "FK_feed_activity_reactions_activity"
70
+ })
71
+ ], FeedActivityReaction.prototype, "activity", 2);
72
+ __decorateClass([
73
+ ManyToOne(() => User, { onDelete: "CASCADE" }),
74
+ JoinColumn({
75
+ name: "user_id",
76
+ foreignKeyConstraintName: "FK_feed_activity_reactions_user"
77
+ })
78
+ ], FeedActivityReaction.prototype, "user", 2);
79
+ FeedActivityReaction = __decorateClass([
80
+ Entity("feed_activity_reactions"),
81
+ Index("IDX_feed_activity_reactions_user", ["userId"]),
82
+ Index("IDX_feed_activity_reactions_activity_reaction_recent", [
83
+ "activityId",
84
+ "reaction",
85
+ "createdAt",
86
+ "userId"
87
+ ]),
88
+ Check("CHK_feed_activity_reactions_reaction_format", `"reaction" ~ '^[A-Z][A-Z0-9_]{1,39}$'`)
89
+ ], FeedActivityReaction);
90
+ export {
91
+ FeedActivityReaction
92
+ };
@@ -0,0 +1,2 @@
1
+ export { FeedActivityReaction } from './feed-activity-reaction.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-activity-reactions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FeedActivityReaction } from "./feed-activity-reaction.entity.js";
2
+ export {
3
+ FeedActivityReaction
4
+ };
@@ -1,5 +1,6 @@
1
1
  export * from './enums';
2
2
  export * from './feed-activities';
3
+ export * from './feed-activity-reactions';
3
4
  export * from './feed-activity-subjects';
4
5
  export * from './feed-outbox';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/feed/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/feed/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from "./enums/index.js";
2
2
  export * from "./feed-activities/index.js";
3
+ export * from "./feed-activity-reactions/index.js";
3
4
  export * from "./feed-activity-subjects/index.js";
4
5
  export * from "./feed-outbox/index.js";
@@ -0,0 +1,5 @@
1
+ export declare enum MatchCreationSource {
2
+ TABLE_GENERATION = "table_generation",
3
+ ORGANIZER = "organizer"
4
+ }
5
+ //# sourceMappingURL=match-creation-source.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"match-creation-source.enum.d.ts","sourceRoot":"","sources":["../../../../src/tournaments/tournament-matches/enums/match-creation-source.enum.ts"],"names":[],"mappings":"AAUA,oBAAY,mBAAmB;IAK7B,gBAAgB,qBAAqB;IAKrC,SAAS,cAAc;CACxB"}
@@ -0,0 +1,8 @@
1
+ var MatchCreationSource = /* @__PURE__ */ ((MatchCreationSource2) => {
2
+ MatchCreationSource2["TABLE_GENERATION"] = "table_generation";
3
+ MatchCreationSource2["ORGANIZER"] = "organizer";
4
+ return MatchCreationSource2;
5
+ })(MatchCreationSource || {});
6
+ export {
7
+ MatchCreationSource
8
+ };
@@ -1,3 +1,4 @@
1
+ export { MatchCreationSource } from './enums/match-creation-source.enum';
1
2
  export { MatchScoresheetSource } from './enums/match-scoresheet-source.enum';
2
3
  export { TournamentMatch } from './tournament-match.entity';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-matches/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-matches/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC"}
@@ -1,6 +1,8 @@
1
+ import { MatchCreationSource } from "./enums/match-creation-source.enum.js";
1
2
  import { MatchScoresheetSource } from "./enums/match-scoresheet-source.enum.js";
2
3
  import { TournamentMatch } from "./tournament-match.entity.js";
3
4
  export {
5
+ MatchCreationSource,
4
6
  MatchScoresheetSource,
5
7
  TournamentMatch
6
8
  };
@@ -1,4 +1,4 @@
1
- import { ITournamentMatch, MatchStatus, TournamentMatchPhase } from '@natrave/tournaments-service-types';
1
+ import { MatchStatus, TournamentMatchPhase } from '@natrave/tournaments-service-types';
2
2
  import { TournamentBracket } from '../tournament-brackets';
3
3
  import { TournamentFacility } from '../tournament-facilities';
4
4
  import { TournamentMatchCard } from '../tournament-match-cards';
@@ -7,8 +7,9 @@ import { TournamentMatchSubstitution } from '../tournament-match-substitutions';
7
7
  import { TournamentPenaltyShootout } from '../tournament-penalty-shootouts';
8
8
  import { TournamentTeam } from '../tournament-teams';
9
9
  import { Tournament } from '../tournaments';
10
+ import { MatchCreationSource } from './enums/match-creation-source.enum';
10
11
  import { MatchScoresheetSource } from './enums/match-scoresheet-source.enum';
11
- export declare class TournamentMatch implements ITournamentMatch {
12
+ export declare class TournamentMatch {
12
13
  id: number;
13
14
  tournamentId: number;
14
15
  homeTeamId: number | null;
@@ -31,6 +32,8 @@ export declare class TournamentMatch implements ITournamentMatch {
31
32
  advancingTeamId: number | null;
32
33
  advancementReason: string | null;
33
34
  scoresheetSource: MatchScoresheetSource | null;
35
+ creationSource: MatchCreationSource;
36
+ createdByOrganizationUserId: number | null;
34
37
  facility?: TournamentFacility;
35
38
  tournament: Tournament;
36
39
  homeTeam: TournamentTeam;
@@ -1 +1 @@
1
- {"version":3,"file":"tournament-match.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-matches/tournament-match.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,oBAAoB,EACrB,MAAM,oCAAoC,CAAC;AAe5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,2BAA2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if (kind && result) __defProp(target, key, result);
9
9
  return result;
10
10
  };
11
- import {
12
- MatchStatus,
13
- TournamentMatchPhase
14
- } from "@natrave/tournaments-service-types";
11
+ import { MatchStatus, TournamentMatchPhase } from "@natrave/tournaments-service-types";
15
12
  import {
16
13
  Check,
17
14
  Column,
@@ -33,6 +30,7 @@ import { TournamentMatchSubstitution } from "../tournament-match-substitutions/i
33
30
  import { TournamentPenaltyShootout } from "../tournament-penalty-shootouts/index.js";
34
31
  import { TournamentTeam } from "../tournament-teams/index.js";
35
32
  import { Tournament } from "../tournaments/index.js";
33
+ import { MatchCreationSource } from "./enums/match-creation-source.enum.js";
36
34
  import { MatchScoresheetSource } from "./enums/match-scoresheet-source.enum.js";
37
35
  let TournamentMatch = class {
38
36
  };
@@ -205,6 +203,23 @@ __decorateClass([
205
203
  comment: "Origem da s\xFAmula usada para finalizar a partida: ao vivo ou p\xF3s-jogo."
206
204
  })
207
205
  ], TournamentMatch.prototype, "scoresheetSource", 2);
206
+ __decorateClass([
207
+ Column({
208
+ name: "creation_source",
209
+ type: "enum",
210
+ enum: MatchCreationSource,
211
+ default: MatchCreationSource.TABLE_GENERATION,
212
+ comment: "Quem originou a partida: a gera\xE7\xE3o de tabela do campeonato, ou o organizador criando um jogo extra \xE0 m\xE3o. NOT NULL com default \u2014 quem gera a tabela n\xE3o precisa conhecer a coluna, e as partidas anteriores a ela ficam como geradas, que \xE9 o que de fato eram."
213
+ })
214
+ ], TournamentMatch.prototype, "creationSource", 2);
215
+ __decorateClass([
216
+ Column({
217
+ name: "created_by_organization_user_id",
218
+ type: "int",
219
+ nullable: true,
220
+ comment: "organization_users.id de quem criou a partida \xE0 m\xE3o. Sem FK declarada (tabela de outro servi\xE7o), no mesmo padr\xE3o de tournament_players.called_up_by_organization_user_id. NULL quando a partida veio da gera\xE7\xE3o de tabela."
221
+ })
222
+ ], TournamentMatch.prototype, "createdByOrganizationUserId", 2);
208
223
  __decorateClass([
209
224
  ManyToOne(() => TournamentFacility, (facility) => facility.matches, {
210
225
  onDelete: "SET NULL"
@@ -275,6 +290,9 @@ TournamentMatch = __decorateClass([
275
290
  Index("idx_tournament_matches_forfeited_by_team", ["tournamentId", "forfeitedByTeamId"], {
276
291
  where: `"status" = 'WALKOVER'`
277
292
  }),
293
+ Index("idx_tournament_matches_organizer_created", ["tournamentId"], {
294
+ where: `"creation_source" = 'organizer'`
295
+ }),
278
296
  Check(`
279
297
  (
280
298
  (status = 'WALKOVER' AND forfeited_by_team_id IS NOT NULL)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natrave/shared-entities",
3
- "version": "7.32.0",
3
+ "version": "7.34.0",
4
4
  "description": "Entidades compartilhadass da NaTrave",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",