@flusys/nestjs-event-manager 3.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 (89) hide show
  1. package/README.md +1328 -0
  2. package/adapters/event-manager.adapter.d.ts +12 -0
  3. package/adapters/index.d.ts +1 -0
  4. package/cjs/adapters/event-manager.adapter.js +71 -0
  5. package/cjs/adapters/index.js +18 -0
  6. package/cjs/config/event-manager.constants.js +13 -0
  7. package/cjs/config/index.js +18 -0
  8. package/cjs/controllers/event-participant.controller.js +271 -0
  9. package/cjs/controllers/event.controller.js +229 -0
  10. package/cjs/controllers/index.js +19 -0
  11. package/cjs/docs/event-manager-swagger.config.js +135 -0
  12. package/cjs/docs/index.js +24 -0
  13. package/cjs/dtos/calendar-query.dto.js +186 -0
  14. package/cjs/dtos/event-participant.dto.js +226 -0
  15. package/cjs/dtos/event.dto.js +291 -0
  16. package/cjs/dtos/index.js +20 -0
  17. package/cjs/entities/event-participant.entity.js +96 -0
  18. package/cjs/entities/event-with-company.entity.js +56 -0
  19. package/cjs/entities/event.entity.js +143 -0
  20. package/cjs/entities/index.js +55 -0
  21. package/cjs/index.js +27 -0
  22. package/cjs/interfaces/event-manager-module.interface.js +4 -0
  23. package/cjs/interfaces/event.interface.js +4 -0
  24. package/cjs/interfaces/index.js +19 -0
  25. package/cjs/modules/event-manager.module.js +133 -0
  26. package/cjs/modules/index.js +18 -0
  27. package/cjs/services/event-manager-config.service.js +76 -0
  28. package/cjs/services/event-manager-datasource.provider.js +181 -0
  29. package/cjs/services/event-manager-helper.service.js +253 -0
  30. package/cjs/services/event-participant.service.js +164 -0
  31. package/cjs/services/event.service.js +421 -0
  32. package/cjs/services/index.js +22 -0
  33. package/config/event-manager.constants.d.ts +1 -0
  34. package/config/index.d.ts +1 -0
  35. package/controllers/event-participant.controller.d.ts +31 -0
  36. package/controllers/event.controller.d.ts +24 -0
  37. package/controllers/index.d.ts +2 -0
  38. package/docs/event-manager-swagger.config.d.ts +3 -0
  39. package/docs/index.d.ts +2 -0
  40. package/dtos/calendar-query.dto.d.ts +23 -0
  41. package/dtos/event-participant.dto.d.ts +31 -0
  42. package/dtos/event.dto.d.ts +37 -0
  43. package/dtos/index.d.ts +3 -0
  44. package/entities/event-participant.entity.d.ts +8 -0
  45. package/entities/event-with-company.entity.d.ts +4 -0
  46. package/entities/event.entity.d.ts +14 -0
  47. package/entities/index.d.ts +11 -0
  48. package/fesm/adapters/event-manager.adapter.js +61 -0
  49. package/fesm/adapters/index.js +1 -0
  50. package/fesm/config/event-manager.constants.js +3 -0
  51. package/fesm/config/index.js +1 -0
  52. package/fesm/controllers/event-participant.controller.js +261 -0
  53. package/fesm/controllers/event.controller.js +219 -0
  54. package/fesm/controllers/index.js +2 -0
  55. package/fesm/docs/event-manager-swagger.config.js +128 -0
  56. package/fesm/docs/index.js +4 -0
  57. package/fesm/dtos/calendar-query.dto.js +168 -0
  58. package/fesm/dtos/event-participant.dto.js +199 -0
  59. package/fesm/dtos/event.dto.js +270 -0
  60. package/fesm/dtos/index.js +3 -0
  61. package/fesm/entities/event-participant.entity.js +86 -0
  62. package/fesm/entities/event-with-company.entity.js +46 -0
  63. package/fesm/entities/event.entity.js +133 -0
  64. package/fesm/entities/index.js +24 -0
  65. package/fesm/index.js +10 -0
  66. package/fesm/interfaces/event-manager-module.interface.js +3 -0
  67. package/fesm/interfaces/event.interface.js +1 -0
  68. package/fesm/interfaces/index.js +2 -0
  69. package/fesm/modules/event-manager.module.js +123 -0
  70. package/fesm/modules/index.js +1 -0
  71. package/fesm/services/event-manager-config.service.js +66 -0
  72. package/fesm/services/event-manager-datasource.provider.js +130 -0
  73. package/fesm/services/event-manager-helper.service.js +243 -0
  74. package/fesm/services/event-participant.service.js +154 -0
  75. package/fesm/services/event.service.js +411 -0
  76. package/fesm/services/index.js +5 -0
  77. package/index.d.ts +9 -0
  78. package/interfaces/event-manager-module.interface.d.ts +20 -0
  79. package/interfaces/event.interface.d.ts +28 -0
  80. package/interfaces/index.d.ts +2 -0
  81. package/modules/event-manager.module.d.ts +8 -0
  82. package/modules/index.d.ts +1 -0
  83. package/package.json +89 -0
  84. package/services/event-manager-config.service.d.ts +13 -0
  85. package/services/event-manager-datasource.provider.d.ts +23 -0
  86. package/services/event-manager-helper.service.d.ts +27 -0
  87. package/services/event-participant.service.d.ts +27 -0
  88. package/services/event.service.d.ts +49 -0
  89. package/services/index.d.ts +5 -0
