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