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

9.0.0 • Public • Published

@edirect/slack

The EDirectInsure Slack module.

Installation

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

Usage

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

import { ConfigService } from '@edirect/config';

...

imports: [

  SlackModule.registerAsync({
    imports: [ConfigModule],
    useFactory: async (configService: ConfigService) => ({
      active: configService.get(Variables.SLACK_ACTIVE),
      service: 'Susbcription Service',
      cluster: configService.get(Variables.NAMESPACE),
      slack: {
        token: configService.get(Variables.SLACK_TOKEN),
        channel: configService.get(Variables.SLACK_CHANNEL)
      },
    }),
    inject: [ConfigService],
  }),

  ...
]

Use the public methods in the code, where applicable:

async sendMessage(
  level: MessageLevel,
  message: string,
  payload?: string,
  attributes?: Record<string, string>,
  channel?: string,
  template?: (data: TemplateInput) => KnownBlock[]
): Promise<string>

Readme

Keywords

none

Package Sidebar

Install

npm i @edirect/slack

Weekly Downloads

18

Version

9.0.0

License

ISC

Unpacked Size

156 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
  • david.pereira
  • paulomarchi