echadospalante-core 12.3.0 → 13.0.1

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 (30) hide show
  1. package/dist/app/modules/domain/common/content-type.d.ts +7 -0
  2. package/dist/app/modules/domain/common/content-type.js +11 -0
  3. package/dist/app/modules/domain/common/geo.d.ts +16 -0
  4. package/dist/app/modules/domain/common/geo.js +2 -0
  5. package/dist/app/modules/domain/common/index.js +5 -0
  6. package/dist/app/modules/domain/common/pagination.d.ts +4 -0
  7. package/dist/app/modules/domain/common/pagination.js +2 -0
  8. package/dist/app/modules/domain/events/event.d.ts +5 -1
  9. package/dist/app/modules/domain/publications/content.d.ts +1 -1
  10. package/dist/app/modules/domain/publications/publication.d.ts +1 -1
  11. package/dist/app/modules/domain/user/detail.d.ts +1 -1
  12. package/dist/app/modules/infrastructure/database/entities/event-location.data.d.ts +1 -1
  13. package/dist/app/modules/infrastructure/database/entities/event-location.data.js +5 -1
  14. package/dist/app/modules/infrastructure/database/entities/publication-content.data.d.ts +1 -1
  15. package/dist/app/modules/infrastructure/database/entities/publication-content.data.js +2 -2
  16. package/dist/index.d.ts +1 -1
  17. package/dist/index.js +1 -1
  18. package/package.json +1 -1
  19. package/src/app/modules/domain/common/index.ts +3 -0
  20. package/src/app/modules/domain/events/event.ts +5 -1
  21. package/src/app/modules/domain/publications/content.ts +1 -1
  22. package/src/app/modules/domain/publications/publication.ts +1 -1
  23. package/src/app/modules/domain/user/detail.ts +1 -1
  24. package/src/app/modules/infrastructure/database/entities/event-location.data.ts +7 -2
  25. package/src/app/modules/infrastructure/database/entities/publication-content.data.ts +1 -1
  26. package/src/index.ts +1 -1
  27. /package/{src/app/modules/domain/shared/index.ts → dist/app/modules/domain/common/index.d.ts} +0 -0
  28. /package/src/app/modules/domain/{shared → common}/content-type.ts +0 -0
  29. /package/src/app/modules/domain/{shared → common}/geo.ts +0 -0
  30. /package/src/app/modules/domain/{shared → common}/pagination.ts +0 -0
