echadospalante-core 5.1.0 → 8.1.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 (52) hide show
  1. package/dist/app/modules/donations/donation.d.ts +5 -5
  2. package/dist/app/modules/donations/index.d.ts +2 -2
  3. package/dist/app/modules/donations/sponsor.d.ts +2 -2
  4. package/dist/app/modules/feeds/clap.d.ts +4 -4
  5. package/dist/app/modules/feeds/comment.d.ts +5 -5
  6. package/dist/app/modules/feeds/event.d.ts +6 -4
  7. package/dist/app/modules/feeds/index.d.ts +2 -2
  8. package/dist/app/modules/feeds/location.d.ts +8 -0
  9. package/dist/app/modules/feeds/location.js +2 -0
  10. package/dist/app/modules/feeds/publication.d.ts +7 -8
  11. package/dist/app/modules/feeds/publication.js +3 -3
  12. package/dist/app/modules/notifications/notification.d.ts +2 -2
  13. package/dist/app/modules/shared/geo.d.ts +3 -19
  14. package/dist/app/modules/shared/geo.js +8 -0
  15. package/dist/app/modules/shared/index.d.ts +0 -1
  16. package/dist/app/modules/user/contact.d.ts +8 -3
  17. package/dist/app/modules/user/detail.d.ts +14 -0
  18. package/dist/app/modules/user/index.d.ts +1 -2
  19. package/dist/app/modules/user/user.d.ts +7 -11
  20. package/dist/app/modules/ventures/contact.d.ts +9 -0
  21. package/dist/app/modules/ventures/contact.js +2 -0
  22. package/dist/app/modules/ventures/detail.d.ts +2 -2
  23. package/dist/app/modules/ventures/index.d.ts +1 -1
  24. package/dist/app/modules/ventures/location.d.ts +11 -0
  25. package/dist/app/modules/ventures/location.js +3 -0
  26. package/dist/app/modules/ventures/subscription.d.ts +3 -3
  27. package/dist/app/modules/ventures/venture.d.ts +6 -2
  28. package/package.json +1 -1
  29. package/src/app/modules/donations/donation.ts +5 -4
  30. package/src/app/modules/donations/index.ts +2 -2
  31. package/src/app/modules/donations/sponsor.ts +2 -1
  32. package/src/app/modules/feeds/clap.ts +4 -3
  33. package/src/app/modules/feeds/comment.ts +5 -4
  34. package/src/app/modules/feeds/event.ts +6 -4
  35. package/src/app/modules/feeds/index.ts +2 -2
  36. package/src/app/modules/feeds/location.ts +10 -0
  37. package/src/app/modules/feeds/publication.ts +6 -7
  38. package/src/app/modules/notifications/notification.ts +2 -2
  39. package/src/app/modules/shared/geo.ts +17 -19
  40. package/src/app/modules/shared/index.ts +0 -1
  41. package/src/app/modules/user/contact.ts +8 -3
  42. package/src/app/modules/user/detail.ts +16 -0
  43. package/src/app/modules/user/index.ts +1 -2
  44. package/src/app/modules/user/user.ts +7 -11
  45. package/src/app/modules/ventures/category.ts +1 -1
  46. package/src/app/modules/ventures/contact.ts +10 -0
  47. package/src/app/modules/ventures/detail.ts +2 -2
  48. package/src/app/modules/ventures/index.ts +1 -1
  49. package/src/app/modules/ventures/location.ts +25 -0
  50. package/src/app/modules/ventures/subscription.ts +3 -2
  51. package/src/app/modules/ventures/venture.ts +6 -2
  52. package/src/app/modules/user/profile.ts +0 -12
