echadospalante-core 9.3.4 → 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 (100) hide show
  1. package/dist/app/modules/domain/contributions/donation.d.ts +10 -0
  2. package/dist/app/modules/domain/contributions/donation.js +2 -0
  3. package/dist/app/modules/domain/contributions/index.js +2 -0
  4. package/dist/app/modules/domain/contributions/sponsor.d.ts +10 -0
  5. package/dist/app/modules/domain/contributions/sponsor.js +2 -0
  6. package/dist/app/modules/domain/events/event-category.d.ts +10 -0
  7. package/dist/app/modules/domain/events/event-category.js +2 -0
  8. package/dist/app/modules/domain/events/event-location.d.ts +8 -0
  9. package/dist/app/modules/domain/events/event-location.js +2 -0
  10. package/dist/app/modules/domain/events/event.d.ts +18 -0
  11. package/dist/app/modules/domain/events/event.js +2 -0
  12. package/dist/app/modules/domain/publications/clap.d.ts +8 -0
  13. package/dist/app/modules/domain/publications/clap.js +2 -0
  14. package/dist/app/modules/domain/publications/comment.d.ts +9 -0
  15. package/dist/app/modules/domain/publications/comment.js +2 -0
  16. package/dist/app/modules/domain/publications/content.d.ts +10 -0
  17. package/dist/app/modules/domain/publications/content.js +12 -0
  18. package/dist/app/modules/domain/publications/index.d.ts +6 -0
  19. package/dist/app/modules/domain/publications/index.js +5 -0
  20. package/dist/app/modules/domain/publications/publication.d.ts +27 -0
  21. package/dist/app/modules/domain/publications/publication.js +11 -0
  22. package/dist/app/modules/domain/user/detail.d.ts +2 -2
  23. package/dist/app/modules/domain/ventures/category.d.ts +4 -2
  24. package/dist/app/modules/domain/ventures/detail.d.ts +3 -3
  25. package/dist/app/modules/domain/ventures/subscription.d.ts +3 -3
  26. package/dist/app/modules/domain/ventures/venture.d.ts +1 -0
  27. package/dist/app/modules/infrastructure/database/entities/event-category.data.d.ts +1 -1
  28. package/dist/app/modules/infrastructure/database/entities/event-category.data.js +3 -3
  29. package/dist/app/modules/infrastructure/database/entities/event-donation.data.d.ts +1 -3
  30. package/dist/app/modules/infrastructure/database/entities/event-donation.data.js +3 -13
  31. package/dist/app/modules/infrastructure/database/entities/event-location.data.d.ts +4 -4
  32. package/dist/app/modules/infrastructure/database/entities/municipality.data.d.ts +0 -1
  33. package/dist/app/modules/infrastructure/database/entities/municipality.data.js +0 -5
  34. package/dist/app/modules/infrastructure/database/entities/publication-clap.data.d.ts +2 -4
  35. package/dist/app/modules/infrastructure/database/entities/publication-clap.data.js +7 -17
  36. package/dist/app/modules/infrastructure/database/entities/publication-comment.data.d.ts +3 -6
  37. package/dist/app/modules/infrastructure/database/entities/publication-comment.data.js +12 -27
  38. package/dist/app/modules/infrastructure/database/entities/publication-content.data.d.ts +1 -2
  39. package/dist/app/modules/infrastructure/database/entities/publication-content.data.js +2 -7
  40. package/dist/app/modules/infrastructure/database/entities/role.data.d.ts +1 -1
  41. package/dist/app/modules/infrastructure/database/entities/user-detail.data.d.ts +0 -1
  42. package/dist/app/modules/infrastructure/database/entities/user-detail.data.js +3 -8
  43. package/dist/app/modules/infrastructure/database/entities/venture-category.data.d.ts +2 -2
  44. package/dist/app/modules/infrastructure/database/entities/venture-contact.data.d.ts +1 -1
  45. package/dist/app/modules/infrastructure/database/entities/venture-detail.data.d.ts +1 -1
  46. package/dist/app/modules/infrastructure/database/entities/venture-event.data.d.ts +4 -6
  47. package/dist/app/modules/infrastructure/database/entities/venture-event.data.js +21 -31
  48. package/dist/app/modules/infrastructure/database/entities/venture-location.data.d.ts +4 -5
  49. package/dist/app/modules/infrastructure/database/entities/venture-location.data.js +0 -5
  50. package/dist/app/modules/infrastructure/database/entities/venture-publication.data.d.ts +1 -1
  51. package/dist/app/modules/infrastructure/database/entities/venture-publication.data.js +5 -5
  52. package/dist/app/modules/infrastructure/database/entities/venture-sponsorship.data.d.ts +2 -4
  53. package/dist/app/modules/infrastructure/database/entities/venture-sponsorship.data.js +2 -12
  54. package/dist/app/modules/infrastructure/database/entities/venture-subscription.data.d.ts +2 -4
  55. package/dist/app/modules/infrastructure/database/entities/venture-subscription.data.js +2 -12
  56. package/dist/app/modules/infrastructure/database/entities/venture.data.d.ts +4 -8
  57. package/dist/app/modules/infrastructure/database/entities/venture.data.js +0 -20
  58. package/dist/index.d.ts +2 -3
  59. package/dist/index.js +2 -3
  60. package/package.json +1 -1
  61. package/src/app/modules/domain/{donations → contributions}/donation.ts +5 -3
  62. package/src/app/modules/domain/contributions/index.ts +2 -0
  63. package/src/app/modules/domain/{donations → contributions}/sponsor.ts +3 -3
  64. package/src/app/modules/domain/{feeds/category.ts → events/event-category.ts} +3 -1
  65. package/src/app/modules/domain/{feeds → events}/event.ts +4 -3
  66. package/src/app/modules/domain/{feeds → publications}/clap.ts +1 -1
  67. package/src/app/modules/domain/{feeds → publications}/comment.ts +1 -0
  68. package/src/app/modules/domain/publications/content.ts +11 -0
  69. package/src/app/modules/domain/{feeds → publications}/index.ts +3 -3
  70. package/src/app/modules/domain/user/detail.ts +2 -2
  71. package/src/app/modules/domain/ventures/category.ts +4 -2
  72. package/src/app/modules/domain/ventures/detail.ts +3 -3
  73. package/src/app/modules/domain/ventures/subscription.ts +3 -2
  74. package/src/app/modules/domain/ventures/venture.ts +2 -1
  75. package/src/app/modules/infrastructure/database/entities/event-category.data.ts +2 -5
  76. package/src/app/modules/infrastructure/database/entities/event-donation.data.ts +2 -8
  77. package/src/app/modules/infrastructure/database/entities/event-location.data.ts +4 -4
  78. package/src/app/modules/infrastructure/database/entities/municipality.data.ts +0 -3
  79. package/src/app/modules/infrastructure/database/entities/publication-clap.data.ts +4 -10
  80. package/src/app/modules/infrastructure/database/entities/publication-comment.data.ts +8 -17
  81. package/src/app/modules/infrastructure/database/entities/publication-content.data.ts +1 -4
  82. package/src/app/modules/infrastructure/database/entities/role.data.ts +1 -1
  83. package/src/app/modules/infrastructure/database/entities/user-detail.data.ts +3 -6
  84. package/src/app/modules/infrastructure/database/entities/venture-category.data.ts +2 -2
  85. package/src/app/modules/infrastructure/database/entities/venture-contact.data.ts +1 -1
  86. package/src/app/modules/infrastructure/database/entities/venture-detail.data.ts +1 -1
  87. package/src/app/modules/infrastructure/database/entities/venture-event.data.ts +13 -22
  88. package/src/app/modules/infrastructure/database/entities/venture-location.data.ts +4 -7
  89. package/src/app/modules/infrastructure/database/entities/venture-publication.data.ts +4 -4
  90. package/src/app/modules/infrastructure/database/entities/venture-sponsorship.data.ts +2 -8
  91. package/src/app/modules/infrastructure/database/entities/venture-subscription.data.ts +2 -8
  92. package/src/app/modules/infrastructure/database/entities/venture.data.ts +5 -16
  93. package/src/index.ts +2 -3
  94. package/src/app/modules/domain/news/category.ts +0 -9
  95. package/src/app/modules/domain/news/clap.ts +0 -9
  96. package/src/app/modules/domain/news/index.ts +0 -5
  97. package/src/app/modules/domain/news/news.ts +0 -20
  98. /package/{src/app/modules/domain/donations/index.ts → dist/app/modules/domain/contributions/index.d.ts} +0 -0
  99. /package/src/app/modules/domain/{feeds/location.ts → events/event-location.ts} +0 -0
  100. /package/src/app/modules/domain/{feeds → publications}/publication.ts +0 -0
