@edirect/alert
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@edirect/auth

The EDirectInsure Alert module.

Installation

$ npm i --save @edirect/**alert**

Usage

Import and register AlertModule in AppModule (app.module.ts):

imports: [

  AlertModule.registerAsync({
    imports: [ConfigModule],
    useFactory: async (configService: ConfigService) => ({
      alertServiceUrl: configService.get<string>(Variables.ALERT_URL),
      service: 'Susbcription Service',
      cluster: configService.get<string>(Variables.NAMESPACE),
      defaults: {
        timeout: 300000,
        channels: ['SLACK'],
        channelConfigs: {
          slack_channel: configService.get<string>(Variables.SLACK_CHANNEL)
        }
      },
    }),
    inject: [ConfigService],
  }),

  ...
]

Use the public methods in the code, where applicable:

async sendTransient(level: AlertLevel, message: string, payload?: string, config?: CreateTransientConfig): Promise<string>

async sendPersistent(level: AlertLevel, message: string, payload?: string, config?: CreatePersistentConfig): Promise<string>

async openCycle(level: AlertLevel, message: string, payload?: string, config?: CreateCycleConfig): Promise<string>

async resolvePersistent(sid: string): Promise<string>

async updateCycle(sidOrCorrelationId: string, milestone: CycleMilestone): Promise<string>

async resolveCycle(sidOrCorrelationId: string, milestone?: CycleMilestone): Promise<string>

Readme

Keywords

none

Package Sidebar

Install

npm i @edirect/alert

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

109 kB

Total Files

34

Last publish

Collaborators

  • rodrigo.prado
  • diogo.bolttech
  • mathais
  • robertoakang
  • samuelbolttech
  • gcmercante
  • herberts.fortuna
  • bruno.gomes
  • danielkhalebbatista
  • andsfranbolt
  • guilherme_benedeti
  • pauloazevedo-ed
  • rafael.jourdan
  • joaoferreirabolttech
  • iquirino.bolttech
  • lukaspiccinibt
  • adailson.bolttech
  • palvares_bolttech
  • plinio.altoe
  • edirectamorim
  • ricardo.coelho
  • layunne-bolttech
  • mayko.calazans
  • david.pereira
  • paulomarchi