@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",
    })

Dependents (1)

Package Sidebar

Install

npm i @luxuryescapes/lib-notifications

Weekly Downloads

1,442

Version

2.0.0

License

MIT

Unpacked Size

15.6 kB

Total Files

34

Last publish

Collaborators

  • ankit.sehgal
  • sithum-nissanka-le
  • fabricio-frontarolli-le
  • ryan.cole
  • soumya-le
  • connor-kneebone-le
  • jamesbeattie-luxuryescapes
  • denis.babak.lux
  • benfranzi-le
  • k0zn4n3ja
  • gribesh
  • alex-teng-le
  • venkatle
  • gabrielgsduarte
  • adisembiringle
  • gearoid-sheehan
  • finbar-kelly-le
  • maha-zohbi-le
  • chrisnassif
  • ron-crisostomo-le
  • georgia-wahib-le
  • jeanbiezus
  • 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
  • jordikitto_le
  • steve.dang
  • andrewjohnstone
  • brunohaveroth
  • pavel-lux
  • mary-le
  • thilina-piyadasun-le
  • gabriel.costa.lux
  • harish-indla-le
  • sakethgetla
  • nicholaspuglia
  • sitaraman
  • siddharth.bose
  • aarontoomey-le
  • sergio.costa.luxuryescapes
  • 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