@volontariapp/domain-event 2.1.2 → 2.2.1-next.20260412152207

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 (89) hide show
  1. package/dist/entities/event.entity.d.ts +19 -0
  2. package/dist/entities/event.entity.d.ts.map +1 -0
  3. package/dist/entities/event.entity.js +15 -0
  4. package/dist/entities/event.entity.js.map +1 -0
  5. package/dist/entities/requirement.entity.d.ts +8 -0
  6. package/dist/entities/requirement.entity.d.ts.map +1 -0
  7. package/dist/entities/requirement.entity.js +8 -0
  8. package/dist/entities/requirement.entity.js.map +1 -0
  9. package/dist/entities/tag.entity.d.ts +7 -0
  10. package/dist/entities/tag.entity.d.ts.map +1 -0
  11. package/dist/entities/tag.entity.js +7 -0
  12. package/dist/entities/tag.entity.js.map +1 -0
  13. package/dist/errors/event.errors.d.ts +6 -0
  14. package/dist/errors/event.errors.d.ts.map +1 -0
  15. package/dist/errors/event.errors.js +6 -0
  16. package/dist/errors/event.errors.js.map +1 -0
  17. package/dist/index.d.ts +15 -1
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +17 -1
  20. package/dist/index.js.map +1 -1
  21. package/dist/models/event.model.d.ts +20 -0
  22. package/dist/models/event.model.d.ts.map +1 -0
  23. package/dist/models/event.model.js +105 -0
  24. package/dist/models/event.model.js.map +1 -0
  25. package/dist/models/mappers.d.ts +2 -0
  26. package/dist/models/mappers.d.ts.map +1 -0
  27. package/dist/models/mappers.js +41 -0
  28. package/dist/models/mappers.js.map +1 -0
  29. package/dist/models/requirement.model.d.ts +10 -0
  30. package/dist/models/requirement.model.d.ts.map +1 -0
  31. package/dist/models/requirement.model.js +48 -0
  32. package/dist/models/requirement.model.js.map +1 -0
  33. package/dist/models/tag.model.d.ts +9 -0
  34. package/dist/models/tag.model.d.ts.map +1 -0
  35. package/dist/models/tag.model.js +43 -0
  36. package/dist/models/tag.model.js.map +1 -0
  37. package/dist/repositories/index.d.ts +5 -0
  38. package/dist/repositories/index.d.ts.map +1 -0
  39. package/dist/repositories/index.js +5 -0
  40. package/dist/repositories/index.js.map +1 -0
  41. package/dist/repositories/interfaces/event.repository.d.ts +10 -0
  42. package/dist/repositories/interfaces/event.repository.d.ts.map +1 -0
  43. package/dist/repositories/interfaces/event.repository.js +2 -0
  44. package/dist/repositories/interfaces/event.repository.js.map +1 -0
  45. package/dist/repositories/interfaces/index.d.ts +4 -0
  46. package/dist/repositories/interfaces/index.d.ts.map +1 -0
  47. package/dist/repositories/interfaces/index.js +4 -0
  48. package/dist/repositories/interfaces/index.js.map +1 -0
  49. package/dist/repositories/interfaces/requirement.repository.d.ts +9 -0
  50. package/dist/repositories/interfaces/requirement.repository.d.ts.map +1 -0
  51. package/dist/repositories/interfaces/requirement.repository.js +2 -0
  52. package/dist/repositories/interfaces/requirement.repository.js.map +1 -0
  53. package/dist/repositories/interfaces/tag.repository.d.ts +10 -0
  54. package/dist/repositories/interfaces/tag.repository.d.ts.map +1 -0
  55. package/dist/repositories/interfaces/tag.repository.js +2 -0
  56. package/dist/repositories/interfaces/tag.repository.js.map +1 -0
  57. package/dist/repositories/postgres-event.repository.d.ts +10 -0
  58. package/dist/repositories/postgres-event.repository.d.ts.map +1 -0
  59. package/dist/repositories/postgres-event.repository.js +32 -0
  60. package/dist/repositories/postgres-event.repository.js.map +1 -0
  61. package/dist/repositories/postgres-requirement.repository.d.ts +10 -0
  62. package/dist/repositories/postgres-requirement.repository.d.ts.map +1 -0
  63. package/dist/repositories/postgres-requirement.repository.js +32 -0
  64. package/dist/repositories/postgres-requirement.repository.js.map +1 -0
  65. package/dist/repositories/postgres-tag.repository.d.ts +11 -0
  66. package/dist/repositories/postgres-tag.repository.d.ts.map +1 -0
  67. package/dist/repositories/postgres-tag.repository.js +35 -0
  68. package/dist/repositories/postgres-tag.repository.js.map +1 -0
  69. package/dist/services/event.service.d.ts +16 -0
  70. package/dist/services/event.service.d.ts.map +1 -0
  71. package/dist/services/event.service.js +131 -0
  72. package/dist/services/event.service.js.map +1 -0
  73. package/dist/services/index.d.ts +3 -1
  74. package/dist/services/index.d.ts.map +1 -1
  75. package/dist/services/index.js +3 -1
  76. package/dist/services/index.js.map +1 -1
  77. package/dist/services/requirement.service.d.ts +13 -0
  78. package/dist/services/requirement.service.d.ts.map +1 -0
  79. package/dist/services/requirement.service.js +101 -0
  80. package/dist/services/requirement.service.js.map +1 -0
  81. package/dist/services/tag.service.d.ts +14 -0
  82. package/dist/services/tag.service.d.ts.map +1 -0
  83. package/dist/services/tag.service.js +128 -0
  84. package/dist/services/tag.service.js.map +1 -0
  85. package/dist/value-objects/event-location.value-object.d.ts +8 -0
  86. package/dist/value-objects/event-location.value-object.d.ts.map +1 -0
  87. package/dist/value-objects/event-location.value-object.js +22 -0
  88. package/dist/value-objects/event-location.value-object.js.map +1 -0
  89. package/package.json +15 -2
