2.0.6 • Published 4 months ago

@thefirstspine/messaging v2.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
4 months ago

📦 dependency-messaging // @thefirstspine/messaging

Javascript and Typescript service to interact with the messaging net service.

More information here: https://github.com/thefirstspine/messaging

Install

npm i @thefirstspine/messaging@latest

Configuration

As part of TFS Platform, this dependency will use environment variable.

Environement keySummary
MESSAGING_URLMessaging net service URL
MESSAGING_PUBLIC_KEYPublic key to interact with the messaging net service

Documentation

MessagingService

Main service to interact with the messaging net service.

sendMessage

Sends a message in a subject to the clients connected to the service.

Synopsis: async sendMessage(to: number[]|'*', subject: string|'*', message: any): Promise<IMessagingResponse>

Params:

  • to: number[]|'*' The list of the users that will receive the message. * is for all users.
  • subject: string|'*' The subject concerned by the message.
  • message: any The message to send.

getMessagingNetServiceUrl

Get the messaging net service URL according to the MESSAGING_URL environment variable.

Synopsis: getMessagingNetServiceUrl(): string

How to use

Build

npm run build

Lint

npm run lint

Publish on NPM

npm publish

License

TFS Platform is NOT licensed. You are free to download, view, run the repository. You are NOT allowed to redistribute this project for both commercial and non-commercial use. Deal with it.

2.0.6

4 months ago

2.0.5

7 months ago

2.0.4

7 months ago

2.0.3

9 months ago

2.0.2

1 year ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.0

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago