@natrave/shared-entities 9.3.0 → 9.5.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 (43) 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 +16 -1
  4. package/dist/feed/feed-activities/feed-activity.entity.d.ts +3 -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 +31 -1
  7. package/dist/feed/feed-activity-subjects/feed-activity-subject.entity.d.ts +1 -0
  8. package/dist/feed/feed-activity-subjects/feed-activity-subject.entity.d.ts.map +1 -1
  9. package/dist/feed/feed-activity-subjects/feed-activity-subject.entity.js +8 -0
  10. package/dist/feed/feed-art-rewarms/feed-art-rewarm.entity.d.ts +7 -0
  11. package/dist/feed/feed-art-rewarms/feed-art-rewarm.entity.d.ts.map +1 -0
  12. package/dist/feed/feed-art-rewarms/feed-art-rewarm.entity.js +49 -0
  13. package/dist/feed/feed-art-rewarms/index.d.ts +2 -0
  14. package/dist/feed/feed-art-rewarms/index.d.ts.map +1 -0
  15. package/dist/feed/feed-art-rewarms/index.js +4 -0
  16. package/dist/feed/feed-media/feed-media.entity.d.ts +22 -0
  17. package/dist/feed/feed-media/feed-media.entity.d.ts.map +1 -0
  18. package/dist/feed/feed-media/feed-media.entity.js +163 -0
  19. package/dist/feed/feed-media/index.d.ts +2 -0
  20. package/dist/feed/feed-media/index.d.ts.map +1 -0
  21. package/dist/feed/feed-media/index.js +4 -0
  22. package/dist/feed/feed-post-attachments/feed-post-attachment.entity.d.ts +16 -0
  23. package/dist/feed/feed-post-attachments/feed-post-attachment.entity.d.ts.map +1 -0
  24. package/dist/feed/feed-post-attachments/feed-post-attachment.entity.js +121 -0
  25. package/dist/feed/feed-post-attachments/index.d.ts +2 -0
  26. package/dist/feed/feed-post-attachments/index.d.ts.map +1 -0
  27. package/dist/feed/feed-post-attachments/index.js +4 -0
  28. package/dist/feed/feed-post-revisions/feed-post-revision.entity.d.ts +15 -0
  29. package/dist/feed/feed-post-revisions/feed-post-revision.entity.d.ts.map +1 -0
  30. package/dist/feed/feed-post-revisions/feed-post-revision.entity.js +109 -0
  31. package/dist/feed/feed-post-revisions/index.d.ts +2 -0
  32. package/dist/feed/feed-post-revisions/index.d.ts.map +1 -0
  33. package/dist/feed/feed-post-revisions/index.js +4 -0
  34. package/dist/feed/feed-posts/feed-post.entity.d.ts +33 -0
  35. package/dist/feed/feed-posts/feed-post.entity.d.ts.map +1 -0
  36. package/dist/feed/feed-posts/feed-post.entity.js +238 -0
  37. package/dist/feed/feed-posts/index.d.ts +2 -0
  38. package/dist/feed/feed-posts/index.d.ts.map +1 -0
  39. package/dist/feed/feed-posts/index.js +4 -0
  40. package/dist/feed/index.d.ts +5 -0
  41. package/dist/feed/index.d.ts.map +1 -1
  42. package/dist/feed/index.js +5 -0
  43. 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, FeedActivityReaction, FeedActivitySubject, FeedOutbox } from '../feed';
6
+ import { FeedActivity, FeedActivityReaction, FeedActivitySubject, FeedArtRewarm, FeedMedia, FeedOutbox, FeedPost, FeedPostAttachment, FeedPostRevision } from '../feed';
7
7
  import { FinanceAuditEvent, FinanceEntry, FinanceEntryItem, FinanceLedger } from '../finance';
8
8
  import { FriendlyBoardPreference, FriendlyChallenge, FriendlyChallengeExtra, FriendlyHistory, FriendlyMatch, FriendlyMatchAttendance, FriendlyMatchExtra, FriendlyMatchGoal, FriendlyMatchMvp, FriendlyMvpVote, FriendlyOpenChallengeExtra, FriendlyRequest, FriendlyScoreEvent, FriendlyStaffCommand, FriendlyStaffCommandEffect } from '../friendlies';
9
9
  import { TeamPlayerMergeHistory } from '../history-logs';
@@ -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 FeedOutbox | 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 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 FeedPostRevision | typeof FeedPost | typeof FeedPostAttachment | 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.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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,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC9F,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,EACtB,eAAe,EACf,aAAa,EACb,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EAEf,0BAA0B,EAC1B,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,0BAA0B,EAC3B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,aA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MAAM,gBAAgB,CAAC;AAEhE,eAAO,MAAM,iBAAiB,ulHA6I7B,CAAC"}
@@ -37,7 +37,17 @@ import {
37
37
  Field,
38
38
  FieldImage
39
39
  } from "../facilities/index.js";
40
- import { FeedActivity, FeedActivityReaction, FeedActivitySubject, FeedOutbox } from "../feed/index.js";
40
+ import {
41
+ FeedActivity,
42
+ FeedActivityReaction,
43
+ FeedActivitySubject,
44
+ FeedArtRewarm,
45
+ FeedMedia,
46
+ FeedOutbox,
47
+ FeedPost,
48
+ FeedPostAttachment,
49
+ FeedPostRevision
50
+ } from "../feed/index.js";
41
51
  import { FinanceAuditEvent, FinanceEntry, FinanceEntryItem, FinanceLedger } from "../finance/index.js";
