@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

15

Version

9.0.0

License

ISC

Unpacked Size

156 kB

Total Files

34

Last publish

Collaborators

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