2.0.0 • Published 8 months ago

@luxuryescapes/lib-notifications v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

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

8 months ago

1.0.8

2 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago