@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

697

Version

2.0.0

License

MIT

Unpacked Size

15.6 kB

Total Files

34

Last publish

Collaborators

  • venkatle
  • sakethgetla
  • tracymu
  • k0zn4n3ja
  • chris.nguyen.lux
  • marhalpert
  • reb2020
  • zediah
  • sonyque
  • joshuacullenlux
  • colins44
  • lukas-zimmermann-le
  • semeer-acheerithodi-le
  • 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
  • dan-wanigasekera-le
  • siddharth.bose
  • alexander.yakovenko
  • sergio.costa.luxuryescapes
  • greg-cumming-le
  • felipefeal.lux
  • cleberricardi
  • andrey-tryapitsin-le
  • arminmon-le
  • mattswansonlux
  • quan.tang
  • dunedayl
  • mary-le
  • hfrankel
  • callmekev
  • aarontoomey-le
  • nicholaspuglia
  • tuanhung-pham-le
  • sangin.lee
  • welingtonlarsenlux
  • paulo.silva3991
  • ricardobalbinot
  • matthewdelaneyatluxuryescapes
  • sitaraman
  • benfranzi-le
  • harish-indla-le
  • pavel-lux
  • nishanthi.n
  • elias.vieira
  • gabriel.costa.lux
  • thilina-piyadasun-le
  • ryan.cole
  • brunohaveroth
  • andrewjohnstone
  • steve.dang
  • jordikitto_le
  • fabricio-frontarolli-le
  • vincent-tran-le
  • chiamaka-ibeme-le
  • lukejudd-lux
  • alex-teng-le
  • dishang
  • gribesh
  • noahxny
  • ethanscavia
  • samhammond
  • hamed.le
  • dulaj.pathirana
  • philippecarvalho
  • roberto-luxuryescapes
  • jamesbeattie-luxuryescapes
  • denis.babak.lux
  • jeanbiezus
  • georgia-wahib-le
  • connor-kneebone-le
  • william.idoine
  • maha-zohbi-le
  • gearoid-sheehan
  • adisembiringle
  • aleksandar.vuksanovic
  • james-kwok-le
  • lux-alexd
  • finbar-kelly-le
  • ron-crisostomo-le
  • chrisnassif
  • gabrielgsduarte
  • edward.iskenderian
  • william-ong
  • daviaazevedo
  • glesage_le
  • sithum-nissanka-le
  • ankit.sehgal
  • pascal-enz-le
  • mark-ma-le
  • caioportela-le
  • serhii.kartavtsev
  • zrdilig