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

@syncpoint/matrix-client-api

v1.13.0

Published

A minimal client API for [matrix]

Downloads

29

Readme

MATRIX Client API

This is a purpose built wrapper for the Matrix API and by no neans a general-purpose SDK! It creates top-level abstractions like project-list and project which are only suitable for ODINv2 replication. It's designed to support both nodejs and browser environments.

WARNING: As of 14mar23 the nodejs runtime must be version 18+ since it requires the (currently experimental) implementation of the fetch API!

http-api

The http-api is a very thin layer for the Matrix http (REST-like) api. The only enhancement is the automated renewal of the access token. This API does not have any ODIN domain specific functionality.

On top of the http-api we have three pillars (structure-api, command-api and timeline-api). These APIs use ODIN domain terms like project and layer but the ids used are still out of the Matrix domain.

structure-api

The structure-api creates ODINv2 structural components like projects (Matrix spaces) and layers (Matrix rooms), allows you to invite users to shared projects and so on. On the other hand one can enumerate existing projects and invitations to join shared projects. You must be in state online to use this API. Top level abstractions must deny access to the methods of this API and/or handle errors accordingly.

command-api

The command-api is a send-only API and is responsible for sending the payload messages to the matrix server. Typically triggered by a state change of a feature or style that is embraced by a layer these messages must get posted in a Matrix room. This API is the only one that can be used while beeing offline. All messages are queued and delivered in-order. If a client is offline there is a retry mechanism that will even work if ODIN gets shut-down and restarted. (TODO :-))

timeline-api

The timeline-api is a receive-only API and is intended to transfer changes from the matrix server to ODINv2. By making use of filters the API can be focused on the project list or a selected project (making use of room ids).

project-list

The project-list targets the ODINv2 view where projects are shared and joined. This API requires the structure-api and the timeline-api. With the exception of user-ids for invitations only ids from the ODIN domain are visible to users of this API. project-list holds a mapping from ODIN ids to Matrix ids.

project