@natrave/shared-entities 9.7.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 (73) 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 +3 -3
  38. package/dist/database-entities/index.d.ts.map +1 -1
  39. package/dist/database-entities/index.js +15 -1
  40. package/dist/feed/feed-media/feed-media.entity.d.ts +1 -0
  41. package/dist/feed/feed-media/feed-media.entity.d.ts.map +1 -1
  42. package/dist/feed/feed-media/feed-media.entity.js +8 -0
  43. package/dist/feed/feed-poll-options/feed-poll-option.entity.d.ts +11 -0
  44. package/dist/feed/feed-poll-options/feed-poll-option.entity.d.ts.map +1 -0
  45. package/dist/feed/feed-poll-options/feed-poll-option.entity.js +84 -0
  46. package/dist/feed/feed-poll-options/index.d.ts +2 -0
  47. package/dist/feed/feed-poll-options/index.d.ts.map +1 -0
  48. package/dist/feed/feed-poll-options/index.js +4 -0
  49. package/dist/feed/feed-poll-votes/feed-poll-vote.entity.d.ts +11 -0
  50. package/dist/feed/feed-poll-votes/feed-poll-vote.entity.d.ts.map +1 -0
  51. package/dist/feed/feed-poll-votes/feed-poll-vote.entity.js +77 -0
  52. package/dist/feed/feed-poll-votes/index.d.ts +2 -0
  53. package/dist/feed/feed-poll-votes/index.d.ts.map +1 -0
  54. package/dist/feed/feed-poll-votes/index.js +4 -0
  55. package/dist/feed/feed-polls/feed-poll.entity.d.ts +17 -0
  56. package/dist/feed/feed-polls/feed-poll.entity.d.ts.map +1 -0
  57. package/dist/feed/feed-polls/feed-poll.entity.js +127 -0
  58. package/dist/feed/feed-polls/index.d.ts +2 -0
  59. package/dist/feed/feed-polls/index.d.ts.map +1 -0
  60. package/dist/feed/feed-polls/index.js +4 -0
  61. package/dist/feed/feed-post-attachments/feed-post-attachment.entity.d.ts +2 -0
  62. package/dist/feed/feed-post-attachments/feed-post-attachment.entity.d.ts.map +1 -1
  63. package/dist/feed/feed-post-attachments/feed-post-attachment.entity.js +9 -1
  64. package/dist/feed/feed-reports/feed-report.entity.d.ts +21 -0
  65. package/dist/feed/feed-reports/feed-report.entity.d.ts.map +1 -0
  66. package/dist/feed/feed-reports/feed-report.entity.js +170 -0
  67. package/dist/feed/feed-reports/index.d.ts +2 -0
  68. package/dist/feed/feed-reports/index.d.ts.map +1 -0
  69. package/dist/feed/feed-reports/index.js +4 -0
  70. package/dist/feed/index.d.ts +4 -0
  71. package/dist/feed/index.d.ts.map +1 -1
  72. package/dist/feed/index.js +4 -0
  73. package/package.json +1 -1
@@ -1,9 +1,9 @@
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
- import { FeedActivity, FeedActivityReaction, FeedActivitySubject, FeedArtRewarm, FeedMedia, FeedOutbox, FeedPost, FeedPostAttachment, FeedPostRevision } from '../feed';
6
+ import { FeedActivity, FeedActivityReaction, FeedActivitySubject, FeedArtRewarm, FeedMedia, FeedOutbox, FeedPoll, FeedPollOption, FeedPollVote, FeedPost, FeedPostAttachment, FeedPostRevision, FeedReport } 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 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)[];
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,E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BAAgB,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,ulHA6I7B,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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AU,CAAC;AAClB,OAAO,EACL,wBAAwB,EACxB,OAAO,EACP,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,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
@@ -44,9 +47,13 @@ import {
44
47
  FeedArtRewarm,
45
48
  FeedMedia,
46
49
  FeedOutbox,
50
+ FeedPoll,
51
+ FeedPollOption,
52
+ FeedPollVote,
47
53
  FeedPost,
48
54
  FeedPostAttachment,
49
- FeedPostRevision
55
+ FeedPostRevision,
56
+ FeedReport
50
57
  } from "../feed/index.js";
51
58
  import { FinanceAuditEvent, FinanceEntry, FinanceEntryItem, FinanceLedger } from "../finance/index.js";
52
59
  import {
@@ -176,14 +183,21 @@ const DATABASE_ENTITIES = [
176
183
  FeedArtRewarm,
177
184
  FeedMedia,
178
185
  FeedOutbox,
186
+ FeedPoll,
187
+ FeedPollOption,
188
+ FeedPollVote,
179
189
  FeedPost,
180
190
  FeedPostAttachment,
181
191
  FeedPostRevision,
192
+ FeedReport,
182
193
  FinanceLedger,
183
194
  FinanceEntry,
184
195
  FinanceEntryItem,
185
196
  FinanceAuditEvent,
197
+ AccessAuditEvent,
186
198
  Organization,
199
+ OrganizationMembership,
200
+ OrganizationMembershipScope,
187
201
  OrganizationUser,
188
202
  OrganizationUserBillingInfo,
189
203
  PasswordReset,
@@ -1,6 +1,7 @@
1
1
  export declare class FeedMedia {
2
2
  id: string;
3
3
  organizationId: string;
4
+ contextId: string | null;
4
5
  uploadedByKind: string;
5
6
  uploadedById: string;
6
7
  kind: string;
@@ -1 +1 @@
1
- {"version":3,"file":"feed-media.entity.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-media/feed-media.entity.ts"],"names":[],"mappings":"AAmCA,qBAWa,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,E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M,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAU3C,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IASzB,eAAe,EAAE,MAAM,CAAC;IASxB,aAAa,EAAE,IAAI,GAAG,IAAI,CAAC;IAQ3B,SAAS,EAAE,IAAI,CAAC;IAQhB,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;IAQrB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;CACxB"}
@@ -28,6 +28,14 @@ __decorateClass([
28
28
  comment: "Organiza\xE7\xE3o dona da m\xEDdia (sem FK: mora no auth-service). M\xEDdia n\xE3o cruza organiza\xE7\xE3o."
29
29
  })
30
30
  ], FeedMedia.prototype, "organizationId", 2);