@@ -0,0 +1,19 @@
1
+ import type { EventType, EventState } from '@volontariapp/contracts';
2
+ import type { EventLocation } from '../value-objects/event-location.value-object.js';
3
+ import type { RequirementEntity } from './requirement.entity.js';
4
+ import type { TagEntity } from './tag.entity.js';
5
+ export declare class EventEntity {
6
+ id: string;
7
+ name: string;
8
+ description: string;
9
+ startAt: Date;
10
+ endAt: Date;
11
+ location: EventLocation;
12
+ type: EventType;
13
+ state: EventState;
14
+ awardedImpactScore: number;
15
+ maxParticipants: number;
16
+ requirements?: RequirementEntity[];
17
+ tags?: TagEntity[];
18
+ }
19
+ //# sourceMappingURL=event.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.entity.d.ts","sourceRoot":"","sources":["../../src/entities/event.entity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AACrF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,qBAAa,WAAW;IACtB,EAAE,EAAG,MAAM,CAAC;IACZ,IAAI,EAAG,MAAM,CAAC;IACd,WAAW,EAAG,MAAM,CAAC;IACrB,OAAO,EAAG,IAAI,CAAC;IACf,KAAK,EAAG,IAAI,CAAC;IACb,QAAQ,EAAG,aAAa,CAAC;IACzB,IAAI,EAAG,SAAS,CAAC;IACjB,KAAK,EAAG,UAAU,CAAC;IACnB,kBAAkB,EAAG,MAAM,CAAC;IAC5B,eAAe,EAAG,MAAM,CAAC;IAEzB,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACnC,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC;CACpB"}
@@ -0,0 +1,15 @@
1
+ export class EventEntity {
2
+ id;
3
+ name;
4
+ description;
5
+ startAt;
6
+ endAt;
7
+ location;
8
+ type;
9
+ state;
10
+ awardedImpactScore;
11
+ maxParticipants;
12
+ requirements;
13
+ tags;
14
+ }
15
+ //# sourceMappingURL=event.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.entity.js","sourceRoot":"","sources":["../../src/entities/event.entity.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,WAAW;IACtB,EAAE,CAAU;IACZ,IAAI,CAAU;IACd,WAAW,CAAU;IACrB,OAAO,CAAQ;IACf,KAAK,CAAQ;IACb,QAAQ,CAAiB;IACzB,IAAI,CAAa;IACjB,KAAK,CAAc;IACnB,kBAAkB,CAAU;IAC5B,eAAe,CAAU;IAEzB,YAAY,CAAuB;IACnC,IAAI,CAAe;CACpB"}
@@ -0,0 +1,8 @@
1
+ export declare class RequirementEntity {
2
+ id: string;
3
+ name: string;
4
+ quantity: number;
5
+ isSystem: boolean;
6
+ createdBy: string;
7
+ }
8
+ //# sourceMappingURL=requirement.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requirement.entity.d.ts","sourceRoot":"","sources":["../../src/entities/requirement.entity.ts"],"names":[],"mappings":"AAAA,qBAAa,iBAAiB;IAC5B,EAAE,EAAG,MAAM,CAAC;IACZ,IAAI,EAAG,MAAM,CAAC;IACd,QAAQ,EAAG,MAAM,CAAC;IAClB,QAAQ,EAAG,OAAO,CAAC;IACnB,SAAS,EAAG,MAAM,CAAC;CACpB"}
@@ -0,0 +1,8 @@
1
+ export class RequirementEntity {
2
+ id;
3
+ name;
4
+ quantity;
5
+ isSystem;
6
+ createdBy;
7
+ }
8
+ //# sourceMappingURL=requirement.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requirement.entity.js","sourceRoot":"","sources":["../../src/entities/requirement.entity.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,iBAAiB;IAC5B,EAAE,CAAU;IACZ,IAAI,CAAU;IACd,QAAQ,CAAU;IAClB,QAAQ,CAAW;IACnB,SAAS,CAAU;CACpB"}
@@ -0,0 +1,7 @@
1
+ export declare class TagEntity {
2
+ id: string;
3
+ name: string;
4
+ slug: string;
5
+ color: string;
6
+ }
7
+ //# sourceMappingURL=tag.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag.entity.d.ts","sourceRoot":"","sources":["../../src/entities/tag.entity.ts"],"names":[],"mappings":"AAAA,qBAAa,SAAS;IACpB,EAAE,EAAG,MAAM,CAAC;IACZ,IAAI,EAAG,MAAM,CAAC;IACd,IAAI,EAAG,MAAM,CAAC;IACd,KAAK,EAAG,MAAM,CAAC;CAChB"}
@@ -0,0 +1,7 @@
1
+ export class TagEntity {
2
+ id;
3
+ name;
4
+ slug;
5
+ color;
6
+ }
7
+ //# sourceMappingURL=tag.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag.entity.js","sourceRoot":"","sources":["../../src/entities/tag.entity.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,SAAS;IACpB,EAAE,CAAU;IACZ,IAAI,CAAU;IACd,IAAI,CAAU;IACd,KAAK,CAAU;CAChB"}
@@ -0,0 +1,6 @@
1
+ import { NotFoundError, ConflictError } from '@volontariapp/errors';
2
+ export declare const EVENT_NOT_FOUND: (id: string) => NotFoundError;
3
+ export declare const TAG_NOT_FOUND: (id: string) => NotFoundError;
4
+ export declare const TAG_ALREADY_EXISTS: (slug: string) => ConflictError;
5
+ export declare const REQUIREMENT_NOT_FOUND: (id: string) => NotFoundError;
6
+ //# sourceMappingURL=event.errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.errors.d.ts","sourceRoot":"","sources":["../../src/errors/event.errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEpE,eAAO,MAAM,eAAe,OAAQ,MAAM,kBAAuD,CAAC;AAElG,eAAO,MAAM,aAAa,OAAQ,MAAM,kBAAqD,CAAC;AAE9F,eAAO,MAAM,kBAAkB,SAAU,MAAM,kBACY,CAAC;AAE5D,eAAO,MAAM,qBAAqB,OAAQ,MAAM,kBACU,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { NotFoundError, ConflictError } from '@volontariapp/errors';
2
+ export const EVENT_NOT_FOUND = (id) => new NotFoundError(`Event with id ${id} not found`);
3
+ export const TAG_NOT_FOUND = (id) => new NotFoundError(`Tag with id ${id} not found`);
4
+ export const TAG_ALREADY_EXISTS = (slug) => new ConflictError(`Tag with slug ${slug} already exists`);
5
+ export const REQUIREMENT_NOT_FOUND = (id) => new NotFoundError(`Requirement with id ${id} not found`);
6
+ //# sourceMappingURL=event.errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.errors.js","sourceRoot":"","sources":["../../src/errors/event.errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEpE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,IAAI,aAAa,CAAC,iBAAiB,EAAE,YAAY,CAAC,CAAC;AAElG,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,IAAI,aAAa,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;AAE9F,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,IAAY,EAAE,EAAE,CACjD,IAAI,aAAa,CAAC,iBAAiB,IAAI,iBAAiB,CAAC,CAAC;AAE5D,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EAAU,EAAE,EAAE,CAClD,IAAI,aAAa,CAAC,uBAAuB,EAAE,YAAY,CAAC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,2 +1,16 @@
1
- export {};
1
+ export * from './entities/event.entity.js';
2
+ export * from './entities/tag.entity.js';
3
+ export * from './entities/requirement.entity.js';
4
+ export * from './models/event.model.js';
5
+ export * from './models/tag.model.js';
6
+ export * from './models/requirement.model.js';
7
+ export * from './models/mappers.js';
8
+ export * from './repositories/interfaces/event.repository.js';
9
+ export * from './repositories/postgres-event.repository.js';
10
+ export * from './repositories/interfaces/tag.repository.js';
11
+ export * from './repositories/postgres-tag.repository.js';
12
+ export * from './repositories/interfaces/requirement.repository.js';
13
+ export * from './repositories/postgres-requirement.repository.js';
14
+ export * from './services/index.js';
15
+ export * from './value-objects/event-location.value-object.js';
2
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC;AAEjD,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AAEpC,cAAc,+CAA+C,CAAC;AAC9D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qDAAqD,CAAC;AACpE,cAAc,mDAAmD,CAAC;AAElE,cAAc,qBAAqB,CAAC;AAEpC,cAAc,gDAAgD,CAAC"}
package/dist/index.js CHANGED
@@ -1,2 +1,18 @@
1
- export {};
1
+ import { registerEventMappings } from './models/mappers.js';
2
+ export * from './entities/event.entity.js';
3
+ export * from './entities/tag.entity.js';
4
+ export * from './entities/requirement.entity.js';
5
+ export * from './models/event.model.js';
6
+ export * from './models/tag.model.js';
7
+ export * from './models/requirement.model.js';
8
+ export * from './models/mappers.js';
9
+ export * from './repositories/interfaces/event.repository.js';
10
+ export * from './repositories/postgres-event.repository.js';
11
+ export * from './repositories/interfaces/tag.repository.js';
12
+ export * from './repositories/postgres-tag.repository.js';
13
+ export * from './repositories/interfaces/requirement.repository.js';
14
+ export * from './repositories/postgres-requirement.repository.js';
15
+ export * from './services/index.js';
16
+ export * from './value-objects/event-location.value-object.js';
17
+ registerEventMappings();
2
18
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC;AAEjD,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AAEpC,cAAc,+CAA+C,CAAC;AAC9D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qDAAqD,CAAC;AACpE,cAAc,mDAAmD,CAAC;AAElE,cAAc,qBAAqB,CAAC;AAEpC,cAAc,gDAAgD,CAAC;AAE/D,qBAAqB,EAAE,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { EventType, EventState } from '@volontariapp/contracts';
2
+ import { TagModel } from './tag.model.js';
3
+ import { RequirementModel } from './requirement.model.js';
4
+ export declare class EventModel {
5
+ id: string;
6
+ name: string;
7
+ description: string;
8
+ startAt: Date;
9
+ endAt: Date;
10
+ location: string;
11
+ type: EventType;
12
+ state: EventState;
13
+ awardedImpactScore: number;
14
+ maxParticipants: number;
15
+ tags?: TagModel[];
16
+ requirements?: RequirementModel[];
17
+ createdAt: Date;
18
+ updatedAt: Date;
19
+ }
20
+ //# sourceMappingURL=event.model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.model.d.ts","sourceRoot":"","sources":["../../src/models/event.model.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,qBACa,UAAU;IAErB,EAAE,EAAG,MAAM,CAAC;IAGZ,IAAI,EAAG,MAAM,CAAC;IAGd,WAAW,EAAG,MAAM,CAAC;IAGrB,OAAO,EAAG,IAAI,CAAC;IAGf,KAAK,EAAG,IAAI,CAAC;IAQb,QAAQ,EAAG,MAAM,CAAC;IAOlB,IAAI,EAAG,SAAS,CAAC;IAOjB,KAAK,EAAG,UAAU,CAAC;IAGnB,kBAAkB,EAAG,MAAM,CAAC;IAG5B,eAAe,EAAG,MAAM,CAAC;IAIzB,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC;IAIlB,YAAY,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAGlC,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;CAClB"}
@@ -0,0 +1,105 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { Entity, PrimaryGeneratedColumn, Column, ManyToMany, JoinTable, CreateDateColumn, UpdateDateColumn, } from 'typeorm';
11
+ import { EventType, EventState } from '@volontariapp/contracts';
12
+ import { TagModel } from './tag.model.js';
13
+ import { RequirementModel } from './requirement.model.js';
14
+ let EventModel = class EventModel {
15
+ id;
16
+ name;
17
+ description;
18
+ startAt;
19
+ endAt;
20
+ location;
21
+ type;
22
+ state;
23
+ awardedImpactScore;
24
+ maxParticipants;
25
+ tags;
26
+ requirements;
27
+ createdAt;
28
+ updatedAt;
29
+ };
30
+ __decorate([
31
+ PrimaryGeneratedColumn('uuid'),
32
+ __metadata("design:type", String)
33
+ ], EventModel.prototype, "id", void 0);
34
+ __decorate([
35
+ Column({ type: 'varchar', length: 255 }),
36
+ __metadata("design:type", String)
37
+ ], EventModel.prototype, "name", void 0);
38
+ __decorate([
39
+ Column({ type: 'text' }),
40
+ __metadata("design:type", String)
41
+ ], EventModel.prototype, "description", void 0);
42
+ __decorate([
43
+ Column({ type: 'timestamp' }),
44
+ __metadata("design:type", Date)
45
+ ], EventModel.prototype, "startAt", void 0);
46
+ __decorate([
47
+ Column({ type: 'timestamp' }),
48
+ __metadata("design:type", Date)
49
+ ], EventModel.prototype, "endAt", void 0);
50
+ __decorate([
51
+ Column({
52
+ type: 'geography',
53
+ spatialFeatureType: 'Point',
54
+ srid: 4326,
55
+ nullable: true,
56
+ }),
57
+ __metadata("design:type", String)
58
+ ], EventModel.prototype, "location", void 0);
59
+ __decorate([
60
+ Column({
61
+ type: 'enum',
62
+ enum: EventType,
63
+ default: EventType.EVENT_TYPE_UNSPECIFIED,
64
+ }),
65
+ __metadata("design:type", Number)
66
+ ], EventModel.prototype, "type", void 0);
67
+ __decorate([
68
+ Column({
69
+ type: 'enum',
70
+ enum: EventState,
71
+ default: EventState.EVENT_STATE_DRAFT,
72
+ }),
73
+ __metadata("design:type", Number)
74
+ ], EventModel.prototype, "state", void 0);
75
+ __decorate([
76
+ Column({ type: 'int', default: 0 }),
77
+ __metadata("design:type", Number)
78
+ ], EventModel.prototype, "awardedImpactScore", void 0);
79
+ __decorate([
80
+ Column({ type: 'int', default: 0 }),
81
+ __metadata("design:type", Number)
82
+ ], EventModel.prototype, "maxParticipants", void 0);
83
+ __decorate([
84
+ ManyToMany(() => TagModel, (tag) => tag.events),
85
+ JoinTable({ name: 'event_tags' }),
86
+ __metadata("design:type", Array)
87
+ ], EventModel.prototype, "tags", void 0);
88
+ __decorate([
89
+ ManyToMany(() => RequirementModel, (req) => req.events),
90
+ JoinTable({ name: 'event_requirements' }),
91
+ __metadata("design:type", Array)
92
+ ], EventModel.prototype, "requirements", void 0);
93
+ __decorate([
94
+ CreateDateColumn(),
95
+ __metadata("design:type", Date)
96
+ ], EventModel.prototype, "createdAt", void 0);
97
+ __decorate([
98
+ UpdateDateColumn(),
99
+ __metadata("design:type", Date)
100
+ ], EventModel.prototype, "updatedAt", void 0);
101
+ EventModel = __decorate([
102
+ Entity('events')
103
+ ], EventModel);
104
+ export { EventModel };
105
+ //# sourceMappingURL=event.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.model.js","sourceRoot":"","sources":["../../src/models/event.model.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,MAAM,EACN,sBAAsB,EACtB,MAAM,EACN,UAAU,EACV,SAAS,EACT,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAGnD,IAAM,UAAU,GAAhB,MAAM,UAAU;IAErB,EAAE,CAAU;IAGZ,IAAI,CAAU;IAGd,WAAW,CAAU;IAGrB,OAAO,CAAQ;IAGf,KAAK,CAAQ;IAQb,QAAQ,CAAU;IAOlB,IAAI,CAAa;IAOjB,KAAK,CAAc;IAGnB,kBAAkB,CAAU;IAG5B,eAAe,CAAU;IAIzB,IAAI,CAAc;IAIlB,YAAY,CAAsB;IAGlC,SAAS,CAAQ;IAGjB,SAAS,CAAQ;CAClB,CAAA;AAvDC;IADC,sBAAsB,CAAC,MAAM,CAAC;;sCACnB;AAGZ;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;wCAC3B;AAGd;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;+CACJ;AAGrB;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;8BACpB,IAAI;2CAAC;AAGf;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;8BACtB,IAAI;yCAAC;AAQb;IANC,MAAM,CAAC;QACN,IAAI,EAAE,WAAW;QACjB,kBAAkB,EAAE,OAAO;QAC3B,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACf,CAAC;;4CACgB;AAOlB;IALC,MAAM,CAAC;QACN,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,SAAS,CAAC,sBAAsB;KAC1C,CAAC;;wCACe;AAOjB;IALC,MAAM,CAAC;QACN,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,UAAU,CAAC,iBAAiB;KACtC,CAAC;;yCACiB;AAGnB;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;sDACR;AAG5B;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;mDACX;AAIzB;IAFC,UAAU,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC;IAC/C,SAAS,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;;wCAChB;AAIlB;IAFC,UAAU,CAAC,GAAG,EAAE,CAAC,gBAAgB,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC;IACvD,SAAS,CAAC,EAAE,IAAI,EAAE,oBAAoB,EAAE,CAAC;;gDACR;AAGlC;IADC,gBAAgB,EAAE;8BACP,IAAI;6CAAC;AAGjB;IADC,gBAAgB,EAAE;8BACP,IAAI;6CAAC;AAxDN,UAAU;IADtB,MAAM,CAAC,QAAQ,CAAC;GACJ,UAAU,CAyDtB"}
@@ -0,0 +1,2 @@
1
+ export declare function registerEventMappings(): void;
2
+ //# sourceMappingURL=mappers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../src/models/mappers.ts"],"names":[],"mappings":"AAcA,wBAAgB,qBAAqB,SAgCpC"}
@@ -0,0 +1,41 @@
1
+ import { databaseMapper } from '@volontariapp/database';
2
+ import { EventModel } from './event.model.js';
3
+ import { EventEntity } from '../entities/event.entity.js';
4
+ import { TagModel } from './tag.model.js';
5
+ import { TagEntity } from '../entities/tag.entity.js';
6
+ import { RequirementModel } from './requirement.model.js';
7
+ import { RequirementEntity } from '../entities/requirement.entity.js';
8
+ import { EventLocation } from '../value-objects/event-location.value-object.js';
9
+ export function registerEventMappings() {
10
+ databaseMapper.registerBidirectional(TagEntity, TagModel);
11
+ databaseMapper.registerBidirectional(RequirementEntity, RequirementModel);
12
+ databaseMapper.registerBidirectional(EventEntity, EventModel, {
13
+ exclude: ['location'],
14
+ overridesAtoB: [
15
+ {
16
+ field: 'location',
17
+ resolve: (source) => `${source.location.longitude.toString()},${source.location.latitude.toString()}`,
18
+ },
19
+ ],
20
+ overridesBtoA: [
21
+ {
22
+ field: 'location',
23
+ resolve: (source) => {
24
+ const loc = source.location;
25
+ if (typeof loc === 'string') {
26
+ const matches = loc.match(/POINT\(([^ ]+) ([^)]+)\)/);
27
+ if (matches) {
28
+ return new EventLocation(parseFloat(matches[2]), parseFloat(matches[1]));
29
+ }
30
+ }
31
+ else if (typeof loc === 'object' && loc !== null && 'coordinates' in loc) {
32
+ const geoJson = loc;
33
+ return new EventLocation(geoJson.coordinates[1], geoJson.coordinates[0]);
34
+ }
35
+ return new EventLocation(0, 0);
36
+ },
37
+ },
38
+ ],
39
+ });
40
+ }
41
+ //# sourceMappingURL=mappers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mappers.js","sourceRoot":"","sources":["../../src/models/mappers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AAOhF,MAAM,UAAU,qBAAqB;IACnC,cAAc,CAAC,qBAAqB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC1D,cAAc,CAAC,qBAAqB,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;IAE1E,cAAc,CAAC,qBAAqB,CAAC,WAAW,EAAE,UAAU,EAAE;QAC5D,OAAO,EAAE,CAAC,UAAU,CAAC;QACrB,aAAa,EAAE;YACb;gBACE,KAAK,EAAE,UAAU;gBACjB,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAClB,GAAG,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE;aACnF;SACF;QACD,aAAa,EAAE;YACb;gBACE,KAAK,EAAE,UAAU;gBACjB,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE;oBAClB,MAAM,GAAG,GAAG,MAAM,CAAC,QAAmB,CAAC;oBACvC,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;wBAC5B,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;wBACtD,IAAI,OAAO,EAAE,CAAC;4BACZ,OAAO,IAAI,aAAa,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;wBAC3E,CAAC;oBACH,CAAC;yBAAM,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,IAAI,aAAa,IAAI,GAAG,EAAE,CAAC;wBAC3E,MAAM,OAAO,GAAG,GAAoB,CAAC;wBACrC,OAAO,IAAI,aAAa,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC3E,CAAC;oBACD,OAAO,IAAI,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBACjC,CAAC;aACF;SACF;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { EventModel } from './event.model.js';
2
+ export declare class RequirementModel {
3
+ id: string;
4
+ name: string;
5
+ quantity: number;
6
+ isSystem: boolean;
7
+ createdBy: string;
8
+ events?: EventModel[];
9
+ }
10
+ //# sourceMappingURL=requirement.model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requirement.model.d.ts","sourceRoot":"","sources":["../../src/models/requirement.model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,qBACa,gBAAgB;IAE3B,EAAE,EAAG,MAAM,CAAC;IAGZ,IAAI,EAAG,MAAM,CAAC;IAGd,QAAQ,EAAG,MAAM,CAAC;IAGlB,QAAQ,EAAG,OAAO,CAAC;IAGnB,SAAS,EAAG,MAAM,CAAC;IAGnB,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC;CACvB"}
@@ -0,0 +1,48 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { Entity, PrimaryGeneratedColumn, Column, ManyToMany } from 'typeorm';
11
+ import { EventModel } from './event.model.js';
12
+ let RequirementModel = class RequirementModel {
13
+ id;
14
+ name;
15
+ quantity;
16
+ isSystem;
17
+ createdBy;
18
+ events;
19
+ };
20
+ __decorate([
21
+ PrimaryGeneratedColumn('uuid'),
22
+ __metadata("design:type", String)
23
+ ], RequirementModel.prototype, "id", void 0);
24
+ __decorate([
25
+ Column({ type: 'varchar', length: 255 }),
26
+ __metadata("design:type", String)
27
+ ], RequirementModel.prototype, "name", void 0);
28
+ __decorate([
29
+ Column({ type: 'int' }),
30
+ __metadata("design:type", Number)
31
+ ], RequirementModel.prototype, "quantity", void 0);
32
+ __decorate([
33
+ Column({ type: 'boolean', default: false }),
34
+ __metadata("design:type", Boolean)
35
+ ], RequirementModel.prototype, "isSystem", void 0);
36
+ __decorate([
37
+ Column({ type: 'uuid' }),
38
+ __metadata("design:type", String)
39
+ ], RequirementModel.prototype, "createdBy", void 0);
40
+ __decorate([
41
+ ManyToMany(() => EventModel, (event) => event.requirements),
42
+ __metadata("design:type", Array)
43
+ ], RequirementModel.prototype, "events", void 0);
44
+ RequirementModel = __decorate([
45
+ Entity('requirements')
46
+ ], RequirementModel);
47
+ export { RequirementModel };
48
+ //# sourceMappingURL=requirement.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requirement.model.js","sourceRoot":"","sources":["../../src/models/requirement.model.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGvC,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAE3B,EAAE,CAAU;IAGZ,IAAI,CAAU;IAGd,QAAQ,CAAU;IAGlB,QAAQ,CAAW;IAGnB,SAAS,CAAU;IAGnB,MAAM,CAAgB;CACvB,CAAA;AAhBC;IADC,sBAAsB,CAAC,MAAM,CAAC;;4CACnB;AAGZ;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;8CAC3B;AAGd;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;kDACN;AAGlB;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;kDACzB;AAGnB;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;mDACN;AAGnB;IADC,UAAU,CAAC,GAAG,EAAE,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC;;gDACtC;AAjBX,gBAAgB;IAD5B,MAAM,CAAC,cAAc,CAAC;GACV,gBAAgB,CAkB5B"}
@@ -0,0 +1,9 @@
1
+ import { EventModel } from './event.model.js';
2
+ export declare class TagModel {
3
+ id: string;
4
+ name: string;
5
+ slug: string;
6
+ color: string;
7
+ events?: EventModel[];
8
+ }
9
+ //# sourceMappingURL=tag.model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag.model.d.ts","sourceRoot":"","sources":["../../src/models/tag.model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,qBACa,QAAQ;IAEnB,EAAE,EAAG,MAAM,CAAC;IAGZ,IAAI,EAAG,MAAM,CAAC;IAGd,IAAI,EAAG,MAAM,CAAC;IAGd,KAAK,EAAG,MAAM,CAAC;IAGf,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC;CACvB"}
@@ -0,0 +1,43 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { Entity, PrimaryGeneratedColumn, Column, ManyToMany } from 'typeorm';
11
+ import { EventModel } from './event.model.js';
12
+ let TagModel = class TagModel {
13
+ id;
14
+ name;
15
+ slug;
16
+ color;
17
+ events;
18
+ };
19
+ __decorate([
20
+ PrimaryGeneratedColumn('uuid'),
21
+ __metadata("design:type", String)
22
+ ], TagModel.prototype, "id", void 0);
23
+ __decorate([
24
+ Column({ type: 'varchar', length: 100 }),
25
+ __metadata("design:type", String)
26
+ ], TagModel.prototype, "name", void 0);
27
+ __decorate([
28
+ Column({ type: 'varchar', length: 100, unique: true }),
29
+ __metadata("design:type", String)
30
+ ], TagModel.prototype, "slug", void 0);
31
+ __decorate([
32
+ Column({ type: 'varchar', length: 7 }),
33
+ __metadata("design:type", String)
34
+ ], TagModel.prototype, "color", void 0);
35
+ __decorate([
36
+ ManyToMany(() => EventModel, (event) => event.tags),
37
+ __metadata("design:type", Array)
38
+ ], TagModel.prototype, "events", void 0);
39
+ TagModel = __decorate([
40
+ Entity('tags')
41
+ ], TagModel);
42
+ export { TagModel };
43
+ //# sourceMappingURL=tag.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag.model.js","sourceRoot":"","sources":["../../src/models/tag.model.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGvC,IAAM,QAAQ,GAAd,MAAM,QAAQ;IAEnB,EAAE,CAAU;IAGZ,IAAI,CAAU;IAGd,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,MAAM,CAAgB;CACvB,CAAA;AAbC;IADC,sBAAsB,CAAC,MAAM,CAAC;;oCACnB;AAGZ;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;sCAC3B;AAGd;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;sCACzC;AAGd;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;;uCACxB;AAGf;IADC,UAAU,CAAC,GAAG,EAAE,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC;;wCAC9B;AAdX,QAAQ;IADpB,MAAM,CAAC,MAAM,CAAC;GACF,QAAQ,CAepB"}
@@ -0,0 +1,5 @@
1
+ export * from './interfaces/index.js';
2
+ export * from './postgres-event.repository.js';
3
+ export * from './postgres-requirement.repository.js';
4
+ export * from './postgres-tag.repository.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/repositories/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './interfaces/index.js';
2
+ export * from './postgres-event.repository.js';
3
+ export * from './postgres-requirement.repository.js';
4
+ export * from './postgres-tag.repository.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/repositories/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { EventEntity } from '../../entities/event.entity.js';
2
+ export interface IEventRepository {
3
+ findById(id: string): Promise<EventEntity | null>;
4
+ findAll(): Promise<EventEntity[]>;
5
+ create(event: Partial<EventEntity>): Promise<EventEntity>;
6
+ update(id: string, data: Partial<EventEntity>): Promise<EventEntity | null>;
7
+ delete(id: string): Promise<boolean>;
8
+ search(searchTerm: string): Promise<EventEntity[]>;
9
+ }
10
+ //# sourceMappingURL=event.repository.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.repository.d.ts","sourceRoot":"","sources":["../../../src/repositories/interfaces/event.repository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAElE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAClD,OAAO,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAClC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAC1D,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC5E,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACrC,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;CACpD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=event.repository.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.repository.js","sourceRoot":"","sources":["../../../src/repositories/interfaces/event.repository.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export * from './event.repository.js';
2
+ export * from './tag.repository.js';
3
+ export * from './requirement.repository.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/repositories/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './event.repository.js';
2
+ export * from './tag.repository.js';
3
+ export * from './requirement.repository.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/repositories/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { RequirementEntity } from '../../entities/requirement.entity.js';
2
+ export interface IRequirementRepository {
3
+ findById(id: string): Promise<RequirementEntity | null>;
4
+ findAll(): Promise<RequirementEntity[]>;
5
+ create(data: Partial<RequirementEntity>): Promise<RequirementEntity>;
6
+ update(id: string, data: Partial<RequirementEntity>): Promise<RequirementEntity | null>;
7
+ delete(id: string): Promise<boolean>;
8
+ }
9
+ //# sourceMappingURL=requirement.repository.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requirement.repository.d.ts","sourceRoot":"","sources":["../../../src/repositories/interfaces/requirement.repository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAE9E,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACxD,OAAO,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC;IACxC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACrE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACxF,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACtC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=requirement.repository.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requirement.repository.js","sourceRoot":"","sources":["../../../src/repositories/interfaces/requirement.repository.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import type { TagEntity } from '../../entities/tag.entity.js';
2
+ export interface ITagRepository {
3
+ findById(id: string): Promise<TagEntity | null>;
4
+ findBySlug(slug: string): Promise<TagEntity | null>;
5
+ findAll(): Promise<TagEntity[]>;
6
+ create(tagData: Partial<TagEntity>): Promise<TagEntity>;
7
+ update(id: string, tagData: Partial<TagEntity>): Promise<TagEntity | null>;
8
+ delete(id: string): Promise<boolean>;
9
+ }
10
+ //# sourceMappingURL=tag.repository.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag.repository.d.ts","sourceRoot":"","sources":["../../../src/repositories/interfaces/tag.repository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAE9D,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IAChD,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IACpD,OAAO,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;IAChC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IACxD,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IAC3E,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACtC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=tag.repository.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag.repository.js","sourceRoot":"","sources":["../../../src/repositories/interfaces/tag.repository.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import type { Repository } from '@volontariapp/database';
2
+ import { BaseRepository } from '@volontariapp/database';
3
+ import { EventModel } from '../models/event.model.js';
4
+ import { EventEntity } from '../entities/event.entity.js';
5
+ import { IEventRepository } from './interfaces/event.repository.js';
6
+ export declare class PostgresEventRepository extends BaseRepository<EventModel, EventEntity> implements IEventRepository {
7
+ constructor(repository: Repository<EventModel>);
8
+ findAll(): Promise<EventEntity[]>;
9
+ }
10
+ //# sourceMappingURL=postgres-event.repository.d.ts.map