@flusys/nestjs-event-manager 5.0.1 → 5.0.4

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.
@@ -8,17 +8,17 @@ Object.defineProperty(exports, "EventController", {
8
8
  return EventController;
9
9
  }
10
10
  });
11
- const _common = require("@nestjs/common");
12
- const _swagger = require("@nestjs/swagger");
13
11
  const _classes = require("@flusys/nestjs-shared/classes");
14
- const _config = require("../config");
15
12
  const _decorators = require("@flusys/nestjs-shared/decorators");
16
13
  const _dtos = require("@flusys/nestjs-shared/dtos");
17
14
  const _guards = require("@flusys/nestjs-shared/guards");
18
15
  const _interfaces = require("@flusys/nestjs-shared/interfaces");
16
+ const _common = require("@nestjs/common");
17
+ const _swagger = require("@nestjs/swagger");
19
18
  const _classtransformer = require("class-transformer");
20
- const _dtos1 = require("../dtos");
19
+ const _config = require("../config");
21
20
  const _docs = require("../docs");
21
+ const _dtos1 = require("../dtos");
22
22
  const _eventservice = require("../services/event.service");
23
23
  function _define_property(obj, key, value) {
24
24
  if (key in obj) {
@@ -128,7 +128,6 @@ _ts_decorate([
128
128
  (0, _common.UseGuards)(_guards.JwtAuthGuard),
129
129
  (0, _swagger.ApiBearerAuth)(),
130
130
  (0, _common.HttpCode)(_common.HttpStatus.OK),
131
- (0, _decorators.RequirePermission)(_docs.EVENT_PERMISSIONS.READ),
132
131
  (0, _swagger.ApiOperation)({
133
132
  summary: 'Get events for calendar range with recurrence expansion'
134
133
  }),
@@ -151,7 +150,7 @@ _ts_decorate([
151
150
  ], EventController.prototype, "getCalendarEvents", null);
152
151
  _ts_decorate([
153
152
  (0, _common.Post)('update-participant-status'),
154
- (0, _common.UseGuards)(_guards.JwtAuthGuard),
153
+ (0, _common.UseGuards)(_guards.JwtAuthGuard, _guards.PermissionGuard),
155
154
  (0, _swagger.ApiBearerAuth)(),
156
155
  (0, _common.HttpCode)(_common.HttpStatus.OK),
157
156
  (0, _decorators.RequirePermission)(_docs.EVENT_PERMISSIONS.UPDATE),
@@ -13,12 +13,12 @@ const _decorators = require("@flusys/nestjs-shared/decorators");
13
13
  const _enums = require("@flusys/nestjs-shared/enums");
14
14
  const _modules = require("@flusys/nestjs-shared/modules");
15
15
  const _utils = require("@flusys/nestjs-shared/utils");
16
- const _config = require("../config");
17
16
  const _common = require("@nestjs/common");
18
17
  const _typeorm = require("typeorm");
19
- const _eventmanagerconfigservice = require("./event-manager-config.service");
18
+ const _config = require("../config");
20
19
  const _dtos = require("../dtos");
21
20
  const _entities = require("../entities");
21
+ const _eventmanagerconfigservice = require("./event-manager-config.service");
22
22
  const _eventmanagerdatasourceprovider = require("./event-manager-datasource.provider");
23
23
  function _define_property(obj, key, value) {
24
24
  if (key in obj) {
@@ -1,6 +1,6 @@
1
1
  import { ListResponseDto, SingleResponseDto } from '@flusys/nestjs-shared/dtos';
2
2
  import { ILoggedUserInfo } from '@flusys/nestjs-shared/interfaces';
3
- import { CalendarQueryDto, CalendarEventResponseDto, CreateEventDto, EventParticipantResponseDto, EventResponseDto, UpdateEventDto, UpdateParticipantStatusDto } from '../dtos';
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
6
  readonly enabledEndpoints: import("@flusys/nestjs-shared/classes").ApiEndpoint[] | "all";
@@ -25,17 +25,17 @@ function _ts_param(paramIndex, decorator) {
25
25
  decorator(target, key, paramIndex);
26
26
  };
27
27
  }
28
- import { Body, Controller, HttpCode, HttpStatus, Inject, Post, UseGuards } from '@nestjs/common';
29
- import { ApiBearerAuth, ApiBody, ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger';
30
28
  import { createApiController } from '@flusys/nestjs-shared/classes';
31
- import { EVENT_MESSAGES, EVENT_PARTICIPANT_MESSAGES } from '../config';
32
29
  import { CurrentUser, RequirePermission } from '@flusys/nestjs-shared/decorators';
33
30
  import { ListResponseDto, SingleResponseDto } from '@flusys/nestjs-shared/dtos';
34
- import { JwtAuthGuard } from '@flusys/nestjs-shared/guards';
31
+ import { JwtAuthGuard, PermissionGuard } from '@flusys/nestjs-shared/guards';
35
32
  import { ILoggedUserInfo } from '@flusys/nestjs-shared/interfaces';
33
+ import { Body, Controller, HttpCode, HttpStatus, Inject, Post, UseGuards } from '@nestjs/common';
34
+ import { ApiBearerAuth, ApiBody, ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger';
36
35
  import { plainToInstance } from 'class-transformer';
37
- import { CalendarQueryDto, CalendarEventResponseDto, CreateEventDto, EventParticipantResponseDto, EventResponseDto, UpdateEventDto, UpdateParticipantStatusDto } from '../dtos';
36
+ import { EVENT_MESSAGES, EVENT_PARTICIPANT_MESSAGES } from '../config';
38
37
  import { EVENT_PERMISSIONS } from '../docs';
38
+ import { CalendarEventResponseDto, CalendarQueryDto, CreateEventDto, EventParticipantResponseDto, EventResponseDto, UpdateEventDto, UpdateParticipantStatusDto } from '../dtos';
39
39
  import { EventService } from '../services/event.service';
40
40
  export class EventController extends createApiController(CreateEventDto, UpdateEventDto, EventResponseDto, {
41
41
  entityName: 'event',
@@ -118,7 +118,6 @@ _ts_decorate([
118
118
  UseGuards(JwtAuthGuard),
119
119
  ApiBearerAuth(),
120
120
  HttpCode(HttpStatus.OK),
121
- RequirePermission(EVENT_PERMISSIONS.READ),
122
121
  ApiOperation({
123
122
  summary: 'Get events for calendar range with recurrence expansion'
124
123
  }),
@@ -141,7 +140,7 @@ _ts_decorate([
141
140
  ], EventController.prototype, "getCalendarEvents", null);
142
141
  _ts_decorate([
143
142
  Post('update-participant-status'),
144
- UseGuards(JwtAuthGuard),
143
+ UseGuards(JwtAuthGuard, PermissionGuard),
145
144
  ApiBearerAuth(),
146
145
  HttpCode(HttpStatus.OK),
147
146
  RequirePermission(EVENT_PERMISSIONS.UPDATE),
@@ -30,12 +30,12 @@ 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';
32
32
  import { applyCompanyFilter } from '@flusys/nestjs-shared/utils';
33
- import { EVENT_MESSAGES, EVENT_PARTICIPANT_MESSAGES } from '../config';
34
33
  import { Inject, Injectable, NotFoundException, Scope } from '@nestjs/common';
35
34
  import { In, IsNull } from 'typeorm';
36
- import { EventManagerConfigService } from './event-manager-config.service';
35
+ import { EVENT_MESSAGES, EVENT_PARTICIPANT_MESSAGES } from '../config';
37
36
  import { UpdateParticipantStatusDto } from '../dtos';
38
- import { Event, EventWithCompany, EventParticipant } from '../entities';
37
+ import { Event, EventParticipant, EventWithCompany } from '../entities';
38
+ import { EventManagerConfigService } from './event-manager-config.service';
39
39
  import { EventManagerDataSourceProvider } from './event-manager-datasource.provider';
40
40
  export class EventService extends RequestScopedApiService {
41
41
  // Abstract implementations
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flusys/nestjs-event-manager",
3
- "version": "5.0.1",
3
+ "version": "5.0.4",
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"
85
85
  },
86
86
  "dependencies": {
87
- "@flusys/nestjs-core": "5.0.1",
88
- "@flusys/nestjs-shared": "5.0.1"
87
+ "@flusys/nestjs-core": "5.0.4",
88
+ "@flusys/nestjs-shared": "5.0.4"
89
89
  }
90
90
  }
@@ -1,13 +1,13 @@
1
1
  import { HybridCache, RequestScopedApiService } from '@flusys/nestjs-shared/classes';
2
2
  import { ILoggedUserInfo } from '@flusys/nestjs-shared/interfaces';
3
3
  import { UtilsService } from '@flusys/nestjs-shared/modules';
4
- import { EntityTarget, QueryRunner, Repository, SelectQueryBuilder } from 'typeorm';
5
- import { EventManagerConfigService } from './event-manager-config.service';
4
+ import { EntityTarget, QueryRunner, SelectQueryBuilder } from 'typeorm';
6
5
  import { CalendarQueryDto, CreateEventDto, UpdateEventDto, UpdateParticipantStatusDto } from '../dtos';
7
6
  import { EventBase, EventParticipant } from '../entities';
8
7
  import { ICalendarEvent, IEvent } from '../interfaces';
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, Repository<EventBase>> {
10
+ export declare class EventService extends RequestScopedApiService<CreateEventDto, UpdateEventDto, IEvent, EventBase> {
11
11
  protected cacheManager: HybridCache;
12
12
  protected utilsService: UtilsService;
13
13
  private readonly eventConfig;