@flusys/nestjs-event-manager 5.4.0 → 5.4.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.
|
@@ -128,14 +128,14 @@ let EventService = class EventService extends _classes.ApiService {
|
|
|
128
128
|
query.leftJoinAndMapMany(`${this.entityName}.participants`, _entities.EventParticipant, 'ep', 'ep.event_id = event.id AND ep.deleted_at IS NULL');
|
|
129
129
|
return result;
|
|
130
130
|
}
|
|
131
|
-
async afterInsertOperation(entities, user, _qr) {
|
|
131
|
+
async afterInsertOperation(entities, _dto, user, _qr) {
|
|
132
132
|
for(let i = 0; i < entities.length; i++){
|
|
133
133
|
const participantIds = this.pendingParticipantsList[i] ?? [];
|
|
134
134
|
await this.addCreatorAndParticipants(entities[i].id, participantIds, user);
|
|
135
135
|
}
|
|
136
136
|
this.pendingParticipantsList = [];
|
|
137
137
|
}
|
|
138
|
-
async afterUpdateOperation(entities, user, _qr) {
|
|
138
|
+
async afterUpdateOperation(entities, _dto, user, _qr) {
|
|
139
139
|
const participantRepo = await this.ensureParticipantRepositoryInitialized();
|
|
140
140
|
for(let i = 0; i < entities.length; i++){
|
|
141
141
|
const participantIds = this.pendingParticipantsList[i] ?? [];
|
|
@@ -25,7 +25,7 @@ function _ts_param(paramIndex, decorator) {
|
|
|
25
25
|
decorator(target, key, paramIndex);
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
import {
|
|
28
|
+
import { ApiService, HybridCache } from '@flusys/nestjs-shared/classes';
|
|
29
29
|
import { LogAction } from '@flusys/nestjs-shared/decorators';
|
|
30
30
|
import { RecurrenceType } from '@flusys/nestjs-shared/enums';
|
|
31
31
|
import { UtilsService } from '@flusys/nestjs-shared/modules';
|
|
@@ -118,14 +118,14 @@ export class EventService extends ApiService {
|
|
|
118
118
|
query.leftJoinAndMapMany(`${this.entityName}.participants`, EventParticipant, 'ep', 'ep.event_id = event.id AND ep.deleted_at IS NULL');
|
|
119
119
|
return result;
|
|
120
120
|
}
|
|
121
|
-
async afterInsertOperation(entities, user, _qr) {
|
|
121
|
+
async afterInsertOperation(entities, _dto, user, _qr) {
|
|
122
122
|
for(let i = 0; i < entities.length; i++){
|
|
123
123
|
const participantIds = this.pendingParticipantsList[i] ?? [];
|
|
124
124
|
await this.addCreatorAndParticipants(entities[i].id, participantIds, user);
|
|
125
125
|
}
|
|
126
126
|
this.pendingParticipantsList = [];
|
|
127
127
|
}
|
|
128
|
-
async afterUpdateOperation(entities, user, _qr) {
|
|
128
|
+
async afterUpdateOperation(entities, _dto, user, _qr) {
|
|
129
129
|
const participantRepo = await this.ensureParticipantRepositoryInitialized();
|
|
130
130
|
for(let i = 0; i < entities.length; i++){
|
|
131
131
|
const participantIds = this.pendingParticipantsList[i] ?? [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flusys/nestjs-event-manager",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.1",
|
|
4
4
|
"description": "Event manager module with calendar support and recurrence",
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"module": "fesm/index.js",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"express": "^4.18.0 || ^5.0.0"
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@flusys/nestjs-core": "5.4.
|
|
88
|
-
"@flusys/nestjs-shared": "5.4.
|
|
87
|
+
"@flusys/nestjs-core": "5.4.1",
|
|
88
|
+
"@flusys/nestjs-shared": "5.4.1"
|
|
89
89
|
}
|
|
90
90
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ApiService, HybridCache } from '@flusys/nestjs-shared/classes';
|
|
2
2
|
import { ILoggedUserInfo } from '@flusys/nestjs-shared/interfaces';
|
|
3
3
|
import { UtilsService } from '@flusys/nestjs-shared/modules';
|
|
4
4
|
import { EntityTarget, QueryRunner, SelectQueryBuilder } from 'typeorm';
|
|
@@ -25,8 +25,8 @@ export declare class EventService extends ApiService<CreateEventDto, UpdateEvent
|
|
|
25
25
|
query: SelectQueryBuilder<EventBase>;
|
|
26
26
|
isRaw: boolean;
|
|
27
27
|
}>;
|
|
28
|
-
protected afterInsertOperation(entities: EventBase[], user: ILoggedUserInfo | null, _qr: QueryRunner): Promise<void>;
|
|
29
|
-
protected afterUpdateOperation(entities: EventBase[], user: ILoggedUserInfo | null, _qr: QueryRunner): Promise<void>;
|
|
28
|
+
protected afterInsertOperation(entities: EventBase[], _dto: CreateEventDto | Array<CreateEventDto>, user: ILoggedUserInfo | null, _qr: QueryRunner): Promise<void>;
|
|
29
|
+
protected afterUpdateOperation(entities: EventBase[], _dto: UpdateEventDto | Array<UpdateEventDto>, user: ILoggedUserInfo | null, _qr: QueryRunner): Promise<void>;
|
|
30
30
|
getEventsForCalendarRange(queryDto: CalendarQueryDto, user: ILoggedUserInfo | null): Promise<ICalendarEvent[]>;
|
|
31
31
|
updateParticipantStatus(dto: UpdateParticipantStatusDto, _user: ILoggedUserInfo | null): Promise<EventParticipant>;
|
|
32
32
|
private addCreatorAndParticipants;
|