@@ -1,8 +1,8 @@
1
- import { User } from "../auth";
2
- import { Venture } from "../ventures/venture";
3
- export interface Donation {
1
+ import { VentureEvent } from "../feeds/event";
2
+ import { UserDetail } from "../user";
3
+ export interface EventDonation {
4
4
  id: string;
5
- donor: User;
6
- venture: Venture;
5
+ donor: UserDetail;
6
+ venture: VentureEvent;
7
7
  createdAt: Date;
8
8
  }
@@ -1,2 +1,2 @@
1
- export { Donation } from "./donation";
2
- export { VentureSponsorship as Sponsorship } from "./sponsor";
1
+ export { EventDonation } from "./donation";
2
+ export { VentureSponsorship } from "./sponsor";
@@ -1,8 +1,8 @@
1
- import { User } from "../auth";
1
+ import { UserDetail } from "../user";
2
2
  import { Venture } from "../ventures/venture";
3
3
  export interface VentureSponsorship {
4
4
  id: string;
5
- sponsor: User;
5
+ sponsor: UserDetail;
6
6
  venture: Venture;
7
7
  monthlyAmount: number;
8
8
  createdAt: Date;
@@ -1,8 +1,8 @@
1
- import { User } from "../auth";
2
- import { Publication } from "./publication";
1
+ import { UserDetail } from "../user";
2
+ import { VenturePublication } from "./publication";
3
3
  export interface PublicationClap {
4
4
  id: number;
5
- user: User;
6
- publication: Publication;
5
+ user: UserDetail;
6
+ publication: VenturePublication;
7
7
  createdAt: Date;
8
8
  }
@@ -1,8 +1,8 @@
1
- import { User } from "../auth";
2
- import { Publication } from "./publication";
3
- export interface Comment {
1
+ import { UserDetail } from "../user";
2
+ import { VenturePublication } from "./publication";
3
+ export interface PublicationComment {
4
4
  id: string;
5
- author: User;
5
+ author: UserDetail;
6
6
  content: string;
7
- publication: Publication;
7
+ publication: VenturePublication;
8
8
  }
@@ -1,14 +1,16 @@
1
- import { Donation } from "../donations";
2
- import { Location } from "../shared/geo";
1
+ import { EventDonation } from "../donations";
2
+ import { VentureDetail } from "../ventures";
3
3
  import { EventCategory } from "./category";
4
+ import { EventLocation } from "./location";
4
5
  export interface VentureEvent {
5
6
  id: string;
6
7
  title: string;
7
8
  description: string;
8
9
  coverPhoto: string;
9
- location: Location;
10
+ ventureDetail: VentureDetail;
11
+ location: EventLocation;
10
12
  categories: EventCategory[];
11
- donations: Donation[];
13
+ donations: EventDonation[];
12
14
  startDate: Date;
13
15
  endDate: Date;
14
16
  createdAt: Date;
@@ -1,5 +1,5 @@
1
1
  export { EventCategory } from "./category";
2
2
  export { PublicationClap } from "./clap";
3
- export { Comment } from "./comment";
3
+ export { PublicationComment } from "./comment";
4
4
  export { VentureEvent } from "./event";
5
- export { Publication, PublicationContent, PublicationType, } from "./publication";
5
+ export { PublicationContent, PublicationType, VenturePublication, } from "./publication";
@@ -0,0 +1,8 @@
1
+ import { VentureEvent } from "./event";
2
+ export interface EventLocation {
3
+ id: string;
4
+ lat?: number;
5
+ lng?: number;
6
+ description?: string;
7
+ event: VentureEvent;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,24 +1,23 @@
1
- import { User } from "../auth";
2
1
  import { ContentType } from "../shared";
3
2
  import { Venture } from "../ventures/venture";
4
3
  import { PublicationClap } from "./clap";
5
- export interface Publication {
4
+ import { PublicationComment } from "./comment";
5
+ export interface VenturePublication {
6
6
  id: string;
7
- author: User;
8
7
  description: string;
9
8
  venture: Venture;
10
9
  type: PublicationType;
11
10
  claps: PublicationClap[];
12
- comments: Comment[];
11
+ comments: PublicationComment[];
13
12
  body: PublicationContent[];
14
13
  createdAt: Date;
15
14
  }
16
15
  export declare enum PublicationType {
17
- TEXTUAL = "TEXTUAL",
18
- VIDEO = "VIDEO",
19
- IMAGE = "IMAGE",
16
+ STANDARD = "STANDARD",
20
17
  ANNOUNCEMENT = "ANNOUNCEMENT",
21
- ACHIEVEMENT = "ACHIEVEMENT"
18
+ ACHIEVEMENT = "ACHIEVEMENT",
19
+ PROMOTION = "PROMOTION",
20
+ BEHIND_THE_SCENES = "BEHIND_THE_SCENES"
22
21
  }
23
22
  export interface PublicationContent {
24
23
  id: string;
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PublicationType = void 0;
4
4
  var PublicationType;
5
5
  (function (PublicationType) {
6
- PublicationType["TEXTUAL"] = "TEXTUAL";
7
- PublicationType["VIDEO"] = "VIDEO";
8
- PublicationType["IMAGE"] = "IMAGE";
6
+ PublicationType["STANDARD"] = "STANDARD";
9
7
  PublicationType["ANNOUNCEMENT"] = "ANNOUNCEMENT";
10
8
  PublicationType["ACHIEVEMENT"] = "ACHIEVEMENT";
9
+ PublicationType["PROMOTION"] = "PROMOTION";
10
+ PublicationType["BEHIND_THE_SCENES"] = "BEHIND_THE_SCENES";
11
11
  })(PublicationType || (exports.PublicationType = PublicationType = {}));
@@ -1,8 +1,8 @@
1
- import { User } from "../auth";
1
+ import { UserDetail } from "../user";
2
2
  export interface Notification {
3
3
  id: string;
4
4
  title: string;
5
- user: User;
5
+ user: UserDetail;
6
6
  type: NotificationType;
7
7
  status: NotificationStatus;
8
8
  description: string;
@@ -1,22 +1,4 @@
1
- export interface Location {
2
- lat: number;
3
- lng: number;
4
- description?: string;
5
- }
6
- export interface Country {
7
- id: number;
8
- name: string;
9
- code: string;
10
- currency: Currency;
11
- phoneCode: string;
12
- flag: string;
13
- }
14
- export interface Currency {
15
- id: number;
16
- name: string;
17
- code: string;
18
- symbol: string;
19
- }
1
+ import { UserDetail } from "../user";
20
2
  export interface Department {
21
3
  id: number;
22
4
  name: string;
@@ -27,6 +9,8 @@ export interface Department {
27
9
  export interface Municipality {
28
10
  id: number;
29
11
  name: string;
12
+ department: Department;
13
+ userDetails: UserDetail[];
30
14
  createdAt: Date;
31
15
  updatedAt: Date;
32
16
  }
@@ -1,2 +1,10 @@
1
1
  "use strict";
2
+ // export interface Country {
3
+ // id: number;
4
+ // name: string;
5
+ // code: string;
6
+ // currency: Currency;
7
+ // phoneCode: string;
8
+ // flag: string;
9
+ // }
2
10
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,2 @@
1
- export { Location, Country, Currency } from "./geo";
2
1
  export { ContentType } from "./content-type";
3
2
  export { Pagination } from "./pagination";
@@ -1,7 +1,12 @@
1
- import { Country } from "../shared";
2
- export interface Contact {
1
+ import { User } from "./user";
2
+ export interface UserContact {
3
3
  id: string;
4
- country: Country;
5
4
  phoneNumber: string;
6
5
  address: string;
6
+ facebookUrl: string;
7
+ linkedinUrl: string;
8
+ twitterUrl: string;
9
+ instagramUrl: string;
10
+ user?: User;
11
+ updatedAt: Date;
7
12
  }
@@ -1,6 +1,20 @@
1
+ import { EventDonation, VentureSponsorship } from "../donations";
2
+ import { PublicationClap, PublicationComment } from "../feeds";
1
3
  import { Municipality } from "../shared/geo";
4
+ import { Venture, VentureSubscription } from "../ventures";
5
+ import { User } from "./user";
6
+ import { Notification } from "../notifications";
2
7
  export interface UserDetail {
8
+ id: string;
3
9
  gender: "M" | "F" | "O";
4
10
  birthDate: Date;
11
+ user: User;
5
12
  municipality: Municipality;
13
+ comments: PublicationComment[];
14
+ donations: EventDonation[];
15
+ notifications: Notification[];
16
+ publicationClaps: PublicationClap[];
17
+ sponsorships: VentureSponsorship[];
18
+ subscriptions: VentureSubscription[];
19
+ ventures: Venture[];
6
20
  }
@@ -1,5 +1,4 @@
1
- export { Contact } from "./contact";
2
- export { Profile } from "./profile";
1
+ export { UserContact } from "./contact";
3
2
  export { Role, AppRole } from "./role";
4
3
  export { User, UserCreate } from "./user";
5
4
  export { UserDetail } from "./detail";
@@ -1,24 +1,20 @@
1
- import { Venture } from "../ventures/venture";
2
- import { Role } from "./role";
3
- import { Notification } from "../notifications";
4
- import { Comment } from "../feeds/comment";
5
- import { UserDetail } from "./detail";
6
1
  import { VentureCategory } from "../ventures";
2
+ import { UserContact } from "./contact";
3
+ import { UserDetail } from "./detail";
4
+ import { Role } from "./role";
7
5
  export interface User {
8
6
  id: string;
9
7
  picture: string;
10
8
  email: string;
11
9
  firstName: string;
12
10
  lastName: string;
13
- roles: Role[];
14
- detail?: UserDetail;
15
- notifications: Notification[];
16
- ventures: Venture[];
17
- comments: Comment[];
18
- preferences: VentureCategory[];
19
11
  active: boolean;
12
+ contact?: UserContact;
13
+ detail?: UserDetail;
20
14
  verified: boolean;
21
15
  onboardingCompleted: boolean;
16
+ roles: Role[];
17
+ preferences: VentureCategory[];
22
18
  createdAt: Date;
23
19
  updatedAt: Date;
24
20
  }
@@ -0,0 +1,9 @@
1
+ import { Venture } from "./venture";
2
+ export interface VentureContact {
3
+ id: string;
4
+ email: string;
5
+ phoneNumber: string;
6
+ venture: Venture;
7
+ createdAt: Date;
8
+ updatedAt: Date;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +1,7 @@
1
1
  import { VentureSponsorship } from "../donations/sponsor";
2
2
  import { VentureEvent } from "../feeds/event";
3
- import { Publication as VenturePublication } from "../feeds/publication";
4
- import { Subscription as VentureSubscription } from "./subscription";
3
+ import { VenturePublication } from "../feeds/publication";
4
+ import { VentureSubscription } from "./subscription";
5
5
  import { Venture } from "./venture";
6
6
  export interface VentureDetail {
7
7
  id: string;
@@ -1,4 +1,4 @@
1
1
  export { VentureCategory } from "./category";
2
2
  export { VentureDetail } from "./detail";
3
- export { Subscription } from "./subscription";
3
+ export { VentureSubscription } from "./subscription";
4
4
  export { Venture } from "./venture";
@@ -0,0 +1,11 @@
1
+ import { Venture } from "./venture";
2
+ export interface VentureLocation {
3
+ id: string;
4
+ ventureId: string;
5
+ lat?: number;
6
+ lng?: number;
7
+ description?: string;
8
+ createdAt: Date;
9
+ updatedAt: Date;
10
+ venture: Venture;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // VentureLocation;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +1,8 @@
1
- import { User } from "../auth";
1
+ import { UserDetail } from "../user";
2
2
  import { Venture } from "./venture";
3
- export interface Subscription {
3
+ export interface VentureSubscription {
4
4
  id: string;
5
- subscriber: User;
5
+ subscriber: UserDetail;
6
6
  venture: Venture;
7
7
  createdAt: Date;
8
8
  }
@@ -1,16 +1,20 @@
1
- import { User } from "../auth";
1
+ import { UserDetail } from "../user";
2
2
  import { VentureCategory } from "./category";
3
+ import { VentureContact } from "./contact";
3
4
  import { VentureDetail } from "./detail";
5
+ import { VentureLocation } from "./location";
4
6
  export interface Venture {
5
7
  id: string;
6
8
  name: string;
7
9
  slug: string;
8
10
  coverPhoto: string;
9
11
  description: string;
10
- owner: User;
11
12
  active: boolean;
12
13
  verified: boolean;
13
14
  detail: VentureDetail;
15
+ ownerDetail: UserDetail;
14
16
  categories: VentureCategory[];
17
+ contact: VentureContact;
18
+ location: VentureLocation;
15
19
  createdAt: Date;
16
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "echadospalante-core",
3
- "version": "5.1.0",
3
+ "version": "8.1.0",
4
4
  "description": "This package contains the core of the echadospalante project, it contains the domain entities, helpers, and other utilities that are shared between the different services.",
5
5
  "main": "dist/index.js",
6
6
  "private": false,
@@ -1,9 +1,10 @@
1
1
  import { User } from "../auth";
2
- import { Venture } from "../ventures/venture";
2
+ import { VentureEvent } from "../feeds/event";
3
+ import { UserDetail } from "../user";
3
4
 
4
- export interface Donation {
5
+ export interface EventDonation {
5
6
  id: string;
6
- donor: User;
7
- venture: Venture;
7
+ donor: UserDetail;
8
+ venture: VentureEvent;
8
9
  createdAt: Date;
9
10
  }
@@ -1,2 +1,2 @@
1
- export { Donation } from "./donation";
2
- export { VentureSponsorship as Sponsorship } from "./sponsor";
1
+ export { EventDonation } from "./donation";
2
+ export { VentureSponsorship } from "./sponsor";
@@ -1,9 +1,10 @@
1
1
  import { User } from "../auth";
2
+ import { UserDetail } from "../user";
2
3
  import { Venture } from "../ventures/venture";
3
4
 
4
5
  export interface VentureSponsorship {
5
6
  id: string;
6
- sponsor: User;
7
+ sponsor: UserDetail;
7
8
  venture: Venture;
8
9
  monthlyAmount: number;
9
10
  createdAt: Date;
@@ -1,9 +1,10 @@
1
1
  import { User } from "../auth";
2
- import { Publication } from "./publication";
2
+ import { UserDetail } from "../user";
3
+ import { VenturePublication } from "./publication";
3
4
 
4
5
  export interface PublicationClap {
5
6
  id: number;
6
- user: User;
7
- publication: Publication;
7
+ user: UserDetail;
8
+ publication: VenturePublication;
8
9
  createdAt: Date;
9
10
  }
@@ -1,9 +1,10 @@
1
1
  import { User } from "../auth";
2
- import { Publication } from "./publication";
2
+ import { UserDetail } from "../user";
3
+ import { VenturePublication } from "./publication";
3
4
 
4
- export interface Comment {
5
+ export interface PublicationComment {
5
6
  id: string;
6
- author: User;
7
+ author: UserDetail;
7
8
  content: string;
8
- publication: Publication;
9
+ publication: VenturePublication;
9
10
  }
@@ -1,15 +1,17 @@
1
- import { Donation } from "../donations";
2
- import { Location } from "../shared/geo";
1
+ import { EventDonation } from "../donations";
2
+ import { Venture, VentureDetail } from "../ventures";
3
3
  import { EventCategory } from "./category";
4
+ import { EventLocation } from "./location";
4
5
 
5
6
  export interface VentureEvent {
6
7
  id: string;
7
8
  title: string;
8
9
  description: string;
9
10
  coverPhoto: string;
10
- location: Location;
11
+ ventureDetail: VentureDetail;
12
+ location: EventLocation;
11
13
  categories: EventCategory[];
12
- donations: Donation[];
14
+ donations: EventDonation[];
13
15
  startDate: Date;
14
16
  endDate: Date;
15
17
  createdAt: Date;
@@ -1,9 +1,9 @@
1
1
  export { EventCategory } from "./category";
2
2
  export { PublicationClap } from "./clap";
3
- export { Comment } from "./comment";
3
+ export { PublicationComment } from "./comment";
4
4
  export { VentureEvent } from "./event";
5
5
  export {
6
- Publication,
7
6
  PublicationContent,
8
7
  PublicationType,
8
+ VenturePublication,
9
9
  } from "./publication";
@@ -0,0 +1,10 @@
1
+ import { Venture } from "../ventures";
2
+ import { VentureEvent } from "./event";
3
+
4
+ export interface EventLocation {
5
+ id: string;
6
+ lat?: number;
7
+ lng?: number;
8
+ description?: string;
9
+ event: VentureEvent;
10
+ }
@@ -1,26 +1,25 @@
1
- import { User } from "../auth";
2
1
  import { ContentType } from "../shared";
3
2
  import { Venture } from "../ventures/venture";
4
3
  import { PublicationClap } from "./clap";
4
+ import { PublicationComment } from "./comment";
5
5
 
6
- export interface Publication {
6
+ export interface VenturePublication {
7
7
  id: string;
8
- author: User;
9
8
  description: string;
10
9
  venture: Venture;
11
10
  type: PublicationType;
12
11
  claps: PublicationClap[];
13
- comments: Comment[];
12
+ comments: PublicationComment[];
14
13
  body: PublicationContent[];
15
14
  createdAt: Date;
16
15
  }
17
16
 
18
17
  export enum PublicationType {
19
- TEXTUAL = "TEXTUAL",
20
- VIDEO = "VIDEO",
21
- IMAGE = "IMAGE",
18
+ STANDARD = "STANDARD",
22
19
  ANNOUNCEMENT = "ANNOUNCEMENT",
23
20
  ACHIEVEMENT = "ACHIEVEMENT",
21
+ PROMOTION = "PROMOTION",
22
+ BEHIND_THE_SCENES = "BEHIND_THE_SCENES",
24
23
  }
25
24
 
26
25
  export interface PublicationContent {
@@ -1,9 +1,9 @@
1
- import { User } from "../auth";
1
+ import { UserDetail } from "../user";
2
2
 
3
3
  export interface Notification {
4
4
  id: string;
5
5
  title: string;
6
- user: User;
6
+ user: UserDetail;
7
7
  type: NotificationType;
8
8
  status: NotificationStatus;
9
9
  description: string;
@@ -1,24 +1,20 @@
1
- export interface Location {
2
- lat: number;
3
- lng: number;
4
- description?: string;
5
- }
1
+ // export interface Country {
2
+ // id: number;
3
+ // name: string;
4
+ // code: string;
5
+ // currency: Currency;
6
+ // phoneCode: string;
7
+ // flag: string;
8
+ // }
6
9
 
7
- export interface Country {
8
- id: number;
9
- name: string;
10
- code: string;
11
- currency: Currency;
12
- phoneCode: string;
13
- flag: string;
14
- }
10
+ import { UserDetail } from "../user";
15
11
 
16
- export interface Currency {
17
- id: number;
18
- name: string;
19
- code: string;
20
- symbol: string;
21
- }
12
+ // export interface Currency {
13
+ // id: number;
14
+ // name: string;
15
+ // code: string;
16
+ // symbol: string;
17
+ // }
22
18
 
23
19
  export interface Department {
24
20
  id: number;
@@ -31,6 +27,8 @@ export interface Department {
31
27
  export interface Municipality {
32
28
  id: number;
33
29
  name: string;
30
+ department: Department;
31
+ userDetails: UserDetail[];
34
32
  createdAt: Date;
35
33
  updatedAt: Date;
36
34
  }
@@ -1,3 +1,2 @@
1
- export { Location, Country, Currency } from "./geo";
2
1
  export { ContentType } from "./content-type";
3
2
  export { Pagination } from "./pagination";
@@ -1,8 +1,13 @@
1
- import { Country } from "../shared";
1
+ import { User } from "./user";
2
2
 
3
- export interface Contact {
3
+ export interface UserContact {
4
4
  id: string;
5
- country: Country;
6
5
  phoneNumber: string;
7
6
  address: string;
7
+ facebookUrl: string;
8
+ linkedinUrl: string;
9
+ twitterUrl: string;
10
+ instagramUrl: string;
11
+ user?: User;
12
+ updatedAt: Date;
8
13
  }
@@ -1,7 +1,23 @@
1
+ import { EventDonation, VentureSponsorship } from "../donations";
2
+ import { PublicationClap, PublicationComment } from "../feeds";
3
+ // import { NewsClap } from "../news";
1
4
  import { Municipality } from "../shared/geo";
5
+ import { Venture, VentureCategory, VentureSubscription } from "../ventures";
6
+ import { User } from "./user";
7
+ import { Notification } from "../notifications";
2
8
 
3
9
  export interface UserDetail {
10
+ id: string;
4
11
  gender: "M" | "F" | "O";
5
12
  birthDate: Date;
13
+ user: User;
6
14
  municipality: Municipality;
15
+ comments: PublicationComment[];
16
+ donations: EventDonation[];
17
+ notifications: Notification[];
18
+ publicationClaps: PublicationClap[];
19
+ sponsorships: VentureSponsorship[];
20
+ // newsClaps: NewsClap[];
21
+ subscriptions: VentureSubscription[];
22
+ ventures: Venture[];
7
23
  }
@@ -1,5 +1,4 @@
1
- export { Contact } from "./contact";
2
- export { Profile } from "./profile";
1
+ export { UserContact } from "./contact";
3
2
  export { Role, AppRole } from "./role";
4
3
  export { User, UserCreate } from "./user";
5
4
  export { UserDetail } from "./detail";
@@ -1,9 +1,7 @@
1
- import { Venture } from "../ventures/venture";
2
- import { Role } from "./role";
3
- import { Notification } from "../notifications";
4
- import { Comment } from "../feeds/comment";
5
- import { UserDetail } from "./detail";
6
1
  import { VentureCategory } from "../ventures";
2
+ import { UserContact } from "./contact";
3
+ import { UserDetail } from "./detail";
4
+ import { Role } from "./role";
7
5
 
8
6
  export interface User {
9
7
  id: string;
@@ -11,15 +9,13 @@ export interface User {
11
9
  email: string;
12
10
  firstName: string;
13
11
  lastName: string;
14
- roles: Role[];
15
- detail?: UserDetail;
16
- notifications: Notification[];
17
- ventures: Venture[];
18
- comments: Comment[];
19
- preferences: VentureCategory[];
20
12
  active: boolean;
13
+ contact?: UserContact;
14
+ detail?: UserDetail;
21
15
  verified: boolean;
22
16
  onboardingCompleted: boolean;
17
+ roles: Role[];
18
+ preferences: VentureCategory[];
23
19
  createdAt: Date;
24
20
  updatedAt: Date;
25
21
  }
@@ -7,5 +7,5 @@ export interface VentureCategory {
7
7
  slug: string;
8
8
  description: string;
9
9
  ventures: Venture[];
10
- users: User[]; // Prueba
10
+ users: User[];
11
11
  }
@@ -0,0 +1,10 @@
1
+ import { Venture } from "./venture";
2
+
3
+ export interface VentureContact {
4
+ id: string;
5
+ email: string;
6
+ phoneNumber: string;
7
+ venture: Venture;
8
+ createdAt: Date;
9
+ updatedAt: Date;
10
+ }
@@ -1,7 +1,7 @@
1
1
  import { VentureSponsorship } from "../donations/sponsor";
2
2
  import { VentureEvent } from "../feeds/event";
3
- import { Publication as VenturePublication } from "../feeds/publication";
4
- import { Subscription as VentureSubscription } from "./subscription";
3
+ import { VenturePublication } from "../feeds/publication";
4
+ import { VentureSubscription } from "./subscription";
5
5
  import { Venture } from "./venture";
6
6
 
7
7
  export interface VentureDetail {
@@ -1,4 +1,4 @@
1
1
  export { VentureCategory } from "./category";
2
2
  export { VentureDetail } from "./detail";
3
- export { Subscription } from "./subscription";
3
+ export { VentureSubscription } from "./subscription";
4
4
  export { Venture } from "./venture";
@@ -0,0 +1,25 @@
1
+ // VentureLocation;
2
+
3
+ import { Venture } from "./venture";
4
+
5
+ // model VentureLocation {
6
+ // id String @id @default(cuid())
7
+ // ventureId String
8
+ // lat Float?
9
+ // lng Float?
10
+ // description String?
11
+ // createdAt DateTime @default(now())
12
+ // updatedAt DateTime @default(now()) @updatedAt
13
+ // venture Venture?
14
+ // }
15
+
16
+ export interface VentureLocation {
17
+ id: string;
18
+ ventureId: string;
19
+ lat?: number;
20
+ lng?: number;
21
+ description?: string;
22
+ createdAt: Date;
23
+ updatedAt: Date;
24
+ venture: Venture;
25
+ }
@@ -1,9 +1,10 @@
1
1
  import { User } from "../auth";
2
+ import { UserDetail } from "../user";
2
3
  import { Venture } from "./venture";
3
4
 
4
- export interface Subscription {
5
+ export interface VentureSubscription {
5
6
  id: string;
6
- subscriber: User;
7
+ subscriber: UserDetail;
7
8
  venture: Venture;
8
9
  createdAt: Date;
9
10
  }
@@ -1,6 +1,8 @@
1
- import { User } from "../auth";
1
+ import { UserDetail } from "../user";
2
2
  import { VentureCategory } from "./category";
3
+ import { VentureContact } from "./contact";
3
4
  import { VentureDetail } from "./detail";
5
+ import { VentureLocation } from "./location";
4
6
 
5
7
  export interface Venture {
6
8
  id: string;
@@ -8,10 +10,12 @@ export interface Venture {
8
10
  slug: string;
9
11
  coverPhoto: string;
10
12
  description: string;
11
- owner: User;
12
13
  active: boolean;
13
14
  verified: boolean;
14
15
  detail: VentureDetail;
16
+ ownerDetail: UserDetail;
15
17
  categories: VentureCategory[];
18
+ contact: VentureContact;
19
+ location: VentureLocation;
16
20
  createdAt: Date;
17
21
  }
@@ -1,12 +0,0 @@
1
- import { User } from "../auth";
2
- import { VentureCategory } from "../ventures";
3
- import { Contact } from "./contact";
4
-
5
- export interface Profile {
6
- id: string;
7
- verified: boolean;
8
- user: User;
9
- preferences: VentureCategory[];
10
- contact: Contact;
11
- createdAt: Date;
12
- }