@flusys/nestjs-event-manager 7.0.2 → 8.0.0-beta.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/adapters/event-manager.adapter.d.ts +2 -2
- package/adapters/index.d.ts +1 -1
- package/config/index.d.ts +3 -3
- package/controllers/event.controller.d.ts +3 -3
- package/controllers/index.d.ts +1 -1
- package/docs/event-manager-swagger.config.d.ts +2 -2
- package/docs/index.d.ts +1 -1
- package/dtos/calendar-query.dto.d.ts +1 -1
- package/dtos/event.dto.d.ts +1 -1
- package/dtos/index.d.ts +3 -3
- package/entities/event-with-company.entity.d.ts +1 -1
- package/entities/index.d.ts +8 -8
- package/fesm/477.js +1798 -0
- package/fesm/833.js +840 -0
- package/fesm/adapters/index.js +884 -1
- package/fesm/config/index.js +87 -3
- package/fesm/controllers/index.js +365 -1
- package/fesm/docs/index.js +155 -2
- package/fesm/dtos/index.js +720 -3
- package/fesm/entities/index.js +350 -11
- package/fesm/index.js +121 -9
- package/fesm/interfaces/index.js +16 -2
- package/fesm/modules/index.js +13 -1
- package/fesm/runtime.js +85 -0
- package/fesm/services/index.js +272 -4
- package/index.d.ts +9 -9
- package/interfaces/event-manager-module.interface.d.ts +3 -3
- package/interfaces/event.interface.d.ts +1 -1
- package/interfaces/index.d.ts +2 -2
- package/modules/event-manager.module.d.ts +2 -2
- package/modules/index.d.ts +1 -1
- package/package.json +29 -39
- package/services/event-manager-config.service.d.ts +3 -3
- package/services/event-manager-datasource.provider.d.ts +3 -3
- package/services/event-manager-helper.service.d.ts +3 -3
- package/services/event.service.d.ts +7 -7
- package/services/index.d.ts +4 -4
- package/cjs/adapters/event-manager.adapter.js +0 -65
- package/cjs/adapters/event-manager.adapter.spec.js +0 -104
- package/cjs/adapters/index.js +0 -18
- package/cjs/config/event-actions.js +0 -31
- package/cjs/config/event-manager.constants.js +0 -13
- package/cjs/config/index.js +0 -20
- package/cjs/config/message-keys.js +0 -27
- package/cjs/controllers/event.controller.js +0 -190
- package/cjs/controllers/event.controller.spec.js +0 -156
- package/cjs/controllers/index.js +0 -18
- package/cjs/docs/event-manager-swagger.config.js +0 -125
- package/cjs/docs/event-manager-swagger.config.spec.js +0 -65
- package/cjs/docs/index.js +0 -21
- package/cjs/dtos/calendar-query.dto.js +0 -212
- package/cjs/dtos/event-participant.dto.js +0 -181
- package/cjs/dtos/event.dto.js +0 -343
- package/cjs/dtos/index.js +0 -20
- package/cjs/entities/event-participant.entity.js +0 -89
- package/cjs/entities/event-with-company.entity.js +0 -56
- package/cjs/entities/event.entity.js +0 -156
- package/cjs/entities/index.js +0 -55
- package/cjs/entities/index.spec.js +0 -18
- package/cjs/index.js +0 -27
- package/cjs/interfaces/event-manager-module.interface.js +0 -4
- package/cjs/interfaces/event.interface.js +0 -4
- package/cjs/interfaces/index.js +0 -19
- package/cjs/modules/event-manager.module.js +0 -132
- package/cjs/modules/event-manager.module.spec.js +0 -146
- package/cjs/modules/index.js +0 -18
- package/cjs/services/event-manager-config.service.js +0 -76
- package/cjs/services/event-manager-config.service.spec.js +0 -111
- package/cjs/services/event-manager-datasource.provider.js +0 -84
- package/cjs/services/event-manager-datasource.provider.spec.js +0 -198
- package/cjs/services/event-manager-helper.service.js +0 -235
- package/cjs/services/event-manager-helper.service.spec.js +0 -327
- package/cjs/services/event.service.js +0 -481
- package/cjs/services/event.service.spec.js +0 -929
- package/cjs/services/index.js +0 -21
- package/fesm/adapters/event-manager.adapter.js +0 -55
- package/fesm/adapters/event-manager.adapter.spec.js +0 -100
- package/fesm/config/event-actions.js +0 -10
- package/fesm/config/event-manager.constants.js +0 -3
- package/fesm/config/message-keys.js +0 -9
- package/fesm/controllers/event.controller.js +0 -180
- package/fesm/controllers/event.controller.spec.js +0 -152
- package/fesm/docs/event-manager-swagger.config.js +0 -118
- package/fesm/docs/event-manager-swagger.config.spec.js +0 -61
- package/fesm/dtos/calendar-query.dto.js +0 -194
- package/fesm/dtos/event-participant.dto.js +0 -157
- package/fesm/dtos/event.dto.js +0 -322
- package/fesm/entities/event-participant.entity.js +0 -79
- package/fesm/entities/event-with-company.entity.js +0 -46
- package/fesm/entities/event.entity.js +0 -146
- package/fesm/entities/index.spec.js +0 -14
- package/fesm/interfaces/event-manager-module.interface.js +0 -3
- package/fesm/interfaces/event.interface.js +0 -1
- package/fesm/modules/event-manager.module.js +0 -122
- package/fesm/modules/event-manager.module.spec.js +0 -142
- package/fesm/services/event-manager-config.service.js +0 -66
- package/fesm/services/event-manager-config.service.spec.js +0 -107
- package/fesm/services/event-manager-datasource.provider.js +0 -74
- package/fesm/services/event-manager-datasource.provider.spec.js +0 -194
- package/fesm/services/event-manager-helper.service.js +0 -225
- package/fesm/services/event-manager-helper.service.spec.js +0 -323
- package/fesm/services/event.service.js +0 -471
- package/fesm/services/event.service.spec.js +0 -925
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "eventManagerSwaggerConfig", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return eventManagerSwaggerConfig;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
/** Schema properties to exclude when company feature is disabled */ const COMPANY_SCHEMA_EXCLUSIONS = [
|
|
12
|
-
{
|
|
13
|
-
schemaName: 'EventResponseDto',
|
|
14
|
-
properties: [
|
|
15
|
-
'companyId'
|
|
16
|
-
]
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
schemaName: 'CalendarEventResponseDto',
|
|
20
|
-
properties: [
|
|
21
|
-
'companyId'
|
|
22
|
-
]
|
|
23
|
-
}
|
|
24
|
-
];
|
|
25
|
-
function buildDescription(enableCompanyFeature, isMultiTenant) {
|
|
26
|
-
const multiTenantNote = isMultiTenant ? `\n> **Multi-Tenant Mode**: Include \`x-tenant-id\` header to target a specific tenant database.\n` : '';
|
|
27
|
-
const companyFeatures = enableCompanyFeature ? '\n- **Company-scoped events**' : '';
|
|
28
|
-
const companyIsolation = enableCompanyFeature ? '\n- **Company isolation**' : '';
|
|
29
|
-
const multiTenantSection = enableCompanyFeature ? `
|
|
30
|
-
## Multi-Tenant Support
|
|
31
|
-
|
|
32
|
-
Events are automatically isolated by:
|
|
33
|
-
- **Company ID**: Events belong to specific companies
|
|
34
|
-
- **User Context**: Participants are company members
|
|
35
|
-
|
|
36
|
-
All queries automatically filter by current user's company context.
|
|
37
|
-
` : '';
|
|
38
|
-
return `
|
|
39
|
-
# Event Manager API
|
|
40
|
-
${multiTenantNote}
|
|
41
|
-
Calendar event management with recurrence support${enableCompanyFeature ? ' and multi-tenant capabilities' : ''}.
|
|
42
|
-
|
|
43
|
-
## Features
|
|
44
|
-
|
|
45
|
-
### 📅 Event Management
|
|
46
|
-
- Create, read, update, delete events
|
|
47
|
-
- Color-coded events
|
|
48
|
-
- All-day event support${companyFeatures}
|
|
49
|
-
|
|
50
|
-
### 🔄 Recurrence Support
|
|
51
|
-
- **None**: Single occurrence
|
|
52
|
-
- **Daily**: Every day
|
|
53
|
-
- **Weekly**: Specific days of the week
|
|
54
|
-
- **Biweekly**: Every two weeks
|
|
55
|
-
- **Monthly**: Same day each month
|
|
56
|
-
|
|
57
|
-
### 👥 Participant Management
|
|
58
|
-
- Status tracking (pending, accepted, declined, tentative)
|
|
59
|
-
- Organizer designation
|
|
60
|
-
|
|
61
|
-
### 📆 Calendar Queries
|
|
62
|
-
- Date range queries
|
|
63
|
-
- Automatic recurrence expansion
|
|
64
|
-
- Filter by user participation
|
|
65
|
-
- Include/exclude participants in response
|
|
66
|
-
|
|
67
|
-
### 🔒 Security
|
|
68
|
-
- JWT authentication required
|
|
69
|
-
- Permission-based access control${companyIsolation}
|
|
70
|
-
|
|
71
|
-
## Recurrence Patterns
|
|
72
|
-
|
|
73
|
-
### Weekly Recurrence
|
|
74
|
-
Use the \`weekDays\` array to specify which days repeat:
|
|
75
|
-
- \`"SUN"\` = Sunday
|
|
76
|
-
- \`"MON"\` = Monday
|
|
77
|
-
- \`"TUE"\` = Tuesday
|
|
78
|
-
- \`"WED"\` = Wednesday
|
|
79
|
-
- \`"THU"\` = Thursday
|
|
80
|
-
- \`"FRI"\` = Friday
|
|
81
|
-
- \`"SAT"\` = Saturday
|
|
82
|
-
|
|
83
|
-
Example: \`{ "weekDays": ["MON", "WED", "FRI"] }\` = Monday, Wednesday, Friday
|
|
84
|
-
|
|
85
|
-
### Recurrence Expansion
|
|
86
|
-
Calendar queries automatically expand recurring events into individual instances.
|
|
87
|
-
Each instance includes:
|
|
88
|
-
- \`isRecurrenceInstance: true\`
|
|
89
|
-
- \`originalEventId\`: Reference to parent event
|
|
90
|
-
${multiTenantSection}
|
|
91
|
-
## API Endpoints
|
|
92
|
-
|
|
93
|
-
All endpoints use POST method (RPC style):
|
|
94
|
-
|
|
95
|
-
### Events
|
|
96
|
-
- \`/event-manager/event/insert\` - Create event
|
|
97
|
-
- \`/event-manager/event/get/:id\` - Get by ID
|
|
98
|
-
- \`/event-manager/event/get-all\` - List with pagination
|
|
99
|
-
- \`/event-manager/event/update\` - Update event
|
|
100
|
-
- \`/event-manager/event/delete\` - Soft delete
|
|
101
|
-
- \`/event-manager/event/calendar\` - Calendar query with expansion
|
|
102
|
-
|
|
103
|
-
### Participant Operations (via Event endpoints)
|
|
104
|
-
- \`/event-manager/event/update-participant-status\` - Update status
|
|
105
|
-
|
|
106
|
-
## Getting Started
|
|
107
|
-
|
|
108
|
-
1. **Authenticate**: Obtain JWT token from /auth/login
|
|
109
|
-
2. **Create Event**: POST to /event-manager/event/insert
|
|
110
|
-
3. **Query Calendar**: POST to /event-manager/event/calendar with date range
|
|
111
|
-
`;
|
|
112
|
-
}
|
|
113
|
-
function eventManagerSwaggerConfig(bootstrapConfig) {
|
|
114
|
-
const enableCompanyFeature = bootstrapConfig?.enableCompanyFeature ?? true;
|
|
115
|
-
const isMultiTenant = bootstrapConfig?.databaseMode === 'multi-tenant';
|
|
116
|
-
return {
|
|
117
|
-
title: 'Event Manager API',
|
|
118
|
-
description: buildDescription(enableCompanyFeature, isMultiTenant),
|
|
119
|
-
version: '1.0',
|
|
120
|
-
path: 'api/docs/event-manager',
|
|
121
|
-
bearerAuth: true,
|
|
122
|
-
excludeTags: [],
|
|
123
|
-
excludeSchemaProperties: enableCompanyFeature ? undefined : COMPANY_SCHEMA_EXCLUSIONS
|
|
124
|
-
};
|
|
125
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
const _eventmanagerswaggerconfig = require("./event-manager-swagger.config");
|
|
6
|
-
describe('eventManagerSwaggerConfig', ()=>{
|
|
7
|
-
it('should default to company feature enabled and single-database mode when no config is given', ()=>{
|
|
8
|
-
const config = (0, _eventmanagerswaggerconfig.eventManagerSwaggerConfig)();
|
|
9
|
-
expect(config.title).toBe('Event Manager API');
|
|
10
|
-
expect(config.path).toBe('api/docs/event-manager');
|
|
11
|
-
expect(config.bearerAuth).toBe(true);
|
|
12
|
-
expect(config.excludeSchemaProperties).toBeUndefined();
|
|
13
|
-
expect(config.description).not.toContain('Multi-Tenant Mode');
|
|
14
|
-
});
|
|
15
|
-
it('should exclude companyId schema properties when the company feature is disabled', ()=>{
|
|
16
|
-
const config = (0, _eventmanagerswaggerconfig.eventManagerSwaggerConfig)({
|
|
17
|
-
enableCompanyFeature: false
|
|
18
|
-
});
|
|
19
|
-
expect(config.excludeSchemaProperties).toEqual([
|
|
20
|
-
{
|
|
21
|
-
schemaName: 'EventResponseDto',
|
|
22
|
-
properties: [
|
|
23
|
-
'companyId'
|
|
24
|
-
]
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
schemaName: 'CalendarEventResponseDto',
|
|
28
|
-
properties: [
|
|
29
|
-
'companyId'
|
|
30
|
-
]
|
|
31
|
-
}
|
|
32
|
-
]);
|
|
33
|
-
});
|
|
34
|
-
it('should not exclude any schema properties when the company feature is enabled', ()=>{
|
|
35
|
-
const config = (0, _eventmanagerswaggerconfig.eventManagerSwaggerConfig)({
|
|
36
|
-
enableCompanyFeature: true
|
|
37
|
-
});
|
|
38
|
-
expect(config.excludeSchemaProperties).toBeUndefined();
|
|
39
|
-
});
|
|
40
|
-
it('should describe company-scoped events and multi-tenant support only when the company feature is enabled', ()=>{
|
|
41
|
-
const withCompany = (0, _eventmanagerswaggerconfig.eventManagerSwaggerConfig)({
|
|
42
|
-
enableCompanyFeature: true
|
|
43
|
-
});
|
|
44
|
-
const withoutCompany = (0, _eventmanagerswaggerconfig.eventManagerSwaggerConfig)({
|
|
45
|
-
enableCompanyFeature: false
|
|
46
|
-
});
|
|
47
|
-
expect(withCompany.description).toContain('Company-scoped events');
|
|
48
|
-
expect(withCompany.description).toContain('Company isolation');
|
|
49
|
-
expect(withCompany.description).toContain('## Multi-Tenant Support');
|
|
50
|
-
expect(withCompany.description).toContain('and multi-tenant capabilities');
|
|
51
|
-
expect(withoutCompany.description).not.toContain('Company-scoped events');
|
|
52
|
-
expect(withoutCompany.description).not.toContain('Company isolation');
|
|
53
|
-
expect(withoutCompany.description).not.toContain('## Multi-Tenant Support');
|
|
54
|
-
});
|
|
55
|
-
it('should mention multi-tenant mode in the description only for multi-tenant database mode', ()=>{
|
|
56
|
-
const multiTenant = (0, _eventmanagerswaggerconfig.eventManagerSwaggerConfig)({
|
|
57
|
-
databaseMode: 'multi-tenant'
|
|
58
|
-
});
|
|
59
|
-
const single = (0, _eventmanagerswaggerconfig.eventManagerSwaggerConfig)({
|
|
60
|
-
databaseMode: 'single'
|
|
61
|
-
});
|
|
62
|
-
expect(multiTenant.description).toContain('Multi-Tenant Mode');
|
|
63
|
-
expect(single.description).not.toContain('Multi-Tenant Mode');
|
|
64
|
-
});
|
|
65
|
-
});
|
package/cjs/docs/index.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// Re-export permissions from shared for convenience
|
|
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 EVENT_PERMISSIONS () {
|
|
14
|
-
return _nestjsshared.EVENT_PERMISSIONS;
|
|
15
|
-
},
|
|
16
|
-
get eventManagerSwaggerConfig () {
|
|
17
|
-
return _eventmanagerswaggerconfig.eventManagerSwaggerConfig;
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
const _nestjsshared = require("@flusys/nestjs-shared");
|
|
21
|
-
const _eventmanagerswaggerconfig = require("./event-manager-swagger.config");
|
|
@@ -1,212 +0,0 @@
|
|
|
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 CalendarEventResponseDto () {
|
|
13
|
-
return CalendarEventResponseDto;
|
|
14
|
-
},
|
|
15
|
-
get CalendarQueryDto () {
|
|
16
|
-
return CalendarQueryDto;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const _swagger = require("@nestjs/swagger");
|
|
20
|
-
const _classtransformer = require("class-transformer");
|
|
21
|
-
const _classvalidator = require("class-validator");
|
|
22
|
-
const _eventparticipantdto = require("./event-participant.dto");
|
|
23
|
-
function _define_property(obj, key, value) {
|
|
24
|
-
if (key in obj) {
|
|
25
|
-
Object.defineProperty(obj, key, {
|
|
26
|
-
value: value,
|
|
27
|
-
enumerable: true,
|
|
28
|
-
configurable: true,
|
|
29
|
-
writable: true
|
|
30
|
-
});
|
|
31
|
-
} else {
|
|
32
|
-
obj[key] = value;
|
|
33
|
-
}
|
|
34
|
-
return obj;
|
|
35
|
-
}
|
|
36
|
-
function _ts_decorate(decorators, target, key, desc) {
|
|
37
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
38
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
39
|
-
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;
|
|
40
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
41
|
-
}
|
|
42
|
-
function _ts_metadata(k, v) {
|
|
43
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
44
|
-
}
|
|
45
|
-
let CalendarQueryDto = class CalendarQueryDto {
|
|
46
|
-
constructor(){
|
|
47
|
-
_define_property(this, "startDate", void 0);
|
|
48
|
-
_define_property(this, "endDate", void 0);
|
|
49
|
-
_define_property(this, "includeParticipants", void 0);
|
|
50
|
-
_define_property(this, "userId", void 0);
|
|
51
|
-
_define_property(this, "activeOnly", void 0);
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
_ts_decorate([
|
|
55
|
-
(0, _swagger.ApiProperty)({
|
|
56
|
-
description: 'Start date for calendar range (YYYY-MM-DD)',
|
|
57
|
-
example: '2024-01-01'
|
|
58
|
-
}),
|
|
59
|
-
(0, _classvalidator.IsNotEmpty)(),
|
|
60
|
-
(0, _classvalidator.IsString)(),
|
|
61
|
-
(0, _classvalidator.Matches)(/^\d{4}-\d{2}-\d{2}$/, {
|
|
62
|
-
message: 'startDate must be in YYYY-MM-DD format'
|
|
63
|
-
}),
|
|
64
|
-
_ts_metadata("design:type", String)
|
|
65
|
-
], CalendarQueryDto.prototype, "startDate", void 0);
|
|
66
|
-
_ts_decorate([
|
|
67
|
-
(0, _swagger.ApiProperty)({
|
|
68
|
-
description: 'End date for calendar range (YYYY-MM-DD)',
|
|
69
|
-
example: '2024-01-31'
|
|
70
|
-
}),
|
|
71
|
-
(0, _classvalidator.IsNotEmpty)(),
|
|
72
|
-
(0, _classvalidator.IsString)(),
|
|
73
|
-
(0, _classvalidator.Matches)(/^\d{4}-\d{2}-\d{2}$/, {
|
|
74
|
-
message: 'endDate must be in YYYY-MM-DD format'
|
|
75
|
-
}),
|
|
76
|
-
_ts_metadata("design:type", String)
|
|
77
|
-
], CalendarQueryDto.prototype, "endDate", void 0);
|
|
78
|
-
_ts_decorate([
|
|
79
|
-
(0, _swagger.ApiPropertyOptional)({
|
|
80
|
-
description: 'Include participant details',
|
|
81
|
-
default: false
|
|
82
|
-
}),
|
|
83
|
-
(0, _classvalidator.IsOptional)(),
|
|
84
|
-
(0, _classvalidator.IsBoolean)(),
|
|
85
|
-
_ts_metadata("design:type", Boolean)
|
|
86
|
-
], CalendarQueryDto.prototype, "includeParticipants", void 0);
|
|
87
|
-
_ts_decorate([
|
|
88
|
-
(0, _swagger.ApiPropertyOptional)({
|
|
89
|
-
description: 'Filter by specific user ID'
|
|
90
|
-
}),
|
|
91
|
-
(0, _classvalidator.IsOptional)(),
|
|
92
|
-
(0, _classvalidator.IsUUID)(),
|
|
93
|
-
_ts_metadata("design:type", String)
|
|
94
|
-
], CalendarQueryDto.prototype, "userId", void 0);
|
|
95
|
-
_ts_decorate([
|
|
96
|
-
(0, _swagger.ApiPropertyOptional)({
|
|
97
|
-
description: 'Include only active events',
|
|
98
|
-
default: true
|
|
99
|
-
}),
|
|
100
|
-
(0, _classvalidator.IsOptional)(),
|
|
101
|
-
(0, _classvalidator.IsBoolean)(),
|
|
102
|
-
_ts_metadata("design:type", Boolean)
|
|
103
|
-
], CalendarQueryDto.prototype, "activeOnly", void 0);
|
|
104
|
-
let CalendarEventResponseDto = class CalendarEventResponseDto {
|
|
105
|
-
constructor(){
|
|
106
|
-
_define_property(this, "id", void 0);
|
|
107
|
-
_define_property(this, "title", void 0);
|
|
108
|
-
_define_property(this, "description", void 0);
|
|
109
|
-
_define_property(this, "eventDate", void 0);
|
|
110
|
-
_define_property(this, "startTime", void 0);
|
|
111
|
-
_define_property(this, "endTime", void 0);
|
|
112
|
-
_define_property(this, "isAllDay", void 0);
|
|
113
|
-
_define_property(this, "recurrenceType", void 0);
|
|
114
|
-
_define_property(this, "recurrenceEndDate", void 0);
|
|
115
|
-
_define_property(this, "weekDays", void 0);
|
|
116
|
-
_define_property(this, "color", void 0);
|
|
117
|
-
_define_property(this, "meetingLink", void 0);
|
|
118
|
-
_define_property(this, "isActive", void 0);
|
|
119
|
-
_define_property(this, "originalEventId", void 0);
|
|
120
|
-
_define_property(this, "isRecurrenceInstance", void 0);
|
|
121
|
-
_define_property(this, "participants", void 0);
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
_ts_decorate([
|
|
125
|
-
(0, _classtransformer.Expose)(),
|
|
126
|
-
(0, _swagger.ApiProperty)(),
|
|
127
|
-
_ts_metadata("design:type", String)
|
|
128
|
-
], CalendarEventResponseDto.prototype, "id", void 0);
|
|
129
|
-
_ts_decorate([
|
|
130
|
-
(0, _classtransformer.Expose)(),
|
|
131
|
-
(0, _swagger.ApiProperty)(),
|
|
132
|
-
_ts_metadata("design:type", String)
|
|
133
|
-
], CalendarEventResponseDto.prototype, "title", void 0);
|
|
134
|
-
_ts_decorate([
|
|
135
|
-
(0, _classtransformer.Expose)(),
|
|
136
|
-
(0, _swagger.ApiPropertyOptional)(),
|
|
137
|
-
_ts_metadata("design:type", Object)
|
|
138
|
-
], CalendarEventResponseDto.prototype, "description", void 0);
|
|
139
|
-
_ts_decorate([
|
|
140
|
-
(0, _classtransformer.Expose)(),
|
|
141
|
-
(0, _swagger.ApiProperty)(),
|
|
142
|
-
_ts_metadata("design:type", String)
|
|
143
|
-
], CalendarEventResponseDto.prototype, "eventDate", void 0);
|
|
144
|
-
_ts_decorate([
|
|
145
|
-
(0, _classtransformer.Expose)(),
|
|
146
|
-
(0, _swagger.ApiProperty)(),
|
|
147
|
-
_ts_metadata("design:type", String)
|
|
148
|
-
], CalendarEventResponseDto.prototype, "startTime", void 0);
|
|
149
|
-
_ts_decorate([
|
|
150
|
-
(0, _classtransformer.Expose)(),
|
|
151
|
-
(0, _swagger.ApiProperty)(),
|
|
152
|
-
_ts_metadata("design:type", String)
|
|
153
|
-
], CalendarEventResponseDto.prototype, "endTime", void 0);
|
|
154
|
-
_ts_decorate([
|
|
155
|
-
(0, _classtransformer.Expose)(),
|
|
156
|
-
(0, _swagger.ApiProperty)(),
|
|
157
|
-
_ts_metadata("design:type", Boolean)
|
|
158
|
-
], CalendarEventResponseDto.prototype, "isAllDay", void 0);
|
|
159
|
-
_ts_decorate([
|
|
160
|
-
(0, _classtransformer.Expose)(),
|
|
161
|
-
(0, _swagger.ApiProperty)(),
|
|
162
|
-
_ts_metadata("design:type", String)
|
|
163
|
-
], CalendarEventResponseDto.prototype, "recurrenceType", void 0);
|
|
164
|
-
_ts_decorate([
|
|
165
|
-
(0, _classtransformer.Expose)(),
|
|
166
|
-
(0, _swagger.ApiPropertyOptional)(),
|
|
167
|
-
_ts_metadata("design:type", Object)
|
|
168
|
-
], CalendarEventResponseDto.prototype, "recurrenceEndDate", void 0);
|
|
169
|
-
_ts_decorate([
|
|
170
|
-
(0, _classtransformer.Expose)(),
|
|
171
|
-
(0, _swagger.ApiPropertyOptional)({
|
|
172
|
-
type: [
|
|
173
|
-
String
|
|
174
|
-
]
|
|
175
|
-
}),
|
|
176
|
-
_ts_metadata("design:type", Object)
|
|
177
|
-
], CalendarEventResponseDto.prototype, "weekDays", void 0);
|
|
178
|
-
_ts_decorate([
|
|
179
|
-
(0, _classtransformer.Expose)(),
|
|
180
|
-
(0, _swagger.ApiProperty)(),
|
|
181
|
-
_ts_metadata("design:type", String)
|
|
182
|
-
], CalendarEventResponseDto.prototype, "color", void 0);
|
|
183
|
-
_ts_decorate([
|
|
184
|
-
(0, _classtransformer.Expose)(),
|
|
185
|
-
(0, _swagger.ApiPropertyOptional)(),
|
|
186
|
-
_ts_metadata("design:type", Object)
|
|
187
|
-
], CalendarEventResponseDto.prototype, "meetingLink", void 0);
|
|
188
|
-
_ts_decorate([
|
|
189
|
-
(0, _classtransformer.Expose)(),
|
|
190
|
-
(0, _swagger.ApiProperty)(),
|
|
191
|
-
_ts_metadata("design:type", Boolean)
|
|
192
|
-
], CalendarEventResponseDto.prototype, "isActive", void 0);
|
|
193
|
-
_ts_decorate([
|
|
194
|
-
(0, _classtransformer.Expose)(),
|
|
195
|
-
(0, _swagger.ApiPropertyOptional)(),
|
|
196
|
-
_ts_metadata("design:type", String)
|
|
197
|
-
], CalendarEventResponseDto.prototype, "originalEventId", void 0);
|
|
198
|
-
_ts_decorate([
|
|
199
|
-
(0, _classtransformer.Expose)(),
|
|
200
|
-
(0, _swagger.ApiPropertyOptional)(),
|
|
201
|
-
_ts_metadata("design:type", Boolean)
|
|
202
|
-
], CalendarEventResponseDto.prototype, "isRecurrenceInstance", void 0);
|
|
203
|
-
_ts_decorate([
|
|
204
|
-
(0, _classtransformer.Expose)(),
|
|
205
|
-
(0, _swagger.ApiPropertyOptional)({
|
|
206
|
-
type: ()=>[
|
|
207
|
-
_eventparticipantdto.EventParticipantResponseDto
|
|
208
|
-
]
|
|
209
|
-
}),
|
|
210
|
-
(0, _classtransformer.Type)(()=>_eventparticipantdto.EventParticipantResponseDto),
|
|
211
|
-
_ts_metadata("design:type", Array)
|
|
212
|
-
], CalendarEventResponseDto.prototype, "participants", void 0);
|
|
@@ -1,181 +0,0 @@
|
|
|
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 CreateEventParticipantDto () {
|
|
13
|
-
return CreateEventParticipantDto;
|
|
14
|
-
},
|
|
15
|
-
get EventParticipantResponseDto () {
|
|
16
|
-
return EventParticipantResponseDto;
|
|
17
|
-
},
|
|
18
|
-
get UpdateEventParticipantDto () {
|
|
19
|
-
return UpdateEventParticipantDto;
|
|
20
|
-
},
|
|
21
|
-
get UpdateParticipantStatusDto () {
|
|
22
|
-
return UpdateParticipantStatusDto;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
const _enums = require("@flusys/nestjs-shared/enums");
|
|
26
|
-
const _swagger = require("@nestjs/swagger");
|
|
27
|
-
const _classtransformer = require("class-transformer");
|
|
28
|
-
const _classvalidator = require("class-validator");
|
|
29
|
-
function _define_property(obj, key, value) {
|
|
30
|
-
if (key in obj) {
|
|
31
|
-
Object.defineProperty(obj, key, {
|
|
32
|
-
value: value,
|
|
33
|
-
enumerable: true,
|
|
34
|
-
configurable: true,
|
|
35
|
-
writable: true
|
|
36
|
-
});
|
|
37
|
-
} else {
|
|
38
|
-
obj[key] = value;
|
|
39
|
-
}
|
|
40
|
-
return obj;
|
|
41
|
-
}
|
|
42
|
-
function _ts_decorate(decorators, target, key, desc) {
|
|
43
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
44
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
45
|
-
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;
|
|
46
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
47
|
-
}
|
|
48
|
-
function _ts_metadata(k, v) {
|
|
49
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
50
|
-
}
|
|
51
|
-
let CreateEventParticipantDto = class CreateEventParticipantDto {
|
|
52
|
-
constructor(){
|
|
53
|
-
_define_property(this, "eventId", void 0);
|
|
54
|
-
_define_property(this, "userId", void 0);
|
|
55
|
-
_define_property(this, "status", void 0);
|
|
56
|
-
_define_property(this, "isOrganizer", void 0);
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
_ts_decorate([
|
|
60
|
-
(0, _swagger.ApiProperty)({
|
|
61
|
-
description: 'Event ID',
|
|
62
|
-
example: 'f2e9c8d0-7a2a-11eb-9439-0242ac130002'
|
|
63
|
-
}),
|
|
64
|
-
(0, _classvalidator.IsNotEmpty)(),
|
|
65
|
-
(0, _classvalidator.IsUUID)(),
|
|
66
|
-
_ts_metadata("design:type", String)
|
|
67
|
-
], CreateEventParticipantDto.prototype, "eventId", void 0);
|
|
68
|
-
_ts_decorate([
|
|
69
|
-
(0, _swagger.ApiProperty)({
|
|
70
|
-
description: 'User ID',
|
|
71
|
-
example: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'
|
|
72
|
-
}),
|
|
73
|
-
(0, _classvalidator.IsNotEmpty)(),
|
|
74
|
-
(0, _classvalidator.IsUUID)(),
|
|
75
|
-
_ts_metadata("design:type", String)
|
|
76
|
-
], CreateEventParticipantDto.prototype, "userId", void 0);
|
|
77
|
-
_ts_decorate([
|
|
78
|
-
(0, _swagger.ApiPropertyOptional)({
|
|
79
|
-
description: 'Participation status',
|
|
80
|
-
enum: _enums.ParticipantStatus,
|
|
81
|
-
default: _enums.ParticipantStatus.PENDING
|
|
82
|
-
}),
|
|
83
|
-
(0, _classvalidator.IsOptional)(),
|
|
84
|
-
(0, _classvalidator.IsEnum)(_enums.ParticipantStatus),
|
|
85
|
-
_ts_metadata("design:type", typeof _enums.ParticipantStatus === "undefined" ? Object : _enums.ParticipantStatus)
|
|
86
|
-
], CreateEventParticipantDto.prototype, "status", void 0);
|
|
87
|
-
_ts_decorate([
|
|
88
|
-
(0, _swagger.ApiPropertyOptional)({
|
|
89
|
-
description: 'Is the organizer of the event',
|
|
90
|
-
default: false
|
|
91
|
-
}),
|
|
92
|
-
(0, _classvalidator.IsOptional)(),
|
|
93
|
-
(0, _classvalidator.IsBoolean)(),
|
|
94
|
-
_ts_metadata("design:type", Boolean)
|
|
95
|
-
], CreateEventParticipantDto.prototype, "isOrganizer", void 0);
|
|
96
|
-
let UpdateEventParticipantDto = class UpdateEventParticipantDto extends (0, _swagger.PartialType)(CreateEventParticipantDto) {
|
|
97
|
-
constructor(...args){
|
|
98
|
-
super(...args), _define_property(this, "id", void 0);
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
_ts_decorate([
|
|
102
|
-
(0, _swagger.ApiProperty)({
|
|
103
|
-
description: 'Event Participant ID',
|
|
104
|
-
example: 'f2e9c8d0-7a2a-11eb-9439-0242ac130002'
|
|
105
|
-
}),
|
|
106
|
-
(0, _classvalidator.IsUUID)(),
|
|
107
|
-
(0, _classvalidator.IsNotEmpty)(),
|
|
108
|
-
_ts_metadata("design:type", String)
|
|
109
|
-
], UpdateEventParticipantDto.prototype, "id", void 0);
|
|
110
|
-
let EventParticipantResponseDto = class EventParticipantResponseDto {
|
|
111
|
-
constructor(){
|
|
112
|
-
_define_property(this, "id", void 0);
|
|
113
|
-
_define_property(this, "eventId", void 0);
|
|
114
|
-
_define_property(this, "userId", void 0);
|
|
115
|
-
_define_property(this, "status", void 0);
|
|
116
|
-
_define_property(this, "isOrganizer", void 0);
|
|
117
|
-
_define_property(this, "createdAt", void 0);
|
|
118
|
-
_define_property(this, "updatedAt", void 0);
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
_ts_decorate([
|
|
122
|
-
(0, _classtransformer.Expose)(),
|
|
123
|
-
(0, _swagger.ApiProperty)(),
|
|
124
|
-
_ts_metadata("design:type", String)
|
|
125
|
-
], EventParticipantResponseDto.prototype, "id", void 0);
|
|
126
|
-
_ts_decorate([
|
|
127
|
-
(0, _classtransformer.Expose)(),
|
|
128
|
-
(0, _swagger.ApiProperty)(),
|
|
129
|
-
_ts_metadata("design:type", String)
|
|
130
|
-
], EventParticipantResponseDto.prototype, "eventId", void 0);
|
|
131
|
-
_ts_decorate([
|
|
132
|
-
(0, _classtransformer.Expose)(),
|
|
133
|
-
(0, _swagger.ApiProperty)(),
|
|
134
|
-
_ts_metadata("design:type", String)
|
|
135
|
-
], EventParticipantResponseDto.prototype, "userId", void 0);
|
|
136
|
-
_ts_decorate([
|
|
137
|
-
(0, _classtransformer.Expose)(),
|
|
138
|
-
(0, _swagger.ApiProperty)({
|
|
139
|
-
enum: _enums.ParticipantStatus
|
|
140
|
-
}),
|
|
141
|
-
_ts_metadata("design:type", String)
|
|
142
|
-
], EventParticipantResponseDto.prototype, "status", void 0);
|
|
143
|
-
_ts_decorate([
|
|
144
|
-
(0, _classtransformer.Expose)(),
|
|
145
|
-
(0, _swagger.ApiProperty)(),
|
|
146
|
-
_ts_metadata("design:type", Boolean)
|
|
147
|
-
], EventParticipantResponseDto.prototype, "isOrganizer", void 0);
|
|
148
|
-
_ts_decorate([
|
|
149
|
-
(0, _classtransformer.Expose)(),
|
|
150
|
-
(0, _swagger.ApiProperty)(),
|
|
151
|
-
_ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
|
|
152
|
-
], EventParticipantResponseDto.prototype, "createdAt", void 0);
|
|
153
|
-
_ts_decorate([
|
|
154
|
-
(0, _classtransformer.Expose)(),
|
|
155
|
-
(0, _swagger.ApiProperty)(),
|
|
156
|
-
_ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
|
|
157
|
-
], EventParticipantResponseDto.prototype, "updatedAt", void 0);
|
|
158
|
-
let UpdateParticipantStatusDto = class UpdateParticipantStatusDto {
|
|
159
|
-
constructor(){
|
|
160
|
-
_define_property(this, "id", void 0);
|
|
161
|
-
_define_property(this, "status", void 0);
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
_ts_decorate([
|
|
165
|
-
(0, _swagger.ApiProperty)({
|
|
166
|
-
description: 'Event Participant ID',
|
|
167
|
-
example: 'f2e9c8d0-7a2a-11eb-9439-0242ac130002'
|
|
168
|
-
}),
|
|
169
|
-
(0, _classvalidator.IsUUID)(),
|
|
170
|
-
(0, _classvalidator.IsNotEmpty)(),
|
|
171
|
-
_ts_metadata("design:type", String)
|
|
172
|
-
], UpdateParticipantStatusDto.prototype, "id", void 0);
|
|
173
|
-
_ts_decorate([
|
|
174
|
-
(0, _swagger.ApiProperty)({
|
|
175
|
-
description: 'New participation status',
|
|
176
|
-
enum: _enums.ParticipantStatus
|
|
177
|
-
}),
|
|
178
|
-
(0, _classvalidator.IsNotEmpty)(),
|
|
179
|
-
(0, _classvalidator.IsEnum)(_enums.ParticipantStatus),
|
|
180
|
-
_ts_metadata("design:type", typeof _enums.ParticipantStatus === "undefined" ? Object : _enums.ParticipantStatus)
|
|
181
|
-
], UpdateParticipantStatusDto.prototype, "status", void 0);
|