Javascript and Typescript service to interact with the messaging net service.
More information here: https://github.com/thefirstspine/messaging
npm i @thefirstspine/messaging@latest
As part of TFS Platform, this dependency will use environment variable.
Environement key | Summary |
---|---|
MESSAGING_URL | Messaging net service URL |
MESSAGING_PUBLIC_KEY | Public key to interact with the messaging net service |
Main service to interact with the messaging net service.
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.
Get the messaging net service URL according to the MESSAGING_URL environment variable.
Synopsis: getMessagingNetServiceUrl(): string
npm run build
npm run lint
npm publish
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.