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

nhs-mesh-client

v1.2.0

Published

A client to talk to NHS MESH

Downloads

10

Readme

Repository Template

CI/CD Pull Request Quality Gate Status

Welcome to the Javascript MESH client repo. This repository houses a Javascript MESH client which can be used by any nodejs application to communicate with MESH

Table of Contents

Installation

This library does not require any external dependencies beyond those used in the src directory files. However, ensure you have a modern version of Node.js installed that supports ES Modules.

you can install the module with npm i nhs-mesh-client

jsdocs can be accessed here

Setup

This client is compatible with the sandbox, integration and production MESH systems.

The repository is structured into several directories, each containing specific types of operations:

  • get/: Contains functions for retrieving information from the message exchange system.
  • put/: Contains functions for updating the status of messages.
  • post/: Contains functions for creating or sending messages.
  • examples/: Contains examples on how to use the functions in practical scenarios.

Functions

Handshake

  • handShake: Establishes a connection with the message exchange system, ensuring that communication is possible.

Message Retrieval

  • getMessageCount: Retrieves the count of messages currently stored in the mailbox.
  • readMessage: Reads the content of a specific message.

Message Management

  • markAsRead: Marks a message as read or acknowledged, updating its status within the system.

Message Creation and Sending

  • sendMessage: Sends a new message to the specified recipient.
  • sendChunkedMessage: Sends a large message in chunks, suitable for handling large datasets or files.

Configuration and Examples

  • loadConfig: Loads and returns configuration settings for the message exchange system, preparing it for operation.
  • createMessages: Demonstrates how to create and send a message using the system.
  • createMessageChunks: Demonstrates how to send a large message in chunks.
  • receiveMessage: Demonstrates how to retrieve and process messages from the mailbox.

Usage

To use any of the provided functions, first ensure you have the necessary configuration. This typically involves setting up authentication details, specifying the target mailbox IDs, and other relevant settings. Here's a basic example

import { loadConfig, createMessages } from "./src/index.js";

async function main() {
  const config = await loadConfig({
    logLevel: "DEBUG",
    url: "https://example.com/messaging",
    // additional configuration options...
  });

  await createMessages(config);
}

main();

Contributing

Contributions to improve or extend the functionality of this message exchange system are welcome. Please follow the existing code structure and document any new functions or changes thoroughly.

Testing

npm test will execute meshService.test.js.

Contacts

Maintainers: andrew cleveland

Licence

Unless stated otherwise, the codebase is released under the MIT License. This covers both the codebase and any sample code in the documentation.

Any HTML or Markdown documentation is © Crown Copyright and available under the terms of the Open Government Licence v3.0.