@@ -16,23 +16,17 @@ export class PublicationClapData {
16
16
  @PrimaryGeneratedColumn("uuid")
17
17
  id: string;
18
18
 
19
- @Column()
20
- publicationId: string;
21
-
22
- @CreateDateColumn()
23
- createdAt: Date;
24
-
25
- @Column()
26
- userDetailId: string;
27
-
28
19
  @ManyToOne(
29
20
  () => VenturePublicationData,
30
21
  (venturePublication) => venturePublication.claps
31
22
  )
32
23
  @JoinColumn({ name: "publicationId" })
33
- venturePublication: VenturePublicationData;
24
+ publication: VenturePublicationData;
34
25
 
35
26
  @ManyToOne(() => UserDetailData, (userDetail) => userDetail.publicationClaps)
36
27
  @JoinColumn({ name: "userDetailId" })
37
28
  user: UserDetailData;
29
+
30
+ @CreateDateColumn()
31
+ createdAt: Date;
38
32
  }
@@ -16,29 +16,20 @@ export class PublicationCommentData {
16
16
  @PrimaryGeneratedColumn("uuid")
17
17
  id: string;
18
18
 
19
- @Column()
20
- authorDetailId: string;
21
-
22
- @Column()
23
- publicationId: string;
24
-
25
- @Column()
26
- body: string;
27
-
28
- @CreateDateColumn()
29
- createdAt: Date;
30
-
31
- @UpdateDateColumn()
32
- updatedAt: Date;
33
-
34
19
  @ManyToOne(() => UserDetailData, (userDetail) => userDetail.comments)
35
20
  @JoinColumn({ name: "authorDetailId" })
36
- User: UserDetailData;
21
+ author: UserDetailData;
22
+
23
+ @Column()
24
+ content: string;
37
25
 
38
26
  @ManyToOne(
39
27
  () => VenturePublicationData,
40
28
  (venturePublication) => venturePublication.comments
41
29
  )
42
30
  @JoinColumn({ name: "publicationId" })
43
- venturePublication: VenturePublicationData;
31
+ publication: VenturePublicationData;
32
+
33
+ @CreateDateColumn()
34
+ createdAt: Date;
44
35
  }
