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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@synanetics/interweave-audit-client

v2.0.0

Published

Client code for the generation and submission of AuditEvent resources in accordance with the Interweave auditing specification (https://interweavedigital.com/wp-content/uploads/2024/06/YHCR-Design-Paper-009.-Auditing-v1.3.pdf)

Readme

@synanetics/interweave-audit-client

Generates FHIR AuditEvents in line with the Interweave Specification

Description

A client for generating AuditEvents for DataConsumers in the Interweave ecosystem, according to the specification, which can be found at the following address: https://interweavedigital.com/wp-content/uploads/2024/06/YHCR-Design-Paper-009.-Auditing-v1.3.pdf. The client generates and sends the AuditEvents to the configured endpoint. The core AuditEvent generation functionality has been abstracted into a separate class, and concrete implementations are responsible for the submission of the event, so that HTTP and NATS clients can use the same event generation logic, whilst managing their own submissions.

Intended usage pattern

An Organization exists in an Interweave region. The Organization has both a DataConsumer and a DataProvider registered in the region's Exchange/PIX. The auditable events generated by the DataConsumer are sent to its corresponding DataProvider, so that they can be queried/reported upon, without the need for the DataConsumer to host its own AuditEvent service.

Unsupport features

  • Local authentication event generation (YHCR0101)

Supported features

  • Regional IAM authentication event generation (YHCR0102)
  • Search result response event generation (YHCR0302)
  • HTTP event submission
  • NATS event submission (to a Connect appliance's "audit" Moleculer service)
  • GCP PubSub queue topic submission

Usage

import { HttpAuditEventClient } from '@synanetics/interweave-audit-client';

const client =  new HttpAuditEventClient({
  url: 'https://data-consumer.fhir.nhs.uk/AuditEvent',
  odsCode: 'ABC01',
  dataConsumer: {
    name: 'ABC NHS Trust',
    identifier: [{
      code: 'participant01',
      system: 'https://yhcr.nhs.uk/Id/participant-id',
    }]
  }
});

const jwt = {
  sub: '...',
  // other claims
}

const tokenResponse = await fetch('http://iam.server.com', { body: JSON.stringify(jwt) });

const auditEventResponse = await client.submitAuthenticationEvent({
  response: tokenResponse,
  jwt,
  requestUrl: 'http://iam.server.com',
});

// auditEventResponse will be the result of submitting the AuditEvent to the server, usually an
// AuditEvent FHIR resource.

BigQuery Gotchas

The GCP PubSub client is intended to publish to a topic that BigQuery subscribes to. During the development phase, the following issues were discovered:

  • When associating a Topic to a BigQuery Subscription and selecting the "use table schema" option, this will respect the required/nullable status of each of the columns, meaning you won't be able to leave out "LastUpdated", for example, from your BigQuery writes (they will silently fail). As such, the BigQuery schema should have any fields that need to be defaulted temporarily set to nullable whilst the Subscription is being created.
  • "JSON" type BigQuery columns need to be stringified, otherwise inserts silently fail.