npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

tstdel-notify-msteam-async

v1.0.0

Published

This is custom module used in TSTDEL projects to send error alert to ms team channel on incomingwebhook created for channel

Downloads

1

Readme

                                  #tstdel-notify_msteam_async
  • Item 1 Project Title: tstdel-notify-msteam-async

  • Item 2 Project Owner: Test Delivery Team

  • Item 3 Description: This node package contains functions that are used for sending msteam notification. This package is in the - act-npm repository

How to install:

npm --registry=https://maven.corporate.act.org/repository/npm-group install --save tstdel-notify-msteam-async

How to use:

  • Constructor:

  • parameters:

    • properties
    • type: Object
    • description : properties to connect to msteam and message defaults attributes
    • attributes:
    • messagetype:
      • type: string
      • description: The "type" field must be "MessageCard".
    • themeColor:
      • type: string
      • description: set the message theme color e.g "0072C6".
    • summary:
      • type: string
      • description: Description of message
    • pretext:
      • type: string
      • description: header of incoming message in MSteam.
    • webhook:
      • type: string
      • description: incoming web hook URL where team channel message deliver. You can generate it by logging to ms team in connector section.

Function#1: notify Description: - This function publishes the message to the msteam.

  • parameters:
  • message
    type: string description: message to publish.

Function#2: notifyCustomizedMessage Description: - This function publishes the customized message to the msteam.

  • parameters:
  • message
    type: string description: message to publish
  • messageProperties
    type: array description: Contained the customized message to send the msteam channel.

Function#2: notifyAlternateMsteamDestination Description: - This function publishes the message to the different channel of msteam

  • parameters:

  • message
    type: string description: message to publish

  • msTeamProperties
    type: array description: contain the different ms team channel (setting)information used to override default settings picked frokm config file.

Function#2: notifyMessage Description: - This is th main method communicate with ms team channel using the webhook for transmission of message.

  • parameters:

  • message
    type: string description: message to publish

  • messageProperties

  • summary: type: string description: Description of message

  • pretext: type: string description: header of incoming message in MSteam

  • msTeamProperties

  • messagetype: type: string description: The "type" field must be "MessageCard".

  • themeColor: type: string description: set the message theme color e.g "0072C6".

  • webhook: type: string description: incoming web hook URL where team channel message deliver. You can generate it by logging to ms team in connector section .

Sample code:
const tstdelNofifyMSTeamAsync = require('./tstdel_notify_msteam_async');
async function sendmsgteam(message) {
  try {
    const props = {
      "type": "MessageCard",
      "themecolor": "theme color of message",
      "summary": "Description Message",
      "pretext": "MESSAGE SHOWN IN HEADER",
      "webhook": "WEBHOOK_URL"
    };
    const notifyMSTeam = new tstdelNofifyMSTeamAsync(props);
        const notifyMSTeamresponse = await notifyMSTeam.notify(message);
        if(notifyMSTeamresponse!= undefined && notifyMSTeamresponse.statusText =='OK' && notifyMSTeamresponse.status == 200 ) {
          console.log(`Message has been successfully sent to MsTeam: ${notifyMSTeamresponse.status} - ${notifyMSTeamresponse.statusText}`);
        } else {
          console.error(`Technical error while sending message to Ms Team`);  
        }    
  } catch (error) {
    console.error('Error sending message to MSTeam:', error);
    throw error;  // Re-throw the error to handle it at a higher level if needed.
  }
}
sendmsgteam('test message');