@natrave/shared-entities 1.6.10 → 1.6.11
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.
- package/dist/database-entities/index.d.ts +2 -1
- package/dist/database-entities/index.d.ts.map +1 -1
- package/dist/database-entities/index.js +4 -0
- package/dist/feed/enums/feed-outbox-status.enum.d.ts +7 -0
- package/dist/feed/enums/feed-outbox-status.enum.d.ts.map +1 -0
- package/dist/feed/enums/feed-outbox-status.enum.js +10 -0
- package/dist/feed/enums/feed-subject-role.enum.d.ts +5 -0
- package/dist/feed/enums/feed-subject-role.enum.d.ts.map +1 -0
- package/dist/feed/enums/feed-subject-role.enum.js +8 -0
- package/dist/feed/enums/feed-subject-type.enum.d.ts +9 -0
- package/dist/feed/enums/feed-subject-type.enum.d.ts.map +1 -0
- package/dist/feed/enums/feed-subject-type.enum.js +12 -0
- package/dist/feed/enums/feed-visibility.enum.d.ts +6 -0
- package/dist/feed/enums/feed-visibility.enum.d.ts.map +1 -0
- package/dist/feed/enums/feed-visibility.enum.js +9 -0
- package/dist/feed/enums/index.d.ts +5 -0
- package/dist/feed/enums/index.d.ts.map +1 -0
- package/dist/feed/enums/index.js +10 -0
- package/dist/feed/feed-activities/feed-activity.entity.d.ts +15 -0
- package/dist/feed/feed-activities/feed-activity.entity.d.ts.map +1 -0
- package/dist/feed/feed-activities/feed-activity.entity.js +105 -0
- package/dist/feed/feed-activities/index.d.ts +2 -0
- package/dist/feed/feed-activities/index.d.ts.map +1 -0
- package/dist/feed/feed-activities/index.js +4 -0
- package/dist/feed/feed-activity-subjects/feed-activity-subject.entity.d.ts +10 -0
- package/dist/feed/feed-activity-subjects/feed-activity-subject.entity.d.ts.map +1 -0
- package/dist/feed/feed-activity-subjects/feed-activity-subject.entity.js +58 -0
- package/dist/feed/feed-activity-subjects/index.d.ts +2 -0
- package/dist/feed/feed-activity-subjects/index.d.ts.map +1 -0
- package/dist/feed/feed-activity-subjects/index.js +4 -0
- package/dist/feed/feed-outbox/feed-outbox.entity.d.ts +13 -0
- package/dist/feed/feed-outbox/feed-outbox.entity.d.ts.map +1 -0
- package/dist/feed/feed-outbox/feed-outbox.entity.js +93 -0
- package/dist/feed/feed-outbox/index.d.ts +2 -0
- package/dist/feed/feed-outbox/index.d.ts.map +1 -0
- package/dist/feed/feed-outbox/index.js +4 -0
- package/dist/feed/index.d.ts +5 -0
- package/dist/feed/index.d.ts.map +1 -0
- package/dist/feed/index.js +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { PasswordReset, RefreshToken, User, UserAuthProvider, UserVerification }
|
|
|
2
2
|
import { Organization, OrganizationUser, OrganizationUserBillingInfo, PhoneNumber } from '../central-auth';
|
|
3
3
|
import { Coupon, CouponUsage } from '../coupons';
|
|
4
4
|
import { Address, Facility, FacilityImage, FacilityOwner, Field, FieldImage } from '../facilities';
|
|
5
|
+
import { FeedActivity, FeedActivitySubject, FeedOutbox } from '../feed';
|
|
5
6
|
import { TeamPlayerMergeHistory } from '../history-logs';
|
|
6
7
|
import { Notification, NotificationDelivery, NotificationDispatchLog, PushDeviceToken, UserNotificationPreference } from '../notifications';
|
|
7
8
|
import { Payment, PaymentProvider, UserPaymentProvider } from '../payments';
|
|
@@ -9,5 +10,5 @@ import { Player, PlayerPersonalData, PlayerPosition } from '../players';
|
|
|
9
10
|
import { PlayerTeam, Team, TeamAccessCode, TeamJoinRequest, TeamModality, TeamTrophy } from '../teams';
|
|
10
11
|
import { Tournament, TournamentAllowedPhone, TournamentBracket, TournamentBracketSlot, TournamentContact, TournamentCoupon, TournamentFacility, TournamentFollow, TournamentFormatConfig, TournamentGroup, TournamentMatch, TournamentMatchAvailability, TournamentMatchCard, TournamentMatchGoal, TournamentMatchRule, TournamentMatchSchema, TournamentPayment, TournamentPenaltyShootout, TournamentPlayer, TournamentPlayerRule, TournamentPrizeRule, TournamentPublicationChargeRule, TournamentRegistrationRequest, TournamentRegistrationRequirement, TournamentTeam, TournamentTeamContactAttempt } from '../tournaments';
|
|
11
12
|
import { UserDomainEvent, UserEventView } from '../user-events';
|
|
12
|
-
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 TournamentPenaltyShootout | typeof TournamentAllowedPhone | typeof Tournament | typeof PhoneNumber | typeof TournamentContact | typeof Coupon | typeof CouponUsage | typeof TournamentCoupon | typeof FacilityImage | typeof Facility | typeof FacilityOwner | typeof Field | typeof FieldImage | typeof TournamentFacility | typeof TournamentFollow | typeof TournamentFormatConfig | typeof TournamentMatchRule | typeof TournamentMatchSchema | typeof TournamentMatchAvailability | typeof UserPaymentProvider | typeof PaymentProvider | typeof Payment | typeof TournamentPayment | typeof OrganizationUser | typeof TournamentPlayerRule | typeof TournamentPrizeRule | typeof TournamentPublicationChargeRule | typeof TournamentRegistrationRequest | typeof TournamentRegistrationRequirement | typeof TournamentTeamContactAttempt | typeof Address | typeof OrganizationUserBillingInfo | typeof Organization | typeof TournamentGroup | typeof TournamentBracket | typeof TournamentBracketSlot | typeof TeamTrophy | typeof TournamentMatchCard | typeof TeamAccessCode | typeof TeamJoinRequest | typeof TeamModality | typeof PlayerPosition | typeof PlayerPersonalData | typeof UserAuthProvider | typeof RefreshToken | typeof UserVerification | typeof UserDomainEvent | typeof UserEventView)[];
|
|
13
|
+
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 TournamentPenaltyShootout | typeof TournamentAllowedPhone | typeof Tournament | typeof PhoneNumber | typeof TournamentContact | typeof Coupon | typeof CouponUsage | typeof TournamentCoupon | typeof FacilityImage | typeof Facility | typeof FacilityOwner | typeof Field | typeof FieldImage | typeof TournamentFacility | typeof TournamentFollow | typeof TournamentFormatConfig | typeof TournamentMatchRule | typeof TournamentMatchSchema | typeof TournamentMatchAvailability | typeof UserPaymentProvider | typeof PaymentProvider | typeof Payment | typeof TournamentPayment | typeof OrganizationUser | typeof TournamentPlayerRule | typeof TournamentPrizeRule | typeof TournamentPublicationChargeRule | typeof TournamentRegistrationRequest | typeof TournamentRegistrationRequirement | typeof TournamentTeamContactAttempt | typeof Address | typeof OrganizationUserBillingInfo | typeof Organization | typeof TournamentGroup | typeof TournamentBracket | typeof TournamentBracketSlot | typeof TeamTrophy | typeof TournamentMatchCard | typeof TeamAccessCode | typeof TeamJoinRequest | typeof TeamModality | typeof PlayerPosition | typeof PlayerPersonalData | typeof UserAuthProvider | typeof RefreshToken | typeof UserVerification | typeof FeedActivitySubject | typeof FeedActivity | typeof FeedOutbox | typeof UserDomainEvent | typeof UserEventView)[];
|
|
13
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/database-entities/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,IAAI,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpG,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,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,uBAAuB,EACvB,eAAe,EACf,0BAA0B,EAC3B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACxE,OAAO,EACL,UAAU,EACV,IAAI,EACJ,cAAc,EACd,eAAe,EACf,YAAY,EACZ,UAAU,EACX,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,UAAU,EACV,sBAAsB,EACtB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,+BAA+B,EAC/B,6BAA6B,EAC7B,iCAAiC,EAEjC,cAAc,EACd,4BAA4B,EAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEhE,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/database-entities/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,IAAI,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpG,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,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,uBAAuB,EACvB,eAAe,EACf,0BAA0B,EAC3B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACxE,OAAO,EACL,UAAU,EACV,IAAI,EACJ,cAAc,EACd,eAAe,EACf,YAAY,EACZ,UAAU,EACX,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,UAAU,EACV,sBAAsB,EACtB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,+BAA+B,EAC/B,6BAA6B,EAC7B,iCAAiC,EAEjC,cAAc,EACd,4BAA4B,EAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEhE,eAAO,MAAM,iBAAiB,wrDAoE7B,CAAC"}
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
} from "../central-auth/index.js";
|
|
8
8
|
import { Coupon, CouponUsage } from "../coupons/index.js";
|
|
9
9
|
import { Address, Facility, FacilityImage, FacilityOwner, Field, FieldImage } from "../facilities/index.js";
|
|
10
|
+
import { FeedActivity, FeedActivitySubject, FeedOutbox } from "../feed/index.js";
|
|
10
11
|
import { TeamPlayerMergeHistory } from "../history-logs/index.js";
|
|
11
12
|
import {
|
|
12
13
|
Notification,
|
|
@@ -64,6 +65,9 @@ const DATABASE_ENTITIES = [
|
|
|
64
65
|
FacilityOwner,
|
|
65
66
|
Field,
|
|
66
67
|
FieldImage,
|
|
68
|
+
FeedActivity,
|
|
69
|
+
FeedActivitySubject,
|
|
70
|
+
FeedOutbox,
|
|
67
71
|
Organization,
|
|
68
72
|
OrganizationUser,
|
|
69
73
|
OrganizationUserBillingInfo,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feed-outbox-status.enum.d.ts","sourceRoot":"","sources":["../../../src/feed/enums/feed-outbox-status.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,gBAAgB;IAC1B,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,MAAM,WAAW;CAClB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var FeedOutboxStatus = /* @__PURE__ */ ((FeedOutboxStatus2) => {
|
|
2
|
+
FeedOutboxStatus2["PENDING"] = "PENDING";
|
|
3
|
+
FeedOutboxStatus2["PROCESSING"] = "PROCESSING";
|
|
4
|
+
FeedOutboxStatus2["PROCESSED"] = "PROCESSED";
|
|
5
|
+
FeedOutboxStatus2["FAILED"] = "FAILED";
|
|
6
|
+
return FeedOutboxStatus2;
|
|
7
|
+
})(FeedOutboxStatus || {});
|
|
8
|
+
export {
|
|
9
|
+
FeedOutboxStatus
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feed-subject-role.enum.d.ts","sourceRoot":"","sources":["../../../src/feed/enums/feed-subject-role.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACzB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feed-subject-type.enum.d.ts","sourceRoot":"","sources":["../../../src/feed/enums/feed-subject-type.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACzB,UAAU,eAAe;IACzB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var FeedSubjectType = /* @__PURE__ */ ((FeedSubjectType2) => {
|
|
2
|
+
FeedSubjectType2["TOURNAMENT"] = "TOURNAMENT";
|
|
3
|
+
FeedSubjectType2["TEAM"] = "TEAM";
|
|
4
|
+
FeedSubjectType2["PLAYER"] = "PLAYER";
|
|
5
|
+
FeedSubjectType2["MATCH"] = "MATCH";
|
|
6
|
+
FeedSubjectType2["USER"] = "USER";
|
|
7
|
+
FeedSubjectType2["FACILITY"] = "FACILITY";
|
|
8
|
+
return FeedSubjectType2;
|
|
9
|
+
})(FeedSubjectType || {});
|
|
10
|
+
export {
|
|
11
|
+
FeedSubjectType
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feed-visibility.enum.d.ts","sourceRoot":"","sources":["../../../src/feed/enums/feed-visibility.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,cAAc,mBAAmB;IACjC,QAAQ,aAAa;CACtB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var FeedVisibility = /* @__PURE__ */ ((FeedVisibility2) => {
|
|
2
|
+
FeedVisibility2["PUBLIC"] = "PUBLIC";
|
|
3
|
+
FeedVisibility2["FOLLOWERS_ONLY"] = "FOLLOWERS_ONLY";
|
|
4
|
+
FeedVisibility2["INTERNAL"] = "INTERNAL";
|
|
5
|
+
return FeedVisibility2;
|
|
6
|
+
})(FeedVisibility || {});
|
|
7
|
+
export {
|
|
8
|
+
FeedVisibility
|
|
9
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { FeedOutboxStatus } from './feed-outbox-status.enum';
|
|
2
|
+
export { FeedSubjectRole } from './feed-subject-role.enum';
|
|
3
|
+
export { FeedSubjectType } from './feed-subject-type.enum';
|
|
4
|
+
export { FeedVisibility } from './feed-visibility.enum';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feed/enums/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FeedOutboxStatus } from "./feed-outbox-status.enum.js";
|
|
2
|
+
import { FeedSubjectRole } from "./feed-subject-role.enum.js";
|
|
3
|
+
import { FeedSubjectType } from "./feed-subject-type.enum.js";
|
|
4
|
+
import { FeedVisibility } from "./feed-visibility.enum.js";
|
|
5
|
+
export {
|
|
6
|
+
FeedOutboxStatus,
|
|
7
|
+
FeedSubjectRole,
|
|
8
|
+
FeedSubjectType,
|
|
9
|
+
FeedVisibility
|
|
10
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FeedVisibility } from '../enums';
|
|
2
|
+
import { FeedActivitySubject } from '../feed-activity-subjects';
|
|
3
|
+
export declare class FeedActivity {
|
|
4
|
+
id: string;
|
|
5
|
+
type: string;
|
|
6
|
+
version: number;
|
|
7
|
+
payload: Record<string, unknown>;
|
|
8
|
+
aggregationKey: string | null;
|
|
9
|
+
visibility: FeedVisibility;
|
|
10
|
+
dedupeKey: string | null;
|
|
11
|
+
occurredAt: Date;
|
|
12
|
+
createdAt: Date;
|
|
13
|
+
subjects: FeedActivitySubject[];
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=feed-activity.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feed-activity.entity.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-activities/feed-activity.entity.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAWhE,qBAMa,YAAY;IAKvB,EAAE,EAAE,MAAM,CAAC;IAQX,IAAI,EAAE,MAAM,CAAC;IAOb,OAAO,EAAE,MAAM,CAAC;IAOhB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAUjC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAS9B,UAAU,EAAE,cAAc,CAAC;IAU3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAOzB,UAAU,EAAE,IAAI,CAAC;IAQjB,SAAS,EAAE,IAAI,CAAC;IAKhB,QAAQ,EAAE,mBAAmB,EAAE,CAAC;CACjC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
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
|
+
Column,
|
|
13
|
+
CreateDateColumn,
|
|
14
|
+
Entity,
|
|
15
|
+
Index,
|
|
16
|
+
OneToMany,
|
|
17
|
+
PrimaryGeneratedColumn
|
|
18
|
+
} from "typeorm";
|
|
19
|
+
import { FeedVisibility } from "../enums/index.js";
|
|
20
|
+
import { FeedActivitySubject } from "../feed-activity-subjects/index.js";
|
|
21
|
+
let FeedActivity = class {
|
|
22
|
+
};
|
|
23
|
+
__decorateClass([
|
|
24
|
+
PrimaryGeneratedColumn({
|
|
25
|
+
type: "bigint",
|
|
26
|
+
primaryKeyConstraintName: "PK_feed_activities_id"
|
|
27
|
+
})
|
|
28
|
+
], FeedActivity.prototype, "id", 2);
|
|
29
|
+
__decorateClass([
|
|
30
|
+
Column({
|
|
31
|
+
type: "varchar",
|
|
32
|
+
length: 80,
|
|
33
|
+
comment: "Tipo funcional da activity (ex.: MATCH_GOAL, TOURNAMENT_REGISTRATION_OPENED). Mantido como varchar para extensibilidade sem migration."
|
|
34
|
+
})
|
|
35
|
+
], FeedActivity.prototype, "type", 2);
|
|
36
|
+
__decorateClass([
|
|
37
|
+
Column({
|
|
38
|
+
type: "smallint",
|
|
39
|
+
default: 1,
|
|
40
|
+
comment: "Vers\xE3o do schema do payload por type."
|
|
41
|
+
})
|
|
42
|
+
], FeedActivity.prototype, "version", 2);
|
|
43
|
+
__decorateClass([
|
|
44
|
+
Column({
|
|
45
|
+
type: "jsonb",
|
|
46
|
+
default: () => "'{}'::jsonb",
|
|
47
|
+
comment: "Payload denormalizado para renderiza\xE7\xE3o do card no feed sem JOINs adicionais."
|
|
48
|
+
})
|
|
49
|
+
], FeedActivity.prototype, "payload", 2);
|
|
50
|
+
__decorateClass([
|
|
51
|
+
Column({
|
|
52
|
+
name: "aggregation_key",
|
|
53
|
+
type: "varchar",
|
|
54
|
+
length: 120,
|
|
55
|
+
nullable: true,
|
|
56
|
+
comment: "Chave para agrupar activities semelhantes (ex.: MATCH:123:GOALS). Usada na leitura para apresentar um \xFAnico card agregado."
|
|
57
|
+
})
|
|
58
|
+
], FeedActivity.prototype, "aggregationKey", 2);
|
|
59
|
+
__decorateClass([
|
|
60
|
+
Column({
|
|
61
|
+
type: "enum",
|
|
62
|
+
enum: FeedVisibility,
|
|
63
|
+
enumName: "FeedVisibility",
|
|
64
|
+
default: FeedVisibility.PUBLIC,
|
|
65
|
+
comment: "Pol\xEDtica de visibilidade da activity."
|
|
66
|
+
})
|
|
67
|
+
], FeedActivity.prototype, "visibility", 2);
|
|
68
|
+
__decorateClass([
|
|
69
|
+
Column({
|
|
70
|
+
name: "dedupe_key",
|
|
71
|
+
type: "varchar",
|
|
72
|
+
length: 160,
|
|
73
|
+
nullable: true,
|
|
74
|
+
comment: "Chave de deduplica\xE7\xE3o (idempot\xEAncia) para reprocessamentos do outbox. Quando preenchida, garante unicidade global."
|
|
75
|
+
})
|
|
76
|
+
], FeedActivity.prototype, "dedupeKey", 2);
|
|
77
|
+
__decorateClass([
|
|
78
|
+
Column({
|
|
79
|
+
name: "occurred_at",
|
|
80
|
+
type: "timestamptz",
|
|
81
|
+
comment: "Data/hora em que o fato aconteceu no dom\xEDnio (pode diferir de created_at)."
|
|
82
|
+
})
|
|
83
|
+
], FeedActivity.prototype, "occurredAt", 2);
|
|
84
|
+
__decorateClass([
|
|
85
|
+
CreateDateColumn({
|
|
86
|
+
name: "created_at",
|
|
87
|
+
type: "timestamptz",
|
|
88
|
+
default: () => "now()",
|
|
89
|
+
comment: "Data/hora de cria\xE7\xE3o da linha no banco."
|
|
90
|
+
})
|
|
91
|
+
], FeedActivity.prototype, "createdAt", 2);
|
|
92
|
+
__decorateClass([
|
|
93
|
+
OneToMany(() => FeedActivitySubject, (subject) => subject.activity)
|
|
94
|
+
], FeedActivity.prototype, "subjects", 2);
|
|
95
|
+
FeedActivity = __decorateClass([
|
|
96
|
+
Entity("feed_activities"),
|
|
97
|
+
Index("IDX_feed_activities_occurred_at", ["occurredAt"]),
|
|
98
|
+
Index("UQ_feed_activities_dedupe_key", ["dedupeKey"], {
|
|
99
|
+
unique: true,
|
|
100
|
+
where: '"dedupe_key" IS NOT NULL'
|
|
101
|
+
})
|
|
102
|
+
], FeedActivity);
|
|
103
|
+
export {
|
|
104
|
+
FeedActivity
|
|
105
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-activities/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FeedSubjectRole, FeedSubjectType } from '../enums';
|
|
2
|
+
import { FeedActivity } from '../feed-activities';
|
|
3
|
+
export declare class FeedActivitySubject {
|
|
4
|
+
activityId: string;
|
|
5
|
+
subjectType: FeedSubjectType;
|
|
6
|
+
subjectId: string;
|
|
7
|
+
role: FeedSubjectRole | null;
|
|
8
|
+
activity: FeedActivity;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=feed-activity-subject.entity.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,58 @@
|
|
|
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, Index, JoinColumn, ManyToOne, PrimaryColumn } from "typeorm";
|
|
12
|
+
import { FeedSubjectRole, FeedSubjectType } from "../enums/index.js";
|
|
13
|
+
import { FeedActivity } from "../feed-activities/index.js";
|
|
14
|
+
let FeedActivitySubject = class {
|
|
15
|
+
};
|
|
16
|
+
__decorateClass([
|
|
17
|
+
PrimaryColumn({
|
|
18
|
+
name: "activity_id",
|
|
19
|
+
type: "bigint",
|
|
20
|
+
comment: "FK feed_activities.id."
|
|
21
|
+
})
|
|
22
|
+
], FeedActivitySubject.prototype, "activityId", 2);
|
|
23
|
+
__decorateClass([
|
|
24
|
+
PrimaryColumn({
|
|
25
|
+
name: "subject_type",
|
|
26
|
+
type: "enum",
|
|
27
|
+
enum: FeedSubjectType,
|
|
28
|
+
enumName: "FeedSubjectType",
|
|
29
|
+
comment: "Tipo da entidade de dom\xEDnio referenciada."
|
|
30
|
+
})
|
|
31
|
+
], FeedActivitySubject.prototype, "subjectType", 2);
|
|
32
|
+
__decorateClass([
|
|
33
|
+
PrimaryColumn({
|
|
34
|
+
name: "subject_id",
|
|
35
|
+
type: "bigint",
|
|
36
|
+
comment: "Identificador da entidade de dom\xEDnio referenciada (sem FK por ser poliforme)."
|
|
37
|
+
})
|
|
38
|
+
], FeedActivitySubject.prototype, "subjectId", 2);
|
|
39
|
+
__decorateClass([
|
|
40
|
+
Column({
|
|
41
|
+
type: "enum",
|
|
42
|
+
enum: FeedSubjectRole,
|
|
43
|
+
enumName: "FeedSubjectRole",
|
|
44
|
+
nullable: true,
|
|
45
|
+
comment: "Papel da entidade na activity (PRIMARY = entidade principal, RELATED = entidade relacionada). \xDAtil para renderiza\xE7\xE3o do card."
|
|
46
|
+
})
|
|
47
|
+
], FeedActivitySubject.prototype, "role", 2);
|
|
48
|
+
__decorateClass([
|
|
49
|
+
ManyToOne(() => FeedActivity, (activity) => activity.subjects, { onDelete: "CASCADE" }),
|
|
50
|
+
JoinColumn({ name: "activity_id" })
|
|
51
|
+
], FeedActivitySubject.prototype, "activity", 2);
|
|
52
|
+
FeedActivitySubject = __decorateClass([
|
|
53
|
+
Entity("feed_activity_subjects"),
|
|
54
|
+
Index("IDX_feed_activity_subjects_subject", ["subjectType", "subjectId", "activityId"])
|
|
55
|
+
], FeedActivitySubject);
|
|
56
|
+
export {
|
|
57
|
+
FeedActivitySubject
|
|
58
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-activity-subjects/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FeedOutboxStatus } from '../enums';
|
|
2
|
+
export declare class FeedOutbox {
|
|
3
|
+
id: string;
|
|
4
|
+
eventType: string;
|
|
5
|
+
rawPayload: Record<string, unknown>;
|
|
6
|
+
status: FeedOutboxStatus;
|
|
7
|
+
attempts: number;
|
|
8
|
+
lastError: string | null;
|
|
9
|
+
availableAt: Date;
|
|
10
|
+
processedAt: Date | null;
|
|
11
|
+
createdAt: Date;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=feed-outbox.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feed-outbox.entity.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-outbox/feed-outbox.entity.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAe5C,qBAIa,UAAU;IAKrB,EAAE,EAAE,MAAM,CAAC;IAQX,SAAS,EAAE,MAAM,CAAC;IAQlB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IASpC,MAAM,EAAE,gBAAgB,CAAC;IAOzB,QAAQ,EAAE,MAAM,CAAC;IAQjB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAQzB,WAAW,EAAE,IAAI,CAAC;IAQlB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IAQzB,SAAS,EAAE,IAAI,CAAC;CACjB"}
|
|
@@ -0,0 +1,93 @@
|
|
|
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, CreateDateColumn, Entity, Index, PrimaryGeneratedColumn } from "typeorm";
|
|
12
|
+
import { FeedOutboxStatus } from "../enums/index.js";
|
|
13
|
+
let FeedOutbox = class {
|
|
14
|
+
};
|
|
15
|
+
__decorateClass([
|
|
16
|
+
PrimaryGeneratedColumn({
|
|
17
|
+
type: "bigint",
|
|
18
|
+
primaryKeyConstraintName: "PK_feed_outbox_id"
|
|
19
|
+
})
|
|
20
|
+
], FeedOutbox.prototype, "id", 2);
|
|
21
|
+
__decorateClass([
|
|
22
|
+
Column({
|
|
23
|
+
name: "event_type",
|
|
24
|
+
type: "varchar",
|
|
25
|
+
length: 80,
|
|
26
|
+
comment: "Tipo do evento de dom\xEDnio (ex.: MATCH_GOAL, TOURNAMENT_REGISTRATION_OPENED)."
|
|
27
|
+
})
|
|
28
|
+
], FeedOutbox.prototype, "eventType", 2);
|
|
29
|
+
__decorateClass([
|
|
30
|
+
Column({
|
|
31
|
+
name: "raw_payload",
|
|
32
|
+
type: "jsonb",
|
|
33
|
+
default: () => "'{}'::jsonb",
|
|
34
|
+
comment: "Dados crus do evento de dom\xEDnio. O worker usa para montar a activity final."
|
|
35
|
+
})
|
|
36
|
+
], FeedOutbox.prototype, "rawPayload", 2);
|
|
37
|
+
__decorateClass([
|
|
38
|
+
Column({
|
|
39
|
+
type: "enum",
|
|
40
|
+
enum: FeedOutboxStatus,
|
|
41
|
+
enumName: "FeedOutboxStatus",
|
|
42
|
+
default: FeedOutboxStatus.PENDING,
|
|
43
|
+
comment: "Estado de processamento da linha."
|
|
44
|
+
})
|
|
45
|
+
], FeedOutbox.prototype, "status", 2);
|
|
46
|
+
__decorateClass([
|
|
47
|
+
Column({
|
|
48
|
+
type: "int",
|
|
49
|
+
default: 0,
|
|
50
|
+
comment: "N\xFAmero de tentativas de processamento j\xE1 realizadas."
|
|
51
|
+
})
|
|
52
|
+
], FeedOutbox.prototype, "attempts", 2);
|
|
53
|
+
__decorateClass([
|
|
54
|
+
Column({
|
|
55
|
+
name: "last_error",
|
|
56
|
+
type: "text",
|
|
57
|
+
nullable: true,
|
|
58
|
+
comment: "\xDAltimo erro registrado (auxilia debug e auditoria)."
|
|
59
|
+
})
|
|
60
|
+
], FeedOutbox.prototype, "lastError", 2);
|
|
61
|
+
__decorateClass([
|
|
62
|
+
Column({
|
|
63
|
+
name: "available_at",
|
|
64
|
+
type: "timestamptz",
|
|
65
|
+
default: () => "now()",
|
|
66
|
+
comment: "Data/hora a partir da qual a linha pode ser processada (usado para backoff)."
|
|
67
|
+
})
|
|
68
|
+
], FeedOutbox.prototype, "availableAt", 2);
|
|
69
|
+
__decorateClass([
|
|
70
|
+
Column({
|
|
71
|
+
name: "processed_at",
|
|
72
|
+
type: "timestamptz",
|
|
73
|
+
nullable: true,
|
|
74
|
+
comment: "Data/hora em que a linha foi processada com sucesso."
|
|
75
|
+
})
|
|
76
|
+
], FeedOutbox.prototype, "processedAt", 2);
|
|
77
|
+
__decorateClass([
|
|
78
|
+
CreateDateColumn({
|
|
79
|
+
name: "created_at",
|
|
80
|
+
type: "timestamptz",
|
|
81
|
+
default: () => "now()",
|
|
82
|
+
comment: "Data/hora de cria\xE7\xE3o da linha."
|
|
83
|
+
})
|
|
84
|
+
], FeedOutbox.prototype, "createdAt", 2);
|
|
85
|
+
FeedOutbox = __decorateClass([
|
|
86
|
+
Entity("feed_outbox"),
|
|
87
|
+
Index("IDX_feed_outbox_pending", ["status", "availableAt"], {
|
|
88
|
+
where: `"status" = 'PENDING'`
|
|
89
|
+
})
|
|
90
|
+
], FeedOutbox);
|
|
91
|
+
export {
|
|
92
|
+
FeedOutbox
|
|
93
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feed/feed-outbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/feed/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from './common';
|
|
|
5
5
|
export * from './coupons';
|
|
6
6
|
export { DATABASE_ENTITIES } from './database-entities';
|
|
7
7
|
export * from './facilities';
|
|
8
|
+
export * from './feed';
|
|
8
9
|
export * from './history-logs';
|
|
9
10
|
export * from './notifications';
|
|
10
11
|
export * from './payments';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@ export * from "./common/index.js";
|
|
|
5
5
|
export * from "./coupons/index.js";
|
|
6
6
|
import { DATABASE_ENTITIES } from "./database-entities/index.js";
|
|
7
7
|
export * from "./facilities/index.js";
|
|
8
|
+
export * from "./feed/index.js";
|
|
8
9
|
export * from "./history-logs/index.js";
|
|
9
10
|
export * from "./notifications/index.js";
|
|
10
11
|
export * from "./payments/index.js";
|