42
52
  import {
43
53
  FriendlyBoardPreference,
@@ -163,7 +173,12 @@ const DATABASE_ENTITIES = [
163
173
  FeedActivity,
164
174
  FeedActivityReaction,
165
175
  FeedActivitySubject,
176
+ FeedArtRewarm,
177
+ FeedMedia,
166
178
  FeedOutbox,
179
+ FeedPost,
180
+ FeedPostAttachment,
181
+ FeedPostRevision,
167
182
  FinanceLedger,
168
183
  FinanceEntry,
169
184
  FinanceEntryItem,
@@ -12,6 +12,9 @@ export declare class FeedActivity {
12
12
  occurredAt: Date;
13
13
  createdAt: Date;
14
14
  sourceEventId: string | null;
15
+ removedAt: Date | null;
16
+ removedByOrganizationUserId: string | null;
17
+ removedSource: string | null;
15
18
  subjects: FeedActivitySubject[];
16
19
  reactions: FeedActivityReaction[];
17
20
  }
@@ -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,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAWhE,qBAMa,YAAY;IAKvB,EAAE,EAAE,MAAM,CAAC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,mBAAmB,EAAE,CAAC;IAGhC,SAAS,EAAE,oBAAoB,EAAE,CAAC;CACnC"}
@@ -9,6 +9,7 @@ var __decorateClass = (decorators, target, key, kind) => {
9
9
  return result;
10
10
  };
11
11
  import {
12
+ Check,
12
13
  Column,
13
14
  CreateDateColumn,
14
15
  Entity,
@@ -98,6 +99,31 @@ __decorateClass([
98
99
  comment: "Id da linha do feed_outbox do \xFAltimo evento aplicado a este card (watermark de ordem). O worker s\xF3 atualiza o card via upsert se o id do evento recebido for >= a este, evitando que um evento reprocessado fora de ordem reverta o card."
99
100
  })
100
101
  ], FeedActivity.prototype, "sourceEventId", 2);
102
+ __decorateClass([
103
+ Column({
104
+ name: "removed_at",
105
+ type: "timestamptz",
106
+ nullable: true,
107
+ comment: "Quando o card foi ocultado. Nulo = vis\xEDvel."
108
+ })
109
+ ], FeedActivity.prototype, "removedAt", 2);
110
+ __decorateClass([
111
+ Column({
112
+ name: "removed_by_organization_user_id",
113
+ type: "bigint",
114
+ nullable: true,
115
+ comment: "Quem ocultou (auditoria). Sem FK de prop\xF3sito: o usu\xE1rio de organiza\xE7\xE3o mora no auth-service e o hist\xF3rico n\xE3o pode travar a remo\xE7\xE3o de um usu\xE1rio l\xE1."
116
+ })
117
+ ], FeedActivity.prototype, "removedByOrganizationUserId", 2);
118
+ __decorateClass([
119
+ Column({
120
+ name: "removed_source",
121
+ type: "varchar",
122
+ length: 16,
123
+ nullable: true,
124
+ comment: "Quem ocultou o card: organizer (organizador do campeonato) ou staff (equipe, exclus\xE3o de amistoso). NULL com removed_at preenchido = organizador (linhas antigas)."
125
+ })
126
+ ], FeedActivity.prototype, "removedSource", 2);
101
127
  __decorateClass([
102
128
  OneToMany(() => FeedActivitySubject, (subject) => subject.activity)
103
129
  ], FeedActivity.prototype, "subjects", 2);
@@ -110,7 +136,11 @@ FeedActivity = __decorateClass([
110
136
  Index("UQ_feed_activities_dedupe_key", ["dedupeKey"], {
111
137
  unique: true,
112
138
  where: '"dedupe_key" IS NOT NULL'
113
- })
139
+ }),
140
+ Check(
141
+ "CHK_feed_activities_removed_source",
142
+ `"removed_source" IS NULL OR "removed_source" IN ('organizer', 'staff')`
143
+ )
114
144
  ], FeedActivity);
115
145
  export {
116
146
  FeedActivity
@@ -5,6 +5,7 @@ export declare class FeedActivitySubject {
5
5
  subjectType: FeedSubjectType;
6
6
  subjectId: string;
7
7
  role: FeedSubjectRole | null;
8
+ occurredAt: Date | null;
8
9
  activity: FeedActivity;
9
10
  }
10
11
  //# sourceMappingURL=feed-activity-subject.entity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feed-activity-subject.entity.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-activity-subjects/feed-activity-subject.entity.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAclD,qBAEa,mBAAmB;IAM9B,UAAU,EAAE,MAAM,CAAC;IASnB,WAAW,EAAE,eAAe,CAAC;IAO7B,SAAS,EAAE,MAAM,CAAC;IAUlB,IAAI,EAAE,eAAe,GAAG,IAAI,CAAC;IAM7B,QAAQ,EAAE,YAAY,CAAC;CACxB"}
1
+ {"version":3,"file":"feed-activity-subject.entity.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-activity-subjects/feed-activity-subject.entity.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAclD,qBAEa,mBAAmB;IAM9B,UAAU,EAAE,MAAM,CAAC;IASnB,WAAW,EAAE,eAAe,CAAC;IAO7B,SAAS,EAAE,MAAM,CAAC;IAUlB,IAAI,EAAE,eAAe,GAAG,IAAI,CAAC;IAkB7B,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;IAMxB,QAAQ,EAAE,YAAY,CAAC;CACxB"}
@@ -45,6 +45,14 @@ __decorateClass([
45
45
  comment: "Papel da entidade na activity (PRIMARY = entidade principal, RELATED = entidade relacionada). \xDAtil para renderiza\xE7\xE3o do card."
46
46
  })
47
47
  ], FeedActivitySubject.prototype, "role", 2);
