@flusys/nestjs-event-manager 5.1.1 → 5.1.3

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.
@@ -96,7 +96,10 @@ let EventController = class EventController extends (0, _classes.createApiContro
96
96
  }) {
97
97
  async getCalendarEvents(dto, user) {
98
98
  const events = await this.eventService.getEventsForCalendarRange(dto, user);
99
- const data = (0, _classtransformer.plainToInstance)(_dtos1.CalendarEventResponseDto, events);
99
+ const plainOptions = {
100
+ excludeExtraneousValues: true
101
+ };
102
+ const data = (0, _classtransformer.plainToInstance)(_dtos1.CalendarEventResponseDto, events, plainOptions);
100
103
  return {
101
104
  success: true,
102
105
  message: 'Calendar events retrieved successfully',
@@ -112,11 +115,14 @@ let EventController = class EventController extends (0, _classes.createApiContro
112
115
  }
113
116
  async updateParticipantStatus(dto, user) {
114
117
  const participant = await this.eventService.updateParticipantStatus(dto, user);
118
+ const plainOptions = {
119
+ excludeExtraneousValues: true
120
+ };
115
121
  return {
116
122
  success: true,
117
123
  message: 'Participant status updated successfully',
118
124
  messageKey: _config.EVENT_PARTICIPANT_MESSAGES.STATUS_UPDATE_SUCCESS,
119
- data: (0, _classtransformer.plainToInstance)(_dtos1.EventParticipantResponseDto, participant)
125
+ data: (0, _classtransformer.plainToInstance)(_dtos1.EventParticipantResponseDto, participant, plainOptions)
120
126
  };
121
127
  }
122
128
  constructor(eventService){
@@ -9,7 +9,6 @@ Object.defineProperty(exports, "EventManagerDataSourceProvider", {
9
9
  }
10
10
  });
11
11
  const _modules = require("@flusys/nestjs-shared/modules");
12
- const _constants = require("@flusys/nestjs-shared/constants");
13
12
  const _common = require("@nestjs/common");
14
13
  const _core = require("@nestjs/core");
15
14
  const _express = require("express");
@@ -43,7 +42,6 @@ function _ts_param(paramIndex, decorator) {
43
42
  };
44
43
  }
45
44
  let EventManagerDataSourceProvider = class EventManagerDataSourceProvider extends _modules.MultiTenantDataSourceService {
46
- // Factory Methods
47
45
  static buildParentOptions(options) {
48
46
  return {
49
47
  bootstrapAppConfig: options.bootstrapAppConfig,
@@ -52,61 +50,15 @@ let EventManagerDataSourceProvider = class EventManagerDataSourceProvider extend
52
50
  tenants: options.config?.tenants
53
51
  };
54
52
  }
55
- // Feature Flags
56
53
  getEnableCompanyFeatureForTenant(tenant) {
57
54
  return tenant?.enableCompanyFeature ?? this.configService.isCompanyFeatureEnabled();
58
55
  }
59
- // Overrides
60
56
  async createDataSourceFromConfig(config) {
61
57
  const currentTenant = this.getCurrentTenant();
62
58
  const enableCompanyFeature = this.getEnableCompanyFeatureForTenant(currentTenant ?? undefined);
63
59
  const entities = (0, _entities.getEventManagerEntitiesByConfig)(enableCompanyFeature);
64
60
  return super.createDataSourceFromConfig(config, entities);
65
61
  }
66
- async getSingleDataSource() {
67
- if (EventManagerDataSourceProvider.singleDataSource?.isInitialized) {
68
- return EventManagerDataSourceProvider.singleDataSource;
69
- }
70
- if (EventManagerDataSourceProvider.singleConnectionLock) {
71
- return EventManagerDataSourceProvider.singleConnectionLock;
72
- }
73
- const config = this.getDefaultDatabaseConfig();
74
- if (!config) {
75
- throw new _common.InternalServerErrorException({
76
- message: 'No database config available. Provide defaultDatabaseConfig or tenantDefaultDatabaseConfig.',
77
- messageKey: _constants.SYSTEM_MESSAGES.DATABASE_CONFIG_NOT_AVAILABLE
78
- });
79
- }
80
- const connectionPromise = this.createDataSourceFromConfig(config);
81
- EventManagerDataSourceProvider.singleConnectionLock = connectionPromise;
82
- try {
83
- const dataSource = await connectionPromise;
84
- EventManagerDataSourceProvider.singleDataSource = dataSource;
85
- return dataSource;
86
- } finally{
87
- EventManagerDataSourceProvider.singleConnectionLock = null;
88
- }
89
- }
90
- async getOrCreateTenantConnection(tenant) {
91
- const existing = EventManagerDataSourceProvider.tenantConnections.get(tenant.id);
92
- if (existing?.isInitialized) {
93
- return existing;
94
- }
95
- const pendingConnection = EventManagerDataSourceProvider.connectionLocks.get(tenant.id);
96
- if (pendingConnection) {
97
- return pendingConnection;
98
- }
99
- const config = this.buildTenantDatabaseConfig(tenant);
100
- const connectionPromise = this.createDataSourceFromConfig(config);
101
- EventManagerDataSourceProvider.connectionLocks.set(tenant.id, connectionPromise);
102
- try {
103
- const dataSource = await connectionPromise;
104
- EventManagerDataSourceProvider.tenantConnections.set(tenant.id, dataSource);
105
- return dataSource;
106
- } finally{
107
- EventManagerDataSourceProvider.connectionLocks.delete(tenant.id);
108
- }
109
- }
110
62
  constructor(configService, request){
111
63
  super(EventManagerDataSourceProvider.buildParentOptions(configService.getOptions()), request), _define_property(this, "configService", void 0), this.configService = configService;
112
64
  }
@@ -47,17 +47,13 @@ function _ts_param(paramIndex, decorator) {
47
47
  decorator(target, key, paramIndex);
48
48
  };
49
49
  }
50
- let EventService = class EventService extends _classes.RequestScopedApiService {
51
- // Abstract implementations
50
+ let EventService = class EventService extends _classes.ApiService {
52
51
  resolveEntity() {
53
52
  return this.eventConfig.isCompanyFeatureEnabled() ? _entities.EventWithCompany : _entities.Event;
54
53
  }
55
- getDataSourceProvider() {
56
- return this.dataSourceProvider;
57
- }
58
54
  // Override methods
59
55
  async convertSingleDtoToEntity(dto, user) {
60
- await this.ensureRepositoryInitialized();
56
+ await this.ensureDataSourceRepository();
61
57
  let entity = {};
62
58
  if ('id' in dto && dto.id && typeof dto.id === 'string') {
63
59
  const existing = await this.repository.findOne({
@@ -155,7 +151,7 @@ let EventService = class EventService extends _classes.RequestScopedApiService {
155
151
  }
156
152
  // Public API methods
157
153
  async getEventsForCalendarRange(queryDto, user) {
158
- await this.ensureRepositoryInitialized();
154
+ await this.ensureDataSourceRepository();
159
155
  const query = this.repository.createQueryBuilder('event').where('event.deletedAt IS NULL').andWhere('event.isActive = :isActive', {
160
156
  isActive: queryDto.activeOnly !== false
161
157
  }).andWhere('((event.eventDate >= :startDate AND event.eventDate <= :endDate) OR (event.recurrenceType != :none AND event.eventDate <= :endDate AND (event.recurrenceEndDate IS NULL OR event.recurrenceEndDate >= :startDate)))', {
@@ -430,7 +426,7 @@ let EventService = class EventService extends _classes.RequestScopedApiService {
430
426
  };
431
427
  }
432
428
  constructor(cacheManager, utilsService, eventConfig, dataSourceProvider){
433
- super('event', null, cacheManager, utilsService, EventService.name, true, 'event-manager'), _define_property(this, "cacheManager", void 0), _define_property(this, "utilsService", void 0), _define_property(this, "eventConfig", void 0), _define_property(this, "dataSourceProvider", void 0), _define_property(this, "participantRepository", void 0), _define_property(this, "pendingParticipantsList", void 0), this.cacheManager = cacheManager, this.utilsService = utilsService, this.eventConfig = eventConfig, this.dataSourceProvider = dataSourceProvider, this.participantRepository = null, this.pendingParticipantsList = [];
429
+ super('event', cacheManager, utilsService, EventService.name, true, 'event-manager', undefined, dataSourceProvider), _define_property(this, "cacheManager", void 0), _define_property(this, "utilsService", void 0), _define_property(this, "eventConfig", void 0), _define_property(this, "dataSourceProvider", void 0), _define_property(this, "participantRepository", void 0), _define_property(this, "pendingParticipantsList", void 0), this.cacheManager = cacheManager, this.utilsService = utilsService, this.eventConfig = eventConfig, this.dataSourceProvider = dataSourceProvider, this.participantRepository = null, this.pendingParticipantsList = [];
434
430
  }
435
431
  };
436
432
  _ts_decorate([
@@ -3,19 +3,19 @@ import { ILoggedUserInfo } from '@flusys/nestjs-shared/interfaces';
3
3
  import { CalendarEventResponseDto, CalendarQueryDto, CreateEventDto, EventParticipantResponseDto, EventResponseDto, UpdateEventDto, UpdateParticipantStatusDto } from '../dtos';
4
4
  import { EventService } from '../services/event.service';
5
5
  declare const EventController_base: abstract new (service: EventService) => {
6
- readonly enabledEndpoints: import("@flusys/nestjs-shared/classes").ApiEndpoint[] | "all";
6
+ readonly enabledEndpoints: import("@flusys/nestjs-shared").ApiEndpoint[] | "all";
7
7
  service: EventService;
8
- isEnabled(endpoint: import("@flusys/nestjs-shared/classes").ApiEndpoint): boolean;
8
+ isEnabled(endpoint: import("@flusys/nestjs-shared").ApiEndpoint): boolean;
9
9
  insert(addDto: CreateEventDto, user: ILoggedUserInfo | null): Promise<SingleResponseDto<EventResponseDto>>;
10
- insertMany(addDto: CreateEventDto[], user: ILoggedUserInfo | null): Promise<import("@flusys/nestjs-shared/dtos").BulkResponseDto<EventResponseDto>>;
11
- getById(id: string, body: import("@flusys/nestjs-shared/dtos").GetByIdBodyDto, user: ILoggedUserInfo | null): Promise<SingleResponseDto<EventResponseDto>>;
12
- getByIds(body: import("@flusys/nestjs-shared/dtos").GetByIdsDto, user: ILoggedUserInfo | null): Promise<ListResponseDto<EventResponseDto>>;
10
+ insertMany(addDto: CreateEventDto[], user: ILoggedUserInfo | null): Promise<import("@flusys/nestjs-shared").BulkResponseDto<EventResponseDto>>;
11
+ getById(id: string, body: import("@flusys/nestjs-shared").GetByIdBodyDto, user: ILoggedUserInfo | null): Promise<SingleResponseDto<EventResponseDto>>;
12
+ getByIds(body: import("@flusys/nestjs-shared").GetByIdsDto, user: ILoggedUserInfo | null): Promise<ListResponseDto<EventResponseDto>>;
13
13
  update(updateDto: UpdateEventDto, user: ILoggedUserInfo | null): Promise<SingleResponseDto<EventResponseDto>>;
14
- updateMany(updateDtos: UpdateEventDto[], user: ILoggedUserInfo | null): Promise<import("@flusys/nestjs-shared/dtos").BulkResponseDto<EventResponseDto>>;
15
- bulkUpsert(dtos: (CreateEventDto | UpdateEventDto)[], user: ILoggedUserInfo | null): Promise<import("@flusys/nestjs-shared/dtos").BulkResponseDto<EventResponseDto>>;
14
+ updateMany(updateDtos: UpdateEventDto[], user: ILoggedUserInfo | null): Promise<import("@flusys/nestjs-shared").BulkResponseDto<EventResponseDto>>;
15
+ bulkUpsert(dtos: (CreateEventDto | UpdateEventDto)[], user: ILoggedUserInfo | null): Promise<import("@flusys/nestjs-shared").BulkResponseDto<EventResponseDto>>;
16
16
  getByFilter(filter: Record<string, any>, user: ILoggedUserInfo | null): Promise<SingleResponseDto<EventResponseDto>>;
17
- getAll(filterAndPaginationDto: import("@flusys/nestjs-shared/dtos").FilterAndPaginationDto, user: ILoggedUserInfo | null, search?: string): Promise<ListResponseDto<EventResponseDto>>;
18
- delete(deleteDto: import("@flusys/nestjs-shared/dtos").DeleteDto, user: ILoggedUserInfo | null): Promise<import("@flusys/nestjs-shared/dtos").MessageResponseDto>;
17
+ getAll(filterAndPaginationDto: import("@flusys/nestjs-shared").FilterAndPaginationDto, user: ILoggedUserInfo | null, search?: string): Promise<ListResponseDto<EventResponseDto>>;
18
+ delete(deleteDto: import("@flusys/nestjs-shared").DeleteDto, user: ILoggedUserInfo | null): Promise<import("@flusys/nestjs-shared").MessageResponseDto>;
19
19
  };
20
20
  export declare class EventController extends EventController_base {
21
21
  protected eventService: EventService;
@@ -86,7 +86,10 @@ export class EventController extends createApiController(CreateEventDto, UpdateE
86
86
  }) {
87
87
  async getCalendarEvents(dto, user) {
88
88
  const events = await this.eventService.getEventsForCalendarRange(dto, user);
89
- const data = plainToInstance(CalendarEventResponseDto, events);
89
+ const plainOptions = {
90
+ excludeExtraneousValues: true
91
+ };
92
+ const data = plainToInstance(CalendarEventResponseDto, events, plainOptions);
90
93
  return {
91
94
  success: true,
92
95
  message: 'Calendar events retrieved successfully',
@@ -102,11 +105,14 @@ export class EventController extends createApiController(CreateEventDto, UpdateE
102
105
  }
103
106
  async updateParticipantStatus(dto, user) {
104
107
  const participant = await this.eventService.updateParticipantStatus(dto, user);
108
+ const plainOptions = {
109
+ excludeExtraneousValues: true
110
+ };
105
111
  return {
106
112
  success: true,
107
113
  message: 'Participant status updated successfully',
108
114
  messageKey: EVENT_PARTICIPANT_MESSAGES.STATUS_UPDATE_SUCCESS,
109
- data: plainToInstance(EventParticipantResponseDto, participant)
115
+ data: plainToInstance(EventParticipantResponseDto, participant, plainOptions)
110
116
  };
111
117
  }
112
118
  constructor(eventService){
@@ -26,14 +26,12 @@ function _ts_param(paramIndex, decorator) {
26
26
  };
27
27
  }
28
28
  import { MultiTenantDataSourceService } from '@flusys/nestjs-shared/modules';
29
- import { SYSTEM_MESSAGES } from '@flusys/nestjs-shared/constants';
30
- import { Inject, Injectable, InternalServerErrorException, Optional, Scope } from '@nestjs/common';
29
+ import { Inject, Injectable, Optional, Scope } from '@nestjs/common';
31
30
  import { REQUEST } from '@nestjs/core';
32
31
  import { Request } from 'express';
33
32
  import { getEventManagerEntitiesByConfig } from '../entities';
34
33
  import { EventManagerConfigService } from './event-manager-config.service';
35
34
  export class EventManagerDataSourceProvider extends MultiTenantDataSourceService {
36
- // Factory Methods
37
35
  static buildParentOptions(options) {
38
36
  return {
39
37
  bootstrapAppConfig: options.bootstrapAppConfig,
@@ -42,61 +40,15 @@ export class EventManagerDataSourceProvider extends MultiTenantDataSourceService
42
40
  tenants: options.config?.tenants
43
41
  };
44
42
  }
45
- // Feature Flags
46
43
  getEnableCompanyFeatureForTenant(tenant) {
47
44
  return tenant?.enableCompanyFeature ?? this.configService.isCompanyFeatureEnabled();
48
45
  }
49
- // Overrides
50
46
  async createDataSourceFromConfig(config) {
51
47
  const currentTenant = this.getCurrentTenant();
52
48
  const enableCompanyFeature = this.getEnableCompanyFeatureForTenant(currentTenant ?? undefined);
53
49
  const entities = getEventManagerEntitiesByConfig(enableCompanyFeature);
54
50
  return super.createDataSourceFromConfig(config, entities);
55
51
  }
56
- async getSingleDataSource() {
57
- if (EventManagerDataSourceProvider.singleDataSource?.isInitialized) {
58
- return EventManagerDataSourceProvider.singleDataSource;
59
- }
60
- if (EventManagerDataSourceProvider.singleConnectionLock) {
61
- return EventManagerDataSourceProvider.singleConnectionLock;
62
- }
63
- const config = this.getDefaultDatabaseConfig();
64
- if (!config) {
65
- throw new InternalServerErrorException({
66
- message: 'No database config available. Provide defaultDatabaseConfig or tenantDefaultDatabaseConfig.',
67
- messageKey: SYSTEM_MESSAGES.DATABASE_CONFIG_NOT_AVAILABLE
68
- });
69
- }
70
- const connectionPromise = this.createDataSourceFromConfig(config);
71
- EventManagerDataSourceProvider.singleConnectionLock = connectionPromise;
72
- try {
73
- const dataSource = await connectionPromise;
74
- EventManagerDataSourceProvider.singleDataSource = dataSource;
75
- return dataSource;
76
- } finally{
77
- EventManagerDataSourceProvider.singleConnectionLock = null;
78
- }
79
- }
80
- async getOrCreateTenantConnection(tenant) {
81
- const existing = EventManagerDataSourceProvider.tenantConnections.get(tenant.id);
82
- if (existing?.isInitialized) {
83
- return existing;
84
- }
85
- const pendingConnection = EventManagerDataSourceProvider.connectionLocks.get(tenant.id);
86
- if (pendingConnection) {
87
- return pendingConnection;
88
- }
89
- const config = this.buildTenantDatabaseConfig(tenant);
90
- const connectionPromise = this.createDataSourceFromConfig(config);
91
- EventManagerDataSourceProvider.connectionLocks.set(tenant.id, connectionPromise);
92
- try {
93
- const dataSource = await connectionPromise;
94
- EventManagerDataSourceProvider.tenantConnections.set(tenant.id, dataSource);
95
- return dataSource;
96
- } finally{
97
- EventManagerDataSourceProvider.connectionLocks.delete(tenant.id);
98
- }
99
- }
100
52
  constructor(configService, request){
101
53
  super(EventManagerDataSourceProvider.buildParentOptions(configService.getOptions()), request), _define_property(this, "configService", void 0), this.configService = configService;
102
54
  }
@@ -25,7 +25,7 @@ function _ts_param(paramIndex, decorator) {
25
25
  decorator(target, key, paramIndex);
26
26
  };
27
27
  }
28
- import { HybridCache, RequestScopedApiService } from '@flusys/nestjs-shared/classes';
28
+ import { HybridCache, ApiService } 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';
@@ -37,17 +37,13 @@ import { UpdateParticipantStatusDto } from '../dtos';
37
37
  import { Event, EventParticipant, EventWithCompany } from '../entities';
38
38
  import { EventManagerConfigService } from './event-manager-config.service';
39
39
  import { EventManagerDataSourceProvider } from './event-manager-datasource.provider';
40
- export class EventService extends RequestScopedApiService {
41
- // Abstract implementations
40
+ export class EventService extends ApiService {
42
41
  resolveEntity() {
43
42
  return this.eventConfig.isCompanyFeatureEnabled() ? EventWithCompany : Event;
44
43
  }
45
- getDataSourceProvider() {
46
- return this.dataSourceProvider;
47
- }
48
44
  // Override methods
49
45
  async convertSingleDtoToEntity(dto, user) {
50
- await this.ensureRepositoryInitialized();
46
+ await this.ensureDataSourceRepository();
51
47
  let entity = {};
52
48
  if ('id' in dto && dto.id && typeof dto.id === 'string') {
53
49
  const existing = await this.repository.findOne({
@@ -145,7 +141,7 @@ export class EventService extends RequestScopedApiService {
145
141
  }
146
142
  // Public API methods
147
143
  async getEventsForCalendarRange(queryDto, user) {
148
- await this.ensureRepositoryInitialized();
144
+ await this.ensureDataSourceRepository();
149
145
  const query = this.repository.createQueryBuilder('event').where('event.deletedAt IS NULL').andWhere('event.isActive = :isActive', {
150
146
  isActive: queryDto.activeOnly !== false
151
147
  }).andWhere('((event.eventDate >= :startDate AND event.eventDate <= :endDate) OR (event.recurrenceType != :none AND event.eventDate <= :endDate AND (event.recurrenceEndDate IS NULL OR event.recurrenceEndDate >= :startDate)))', {
@@ -420,7 +416,7 @@ export class EventService extends RequestScopedApiService {
420
416
  };
421
417
  }
422
418
  constructor(cacheManager, utilsService, eventConfig, dataSourceProvider){
423
- super('event', null, cacheManager, utilsService, EventService.name, true, 'event-manager'), _define_property(this, "cacheManager", void 0), _define_property(this, "utilsService", void 0), _define_property(this, "eventConfig", void 0), _define_property(this, "dataSourceProvider", void 0), _define_property(this, "participantRepository", void 0), _define_property(this, "pendingParticipantsList", void 0), this.cacheManager = cacheManager, this.utilsService = utilsService, this.eventConfig = eventConfig, this.dataSourceProvider = dataSourceProvider, this.participantRepository = null, this.pendingParticipantsList = [];
419
+ super('event', cacheManager, utilsService, EventService.name, true, 'event-manager', undefined, dataSourceProvider), _define_property(this, "cacheManager", void 0), _define_property(this, "utilsService", void 0), _define_property(this, "eventConfig", void 0), _define_property(this, "dataSourceProvider", void 0), _define_property(this, "participantRepository", void 0), _define_property(this, "pendingParticipantsList", void 0), this.cacheManager = cacheManager, this.utilsService = utilsService, this.eventConfig = eventConfig, this.dataSourceProvider = dataSourceProvider, this.participantRepository = null, this.pendingParticipantsList = [];
424
420
  }
425
421
  }
426
422
  _ts_decorate([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flusys/nestjs-event-manager",
3
- "version": "5.1.1",
3
+ "version": "5.1.3",
4
4
  "description": "Event manager module with calendar support and recurrence",
5
5
  "main": "cjs/index.js",
6
6
  "module": "fesm/index.js",
@@ -72,19 +72,19 @@
72
72
  }
73
73
  },
74
74
  "peerDependencies": {
75
- "@nestjs/common": "^10.0.0 || ^11.0.0",
76
- "@nestjs/config": "^3.0.0 || ^4.0.0",
77
- "@nestjs/core": "^10.0.0 || ^11.0.0",
78
- "@nestjs/platform-express": "^10.0.0 || ^11.0.0",
79
- "@nestjs/swagger": "^7.0.0 || ^11.0.0",
80
- "@nestjs/typeorm": "^10.0.0 || ^11.0.0",
81
- "class-transformer": "^0.5.0",
82
- "class-validator": "^0.14.0",
75
+ "@nestjs/common": "^11.0.0",
76
+ "@nestjs/config": "^4.0.0",
77
+ "@nestjs/core": "^11.0.0",
78
+ "@nestjs/platform-express": "^11.0.0",
79
+ "@nestjs/swagger": "^11.0.0",
80
+ "@nestjs/typeorm": "^11.0.0",
81
+ "class-transformer": "^0.5.1",
82
+ "class-validator": "^0.14.0 || ^0.15.0",
83
83
  "typeorm": "^0.3.0",
84
- "express": "^4.18.0"
84
+ "express": "^4.18.0 || ^5.0.0"
85
85
  },
86
86
  "dependencies": {
87
- "@flusys/nestjs-core": "5.1.1",
88
- "@flusys/nestjs-shared": "5.1.1"
87
+ "@flusys/nestjs-core": "5.1.3",
88
+ "@flusys/nestjs-shared": "5.1.3"
89
89
  }
90
90
  }
@@ -15,6 +15,4 @@ export declare class EventManagerDataSourceProvider extends MultiTenantDataSourc
15
15
  private static buildParentOptions;
16
16
  getEnableCompanyFeatureForTenant(tenant?: ITenantDatabaseConfig): boolean;
17
17
  protected createDataSourceFromConfig(config: IDatabaseConfig): Promise<DataSource>;
18
- protected getSingleDataSource(): Promise<DataSource>;
19
- protected getOrCreateTenantConnection(tenant: ITenantDatabaseConfig): Promise<DataSource>;
20
18
  }
@@ -1,4 +1,4 @@
1
- import { HybridCache, RequestScopedApiService } from '@flusys/nestjs-shared/classes';
1
+ import { HybridCache, ApiService } 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';
@@ -7,7 +7,7 @@ import { EventBase, EventParticipant } from '../entities';
7
7
  import { ICalendarEvent, IEvent } from '../interfaces';
8
8
  import { EventManagerConfigService } from './event-manager-config.service';
9
9
  import { EventManagerDataSourceProvider } from './event-manager-datasource.provider';
10
- export declare class EventService extends RequestScopedApiService<CreateEventDto, UpdateEventDto, IEvent, EventBase> {
10
+ export declare class EventService extends ApiService<CreateEventDto, UpdateEventDto, IEvent, EventBase> {
11
11
  protected cacheManager: HybridCache;
12
12
  protected utilsService: UtilsService;
13
13
  private readonly eventConfig;
@@ -16,7 +16,6 @@ export declare class EventService extends RequestScopedApiService<CreateEventDto
16
16
  private pendingParticipantsList;
17
17
  constructor(cacheManager: HybridCache, utilsService: UtilsService, eventConfig: EventManagerConfigService, dataSourceProvider: EventManagerDataSourceProvider);
18
18
  protected resolveEntity(): EntityTarget<EventBase>;
19
- protected getDataSourceProvider(): EventManagerDataSourceProvider;
20
19
  convertSingleDtoToEntity(dto: CreateEventDto | UpdateEventDto, user: ILoggedUserInfo | null): Promise<EventBase>;
21
20
  protected getFilterQuery(query: SelectQueryBuilder<EventBase>, filter: Record<string, unknown>, _user: ILoggedUserInfo | null): Promise<{
22
21
  query: SelectQueryBuilder<EventBase>;