elewis-nestjs-events
TypeScript icon, indicating that this package has built-in type declarations

0.0.34 • Public • Published

Common security modules

Overview

!!! This is an expermental module !!!

Provides a data transformation interceptor which adds workflow elements to all elements in an array of data.

Requires that method is decorated with the WorkflowConfig decorator

Install

npm install elewis-nestjs-workflow

Types

  • WorkflowTransoformationInterceptor

Usage

import { WorkflowTransformationInterceptor } from 'elewis-nestjs-workflow';
import { WorkflowTransformationInterceptor } from 'elewis-nestjs-workflow';
// etc.
@Get()
@Roles('admin')
@workflowConfig(workflow)         // Need this, it's injected into WorkflowInterceptor
@UseGuards(AuthGuard, RolesGuard)
@UseInterceptors(WorkflowTransormationInterceptor)
async findAll(
  @Headers('Authorization') authorzation: string,
): Promise<User[]> {
  return this.usersService.findAll();
}

Readme

Keywords

none

Package Sidebar

Install

npm i elewis-nestjs-events

Weekly Downloads

0

Version

0.0.34

License

MIT

Unpacked Size

29.4 kB

Total Files

42

Last publish

Collaborators

  • eldon.lewis1