@luxuryescapes/lib-notifications
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

Install

npm install --save @luxuryescapes/lib-notifications

Use

import notifications from '@luxuryescapes/lib-notifications'

notifications.initHook('hook', 'appName')

notifications.initHook('hook2', 'appName2')

await notifications.notify.send.plain('text', 'appName2')

await notifications.notify.send.blocks(
  [
        {
          type: "section",
          text: {
            type: "mrkdwn",
            text: 'text'
          }
        },
        {
          type: "section",
          block_id: "section567",
          text: {
            type: "mrkdwn",
            text: 'text'
          },
          accessory: {
            type: "image",
            image_url: 'url',
            alt_text: 'text'
          }
        }
      ]
)

await notifications.notify.send.attachments([
  {
    mrkdwn_in: ['text'],
    color: '#004085',
    pretext: 'text',
    title: 'text',
    text: 'text',
    footer: 'text',
    ts: (new Date().getTime()).toString(),
  }
])

await notifications.notify.alerts.info({
      name: "test",
      title: "test - title",
      message: "test - message",
      footer: "test - footer",
    })

await notifications.notify.alerts.error({
      name: "test",
      title: "test - title",
      message: "test - message",
      footer: "test - footer",
    })

await notifications.notify.alerts.warning({
      name: "test",
      title: "test - title",
      message: "test - message",
      footer: "test - footer",
    })

await notifications.notify.alerts.success({
      name: "test",
      title: "test - title",
      message: "test - message",
      footer: "test - footer",
    })

Readme

Keywords

none

Package Sidebar

Install

npm i @luxuryescapes/lib-notifications

Weekly Downloads

236

Version

2.0.0

License

MIT

Unpacked Size

15.6 kB

Total Files

34

Last publish

Collaborators

  • georgia-wahib-le
  • jeanbiezus
  • deven.chen
  • emanuel.kozerski
  • elias.vieira
  • roberto-luxuryescapes
  • ethanscavia
  • jahanzeb-hussain-le
  • lukejudd-lux
  • chiamaka-ibeme-le
  • vincent-tran-le
  • welingtonlarsenlux
  • hfrankel
  • sangin.lee
  • tuanhung-pham-le
  • lukas-zimmermann-le
  • lux-alexd
  • william.idoine
  • edward.iskenderian
  • adham-oliveira
  • james-kwok-le
  • aleksandar.vuksanovic
  • nishanthi.n
  • glesage_le
  • daviaazevedo
  • william-ong
  • philippecarvalho
  • dulaj.pathirana
  • hamed.le
  • samhammond
  • paulo.silva3991
  • noahxny
  • dishang
  • ahmad.hafez
  • jordikitto_le
  • steve.dang
  • andrewjohnstone
  • brunohaveroth
  • pavel-lux
  • mary-le
  • pankaj-le
  • rubenbelem
  • gabe-miranda-lux
  • thilina-piyadasun-le
  • gabriel.costa.lux
  • icelic
  • cervantes.kenneth
  • harish-indla-le
  • eran.stiller.luxury.escapes
  • sakethgetla
  • nicholaspuglia
  • sitaraman
  • siddharth.bose
  • aarontoomey-le
  • sergio.costa.luxuryescapes
  • mzilio-lux
  • michael-reid-le
  • matthewdelaneyatluxuryescapes
  • ricardobalbinot
  • callmekev
  • semeer-acheerithodi-le
  • andrey-tryapitsin-le
  • quan.tang
  • alexander.yakovenko
  • greg-cumming-le
  • jerry.huang-le
  • dan-wanigasekera-le
  • dunedayl
  • arminmon-le
  • mattswansonlux
  • cleberricardi
  • felipefeal.lux
  • tracymu
  • chris.nguyen.lux
  • marhalpert
  • reb2020
  • zediah
  • sonyque
  • joshuacullenlux
  • shawn-cx-li
  • colins44
  • diegogadens
  • felixivanov
  • joshua.paling.le
  • operations.luxgroup
  • eddiemcleanlux
  • robert.harris.lux
  • kostya-luxuryescapes
  • alexb.pi
  • kaustuva
  • luizcarraro
  • ryan.tian
  • le_tyang
  • richardbiddle
  • henryshen-le
  • jamesly