48
+ __decorateClass([
49
+ Column({
50
+ name: "occurred_at",
51
+ type: "timestamptz",
52
+ nullable: true,
53
+ comment: "C\xF3pia de feed_activities.occurred_at, para ler o assunto j\xE1 ordenado. Nula at\xE9 o preenchimento terminar; depois vira NOT NULL. Nunca muda."
54
+ })
55
+ ], FeedActivitySubject.prototype, "occurredAt", 2);
48
56
  __decorateClass([
49
57
  ManyToOne(() => FeedActivity, (activity) => activity.subjects, { onDelete: "CASCADE" }),
50
58
  JoinColumn({ name: "activity_id" })
@@ -0,0 +1,7 @@
1
+ export declare class FeedArtRewarm {
2
+ templateVersion: string;
3
+ claimedAt: Date;
4
+ finishedAt: Date | null;
5
+ arts: number | null;
6
+ }
7
+ //# sourceMappingURL=feed-art-rewarm.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feed-art-rewarm.entity.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-art-rewarms/feed-art-rewarm.entity.ts"],"names":[],"mappings":"AAcA,qBACa,aAAa;IAOxB,eAAe,EAAE,MAAM,CAAC;IAQxB,SAAS,EAAE,IAAI,CAAC;IAQhB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;IAOxB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB"}
@@ -0,0 +1,49 @@
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 { Column, Entity, PrimaryColumn } from "typeorm";
12
+ let FeedArtRewarm = class {
13
+ };
14
+ __decorateClass([
15
+ PrimaryColumn({
16
+ name: "template_version",
17
+ type: "text",
18
+ primaryKeyConstraintName: "feed_art_rewarms_pkey",
19
+ comment: "Vers\xE3o dos desenhos (ARTS_TEMPLATE_VERSION do image-service) que foi reaquecida."
20
+ })
21
+ ], FeedArtRewarm.prototype, "templateVersion", 2);
22
+ __decorateClass([
23
+ Column({
24
+ name: "claimed_at",
25
+ type: "timestamptz",
26
+ comment: "Quando a r\xE9plica reservou. Reserva sem finished_at antiga (r\xE9plica que caiu no meio) pode ser tomada por outra."
27
+ })
28
+ ], FeedArtRewarm.prototype, "claimedAt", 2);
29
+ __decorateClass([
30
+ Column({
31
+ name: "finished_at",
32
+ type: "timestamptz",
33
+ nullable: true,
34
+ comment: "Quando terminou. Nulo = reservada e ainda em andamento (ou abandonada)."
35
+ })
36
+ ], FeedArtRewarm.prototype, "finishedAt", 2);
37
+ __decorateClass([
38
+ Column({
39
+ type: "int",
40
+ nullable: true,
41
+ comment: "Quantas artes foram pedidas ao image-service nesta rodada."
42
+ })
43
+ ], FeedArtRewarm.prototype, "arts", 2);
44
+ FeedArtRewarm = __decorateClass([
45
+ Entity("feed_art_rewarms")
46
+ ], FeedArtRewarm);
47
+ export {
48
+ FeedArtRewarm
49
+ };
@@ -0,0 +1,2 @@
1
+ export { FeedArtRewarm } from './feed-art-rewarm.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-art-rewarms/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FeedArtRewarm } from "./feed-art-rewarm.entity.js";
2
+ export {
3
+ FeedArtRewarm
4
+ };
@@ -0,0 +1,22 @@
1
+ export declare class FeedMedia {
2
+ id: string;
3
+ organizationId: string;
4
+ uploadedByKind: string;
5
+ uploadedById: string;
6
+ kind: string;
7
+ status: string;
8
+ mimeType: string | null;
9
+ bytes: string | null;
10
+ width: number | null;
11
+ height: number | null;
12
+ durationMs: number | null;
13
+ storageKey: string | null;
14
+ variants: Record<string, unknown> | null;
15
+ placeholder: Record<string, unknown> | null;
16
+ sha256: string | null;
17
+ moderation: Record<string, unknown> | null;
18
+ createdAt: Date;
19
+ readyAt: Date | null;
20
+ deletedAt: Date | null;
21
+ }
22
+ //# sourceMappingURL=feed-media.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feed-media.entity.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-media/feed-media.entity.ts"],"names":[],"mappings":"AA+BA,qBAOa,SAAS;IAKpB,EAAE,EAAE,MAAM,CAAC;IAQX,cAAc,EAAE,MAAM,CAAC;IAQvB,cAAc,EAAE,MAAM,CAAC;IAQvB,YAAY,EAAE,MAAM,CAAC;IAQrB,IAAI,EAAE,MAAM,CAAC;IAQb,MAAM,EAAE,MAAM,CAAC;IASf,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAOxB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAGrB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAGrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAQtB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAS1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ1B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAOzC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAO5C,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAQtB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAQ3C,SAAS,EAAE,IAAI,CAAC;IAQhB,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;IAQrB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;CACxB"}
@@ -0,0 +1,163 @@
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, Entity, Index, PrimaryGeneratedColumn } from "typeorm";
12
+ const quoted = (values) => values.map((value) => `'${value}'`).join(", ");
13
+ const UPLOADED_BY_KINDS = quoted(["ORGANIZATION_USER", "STAFF", "AUTOMATION", "APP_USER"]);
14
+ const KINDS = quoted(["IMAGE", "VIDEO"]);
15
+ const STATUSES = quoted(["PENDING_UPLOAD", "PROCESSING", "READY", "REJECTED", "FAILED"]);
16
+ let FeedMedia = class {
17
+ };
18
+ __decorateClass([
19
+ PrimaryGeneratedColumn("uuid", {
20
+ primaryKeyConstraintName: "PK_feed_media",
21
+ comment: "Identificador da m\xEDdia. Reservado no POST /media."
22
+ })
23
+ ], FeedMedia.prototype, "id", 2);
24
+ __decorateClass([
25
+ Column({
26
+ name: "organization_id",
27
+ type: "bigint",
28
+ comment: "Organiza\xE7\xE3o dona da m\xEDdia (sem FK: mora no auth-service). M\xEDdia n\xE3o cruza organiza\xE7\xE3o."
29
+ })
30
+ ], FeedMedia.prototype, "organizationId", 2);
31
+ __decorateClass([
32
+ Column({
33
+ name: "uploaded_by_kind",
34
+ type: "varchar",
35
+ length: 32,
36
+ comment: "Tipo de quem enviou (ORGANIZATION_USER, STAFF, AUTOMATION, APP_USER)."
37
+ })
38
+ ], FeedMedia.prototype, "uploadedByKind", 2);
39
+ __decorateClass([
40
+ Column({
41
+ name: "uploaded_by_id",
42
+ type: "text",
43
+ comment: "Id de quem enviou, em texto porque cada tipo tem um espa\xE7o de id diferente. Sem FK, como feed_posts.author_id."
44
+ })
45
+ ], FeedMedia.prototype, "uploadedById", 2);
46
+ __decorateClass([
47
+ Column({
48
+ type: "varchar",
49
+ length: 16,
50
+ default: "IMAGE",
51
+ comment: "IMAGE agora; VIDEO depois."
52
+ })
53
+ ], FeedMedia.prototype, "kind", 2);
54
+ __decorateClass([
55
+ Column({
56
+ type: "varchar",
57
+ length: 24,
58
+ default: "PENDING_UPLOAD",
59
+ comment: "Ciclo: PENDING_UPLOAD, PROCESSING, READY, REJECTED (filtro de imagem) ou FAILED."
60
+ })
61
+ ], FeedMedia.prototype, "status", 2);
62
+ __decorateClass([
63
+ Column({
64
+ name: "mime_type",
65
+ type: "varchar",
66
+ length: 100,
67
+ nullable: true,
68
+ comment: "Tipo do arquivo, conferido pelos primeiros bytes no /complete."
69
+ })
70
+ ], FeedMedia.prototype, "mimeType", 2);
71
+ __decorateClass([
72
+ Column({
73
+ type: "bigint",
74
+ nullable: true,
75
+ comment: "Tamanho do envio em bytes (bigint para caber v\xEDdeo depois)."
76
+ })
77
+ ], FeedMedia.prototype, "bytes", 2);
78
+ __decorateClass([
79
+ Column({ type: "int", nullable: true, comment: "Largura em pixels do original." })
80
+ ], FeedMedia.prototype, "width", 2);
81
+ __decorateClass([
82
+ Column({ type: "int", nullable: true, comment: "Altura em pixels do original." })
83
+ ], FeedMedia.prototype, "height", 2);
84
+ __decorateClass([
85
+ Column({
86
+ name: "duration_ms",
87
+ type: "int",
88
+ nullable: true,
89
+ comment: "Dura\xE7\xE3o em milissegundos. S\xF3 em v\xEDdeo."
90
+ })
91
+ ], FeedMedia.prototype, "durationMs", 2);
92
+ __decorateClass([
93
+ Column({
94
+ name: "storage_key",
95
+ type: "text",
96
+ nullable: true,
97
+ comment: "Chave do envio no bucket (feed/<ambiente>/incoming/<mediaId>), nunca URL. Nula porque o original n\xE3o \xE9 guardado: o image-service apaga o envio depois de gerar os tamanhos."
98
+ })
99
+ ], FeedMedia.prototype, "storageKey", 2);
100
+ __decorateClass([
101
+ Column({
102
+ type: "jsonb",
103
+ nullable: true,
104
+ comment: 'S\xF3 chaves e tamanhos gerados pelo image-service, ex.: {"thumb":{key,w,h},"feed":{key,w,h}}. V\xEDdeo ganha poster e hls. Nenhuma URL gravada.'
105
+ })
106
+ ], FeedMedia.prototype, "variants", 2);
107
+ __decorateClass([
108
+ Column({
109
+ type: "jsonb",
110
+ nullable: true,
111
+ comment: "Marcador de carregamento: cor m\xE9dia e blurhash."
112
+ })
113
+ ], FeedMedia.prototype, "placeholder", 2);
114
+ __decorateClass([
115
+ Column({
116
+ type: "text",
117
+ nullable: true,
118
+ comment: "Hash do arquivo enviado: permite achar o mesmo arquivo enviado duas vezes."
119
+ })
120
+ ], FeedMedia.prototype, "sha256", 2);
121
+ __decorateClass([
122
+ Column({
123
+ type: "jsonb",
124
+ nullable: true,
125
+ comment: "Veredito do filtro de imagem: { verdict: PASS, REVIEW ou BLOCK, labels (nome, categoria pai, n\xEDvel, certeza), modelVersion, checkedAt }."
126
+ })
127
+ ], FeedMedia.prototype, "moderation", 2);
128
+ __decorateClass([
129
+ Column({
130
+ name: "created_at",
131
+ type: "timestamptz",
132
+ default: () => "now()",
133
+ comment: "Data/hora da reserva."
134
+ })
135
+ ], FeedMedia.prototype, "createdAt", 2);
136
+ __decorateClass([
137
+ Column({
138
+ name: "ready_at",
139
+ type: "timestamptz",
140
+ nullable: true,
141
+ comment: "Data/hora em que a m\xEDdia ficou READY."
142
+ })
143
+ ], FeedMedia.prototype, "readyAt", 2);
144
+ __decorateClass([
145
+ Column({
146
+ name: "deleted_at",
147
+ type: "timestamptz",
148
+ nullable: true,
149
+ comment: "Data/hora em que a m\xEDdia saiu (faxina de \xF3rf\xE3 ou exclus\xE3o da publica\xE7\xE3o)."
150
+ })
151
+ ], FeedMedia.prototype, "deletedAt", 2);
152
+ FeedMedia = __decorateClass([
153
+ Entity("feed_media"),
154
+ Index("IDX_feed_media_status_created_at", ["status", "createdAt"], {
155
+ where: `"status" IN ('PENDING_UPLOAD', 'READY')`
156
+ }),
157
+ Check("CHK_feed_media_uploaded_by_kind", `"uploaded_by_kind" IN (${UPLOADED_BY_KINDS})`),
158
+ Check("CHK_feed_media_kind", `"kind" IN (${KINDS})`),
159
+ Check("CHK_feed_media_status", `"status" IN (${STATUSES})`)
160
+ ], FeedMedia);
161
+ export {
162
+ FeedMedia
163
+ };
@@ -0,0 +1,2 @@
1
+ export { FeedMedia } from './feed-media.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-media/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FeedMedia } from "./feed-media.entity.js";
2
+ export {
3
+ FeedMedia
4
+ };
@@ -0,0 +1,16 @@
1
+ import { FeedMedia } from '../feed-media';
2
+ import { FeedPost } from '../feed-posts';
3
+ export declare class FeedPostAttachment {
4
+ postId: string;
5
+ position: number;
6
+ kind: string;
7
+ kindVersion: number;
8
+ mediaId: string | null;
9
+ pollId: string | null;
10
+ refType: string | null;
11
+ refId: string | null;
12
+ data: Record<string, unknown> | null;
13
+ post: FeedPost;
14
+ media: FeedMedia | null;
15
+ }
16
+ //# sourceMappingURL=feed-post-attachment.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feed-post-attachment.entity.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-post-attachments/feed-post-attachment.entity.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AA2BzC,qBAgBa,kBAAkB;IAO7B,MAAM,EAAE,MAAM,CAAC;IAOf,QAAQ,EAAE,MAAM,CAAC;IAOjB,IAAI,EAAE,MAAM,CAAC;IASb,WAAW,EAAE,MAAM,CAAC;IAQpB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IASvB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAStB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAQvB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAOrB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IASrC,IAAI,EAAE,QAAQ,CAAC;IAOf,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;CACzB"}
@@ -0,0 +1,121 @@
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, Entity, Index, JoinColumn, ManyToOne, PrimaryColumn } from "typeorm";
12
+ import { FeedMedia } from "../feed-media/index.js";
13
+ import { FeedPost } from "../feed-posts/index.js";
14
+ const quoted = (values) => values.map((value) => `'${value}'`).join(", ");
15
+ const KINDS = quoted(["MEDIA", "POLL"]);
16
+ let FeedPostAttachment = class {
17
+ };
18
+ __decorateClass([
19
+ PrimaryColumn({
20
+ name: "post_id",
21
+ type: "uuid",
22
+ primaryKeyConstraintName: "PK_feed_post_attachments",
23
+ comment: "FK feed_posts.id (CASCADE): anexo n\xE3o vive sem publica\xE7\xE3o."
24
+ })
25
+ ], FeedPostAttachment.prototype, "postId", 2);
26
+ __decorateClass([
27
+ PrimaryColumn({
28
+ type: "smallint",
29
+ primaryKeyConstraintName: "PK_feed_post_attachments",
30
+ comment: "Ordem do anexo na publica\xE7\xE3o (carrossel). A posi\xE7\xE3o 0 \xE9 a capa."
31
+ })
32
+ ], FeedPostAttachment.prototype, "position", 2);
33
+ __decorateClass([
34
+ Column({
35
+ type: "varchar",
36
+ length: 16,
37
+ comment: "MEDIA ou POLL agora; MATCH, MATCH_EVENT, CHART e LINK depois."
38
+ })
39
+ ], FeedPostAttachment.prototype, "kind", 2);
40
+ __decorateClass([
41
+ Column({
42
+ name: "kind_version",
43
+ type: "smallint",
44
+ default: 1,
45
+ comment: "Vers\xE3o do schema daquele anexo no contrato (ex.: mediaAttachmentV1), independente da vers\xE3o do POST."
46
+ })
47
+ ], FeedPostAttachment.prototype, "kindVersion", 2);
48
+ __decorateClass([
49
+ Column({
50
+ name: "media_id",
51
+ type: "uuid",
52
+ nullable: true,
53
+ comment: "FK feed_media.id (RESTRICT). Preenchido s\xF3 em anexo MEDIA. \xDAnico quando preenchido."
54
+ })
55
+ ], FeedPostAttachment.prototype, "mediaId", 2);
56
+ __decorateClass([
57
+ Column({
58
+ name: "poll_id",
59
+ type: "uuid",
60
+ nullable: true,
61
+ comment: "FK feed_polls.id (CASCADE), criada junto da entidade da enquete. Preenchido s\xF3 em anexo POLL."
62
+ })
63
+ ], FeedPostAttachment.prototype, "pollId", 2);
64
+ __decorateClass([
65
+ Column({
66
+ name: "ref_type",
67
+ type: "varchar",
68
+ length: 32,
69
+ nullable: true,
70
+ comment: "Para anexos que apontam para outro dom\xEDnio (uma partida, um lance). Nulo agora."
71
+ })
72
+ ], FeedPostAttachment.prototype, "refType", 2);
73
+ __decorateClass([
74
+ Column({
75
+ name: "ref_id",
76
+ type: "text",
77
+ nullable: true,
78
+ comment: "Id do que o anexo aponta (com ref_type). Nulo agora."
79
+ })
80
+ ], FeedPostAttachment.prototype, "refId", 2);
81
+ __decorateClass([
82
+ Column({
83
+ type: "jsonb",
84
+ nullable: true,
85
+ comment: "Propriedades pequenas do anexo, como texto alternativo da foto e ponto de foco."
86
+ })
87
+ ], FeedPostAttachment.prototype, "data", 2);
88
+ __decorateClass([
89
+ ManyToOne(() => FeedPost, (post) => post.attachments, { onDelete: "CASCADE" }),
90
+ JoinColumn({
91
+ name: "post_id",
92
+ foreignKeyConstraintName: "FK_feed_post_attachments_post"
93
+ })
94
+ ], FeedPostAttachment.prototype, "post", 2);
95
+ __decorateClass([
96
+ ManyToOne(() => FeedMedia, { onDelete: "RESTRICT", nullable: true }),
97
+ JoinColumn({
98
+ name: "media_id",
99
+ foreignKeyConstraintName: "FK_feed_post_attachments_media"
100
+ })
101
+ ], FeedPostAttachment.prototype, "media", 2);
102
+ FeedPostAttachment = __decorateClass([
103
+ Entity("feed_post_attachments"),
104
+ Index("UQ_feed_post_attachments_media", ["mediaId"], {
105
+ unique: true,
106
+ where: '"media_id" IS NOT NULL'
107
+ }),
108
+ Index("IDX_feed_post_attachments_poll", ["pollId"]),
109
+ Check("CHK_feed_post_attachments_kind", `"kind" IN (${KINDS})`),
110
+ Check(
111
+ "CHK_feed_post_attachments_media",
112
+ `"kind" <> 'MEDIA' OR ("media_id" IS NOT NULL AND "poll_id" IS NULL)`
113
+ ),
114
+ Check(
115
+ "CHK_feed_post_attachments_poll",
116
+ `"kind" <> 'POLL' OR ("poll_id" IS NOT NULL AND "media_id" IS NULL)`
117
+ )
118
+ ], FeedPostAttachment);
119
+ export {
120
+ FeedPostAttachment
121
+ };
@@ -0,0 +1,2 @@
1
+ export { FeedPostAttachment } from './feed-post-attachment.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-post-attachments/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FeedPostAttachment } from "./feed-post-attachment.entity.js";
2
+ export {
3
+ FeedPostAttachment
4
+ };
@@ -0,0 +1,15 @@
1
+ import { FeedPost } from '../feed-posts';
2
+ export declare class FeedPostRevision {
3
+ postId: string;
4
+ revision: number;
5
+ action: string;
6
+ actorKind: string;
7
+ actorId: string;
8
+ actorName: string | null;
9
+ actorEmail: string | null;
10
+ changes: Record<string, unknown> | null;
11
+ requestId: string | null;
12
+ createdAt: Date;
13
+ post: FeedPost;
14
+ }
15
+ //# sourceMappingURL=feed-post-revision.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feed-post-revision.entity.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-post-revisions/feed-post-revision.entity.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AA4BzC,qBAGa,gBAAgB;IAO3B,MAAM,EAAE,MAAM,CAAC;IAOf,QAAQ,EAAE,MAAM,CAAC;IAOjB,MAAM,EAAE,MAAM,CAAC;IAQf,SAAS,EAAE,MAAM,CAAC;IAOlB,OAAO,EAAE,MAAM,CAAC;IAQhB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAUzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAQxC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAQzB,SAAS,EAAE,IAAI,CAAC;IAShB,IAAI,EAAE,QAAQ,CAAC;CAChB"}
@@ -0,0 +1,109 @@
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, Entity, JoinColumn, ManyToOne, PrimaryColumn } from "typeorm";
12
+ import { FeedPost } from "../feed-posts/index.js";
13
+ const quoted = (values) => values.map((value) => `'${value}'`).join(", ");
14
+ const ACTIONS = quoted(["CREATE", "EDIT", "CLOSE_POLL", "DELETE"]);
15
+ const ACTOR_KINDS = quoted(["ORGANIZATION_USER", "STAFF", "AUTOMATION"]);
16
+ let FeedPostRevision = class {
17
+ };
18
+ __decorateClass([
19
+ PrimaryColumn({
20
+ name: "post_id",
21
+ type: "uuid",
22
+ primaryKeyConstraintName: "PK_feed_post_revisions",
23
+ comment: "FK feed_posts.id (CASCADE): a trilha vive com a publica\xE7\xE3o."
24
+ })
25
+ ], FeedPostRevision.prototype, "postId", 2);
26
+ __decorateClass([
27
+ PrimaryColumn({
28
+ type: "int",
29
+ primaryKeyConstraintName: "PK_feed_post_revisions",
30
+ comment: "N\xFAmero da revis\xE3o, igual a feed_posts.revision naquele momento. A 1 \xE9 a cria\xE7\xE3o."
31
+ })
32
+ ], FeedPostRevision.prototype, "revision", 2);
33
+ __decorateClass([
34
+ Column({
35
+ type: "varchar",
36
+ length: 16,
37
+ comment: "CREATE, EDIT, CLOSE_POLL (encerrar enquete pelo bot\xE3o) ou DELETE."
38
+ })
39
+ ], FeedPostRevision.prototype, "action", 2);
40
+ __decorateClass([
41
+ Column({
42
+ name: "actor_kind",
43
+ type: "varchar",
44
+ length: 32,
45
+ comment: "Quem fez: ORGANIZATION_USER, STAFF ou AUTOMATION."
46
+ })
47
+ ], FeedPostRevision.prototype, "actorKind", 2);
48
+ __decorateClass([
49
+ Column({
50
+ name: "actor_id",
51
+ type: "text",
52
+ comment: "Id de quem fez, em texto como feed_posts.author_id. Sem FK."
53
+ })
54
+ ], FeedPostRevision.prototype, "actorId", 2);
55
+ __decorateClass([
56
+ Column({
57
+ name: "actor_name",
58
+ type: "text",
59
+ nullable: true,
60
+ comment: "Nome guardado na hora, leg\xEDvel se a pessoa sair da organiza\xE7\xE3o."
61
+ })
62
+ ], FeedPostRevision.prototype, "actorName", 2);
63
+ __decorateClass([
64
+ Column({
65
+ name: "actor_email",
66
+ type: "varchar",
67
+ length: 320,
68
+ nullable: true,
69
+ comment: "E-mail guardado na hora, como actor_name: a auditoria guarda nome, id e e-mail (decis\xE3o de 30/10/2026) e segue leg\xEDvel se a pessoa sair da organiza\xE7\xE3o."
70
+ })
71
+ ], FeedPostRevision.prototype, "actorEmail", 2);
72
+ __decorateClass([
73
+ Column({
74
+ type: "jsonb",
75
+ nullable: true,
76
+ comment: 'S\xF3 o que mudou: { "campo": { "before": ..., "after": ... } }. Nulo na cria\xE7\xE3o (o estado de cada vers\xE3o se reconstr\xF3i pelo before da revis\xE3o seguinte).'
77
+ })
78
+ ], FeedPostRevision.prototype, "changes", 2);
79
+ __decorateClass([
80
+ Column({
81
+ name: "request_id",
82
+ type: "text",
83
+ nullable: true,
84
+ comment: "Cruza com o log da requisi\xE7\xE3o."
85
+ })
86
+ ], FeedPostRevision.prototype, "requestId", 2);
87
+ __decorateClass([
88
+ Column({
89
+ name: "created_at",
90
+ type: "timestamptz",
91
+ default: () => "now()",
92
+ comment: "Quando foi feita; gravada na mesma transa\xE7\xE3o da mudan\xE7a."
93
+ })
94
+ ], FeedPostRevision.prototype, "createdAt", 2);
95
+ __decorateClass([
96
+ ManyToOne(() => FeedPost, (post) => post.revisions, { onDelete: "CASCADE" }),
97
+ JoinColumn({
98
+ name: "post_id",
99
+ foreignKeyConstraintName: "FK_feed_post_revisions_post"
100
+ })
101
+ ], FeedPostRevision.prototype, "post", 2);
102
+ FeedPostRevision = __decorateClass([
103
+ Entity("feed_post_revisions"),
104
+ Check("CHK_feed_post_revisions_action", `"action" IN (${ACTIONS})`),
105
+ Check("CHK_feed_post_revisions_actor_kind", `"actor_kind" IN (${ACTOR_KINDS})`)
106
+ ], FeedPostRevision);
107
+ export {
108
+ FeedPostRevision
109
+ };
@@ -0,0 +1,2 @@
1
+ export { FeedPostRevision } from './feed-post-revision.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-post-revisions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FeedPostRevision } from "./feed-post-revision.entity.js";
2
+ export {
3
+ FeedPostRevision
4
+ };
@@ -0,0 +1,33 @@
1
+ import { FeedSubjectType } from '../enums';
2
+ import { FeedActivity } from '../feed-activities';
3
+ import { FeedPostAttachment } from '../feed-post-attachments';
4
+ import { FeedPostRevision } from '../feed-post-revisions';
5
+ export declare class FeedPost {
6
+ id: string;
7
+ organizationId: string;
8
+ authorKind: string;
9
+ authorId: string;
10
+ contextType: FeedSubjectType;
11
+ contextId: string;
12
+ format: string;
13
+ body: string | null;
14
+ bodyFacets: Record<string, unknown> | null;
15
+ status: string;
16
+ revision: number;
17
+ publishedAt: Date;
18
+ editedAt: Date | null;
19
+ deletedAt: Date | null;
20
+ deletedBy: string | null;
21
+ notify: boolean;
22
+ notifiedAt: Date | null;
23
+ notifyCursor: string | null;
24
+ activityId: string | null;
25
+ idempotencyKey: string | null;
26
+ requestHash: string | null;
27
+ createdAt: Date;
28
+ updatedAt: Date;
29
+ activity: FeedActivity | null;
30
+ revisions: FeedPostRevision[];
31
+ attachments: FeedPostAttachment[];
32
+ }
33
+ //# sourceMappingURL=feed-post.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feed-post.entity.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-posts/feed-post.entity.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAiC1D,qBAca,QAAQ;IAKnB,EAAE,EAAE,MAAM,CAAC;IAQX,cAAc,EAAE,MAAM,CAAC;IAQvB,UAAU,EAAE,MAAM,CAAC;IAQnB,QAAQ,EAAE,MAAM,CAAC;IASjB,WAAW,EAAE,eAAe,CAAC;IAQ7B,SAAS,EAAE,MAAM,CAAC;IAOlB,MAAM,EAAE,MAAM,CAAC;IAQf,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAQpB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAQ3C,MAAM,EAAE,MAAM,CAAC;IAQf,QAAQ,EAAE,MAAM,CAAC;IAQjB,WAAW,EAAE,IAAI,CAAC;IAQlB,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC;IAQtB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAQvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAOzB,MAAM,EAAE,OAAO,CAAC;IAQhB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;IAQxB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAS5B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAS1B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ9B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ3B,SAAS,EAAE,IAAI,CAAC;IAQhB,SAAS,EAAE,IAAI,CAAC;IAShB,QAAQ,EAAE,YAAY,GAAG,IAAI,CAAC;IAG9B,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAG9B,WAAW,EAAE,kBAAkB,EAAE,CAAC;CACnC"}
@@ -0,0 +1,238 @@
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
+ OneToMany,
20
+ PrimaryGeneratedColumn,
21
+ UpdateDateColumn
22
+ } from "typeorm";
23
+ import { FeedSubjectType } from "../enums/index.js";
24
+ import { FeedActivity } from "../feed-activities/index.js";
25
+ import { FeedPostAttachment } from "../feed-post-attachments/index.js";
26
+ import { FeedPostRevision } from "../feed-post-revisions/index.js";
27
+ const quoted = (values) => values.map((value) => `'${value}'`).join(", ");
28
+ const AUTHOR_KINDS = quoted(["ORGANIZATION_USER", "STAFF", "AUTOMATION", "APP_USER"]);
29
+ const FORMATS = quoted(["TEXT", "MEDIA", "POLL"]);
30
+ const STATUSES = quoted(["PUBLISHED", "DELETED"]);
31
+ let FeedPost = class {
32
+ };
33
+ __decorateClass([
34
+ PrimaryGeneratedColumn("uuid", {
35
+ primaryKeyConstraintName: "PK_feed_posts",
36
+ comment: "Identificador da publica\xE7\xE3o. Vai no payload do card como postId."
37
+ })
38
+ ], FeedPost.prototype, "id", 2);
39
+ __decorateClass([
40
+ Column({
41
+ name: "organization_id",
42
+ type: "bigint",
43
+ comment: "Organiza\xE7\xE3o dona da publica\xE7\xE3o (sem FK: mora no auth-service). Posse conferida em toda rota."
44
+ })
45
+ ], FeedPost.prototype, "organizationId", 2);
46
+ __decorateClass([
47
+ Column({
48
+ name: "author_kind",
49
+ type: "varchar",
50
+ length: 32,
51
+ comment: "Tipo do autor (ORGANIZATION_USER, STAFF, AUTOMATION, APP_USER)."
52
+ })
53
+ ], FeedPost.prototype, "authorKind", 2);
54
+ __decorateClass([
55
+ Column({
56
+ name: "author_id",
57
+ type: "text",
58
+ comment: "Id do autor, em texto porque cada tipo tem um espa\xE7o de id diferente. Sem FK de prop\xF3sito."
59
+ })
60
+ ], FeedPost.prototype, "authorId", 2);
61
+ __decorateClass([
62
+ Column({
63
+ name: "context_type",
64
+ type: "enum",
65
+ enum: FeedSubjectType,
66
+ enumName: "FeedSubjectType",
67
+ comment: "Onde a publica\xE7\xE3o aparece. Na v1 s\xF3 TOURNAMENT."
68
+ })
69
+ ], FeedPost.prototype, "contextType", 2);
70
+ __decorateClass([
71
+ Column({
72
+ name: "context_id",
73
+ type: "bigint",
74
+ comment: "Id do contexto. Para TOURNAMENT \xE9 tournament_category_groups.id (o campeonato), o mesmo espa\xE7o do follow. Sem FK por ser poliforme."
75
+ })
76
+ ], FeedPost.prototype, "contextId", 2);
77
+ __decorateClass([
78
+ Column({
79
+ type: "varchar",
80
+ length: 16,
81
+ comment: "TEXT, MEDIA ou POLL. N\xE3o muda depois de publicar."
82
+ })
83
+ ], FeedPost.prototype, "format", 2);
84
+ __decorateClass([
85
+ Column({
86
+ type: "text",
87
+ nullable: true,
88
+ comment: "Texto, legenda ou pergunta. O limite por formato \xE9 do contrato zod. Nulo depois da faxina de 7 dias da exclus\xE3o."
89
+ })
90
+ ], FeedPost.prototype, "body", 2);
91
+ __decorateClass([
92
+ Column({
93
+ name: "body_facets",
94
+ type: "jsonb",
95
+ nullable: true,
96
+ comment: "Men\xE7\xF5es e links por posi\xE7\xE3o no texto, sem HTML. Nulo por enquanto."
97
+ })
98
+ ], FeedPost.prototype, "bodyFacets", 2);
99
+ __decorateClass([
100
+ Column({
101
+ type: "varchar",
102
+ length: 16,
103
+ default: "PUBLISHED",
104
+ comment: "PUBLISHED ou DELETED. DRAFT e SCHEDULED entram depois."
105
+ })
106
+ ], FeedPost.prototype, "status", 2);
107
+ __decorateClass([
108
+ Column({
109
+ type: "int",
110
+ default: 1,
111
+ comment: "Come\xE7a em 1 e sobe a cada mudan\xE7a. \xC9 o If-Match do PATCH e a chave de feed_post_revisions."
112
+ })
113
+ ], FeedPost.prototype, "revision", 2);
114
+ __decorateClass([
115
+ Column({
116
+ name: "published_at",
117
+ type: "timestamptz",
118
+ comment: "Quando foi publicada, truncada em milissegundo. Vira o occurred_at do item na timeline."
119
+ })
120
+ ], FeedPost.prototype, "publishedAt", 2);
121
+ __decorateClass([
122
+ Column({
123
+ name: "edited_at",
124
+ type: "timestamptz",
125
+ nullable: true,
126
+ comment: '\xDAltima edi\xE7\xE3o. Alimenta o selo "editado".'
127
+ })
128
+ ], FeedPost.prototype, "editedAt", 2);
129
+ __decorateClass([
130
+ Column({
131
+ name: "deleted_at",
132
+ type: "timestamptz",
133
+ nullable: true,
134
+ comment: "Quando foi exclu\xEDda (status DELETED)."
135
+ })
136
+ ], FeedPost.prototype, "deletedAt", 2);
137
+ __decorateClass([
138
+ Column({
139
+ name: "deleted_by",
140
+ type: "text",
141
+ nullable: true,
142
+ comment: "Quem excluiu, em texto pelo mesmo motivo de author_id."
143
+ })
144
+ ], FeedPost.prototype, "deletedBy", 2);
145
+ __decorateClass([
146
+ Column({
147
+ type: "boolean",
148
+ default: false,
149
+ comment: "Se o organizador pediu push para esta publica\xE7\xE3o."
150
+ })
151
+ ], FeedPost.prototype, "notify", 2);
152
+ __decorateClass([
153
+ Column({
154
+ name: "notified_at",
155
+ type: "timestamptz",
156
+ nullable: true,
157
+ comment: "Quando a rotina de push terminou. S\xF3 preenchida no fim."
158
+ })
159
+ ], FeedPost.prototype, "notifiedAt", 2);
160
+ __decorateClass([
161
+ Column({
162
+ name: "notify_cursor",
163
+ type: "uuid",
164
+ nullable: true,
165
+ comment: "\xDAltimo destinat\xE1rio enviado, para a rotina do push retomar sem repetir."
166
+ })
167
+ ], FeedPost.prototype, "notifyCursor", 2);
168
+ __decorateClass([
169
+ Column({
170
+ name: "activity_id",
171
+ type: "bigint",
172
+ nullable: true,
173
+ comment: "FK feed_activities.id, a linha do tipo POST na timeline. UNIQUE. Vira nulo quando a linha some (ON DELETE SET NULL), e a publica\xE7\xE3o guarda o rastro."
174
+ })
175
+ ], FeedPost.prototype, "activityId", 2);
176
+ __decorateClass([
177
+ Column({
178
+ name: "idempotency_key",
179
+ type: "text",
180
+ nullable: true,
181
+ comment: "Chave gerada pelo site ao abrir o composer. \xDAnico por (organization_id, idempotency_key): clique duplo n\xE3o publica duas vezes."
182
+ })
183
+ ], FeedPost.prototype, "idempotencyKey", 2);
184
+ __decorateClass([
185
+ Column({
186
+ name: "request_hash",
187
+ type: "text",
188
+ nullable: true,
189
+ comment: "Hash do corpo do pedido. A mesma chave com corpo diferente responde 422."
190
+ })
191
+ ], FeedPost.prototype, "requestHash", 2);
192
+ __decorateClass([
193
+ CreateDateColumn({
194
+ name: "created_at",
195
+ type: "timestamptz",
196
+ default: () => "now()",
197
+ comment: "Data/hora de cria\xE7\xE3o da linha."
198
+ })
199
+ ], FeedPost.prototype, "createdAt", 2);
200
+ __decorateClass([
201
+ UpdateDateColumn({
202
+ name: "updated_at",
203
+ type: "timestamptz",
204
+ default: () => "now()",
205
+ comment: "Data/hora da \xFAltima altera\xE7\xE3o da linha."
206
+ })
207
+ ], FeedPost.prototype, "updatedAt", 2);
208
+ __decorateClass([
209
+ ManyToOne(() => FeedActivity, { onDelete: "SET NULL", nullable: true }),
210
+ JoinColumn({
211
+ name: "activity_id",
212
+ foreignKeyConstraintName: "FK_feed_posts_activity"
213
+ })
214
+ ], FeedPost.prototype, "activity", 2);
215
+ __decorateClass([
216
+ OneToMany(() => FeedPostRevision, (revision) => revision.post)
217
+ ], FeedPost.prototype, "revisions", 2);
218
+ __decorateClass([
219
+ OneToMany(() => FeedPostAttachment, (attachment) => attachment.post)
220
+ ], FeedPost.prototype, "attachments", 2);
221
+ FeedPost = __decorateClass([
222
+ Entity("feed_posts"),
223
+ Index("IDX_feed_posts_context_published", ["contextType", "contextId", "publishedAt"]),
224
+ Index("UQ_feed_posts_organization_idempotency_key", ["organizationId", "idempotencyKey"], {
225
+ unique: true,
226
+ where: '"idempotency_key" IS NOT NULL'
227
+ }),
228
+ Index("UQ_feed_posts_activity", ["activityId"], { unique: true }),
229
+ Index("IDX_feed_posts_notify_pending", ["publishedAt"], {
230
+ where: '"notify" AND "notified_at" IS NULL'
231
+ }),
232
+ Check("CHK_feed_posts_author_kind", `"author_kind" IN (${AUTHOR_KINDS})`),
233
+ Check("CHK_feed_posts_format", `"format" IN (${FORMATS})`),
234
+ Check("CHK_feed_posts_status", `"status" IN (${STATUSES})`)
235
+ ], FeedPost);
236
+ export {
237
+ FeedPost
238
+ };
@@ -0,0 +1,2 @@
1
+ export { FeedPost } from './feed-post.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-posts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FeedPost } from "./feed-post.entity.js";
2
+ export {
3
+ FeedPost
4
+ };
@@ -2,5 +2,10 @@ export * from './enums';
2
2
  export * from './feed-activities';
3
3
  export * from './feed-activity-reactions';
4
4
  export * from './feed-activity-subjects';
5
+ export * from './feed-art-rewarms';
6
+ export * from './feed-media';
5
7
  export * from './feed-outbox';
8
+ export * from './feed-post-attachments';
9
+ export * from './feed-post-revisions';
10
+ export * from './feed-posts';
6
11
  //# 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,2BAA2B,CAAC;AAC1C,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,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC"}
@@ -2,4 +2,9 @@ export * from "./enums/index.js";
2
2
  export * from "./feed-activities/index.js";
3
3
  export * from "./feed-activity-reactions/index.js";
4
4
  export * from "./feed-activity-subjects/index.js";
5
+ export * from "./feed-art-rewarms/index.js";
6
+ export * from "./feed-media/index.js";
5
7
  export * from "./feed-outbox/index.js";
8
+ export * from "./feed-post-attachments/index.js";
9
+ export * from "./feed-post-revisions/index.js";
10
+ export * from "./feed-posts/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natrave/shared-entities",
3
- "version": "9.3.0",
3
+ "version": "9.5.0",
4
4
  "description": "Entidades compartilhadass da NaTrave",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",