@@ -22,9 +22,6 @@ export class PublicationContentData {
22
22
  @Column()
23
23
  content: string;
24
24
 
25
- @Column()
26
- publicationId: string;
27
-
28
25
  @CreateDateColumn()
29
26
  createdAt: Date;
30
27
 
@@ -36,5 +33,5 @@ export class PublicationContentData {
36
33
  (venturePublication) => venturePublication.contents
37
34
  )
38
35
  @JoinColumn({ name: "publicationId" })
39
- venturePublication: VenturePublicationData;
36
+ publication: VenturePublicationData;
40
37
  }
@@ -28,5 +28,5 @@ export class RoleData {
28
28
  updatedAt: Date;
29
29
 
30
30
  @ManyToMany(() => UserData, (user) => user.roles, { eager: false })
31
- users: UserData[];
31
+ users?: UserData[];
32
32
  }
@@ -30,9 +30,6 @@ export class UserDetailData {
30
30
  @Column()
31
31
  birthDate: Date;
32
32
 
33
- @Column()
34
- municipalityId: number;
35
-
36
33
  @OneToOne(() => UserData, (user) => user.detail)
37
34
  user?: UserData;
38
35
 
@@ -42,7 +39,7 @@ export class UserDetailData {
42
39
 
43
40
  @OneToMany(
44
41
  () => PublicationCommentData,
45
- (publicationComment) => publicationComment.User
42
+ (publicationComment) => publicationComment.author
46
43
  )
47
44
  comments: PublicationCommentData[];
48
45
 
@@ -60,13 +57,13 @@ export class UserDetailData {
60
57
 
61
58
  @OneToMany(
62
59
  () => VentureSponsorshipData,
63
- (ventureSponsorship) => ventureSponsorship.user
60
+ (ventureSponsorship) => ventureSponsorship.sponsor
64
61
  )
65
62
  sponsorships: VentureSponsorshipData[];
66
63
 
67
64
  @OneToMany(
68
65
  () => VentureSubscriptionData,
69
- (ventureSubscription) => ventureSubscription.user
66
+ (ventureSubscription) => ventureSubscription.subscriber
70
67
  )
71
68
  subscriptions: VentureSubscriptionData[];
72
69
 
@@ -31,8 +31,8 @@ export class VentureCategoryData {
31
31
  updatedAt: Date;
32
32
 
33
33
  @ManyToMany(() => UserData, (user) => user.preferences)
34
- users: UserData[];
34
+ users?: UserData[];
35
35
 
36
36
  @ManyToMany(() => VentureData, (venture) => venture.categories)
37
- ventures: VentureData[];
37
+ ventures?: VentureData[];
38
38
  }
@@ -26,5 +26,5 @@ export class VentureContactData {
26
26
  updatedAt: Date;
27
27
 
28
28
  @OneToOne(() => VentureData, (venture) => venture.contact)
29
- Venture: VentureData;
29
+ Venture?: VentureData;
30
30
  }
@@ -25,7 +25,7 @@ export class VentureDetailData {
25
25
  updatedAt: Date;
26
26
 
27
27
  @OneToOne(() => VentureData, (venture) => venture.detail)
28
- venture: VentureData;
28
+ venture?: VentureData;
29
29
 
30
30
  @OneToMany(
31
31
  () => VentureEventData,
@@ -29,8 +29,19 @@ export class VentureEventData {
29
29
  @Column()
30
30
  coverPhoto: string;
31
31
 
32
- @Column()
33
- ventureId: string;
32
+ @ManyToOne(() => VentureDetailData, (ventureDetail) => ventureDetail.events)
33
+ @JoinColumn({ name: "ventureId" })
34
+ ventureDetail?: VentureDetailData;
35
+
36
+ @OneToOne(() => EventLocationData, (eventLocation) => eventLocation.event)
37
+ @JoinColumn({ name: "locationId" })
38
+ location: EventLocationData;
39
+
40
+ @ManyToMany(() => EventCategoryData, (eventCategory) => eventCategory.events)
41
+ categories: EventCategoryData[];
42
+
43
+ @OneToMany(() => EventDonationData, (eventDonation) => eventDonation.event)
44
+ donations: EventDonationData[];
34
45
 
35
46
  @Column()
36
47
  startDate: Date;
@@ -43,24 +54,4 @@ export class VentureEventData {
43
54
 
44
55
  @UpdateDateColumn()
45
56
  updatedAt: Date;
46
-
47
- @Column({ unique: true })
48
- locationId: string;
49
-
50
- @ManyToOne(() => VentureDetailData, (ventureDetail) => ventureDetail.events)
51
- @JoinColumn({ name: "ventureId" })
52
- ventureDetail: VentureDetailData;
53
-
54
- @OneToOne(() => EventLocationData, (eventLocation) => eventLocation.event)
55
- @JoinColumn({ name: "locationId" })
56
- location: EventLocationData;
57
-
58
- @OneToMany(() => EventDonationData, (eventDonation) => eventDonation.event)
59
- donations: EventDonationData[];
60
-
61
- @ManyToMany(
62
- () => EventCategoryData,
63
- (eventCategory) => eventCategory.ventureEvent
64
- )
65
- EventCategory: EventCategoryData[];
66
57
  }
@@ -13,17 +13,14 @@ export class VentureLocationData {
13
13
  @PrimaryGeneratedColumn("uuid")
14
14
  id: string;
15
15
 
16
- @Column({ nullable: true })
17
- ventureId: string;
18
-
19
16
  @Column("float", { nullable: true })
20
- lat: number;
17
+ lat?: number;
21
18
 
22
19
  @Column("float", { nullable: true })
23
- lng: number;
20
+ lng?: number;
24
21
 
25
22
  @Column({ nullable: true })
26
- description: string;
23
+ description?: string;
27
24
 
28
25
  @CreateDateColumn()
29
26
  createdAt: Date;
@@ -32,5 +29,5 @@ export class VentureLocationData {
32
29
  updatedAt: Date;
33
30
 
34
31
  @OneToOne(() => VentureData, (venture) => venture.location)
35
- Venture: VentureData;
32
+ Venture?: VentureData;
36
33
  }
@@ -13,7 +13,7 @@ import { PublicationClapData } from "./publication-clap.data";
13
13
  import { PublicationCommentData } from "./publication-comment.data";
14
14
  import { VentureDetailData } from "./venture-detail.data";
15
15
  import { PublicationContentData } from "./publication-content.data";
16
- import { PublicationType } from "../../../domain/feeds";
16
+ import { PublicationType } from "../../../domain/publications";
17
17
 
18
18
  @Entity()
19
19
  export class VenturePublicationData {
@@ -47,19 +47,19 @@ export class VenturePublicationData {
47
47
 
48
48
  @OneToMany(
49
49
  () => PublicationClapData,
50
- (publicationClap) => publicationClap.venturePublication
50
+ (publicationClap) => publicationClap.publication
51
51
  )
52
52
  claps: PublicationClapData[];
53
53
 
54
54
  @OneToMany(
55
55
  () => PublicationCommentData,
56
- (publicationComment) => publicationComment.venturePublication
56
+ (publicationComment) => publicationComment.publication
57
57
  )
58
58
  comments: PublicationCommentData[];
59
59
 
60
60
  @OneToMany(
61
61
  () => PublicationContentData,
62
- (publicationContent) => publicationContent.venturePublication
62
+ (publicationContent) => publicationContent.publication
63
63
  )
64
64
  contents: PublicationContentData[];
65
65
  }
@@ -15,9 +15,6 @@ export class VentureSponsorshipData {
15
15
  @PrimaryGeneratedColumn("uuid")
16
16
  id: string;
17
17
 
18
- @Column()
19
- ventureDetailId: string;
20
-
21
18
  @Column("float")
22
19
  monthlyAmount: number;
23
20
 
@@ -27,17 +24,14 @@ export class VentureSponsorshipData {
27
24
  @UpdateDateColumn()
28
25
  updatedAt: Date;
29
26
 
30
- @Column()
31
- sponsorDetailId: string;
32
-
33
27
  @ManyToOne(() => UserDetailData, (userDetail) => userDetail.sponsorships)
34
28
  @JoinColumn({ name: "sponsorDetailId" })
35
- user: UserDetailData;
29
+ sponsor?: UserDetailData;
36
30
 
37
31
  @ManyToOne(
38
32
  () => VentureDetailData,
39
33
  (ventureDetail) => ventureDetail.sponsorships
40
34
  )
41
35
  @JoinColumn({ name: "ventureDetailId" })
42
- detail: VentureDetailData;
36
+ detail?: VentureDetailData;
43
37
  }
@@ -15,23 +15,17 @@ export class VentureSubscriptionData {
15
15
  @PrimaryGeneratedColumn("uuid")
16
16
  id: string;
17
17
 
18
- @Column()
19
- ventureId: string;
20
-
21
18
  @CreateDateColumn()
22
19
  createdAt: Date;
23
20
 
24
- @Column()
25
- subscriberDetailId: string;
26
-
27
21
  @ManyToOne(() => UserDetailData, (userDetail) => userDetail.subscriptions)
28
22
  @JoinColumn({ name: "subscriberDetailId" })
29
- user: UserDetailData;
23
+ subscriber?: UserDetailData;
30
24
 
31
25
  @ManyToOne(
32
26
  () => VentureDetailData,
33
27
  (ventureDetail) => ventureDetail.subscriptions
34
28
  )
35
29
  @JoinColumn({ name: "ventureId" })
36
- detail: VentureDetailData;
30
+ detail?: VentureDetailData;
37
31
  }
@@ -10,6 +10,7 @@ import {
10
10
  JoinTable,
11
11
  JoinColumn,
12
12
  } from "typeorm";
13
+
13
14
  import { VentureDetailData } from "./venture-detail.data";
14
15
  import { VentureLocationData } from "./venture-location.data";
15
16
  import { UserDetailData } from "./user-detail.data";
@@ -39,45 +40,33 @@ export class VentureData {
39
40
  @Column({ default: false })
40
41
  verified: boolean;
41
42
 
42
- @Column({ unique: true })
43
- detailId: string;
44
-
45
43
  @CreateDateColumn()
46
44
  createdAt: Date;
47
45
 
48
46
  @UpdateDateColumn()
49
47
  updatedAt: Date;
50
48
 
51
- @Column({ unique: true })
52
- locationId: string;
53
-
54
- @Column()
55
- ownerDetailId: string;
56
-
57
- @Column({ unique: true })
58
- ventureContactId: string;
59
-
60
49
  @OneToOne(() => VentureDetailData, (ventureDetail) => ventureDetail.venture)
61
50
  @JoinColumn({ name: "detailId" })
62
- detail: VentureDetailData;
51
+ detail?: VentureDetailData;
63
52
 
64
53
  @OneToOne(
65
54
  () => VentureLocationData,
66
55
  (ventureLocation) => ventureLocation.Venture
67
56
  )
68
57
  @JoinColumn({ name: "locationId" })
69
- location: VentureLocationData;
58
+ location?: VentureLocationData;
70
59
 
71
60
  @ManyToOne(() => UserDetailData, (userDetail) => userDetail.ventures)
72
61
  @JoinColumn({ name: "ownerDetailId" })
73
- ownerDetail: UserDetailData;
62
+ ownerDetail?: UserDetailData;
74
63
 
75
64
  @OneToOne(
76
65
  () => VentureContactData,
77
66
  (ventureContact) => ventureContact.Venture
78
67
  )
79
68
  @JoinColumn({ name: "ventureContactId" })
80
- contact: VentureContactData;
69
+ contact?: VentureContactData;
81
70
 
82
71
  @ManyToMany(
83
72
  () => VentureCategoryData,
package/src/index.ts CHANGED
@@ -1,9 +1,8 @@
1
1
  import "reflect-metadata";
2
2
 
3
3
  export * from "./app/modules/domain/auth";
4
- export * from "./app/modules/domain/donations";
5
- export * from "./app/modules/domain/feeds";
6
- export * from "./app/modules/domain/news";
4
+ export * from "./app/modules/domain/contributions";
5
+ export * from "./app/modules/domain/publications";
7
6
  export * from "./app/modules/domain/notifications";
8
7
  export * from "./app/modules/domain/shared";
9
8
  export * from "./app/modules/domain/user";
@@ -1,9 +0,0 @@
1
- import { News } from "./news";
2
-
3
- export interface NewsCategory {
4
- id: number;
5
- name: string;
6
- slug: string;
7
- description: string;
8
- news: News[];
9
- }
@@ -1,9 +0,0 @@
1
- import { User } from "../auth";
2
- import { News } from "./news";
3
-
4
- export interface NewsClap {
5
- id: number;
6
- user: User;
7
- news: News;
8
- createdAt: Date;
9
- }
@@ -1,5 +0,0 @@
1
- export { NewsCategory } from "./category";
2
- export { NewsClap } from "./clap";
3
-
4
- export { News } from "./news";
5
- export { NewsContent } from "./news";
@@ -1,20 +0,0 @@
1
- import { ContentType } from "../shared";
2
- import { NewsCategory } from "./category";
3
- import { NewsClap } from "./clap";
4
-
5
- export interface News {
6
- id: string;
7
- title: string;
8
- slug: string;
9
- claps: NewsClap[];
10
- comments: Comment[];
11
- body: NewsContent[];
12
- categories: NewsCategory[];
13
- createdAt: Date;
14
- }
15
-
16
- export interface NewsContent {
17
- id: string;
18
- type: ContentType;
19
- content: string; // JSON string
20
- }