elewis-ui-common
TypeScript icon, indicating that this package has built-in type declarations

0.0.22 • 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();
}

Dependencies (26)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i elewis-ui-common

    Weekly Downloads

    3

    Version

    0.0.22

    License

    MIT

    Unpacked Size

    18.5 kB

    Total Files

    20

    Last publish

    Collaborators

    • eldon.lewis1