31
+ __decorateClass([
32
+ Column({
33
+ name: "context_id",
34
+ type: "bigint",
35
+ nullable: true,
36
+ comment: "Campeonato da reserva (tournament_category_groups.id, o mesmo contexto de feed_posts.context_id). Sem FK: poliforme e mora em outro servi\xE7o. Nulo nas linhas anteriores \xE0 coluna. Trava foto de outro campeonato ao publicar."
37
+ })
38
+ ], FeedMedia.prototype, "contextId", 2);
31
39
  __decorateClass([
32
40
  Column({
33
41
  name: "uploaded_by_kind",
@@ -0,0 +1,11 @@
1
+ import { FeedPoll } from '../feed-polls';
2
+ export declare class FeedPollOption {
3
+ id: string;
4
+ pollId: string;
5
+ position: number;
6
+ label: string;
7
+ refType: string | null;
8
+ refId: string | null;
9
+ poll: FeedPoll;
10
+ }
11
+ //# sourceMappingURL=feed-poll-option.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feed-poll-option.entity.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-poll-options/feed-poll-option.entity.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAwBzC,qBAOa,cAAc;IAKzB,EAAE,EAAE,MAAM,CAAC;IAOX,MAAM,EAAE,MAAM,CAAC;IAMf,QAAQ,EAAE,MAAM,CAAC;IAOjB,KAAK,EAAE,MAAM,CAAC;IAUd,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAQvB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IASrB,IAAI,EAAE,QAAQ,CAAC;CAChB"}
@@ -0,0 +1,84 @@
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
+ Entity,
15
+ JoinColumn,
16
+ ManyToOne,
17
+ PrimaryGeneratedColumn,
18
+ Unique
19
+ } from "typeorm";
20
+ import { FeedPoll } from "../feed-polls/index.js";
21
+ let FeedPollOption = class {
22
+ };
23
+ __decorateClass([
24
+ PrimaryGeneratedColumn("uuid", {
25
+ primaryKeyConstraintName: "PK_feed_poll_options",
26
+ comment: "Identificador da op\xE7\xE3o, gerado no servidor ao publicar. O voto aponta para ele."
27
+ })
28
+ ], FeedPollOption.prototype, "id", 2);
29
+ __decorateClass([
30
+ Column({
31
+ name: "poll_id",
32
+ type: "uuid",
33
+ comment: "FK feed_polls.id (CASCADE): op\xE7\xE3o n\xE3o vive sem enquete."
34
+ })
35
+ ], FeedPollOption.prototype, "pollId", 2);
36
+ __decorateClass([
37
+ Column({
38
+ type: "smallint",
39
+ comment: "Ordem na tela. \xDAnica por enquete (UNIQUE adi\xE1vel)."
40
+ })
41
+ ], FeedPollOption.prototype, "position", 2);
42
+ __decorateClass([
43
+ Column({
44
+ type: "varchar",
45
+ length: 40,
46
+ comment: "O texto da op\xE7\xE3o, de 1 a 40 caracteres."
47
+ })
48
+ ], FeedPollOption.prototype, "label", 2);
49
+ __decorateClass([
50
+ Column({
51
+ name: "ref_type",
52
+ type: "varchar",
53
+ length: 32,
54
+ nullable: true,
55
+ comment: "Para op\xE7\xE3o que \xE9 um jogador ou um time (craque da rodada, depois). Nulo agora. Vem junto de ref_id."
56
+ })
57
+ ], FeedPollOption.prototype, "refType", 2);
58
+ __decorateClass([
59
+ Column({
60
+ name: "ref_id",
61
+ type: "text",
62
+ nullable: true,
63
+ comment: "Id do que a op\xE7\xE3o aponta (com ref_type). Nulo agora."
64
+ })
65
+ ], FeedPollOption.prototype, "refId", 2);
66
+ __decorateClass([
67
+ ManyToOne(() => FeedPoll, (poll) => poll.options, { onDelete: "CASCADE" }),
68
+ JoinColumn({
69
+ name: "poll_id",
70
+ foreignKeyConstraintName: "FK_feed_poll_options_poll"
71
+ })
72
+ ], FeedPollOption.prototype, "poll", 2);
73
+ FeedPollOption = __decorateClass([
74
+ Entity("feed_poll_options"),
75
+ Unique("UQ_feed_poll_options_poll_position", ["pollId", "position"], {
76
+ deferrable: "INITIALLY IMMEDIATE"
77
+ }),
78
+ Unique("UQ_feed_poll_options_poll_id_id", ["pollId", "id"]),
79
+ Check("CHK_feed_poll_options_label", `char_length(btrim("label")) BETWEEN 1 AND 40`),
80
+ Check("CHK_feed_poll_options_ref", `("ref_type" IS NULL) = ("ref_id" IS NULL)`)
81
+ ], FeedPollOption);
82
+ export {
83
+ FeedPollOption
84
+ };
@@ -0,0 +1,2 @@
1
+ export { FeedPollOption } from './feed-poll-option.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-poll-options/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FeedPollOption } from "./feed-poll-option.entity.js";
2
+ export {
3
+ FeedPollOption
4
+ };
@@ -0,0 +1,11 @@
1
+ import { User } from '../../app-auth';
2
+ import { FeedPollOption } from '../feed-poll-options';
3
+ export declare class FeedPollVote {
4
+ pollId: string;
5
+ userId: string;
6
+ optionId: string;
7
+ createdAt: Date;
8
+ option: FeedPollOption;
9
+ user: User;
10
+ }
11
+ //# sourceMappingURL=feed-poll-vote.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feed-poll-vote.entity.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-poll-votes/feed-poll-vote.entity.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AA2BtD,qBAGa,YAAY;IAOvB,MAAM,EAAE,MAAM,CAAC;IAQf,MAAM,EAAE,MAAM,CAAC;IASf,QAAQ,EAAE,MAAM,CAAC;IAQjB,SAAS,EAAE,IAAI,CAAC;IAiBhB,MAAM,EAAE,cAAc,CAAC;IAOvB,IAAI,EAAE,IAAI,CAAC;CACZ"}
@@ -0,0 +1,77 @@
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 { CreateDateColumn, Entity, Index, JoinColumn, ManyToOne, PrimaryColumn } from "typeorm";
12
+ import { User } from "../../app-auth/index.js";
13
+ import { FeedPollOption } from "../feed-poll-options/index.js";
14
+ let FeedPollVote = class {
15
+ };
16
+ __decorateClass([
17
+ PrimaryColumn({
18
+ name: "poll_id",
19
+ type: "uuid",
20
+ primaryKeyConstraintName: "PK_feed_poll_votes",
21
+ comment: "Enquete votada. Parte da FK composta para feed_poll_options."
22
+ })
23
+ ], FeedPollVote.prototype, "pollId", 2);
24
+ __decorateClass([
25
+ PrimaryColumn({
26
+ name: "user_id",
27
+ type: "uuid",
28
+ primaryKeyConstraintName: "PK_feed_poll_votes",
29
+ comment: "FK users.id: quem votou (o id do app)."
30
+ })
31
+ ], FeedPollVote.prototype, "userId", 2);
32
+ __decorateClass([
33
+ PrimaryColumn({
34
+ name: "option_id",
35
+ type: "uuid",
36
+ primaryKeyConstraintName: "PK_feed_poll_votes",
37
+ comment: "Op\xE7\xE3o votada. A FK composta (poll_id, option_id) garante que a op\xE7\xE3o \xE9 da mesma enquete."
38
+ })
39
+ ], FeedPollVote.prototype, "optionId", 2);
40
+ __decorateClass([
41
+ CreateDateColumn({
42
+ name: "created_at",
43
+ type: "timestamptz",
44
+ default: () => "now()",
45
+ comment: "Data/hora do voto. Ordena a lista de quem votou."
46
+ })
47
+ ], FeedPollVote.prototype, "createdAt", 2);
48
+ __decorateClass([
49
+ ManyToOne(() => FeedPollOption, { onDelete: "CASCADE" }),
50
+ JoinColumn([
51
+ {
52
+ name: "poll_id",
53
+ referencedColumnName: "pollId",
54
+ foreignKeyConstraintName: "FK_feed_poll_votes_option"
55
+ },
56
+ {
57
+ name: "option_id",
58
+ referencedColumnName: "id",
59
+ foreignKeyConstraintName: "FK_feed_poll_votes_option"
60
+ }
61
+ ])
62
+ ], FeedPollVote.prototype, "option", 2);
63
+ __decorateClass([
64
+ ManyToOne(() => User, { onDelete: "CASCADE" }),
65
+ JoinColumn({
66
+ name: "user_id",
67
+ foreignKeyConstraintName: "FK_feed_poll_votes_user"
68
+ })
69
+ ], FeedPollVote.prototype, "user", 2);
70
+ FeedPollVote = __decorateClass([
71
+ Entity("feed_poll_votes"),
72
+ Index("IDX_feed_poll_votes_option_recent", ["pollId", "optionId", "createdAt", "userId"]),
73
+ Index("IDX_feed_poll_votes_user", ["userId"])
74
+ ], FeedPollVote);
75
+ export {
76
+ FeedPollVote
77
+ };
@@ -0,0 +1,2 @@
1
+ export { FeedPollVote } from './feed-poll-vote.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-poll-votes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FeedPollVote } from "./feed-poll-vote.entity.js";
2
+ export {
3
+ FeedPollVote
4
+ };
@@ -0,0 +1,17 @@
1
+ import { FeedPollOption } from '../feed-poll-options';
2
+ import { FeedPost } from '../feed-posts';
3
+ export declare class FeedPoll {
4
+ id: string;
5
+ postId: string;
6
+ kind: string;
7
+ maxChoices: number;
8
+ closesAt: Date | null;
9
+ closedAt: Date | null;
10
+ lockedAt: Date | null;
11
+ finalCounts: Record<string, number> | null;
12
+ createdAt: Date;
13
+ updatedAt: Date;
14
+ post: FeedPost;
15
+ options: FeedPollOption[];
16
+ }
17
+ //# sourceMappingURL=feed-poll.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feed-poll.entity.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-polls/feed-poll.entity.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AA6BzC,qBASa,QAAQ;IAKnB,EAAE,EAAE,MAAM,CAAC;IAOX,MAAM,EAAE,MAAM,CAAC;IAQf,IAAI,EAAE,MAAM,CAAC;IASb,UAAU,EAAE,MAAM,CAAC;IAQnB,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC;IAStB,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC;IAStB,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC;IAStB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAQ3C,SAAS,EAAE,IAAI,CAAC;IAQhB,SAAS,EAAE,IAAI,CAAC;IAWhB,IAAI,EAAE,QAAQ,CAAC;IAGf,OAAO,EAAE,cAAc,EAAE,CAAC;CAC3B"}
@@ -0,0 +1,127 @@
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 { FeedPollOption } from "../feed-poll-options/index.js";
24
+ import { FeedPost } from "../feed-posts/index.js";
25
+ const quoted = (values) => values.map((value) => `'${value}'`).join(", ");
26
+ const KINDS = quoted(["CHOICE"]);
27
+ let FeedPoll = class {
28
+ };
29
+ __decorateClass([
30
+ PrimaryGeneratedColumn("uuid", {
31
+ primaryKeyConstraintName: "PK_feed_polls",
32
+ comment: "Identificador da enquete. Vai no anexo POLL (feed_post_attachments.poll_id)."
33
+ })
34
+ ], FeedPoll.prototype, "id", 2);
35
+ __decorateClass([
36
+ Column({
37
+ name: "post_id",
38
+ type: "uuid",
39
+ comment: "FK feed_posts.id (CASCADE). UNIQUE: uma enquete por publica\xE7\xE3o."
40
+ })
41
+ ], FeedPoll.prototype, "postId", 2);
42
+ __decorateClass([
43
+ Column({
44
+ type: "varchar",
45
+ length: 32,
46
+ default: "CHOICE",
47
+ comment: "Tipo da enquete. CHOICE agora; PLAYER_PICK e outros depois."
48
+ })
49
+ ], FeedPoll.prototype, "kind", 2);
50
+ __decorateClass([
51
+ Column({
52
+ name: "max_choices",
53
+ type: "smallint",
54
+ default: 1,
55
+ comment: "Quantas op\xE7\xF5es cada pessoa pode marcar: 1 \xE9 uma resposta, acima de 1 s\xE3o v\xE1rias (no m\xE1ximo 5). O contrato limita ao n\xFAmero de op\xE7\xF5es. N\xE3o muda depois do 1\xBA voto."
56
+ })
57
+ ], FeedPoll.prototype, "maxChoices", 2);
58
+ __decorateClass([
59
+ Column({
60
+ name: "closes_at",
61
+ type: "timestamptz",
62
+ nullable: true,
63
+ comment: "Prazo da enquete. Nulo \xE9 sem prazo (encerra junto com o campeonato)."
64
+ })
65
+ ], FeedPoll.prototype, "closesAt", 2);
66
+ __decorateClass([
67
+ Column({
68
+ name: "closed_at",
69
+ type: "timestamptz",
70
+ nullable: true,
71
+ comment: "Quando foi encerrada, pelo prazo ou pelo bot\xE3o. Estender o prazo de uma encerrada n\xE3o reabre."
72
+ })
73
+ ], FeedPoll.prototype, "closedAt", 2);
74
+ __decorateClass([
75
+ Column({
76
+ name: "locked_at",
77
+ type: "timestamptz",
78
+ nullable: true,
79
+ comment: "Quando o 1\xBA voto entrou. A partir da\xED pergunta, op\xE7\xF5es e max_choices n\xE3o mudam. Gravado com UPDATE ... WHERE locked_at IS NULL."
80
+ })
81
+ ], FeedPoll.prototype, "lockedAt", 2);
82
+ __decorateClass([
83
+ Column({
84
+ name: "final_counts",
85
+ type: "jsonb",
86
+ nullable: true,
87
+ comment: 'Resultado congelado ao encerrar: { "<optionId>": votos, "total": pessoas distintas }. Nulo enquanto aberta.'
88
+ })
89
+ ], FeedPoll.prototype, "finalCounts", 2);
90
+ __decorateClass([
91
+ CreateDateColumn({
92
+ name: "created_at",
93
+ type: "timestamptz",
94
+ default: () => "now()",
95
+ comment: "Data/hora de cria\xE7\xE3o da linha."
96
+ })
97
+ ], FeedPoll.prototype, "createdAt", 2);
98
+ __decorateClass([
99
+ UpdateDateColumn({
100
+ name: "updated_at",
101
+ type: "timestamptz",
102
+ default: () => "now()",
103
+ comment: "Data/hora da \xFAltima altera\xE7\xE3o da linha."
104
+ })
105
+ ], FeedPoll.prototype, "updatedAt", 2);
106
+ __decorateClass([
107
+ ManyToOne(() => FeedPost, { onDelete: "CASCADE" }),
108
+ JoinColumn({
109
+ name: "post_id",
110
+ foreignKeyConstraintName: "FK_feed_polls_post"
111
+ })
112
+ ], FeedPoll.prototype, "post", 2);
113
+ __decorateClass([
114
+ OneToMany(() => FeedPollOption, (option) => option.poll)
115
+ ], FeedPoll.prototype, "options", 2);
116
+ FeedPoll = __decorateClass([
117
+ Entity("feed_polls"),
118
+ Index("UQ_feed_polls_post", ["postId"], { unique: true }),
119
+ Index("IDX_feed_polls_closes_at_open", ["closesAt"], {
120
+ where: '"closed_at" IS NULL AND "closes_at" IS NOT NULL'
121
+ }),
122
+ Check("CHK_feed_polls_kind", `"kind" IN (${KINDS})`),
123
+ Check("CHK_feed_polls_max_choices", `"max_choices" BETWEEN 1 AND 5`)
124
+ ], FeedPoll);
125
+ export {
126
+ FeedPoll
127
+ };
@@ -0,0 +1,2 @@
1
+ export { FeedPoll } from './feed-poll.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-polls/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FeedPoll } from "./feed-poll.entity.js";
2
+ export {
3
+ FeedPoll
4
+ };
@@ -1,4 +1,5 @@
1
1
  import { FeedMedia } from '../feed-media';
2
+ import { FeedPoll } from '../feed-polls';
2
3
  import { FeedPost } from '../feed-posts';
3
4
  export declare class FeedPostAttachment {
4
5
  postId: string;
@@ -12,5 +13,6 @@ export declare class FeedPostAttachment {
12
13
  data: Record<string, unknown> | null;
13
14
  post: FeedPost;
14
15
  media: FeedMedia | null;
16
+ poll: FeedPoll | null;
15
17
  }
16
18
  //# sourceMappingURL=feed-post-attachment.entity.d.ts.map
@@ -1 +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"}
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;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AA4BzC,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;IAQvB,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;IAOxB,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC;CACvB"}
@@ -10,6 +10,7 @@ var __decorateClass = (decorators, target, key, kind) => {
10
10
  };
11
11
  import { Check, Column, Entity, Index, JoinColumn, ManyToOne, PrimaryColumn } from "typeorm";
12
12
  import { FeedMedia } from "../feed-media/index.js";
13
+ import { FeedPoll } from "../feed-polls/index.js";
13
14
  import { FeedPost } from "../feed-posts/index.js";
14
15
  const quoted = (values) => values.map((value) => `'${value}'`).join(", ");
15
16
  const KINDS = quoted(["MEDIA", "POLL"]);
@@ -58,7 +59,7 @@ __decorateClass([
58
59
  name: "poll_id",
59
60
  type: "uuid",
60
61
  nullable: true,
61
- comment: "FK feed_polls.id (CASCADE), criada junto da entidade da enquete. Preenchido s\xF3 em anexo POLL."
62
+ comment: "FK feed_polls.id (CASCADE). Preenchido s\xF3 em anexo POLL."
62
63
  })
63
64
  ], FeedPostAttachment.prototype, "pollId", 2);
64
65
  __decorateClass([
@@ -99,6 +100,13 @@ __decorateClass([
99
100
  foreignKeyConstraintName: "FK_feed_post_attachments_media"
100
101
  })
101
102
  ], FeedPostAttachment.prototype, "media", 2);
103
+ __decorateClass([
104
+ ManyToOne(() => FeedPoll, { onDelete: "CASCADE", nullable: true }),
105
+ JoinColumn({
106
+ name: "poll_id",
107
+ foreignKeyConstraintName: "FK_feed_post_attachments_poll"
108
+ })
109
+ ], FeedPostAttachment.prototype, "poll", 2);
102
110
  FeedPostAttachment = __decorateClass([
103
111
  Entity("feed_post_attachments"),
104
112
  Index("UQ_feed_post_attachments_media", ["mediaId"], {
@@ -0,0 +1,21 @@
1
+ import { User } from '../../app-auth';
2
+ import { FeedMedia } from '../feed-media';
3
+ import { FeedPost } from '../feed-posts';
4
+ export declare class FeedReport {
5
+ id: string;
6
+ postId: string;
7
+ userId: string | null;
8
+ source: string;
9
+ mediaId: string | null;
10
+ reason: string;
11
+ details: string | null;
12
+ status: string;
13
+ reviewedBy: string | null;
14
+ reviewedAt: Date | null;
15
+ slackNotifiedAt: Date | null;
16
+ createdAt: Date;
17
+ post: FeedPost;
18
+ user: User | null;
19
+ media: FeedMedia | null;
20
+ }
21
+ //# sourceMappingURL=feed-report.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feed-report.entity.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-reports/feed-report.entity.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAwCzC,qBA6Ba,UAAU;IAKrB,EAAE,EAAE,MAAM,CAAC;IAQX,MAAM,EAAE,MAAM,CAAC;IASf,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAQtB,MAAM,EAAE,MAAM,CAAC;IASf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAOvB,MAAM,EAAE,MAAM,CAAC;IAOf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IASvB,MAAM,EAAE,MAAM,CAAC;IAQf,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ1B,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;IASxB,eAAe,EAAE,IAAI,GAAG,IAAI,CAAC;IAQ7B,SAAS,EAAE,IAAI,CAAC;IAShB,IAAI,EAAE,QAAQ,CAAC;IAOf,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAOlB,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;CACzB"}