@@ -0,0 +1,7 @@
1
+ export declare enum ContentType {
2
+ TEXT = "TEXT",
3
+ IMAGE = "IMAGE",
4
+ VIDEO = "VIDEO",
5
+ LINK = "LINK",
6
+ FILE = "FILE"
7
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ContentType = void 0;
4
+ var ContentType;
5
+ (function (ContentType) {
6
+ ContentType["TEXT"] = "TEXT";
7
+ ContentType["IMAGE"] = "IMAGE";
8
+ ContentType["VIDEO"] = "VIDEO";
9
+ ContentType["LINK"] = "LINK";
10
+ ContentType["FILE"] = "FILE";
11
+ })(ContentType || (exports.ContentType = ContentType = {}));
@@ -0,0 +1,16 @@
1
+ import { UserDetail } from "../user";
2
+ export interface Department {
3
+ id: number;
4
+ name: string;
5
+ municipalities: Municipality[];
6
+ createdAt: Date;
7
+ updatedAt: Date;
8
+ }
9
+ export interface Municipality {
10
+ id: number;
11
+ name: string;
12
+ department: Department;
13
+ userDetails: UserDetail[];
14
+ createdAt: Date;
15
+ updatedAt: Date;
16
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ContentType = void 0;
4
+ var content_type_1 = require("./content-type");
5
+ Object.defineProperty(exports, "ContentType", { enumerable: true, get: function () { return content_type_1.ContentType; } });
@@ -0,0 +1,4 @@
1
+ export interface Pagination {
2
+ skip: number;
3
+ take: number;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -23,7 +23,11 @@ export interface EventCreate {
23
23
  title: string;
24
24
  description: string;
25
25
  coverPhoto: string;
26
- location: EventLocation;
26
+ location?: {
27
+ lat?: number;
28
+ lng?: number;
29
+ description?: string;
30
+ };
27
31
  categoriesIds: string[];
28
32
  startDate: Date;
29
33
  contactEmail?: string;
@@ -1,4 +1,4 @@
1
- import { ContentType } from "../shared";
1
+ import { ContentType } from "../common";
2
2
  import { VenturePublication } from "./publication";
3
3
  export declare class PublicationContent {
4
4
  id: string;
@@ -1,4 +1,4 @@
1
- import { ContentType } from "../shared";
1
+ import { ContentType } from "../common";
2
2
  import { Venture } from "../ventures/venture";
3
3
  import { PublicationClap } from "./clap";
4
4
  import { PublicationComment } from "./comment";
@@ -1,6 +1,6 @@
1
1
  import { EventDonation, VentureSponsorship } from "../contributions";
2
2
  import { PublicationClap, PublicationComment } from "../publications";
3
- import { Municipality } from "../shared/geo";
3
+ import { Municipality } from "../common/geo";
4
4
  import { Venture, VentureSubscription } from "../ventures";
5
5
  import { User } from "./user";
6
6
  import { Notification } from "../notifications";
@@ -2,7 +2,7 @@ import { Point } from "typeorm";
2
2
  import { VentureEventData } from "./venture-event.data";
3
3
  export declare class EventLocationData {
4
4
  id: string;
5
- location: Point;
5
+ location?: Point;
6
6
  description?: string;
7
7
  event?: VentureEventData;
8
8
  }
@@ -24,7 +24,11 @@ __decorate([
24
24
  __metadata("design:type", String)
25
25
  ], EventLocationData.prototype, "id", void 0);
26
26
  __decorate([
27
- (0, typeorm_1.Column)("geometry", { spatialFeatureType: "Point", srid: 4326 }),
27
+ (0, typeorm_1.Column)("geometry", {
28
+ spatialFeatureType: "Point",
29
+ srid: 4326,
30
+ nullable: true,
31
+ }),
28
32
  (0, typeorm_1.Index)({ spatial: true }),
29
33
  __metadata("design:type", Object)
30
34
  ], EventLocationData.prototype, "location", void 0);
@@ -1,4 +1,4 @@
1
- import { ContentType } from "../../../domain/shared";
1
+ import { ContentType } from "../../../domain/common";
2
2
  import { VenturePublicationData } from "./venture-publication.data";
3
3
  export declare class PublicationContentData {
4
4
  id: string;
@@ -11,7 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.PublicationContentData = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
- const shared_1 = require("../../../domain/shared");
14
+ const common_1 = require("../../../domain/common");
15
15
  const venture_publication_data_1 = require("./venture-publication.data");
16
16
  let PublicationContentData = class PublicationContentData {
17
17
  id;
@@ -27,7 +27,7 @@ __decorate([
27
27
  __metadata("design:type", String)
28
28
  ], PublicationContentData.prototype, "id", void 0);
29
29
  __decorate([
30
- (0, typeorm_1.Column)({ type: "enum", enum: shared_1.ContentType }),
30
+ (0, typeorm_1.Column)({ type: "enum", enum: common_1.ContentType }),
31
31
  __metadata("design:type", String)
32
32
  ], PublicationContentData.prototype, "type", void 0);
33
33
  __decorate([
package/dist/index.d.ts CHANGED
@@ -3,9 +3,9 @@ export * from "./app/modules/domain/auth";
3
3
  export * from "./app/modules/domain/contributions";
4
4
  export * from "./app/modules/domain/publications";
5
5
  export * from "./app/modules/domain/notifications";
6
- export * from "./app/modules/domain/shared";
7
6
  export * from "./app/modules/domain/user";
8
7
  export * from "./app/modules/domain/events";
9
8
  export * from "./app/modules/domain/ventures";
9
+ export * from "./app/modules/domain/common";
10
10
  export * from "./app/modules/infrastructure/database/entities";
11
11
  export * from "./app/modules/utilities";
package/dist/index.js CHANGED
@@ -19,9 +19,9 @@ __exportStar(require("./app/modules/domain/auth"), exports);
19
19
  __exportStar(require("./app/modules/domain/contributions"), exports);
20
20
  __exportStar(require("./app/modules/domain/publications"), exports);
21
21
  __exportStar(require("./app/modules/domain/notifications"), exports);
22
- __exportStar(require("./app/modules/domain/shared"), exports);
23
22
  __exportStar(require("./app/modules/domain/user"), exports);
24
23
  __exportStar(require("./app/modules/domain/events"), exports);
25
24
  __exportStar(require("./app/modules/domain/ventures"), exports);
25
+ __exportStar(require("./app/modules/domain/common"), exports);
26
26
  __exportStar(require("./app/modules/infrastructure/database/entities"), exports);
27
27
  __exportStar(require("./app/modules/utilities"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "echadospalante-core",
3
- "version": "12.3.0",
3
+ "version": "13.0.1",
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
  "types": "dist/index.d.ts",
@@ -0,0 +1,3 @@
1
+ export { ContentType } from "./content-type";
2
+ export { Department, Municipality } from "./geo";
3
+ export { Pagination } from "./pagination";
@@ -25,7 +25,11 @@ export interface EventCreate {
25
25
  title: string;
26
26
  description: string;
27
27
  coverPhoto: string;
28
- location: EventLocation;
28
+ location?: {
29
+ lat?: number;
30
+ lng?: number;
31
+ description?: string;
32
+ };
29
33
  categoriesIds: string[];
30
34
  startDate: Date;
31
35
  contactEmail?: string;
@@ -1,4 +1,4 @@
1
- import { ContentType } from "../shared";
1
+ import { ContentType } from "../common";
2
2
  import { VenturePublication } from "./publication";
3
3
 
4
4
  export class PublicationContent {
@@ -1,4 +1,4 @@
1
- import { ContentType } from "../shared";
1
+ import { ContentType } from "../common";
2
2
  import { Venture } from "../ventures/venture";
3
3
  import { PublicationClap } from "./clap";
4
4
  import { PublicationComment } from "./comment";
@@ -1,7 +1,7 @@
1
1
  import { EventDonation, VentureSponsorship } from "../contributions";
2
2
  import { PublicationClap, PublicationComment } from "../publications";
3
3
  // import { NewsClap } from "../news";
4
- import { Municipality } from "../shared/geo";
4
+ import { Municipality } from "../common/geo";
5
5
  import { Venture, VentureCategory, VentureSubscription } from "../ventures";
6
6
  import { User } from "./user";
7
7
  import { Notification } from "../notifications";
@@ -6,6 +6,7 @@ import {
6
6
  Point,
7
7
  Index,
8
8
  } from "typeorm";
9
+
9
10
  import { VentureEventData } from "./venture-event.data";
10
11
 
11
12
  @Entity({ name: "event_location" })
@@ -13,9 +14,13 @@ export class EventLocationData {
13
14
  @PrimaryGeneratedColumn("uuid")
14
15
  id: string;
15
16
 
16
- @Column("geometry", { spatialFeatureType: "Point", srid: 4326 })
17
+ @Column("geometry", {
18
+ spatialFeatureType: "Point",
19
+ srid: 4326,
20
+ nullable: true,
21
+ })
17
22
  @Index({ spatial: true })
18
- public location: Point;
23
+ public location?: Point;
19
24
 
20
25
  @Column({ nullable: true })
21
26
  description?: string;
@@ -8,7 +8,7 @@ import {
8
8
  UpdateDateColumn,
9
9
  } from "typeorm";
10
10
 
11
- import { ContentType } from "../../../domain/shared";
11
+ import { ContentType } from "../../../domain/common";
12
12
  import { VenturePublicationData } from "./venture-publication.data";
13
13
 
14
14
  @Entity({ name: "publication_content" })
package/src/index.ts CHANGED
@@ -4,9 +4,9 @@ export * from "./app/modules/domain/auth";
4
4
  export * from "./app/modules/domain/contributions";
5
5
  export * from "./app/modules/domain/publications";
6
6
  export * from "./app/modules/domain/notifications";
7
- export * from "./app/modules/domain/shared";
8
7
  export * from "./app/modules/domain/user";
9
8
  export * from "./app/modules/domain/events";
10
9
  export * from "./app/modules/domain/ventures";
10
+ export * from "./app/modules/domain/common";
11
11
  export * from "./app/modules/infrastructure/database/entities";
12
12
  export * from "./app/modules/utilities";