@@ -0,0 +1,199 @@
1
+ function _define_property(obj, key, value) {
2
+ if (key in obj) {
3
+ Object.defineProperty(obj, key, {
4
+ value: value,
5
+ enumerable: true,
6
+ configurable: true,
7
+ writable: true
8
+ });
9
+ } else {
10
+ obj[key] = value;
11
+ }
12
+ return obj;
13
+ }
14
+ function _ts_decorate(decorators, target, key, desc) {
15
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17
+ 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;
18
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
19
+ }
20
+ function _ts_metadata(k, v) {
21
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
22
+ }
23
+ import { ParticipantStatus } from '@flusys/nestjs-shared/enums';
24
+ import { ApiProperty, ApiPropertyOptional, PartialType } from '@nestjs/swagger';
25
+ import { Expose } from 'class-transformer';
26
+ import { IsBoolean, IsEnum, IsNotEmpty, IsOptional, IsUUID } from 'class-validator';
27
+ export class CreateEventParticipantDto {
28
+ constructor(){
29
+ _define_property(this, "eventId", void 0);
30
+ _define_property(this, "userId", void 0);
31
+ _define_property(this, "status", void 0);
32
+ _define_property(this, "isOrganizer", void 0);
33
+ _define_property(this, "metadata", void 0);
34
+ }
35
+ }
36
+ _ts_decorate([
37
+ ApiProperty({
38
+ description: 'Event ID',
39
+ example: 'f2e9c8d0-7a2a-11eb-9439-0242ac130002'
40
+ }),
41
+ IsNotEmpty(),
42
+ IsUUID(),
43
+ _ts_metadata("design:type", String)
44
+ ], CreateEventParticipantDto.prototype, "eventId", void 0);
45
+ _ts_decorate([
46
+ ApiProperty({
47
+ description: 'User ID',
48
+ example: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'
49
+ }),
50
+ IsNotEmpty(),
51
+ IsUUID(),
52
+ _ts_metadata("design:type", String)
53
+ ], CreateEventParticipantDto.prototype, "userId", void 0);
54
+ _ts_decorate([
55
+ ApiPropertyOptional({
56
+ description: 'Participation status',
57
+ enum: ParticipantStatus,
58
+ default: ParticipantStatus.PENDING
59
+ }),
60
+ IsOptional(),
61
+ IsEnum(ParticipantStatus),
62
+ _ts_metadata("design:type", typeof ParticipantStatus === "undefined" ? Object : ParticipantStatus)
63
+ ], CreateEventParticipantDto.prototype, "status", void 0);
64
+ _ts_decorate([
65
+ ApiPropertyOptional({
66
+ description: 'Is the organizer of the event',
67
+ default: false
68
+ }),
69
+ IsOptional(),
70
+ IsBoolean(),
71
+ _ts_metadata("design:type", Boolean)
72
+ ], CreateEventParticipantDto.prototype, "isOrganizer", void 0);
73
+ _ts_decorate([
74
+ ApiPropertyOptional({
75
+ description: 'Additional metadata'
76
+ }),
77
+ IsOptional(),
78
+ _ts_metadata("design:type", typeof Record === "undefined" ? Object : Record)
79
+ ], CreateEventParticipantDto.prototype, "metadata", void 0);
80
+ export class UpdateEventParticipantDto extends PartialType(CreateEventParticipantDto) {
81
+ constructor(...args){
82
+ super(...args), _define_property(this, "id", void 0);
83
+ }
84
+ }
85
+ _ts_decorate([
86
+ ApiProperty({
87
+ description: 'Event Participant ID',
88
+ example: 'f2e9c8d0-7a2a-11eb-9439-0242ac130002'
89
+ }),
90
+ IsUUID(),
91
+ IsNotEmpty(),
92
+ _ts_metadata("design:type", String)
93
+ ], UpdateEventParticipantDto.prototype, "id", void 0);
94
+ export class EventParticipantResponseDto {
95
+ constructor(){
96
+ _define_property(this, "id", void 0);
97
+ _define_property(this, "eventId", void 0);
98
+ _define_property(this, "userId", void 0);
99
+ _define_property(this, "status", void 0);
100
+ _define_property(this, "isOrganizer", void 0);
101
+ _define_property(this, "metadata", void 0);
102
+ _define_property(this, "createdAt", void 0);
103
+ _define_property(this, "updatedAt", void 0);
104
+ }
105
+ }
106
+ _ts_decorate([
107
+ Expose(),
108
+ ApiProperty(),
109
+ _ts_metadata("design:type", String)
110
+ ], EventParticipantResponseDto.prototype, "id", void 0);
111
+ _ts_decorate([
112
+ Expose(),
113
+ ApiProperty(),
114
+ _ts_metadata("design:type", String)
115
+ ], EventParticipantResponseDto.prototype, "eventId", void 0);
116
+ _ts_decorate([
117
+ Expose(),
118
+ ApiProperty(),
119
+ _ts_metadata("design:type", String)
120
+ ], EventParticipantResponseDto.prototype, "userId", void 0);
121
+ _ts_decorate([
122
+ Expose(),
123
+ ApiProperty({
124
+ enum: ParticipantStatus
125
+ }),
126
+ _ts_metadata("design:type", String)
127
+ ], EventParticipantResponseDto.prototype, "status", void 0);
128
+ _ts_decorate([
129
+ Expose(),
130
+ ApiProperty(),
131
+ _ts_metadata("design:type", Boolean)
132
+ ], EventParticipantResponseDto.prototype, "isOrganizer", void 0);
133
+ _ts_decorate([
134
+ Expose(),
135
+ ApiPropertyOptional(),
136
+ _ts_metadata("design:type", Object)
137
+ ], EventParticipantResponseDto.prototype, "metadata", void 0);
138
+ _ts_decorate([
139
+ Expose(),
140
+ ApiProperty(),
141
+ _ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
142
+ ], EventParticipantResponseDto.prototype, "createdAt", void 0);
143
+ _ts_decorate([
144
+ Expose(),
145
+ ApiProperty(),
146
+ _ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
147
+ ], EventParticipantResponseDto.prototype, "updatedAt", void 0);
148
+ export class UpdateParticipantStatusDto {
149
+ constructor(){
150
+ _define_property(this, "id", void 0);
151
+ _define_property(this, "status", void 0);
152
+ }
153
+ }
154
+ _ts_decorate([
155
+ ApiProperty({
156
+ description: 'Event Participant ID',
157
+ example: 'f2e9c8d0-7a2a-11eb-9439-0242ac130002'
158
+ }),
159
+ IsUUID(),
160
+ IsNotEmpty(),
161
+ _ts_metadata("design:type", String)
162
+ ], UpdateParticipantStatusDto.prototype, "id", void 0);
163
+ _ts_decorate([
164
+ ApiProperty({
165
+ description: 'New participation status',
166
+ enum: ParticipantStatus
167
+ }),
168
+ IsNotEmpty(),
169
+ IsEnum(ParticipantStatus),
170
+ _ts_metadata("design:type", typeof ParticipantStatus === "undefined" ? Object : ParticipantStatus)
171
+ ], UpdateParticipantStatusDto.prototype, "status", void 0);
172
+ export class BulkAddParticipantsDto {
173
+ constructor(){
174
+ _define_property(this, "eventId", void 0);
175
+ _define_property(this, "userIds", void 0);
176
+ }
177
+ }
178
+ _ts_decorate([
179
+ ApiProperty({
180
+ description: 'Event ID',
181
+ example: 'f2e9c8d0-7a2a-11eb-9439-0242ac130002'
182
+ }),
183
+ IsNotEmpty(),
184
+ IsUUID(),
185
+ _ts_metadata("design:type", String)
186
+ ], BulkAddParticipantsDto.prototype, "eventId", void 0);
187
+ _ts_decorate([
188
+ ApiProperty({
189
+ description: 'User IDs to add as participants',
190
+ type: [
191
+ String
192
+ ]
193
+ }),
194
+ IsNotEmpty(),
195
+ IsUUID('4', {
196
+ each: true
197
+ }),
198
+ _ts_metadata("design:type", Array)
199
+ ], BulkAddParticipantsDto.prototype, "userIds", void 0);
@@ -0,0 +1,270 @@
1
+ function _define_property(obj, key, value) {
2
+ if (key in obj) {
3
+ Object.defineProperty(obj, key, {
4
+ value: value,
5
+ enumerable: true,
6
+ configurable: true,
7
+ writable: true
8
+ });
9
+ } else {
10
+ obj[key] = value;
11
+ }
12
+ return obj;
13
+ }
14
+ function _ts_decorate(decorators, target, key, desc) {
15
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17
+ 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;
18
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
19
+ }
20
+ function _ts_metadata(k, v) {
21
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
22
+ }
23
+ import { RecurrenceType } from '@flusys/nestjs-shared/enums';
24
+ import { ApiProperty, ApiPropertyOptional, PartialType } from '@nestjs/swagger';
25
+ import { Expose, Type } from 'class-transformer';
26
+ import { IsArray, IsBoolean, IsDate, IsEnum, IsNotEmpty, IsOptional, IsString, IsUUID, MaxLength } from 'class-validator';
27
+ export class CreateEventDto {
28
+ constructor(){
29
+ _define_property(this, "title", void 0);
30
+ _define_property(this, "description", void 0);
31
+ _define_property(this, "meetingLink", void 0);
32
+ _define_property(this, "startDateTime", void 0);
33
+ _define_property(this, "endDateTime", void 0);
34
+ _define_property(this, "isAllDay", void 0);
35
+ _define_property(this, "recurrenceType", void 0);
36
+ _define_property(this, "recurrenceEndDate", void 0);
37
+ _define_property(this, "color", void 0);
38
+ _define_property(this, "isActive", void 0);
39
+ _define_property(this, "metadata", void 0);
40
+ _define_property(this, "participantIds", void 0);
41
+ }
42
+ }
43
+ _ts_decorate([
44
+ ApiProperty({
45
+ description: 'Event title',
46
+ example: 'Team Meeting',
47
+ maxLength: 255
48
+ }),
49
+ IsNotEmpty(),
50
+ IsString(),
51
+ MaxLength(255),
52
+ _ts_metadata("design:type", String)
53
+ ], CreateEventDto.prototype, "title", void 0);
54
+ _ts_decorate([
55
+ ApiPropertyOptional({
56
+ description: 'Event description'
57
+ }),
58
+ IsOptional(),
59
+ IsString(),
60
+ _ts_metadata("design:type", String)
61
+ ], CreateEventDto.prototype, "description", void 0);
62
+ _ts_decorate([
63
+ ApiPropertyOptional({
64
+ description: 'Meeting link URL',
65
+ maxLength: 500
66
+ }),
67
+ IsOptional(),
68
+ IsString(),
69
+ MaxLength(500),
70
+ _ts_metadata("design:type", String)
71
+ ], CreateEventDto.prototype, "meetingLink", void 0);
72
+ _ts_decorate([
73
+ ApiProperty({
74
+ description: 'Start date and time',
75
+ example: '2024-01-15T09:00:00Z'
76
+ }),
77
+ IsNotEmpty(),
78
+ IsDate(),
79
+ Type(()=>Date),
80
+ _ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
81
+ ], CreateEventDto.prototype, "startDateTime", void 0);
82
+ _ts_decorate([
83
+ ApiProperty({
84
+ description: 'End date and time',
85
+ example: '2024-01-15T10:00:00Z'
86
+ }),
87
+ IsNotEmpty(),
88
+ IsDate(),
89
+ Type(()=>Date),
90
+ _ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
91
+ ], CreateEventDto.prototype, "endDateTime", void 0);
92
+ _ts_decorate([
93
+ ApiPropertyOptional({
94
+ description: 'All day event flag',
95
+ default: false
96
+ }),
97
+ IsOptional(),
98
+ IsBoolean(),
99
+ _ts_metadata("design:type", Boolean)
100
+ ], CreateEventDto.prototype, "isAllDay", void 0);
101
+ _ts_decorate([
102
+ ApiPropertyOptional({
103
+ description: 'Recurrence type',
104
+ enum: RecurrenceType,
105
+ default: RecurrenceType.NONE
106
+ }),
107
+ IsOptional(),
108
+ IsEnum(RecurrenceType),
109
+ _ts_metadata("design:type", typeof RecurrenceType === "undefined" ? Object : RecurrenceType)
110
+ ], CreateEventDto.prototype, "recurrenceType", void 0);
111
+ _ts_decorate([
112
+ ApiPropertyOptional({
113
+ description: 'Recurrence end date'
114
+ }),
115
+ IsOptional(),
116
+ IsDate(),
117
+ Type(()=>Date),
118
+ _ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
119
+ ], CreateEventDto.prototype, "recurrenceEndDate", void 0);
120
+ _ts_decorate([
121
+ ApiPropertyOptional({
122
+ description: 'Event color (hex)',
123
+ example: '#3B82F6',
124
+ default: '#3B82F6'
125
+ }),
126
+ IsOptional(),
127
+ IsString(),
128
+ MaxLength(7),
129
+ _ts_metadata("design:type", String)
130
+ ], CreateEventDto.prototype, "color", void 0);
131
+ _ts_decorate([
132
+ ApiPropertyOptional({
133
+ description: 'Active status',
134
+ default: true
135
+ }),
136
+ IsOptional(),
137
+ IsBoolean(),
138
+ _ts_metadata("design:type", Boolean)
139
+ ], CreateEventDto.prototype, "isActive", void 0);
140
+ _ts_decorate([
141
+ ApiPropertyOptional({
142
+ description: 'Additional metadata'
143
+ }),
144
+ IsOptional(),
145
+ _ts_metadata("design:type", typeof Record === "undefined" ? Object : Record)
146
+ ], CreateEventDto.prototype, "metadata", void 0);
147
+ _ts_decorate([
148
+ ApiPropertyOptional({
149
+ description: 'Participant user IDs',
150
+ type: [
151
+ String
152
+ ]
153
+ }),
154
+ IsOptional(),
155
+ IsArray(),
156
+ IsUUID('4', {
157
+ each: true
158
+ }),
159
+ _ts_metadata("design:type", Array)
160
+ ], CreateEventDto.prototype, "participantIds", void 0);
161
+ export class UpdateEventDto extends PartialType(CreateEventDto) {
162
+ constructor(...args){
163
+ super(...args), _define_property(this, "id", void 0);
164
+ }
165
+ }
166
+ _ts_decorate([
167
+ ApiProperty({
168
+ description: 'Event ID',
169
+ example: 'f2e9c8d0-7a2a-11eb-9439-0242ac130002'
170
+ }),
171
+ IsUUID(),
172
+ IsNotEmpty(),
173
+ _ts_metadata("design:type", String)
174
+ ], UpdateEventDto.prototype, "id", void 0);
175
+ export class EventResponseDto {
176
+ constructor(){
177
+ _define_property(this, "id", void 0);
178
+ _define_property(this, "title", void 0);
179
+ _define_property(this, "description", void 0);
180
+ _define_property(this, "meetingLink", void 0);
181
+ _define_property(this, "startDateTime", void 0);
182
+ _define_property(this, "endDateTime", void 0);
183
+ _define_property(this, "isAllDay", void 0);
184
+ _define_property(this, "recurrenceType", void 0);
185
+ _define_property(this, "recurrenceEndDate", void 0);
186
+ _define_property(this, "color", void 0);
187
+ _define_property(this, "isActive", void 0);
188
+ _define_property(this, "metadata", void 0);
189
+ _define_property(this, "companyId", void 0);
190
+ _define_property(this, "createdAt", void 0);
191
+ _define_property(this, "updatedAt", void 0);
192
+ }
193
+ }
194
+ _ts_decorate([
195
+ Expose(),
196
+ ApiProperty(),
197
+ _ts_metadata("design:type", String)
198
+ ], EventResponseDto.prototype, "id", void 0);
199
+ _ts_decorate([
200
+ Expose(),
201
+ ApiProperty(),
202
+ _ts_metadata("design:type", String)
203
+ ], EventResponseDto.prototype, "title", void 0);
204
+ _ts_decorate([
205
+ Expose(),
206
+ ApiPropertyOptional(),
207
+ _ts_metadata("design:type", Object)
208
+ ], EventResponseDto.prototype, "description", void 0);
209
+ _ts_decorate([
210
+ Expose(),
211
+ ApiPropertyOptional(),
212
+ _ts_metadata("design:type", Object)
213
+ ], EventResponseDto.prototype, "meetingLink", void 0);
214
+ _ts_decorate([
215
+ Expose(),
216
+ ApiProperty(),
217
+ _ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
218
+ ], EventResponseDto.prototype, "startDateTime", void 0);
219
+ _ts_decorate([
220
+ Expose(),
221
+ ApiProperty(),
222
+ _ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
223
+ ], EventResponseDto.prototype, "endDateTime", void 0);
224
+ _ts_decorate([
225
+ Expose(),
226
+ ApiProperty(),
227
+ _ts_metadata("design:type", Boolean)
228
+ ], EventResponseDto.prototype, "isAllDay", void 0);
229
+ _ts_decorate([
230
+ Expose(),
231
+ ApiProperty({
232
+ enum: RecurrenceType
233
+ }),
234
+ _ts_metadata("design:type", String)
235
+ ], EventResponseDto.prototype, "recurrenceType", void 0);
236
+ _ts_decorate([
237
+ Expose(),
238
+ ApiPropertyOptional(),
239
+ _ts_metadata("design:type", Object)
240
+ ], EventResponseDto.prototype, "recurrenceEndDate", void 0);
241
+ _ts_decorate([
242
+ Expose(),
243
+ ApiProperty(),
244
+ _ts_metadata("design:type", String)
245
+ ], EventResponseDto.prototype, "color", void 0);
246
+ _ts_decorate([
247
+ Expose(),
248
+ ApiProperty(),
249
+ _ts_metadata("design:type", Boolean)
250
+ ], EventResponseDto.prototype, "isActive", void 0);
251
+ _ts_decorate([
252
+ Expose(),
253
+ ApiPropertyOptional(),
254
+ _ts_metadata("design:type", Object)
255
+ ], EventResponseDto.prototype, "metadata", void 0);
256
+ _ts_decorate([
257
+ Expose(),
258
+ ApiPropertyOptional(),
259
+ _ts_metadata("design:type", Object)
260
+ ], EventResponseDto.prototype, "companyId", void 0);
261
+ _ts_decorate([
262
+ Expose(),
263
+ ApiProperty(),
264
+ _ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
265
+ ], EventResponseDto.prototype, "createdAt", void 0);
266
+ _ts_decorate([
267
+ Expose(),
268
+ ApiProperty(),
269
+ _ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
270
+ ], EventResponseDto.prototype, "updatedAt", void 0);
@@ -0,0 +1,3 @@
1
+ export * from './event.dto';
2
+ export * from './event-participant.dto';
3
+ export * from './calendar-query.dto';
@@ -0,0 +1,86 @@
1
+ function _define_property(obj, key, value) {
2
+ if (key in obj) {
3
+ Object.defineProperty(obj, key, {
4
+ value: value,
5
+ enumerable: true,
6
+ configurable: true,
7
+ writable: true
8
+ });
9
+ } else {
10
+ obj[key] = value;
11
+ }
12
+ return obj;
13
+ }
14
+ function _ts_decorate(decorators, target, key, desc) {
15
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17
+ 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;
18
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
19
+ }
20
+ function _ts_metadata(k, v) {
21
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
22
+ }
23
+ import { ParticipantStatus } from '@flusys/nestjs-shared/enums';
24
+ import { Identity } from '@flusys/nestjs-shared/entities';
25
+ import { Column, Entity, Index } from 'typeorm';
26
+ export class EventParticipant extends Identity {
27
+ constructor(...args){
28
+ super(...args), _define_property(this, "eventId", void 0), _define_property(this, "userId", void 0), _define_property(this, "status", void 0), _define_property(this, "isOrganizer", void 0), _define_property(this, "metadata", void 0);
29
+ }
30
+ }
31
+ _ts_decorate([
32
+ Index(),
33
+ Column({
34
+ name: 'event_id',
35
+ type: 'uuid',
36
+ nullable: false
37
+ }),
38
+ _ts_metadata("design:type", String)
39
+ ], EventParticipant.prototype, "eventId", void 0);
40
+ _ts_decorate([
41
+ Column({
42
+ name: 'user_id',
43
+ type: 'uuid',
44
+ nullable: false
45
+ }),
46
+ _ts_metadata("design:type", String)
47
+ ], EventParticipant.prototype, "userId", void 0);
48
+ _ts_decorate([
49
+ Column({
50
+ type: 'varchar',
51
+ length: 50,
52
+ nullable: false,
53
+ default: ParticipantStatus.PENDING
54
+ }),
55
+ _ts_metadata("design:type", String)
56
+ ], EventParticipant.prototype, "status", void 0);
57
+ _ts_decorate([
58
+ Column({
59
+ name: 'is_organizer',
60
+ type: 'boolean',
61
+ nullable: false,
62
+ default: false
63
+ }),
64
+ _ts_metadata("design:type", Boolean)
65
+ ], EventParticipant.prototype, "isOrganizer", void 0);
66
+ _ts_decorate([
67
+ Column({
68
+ type: 'simple-json',
69
+ nullable: true
70
+ }),
71
+ _ts_metadata("design:type", Object)
72
+ ], EventParticipant.prototype, "metadata", void 0);
73
+ EventParticipant = _ts_decorate([
74
+ Entity({
75
+ name: 'event_participant'
76
+ }),
77
+ Index([
78
+ 'eventId',
79
+ 'userId'
80
+ ], {
81
+ unique: true
82
+ }),
83
+ Index([
84
+ 'userId'
85
+ ])
86
+ ], EventParticipant);
@@ -0,0 +1,46 @@
1
+ function _define_property(obj, key, value) {
2
+ if (key in obj) {
3
+ Object.defineProperty(obj, key, {
4
+ value: value,
5
+ enumerable: true,
6
+ configurable: true,
7
+ writable: true
8
+ });
9
+ } else {
10
+ obj[key] = value;
11
+ }
12
+ return obj;
13
+ }
14
+ function _ts_decorate(decorators, target, key, desc) {
15
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17
+ 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;
18
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
19
+ }
20
+ function _ts_metadata(k, v) {
21
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
22
+ }
23
+ import { Column, Entity, Index } from 'typeorm';
24
+ import { Event } from './event.entity';
25
+ export class EventWithCompany extends Event {
26
+ constructor(...args){
27
+ super(...args), _define_property(this, "companyId", void 0);
28
+ }
29
+ }
30
+ _ts_decorate([
31
+ Column({
32
+ name: 'company_id',
33
+ type: 'uuid',
34
+ nullable: true
35
+ }),
36
+ _ts_metadata("design:type", Object)
37
+ ], EventWithCompany.prototype, "companyId", void 0);
38
+ EventWithCompany = _ts_decorate([
39
+ Entity({
40
+ name: 'event'
41
+ }),
42
+ Index([
43
+ 'companyId',
44
+ 'isActive'
45
+ ])
46
+ ], EventWithCompany);