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

flowmyna

v0.1.2

Published

Official Node.js SDK for FlowMyna - Process Mining Event Tracking

Readme

flowmyna

Official Node.js SDK for FlowMyna - Process Mining Event Tracking.

Installation

npm install flowmyna
# or
yarn add flowmyna
# or
pnpm add flowmyna

Quick Start

import { FlowMyna } from 'flowmyna';

const client = new FlowMyna({
  apiKey: process.env.FLOWMYNA_API_KEY!
});

// Record an event
await client.recordEvent({
  event: 'Order Placed',
  objects: [
    { type: 'Order', id: 'ORD-123' },
    { type: 'Customer', id: 'CUST-456' }
  ],
  properties: { total: 149.99 }
});

// Upsert an object
await client.upsertObject({
  type: 'Customer',
  id: 'CUST-456',
  properties: {
    name: 'Jane Doe',
    email: '[email protected]'
  }
});

Features

  • TypeScript-first - Full type definitions included
  • Automatic retries - Exponential backoff for transient failures
  • Rate limit handling - Respects Retry-After headers
  • ESM and CommonJS - Works with both module systems
  • Node.js 18+ - Uses native fetch API

Configuration

const client = new FlowMyna({
  apiKey: 'fm_live_xxx',      // Required
  baseUrl: 'https://...',     // Optional, defaults to production
  timeout: 30000,             // Optional, request timeout in ms
  maxRetries: 3,              // Optional, max retry attempts
});

API Reference

recordEvent(request)

Record a single process event.

const result = await client.recordEvent({
  event: 'Order Shipped',
  objects: [
    { type: 'Order', id: 'ORD-123' },
    { type: 'Shipment', id: 'SHIP-456' }
  ],
  timestamp: new Date(),
  properties: { carrier: 'FedEx' }
});

recordEventBatch(events)

Record multiple events in a single request (max 100).

const result = await client.recordEventBatch([
  { event: 'Order Created', objects: [{ type: 'Order', id: 'ORD-1' }] },
  { event: 'Order Shipped', objects: [{ type: 'Order', id: 'ORD-1' }] },
]);
console.log(`Processed: ${result.processed}`);

upsertObject(request)

Create or update an object with properties.

const result = await client.upsertObject({
  type: 'Customer',
  id: 'CUST-456',
  properties: { name: 'Jane Doe', tier: 'gold' }
});
console.log(`Object ${result.created ? 'created' : 'updated'}`);

upsertObjectBatch(objects)

Create or update multiple objects (max 100).

const result = await client.upsertObjectBatch([
  { type: 'Customer', id: 'CUST-1', properties: { tier: 'gold' } },
  { type: 'Customer', id: 'CUST-2', properties: { tier: 'silver' } },
]);

health()

Verify API key and get workspace info.

const health = await client.health();
console.log(`Connected to ${health.workspaceName}`);

Error Handling

import { FlowMyna } from 'flowmyna';
import {
  AuthenticationError,
  ValidationError,
  RateLimitError,
  ServerError,
  FlowMynaError
} from 'flowmyna/errors';

try {
  await client.recordEvent({ ... });
} catch (error) {
  if (error instanceof AuthenticationError) {
    console.error('Invalid API key');
  } else if (error instanceof ValidationError) {
    console.error('Invalid request:', error.message);
  } else if (error instanceof RateLimitError) {
    console.error(`Rate limited. Retry after ${error.retryAfter}s`);
  } else if (error instanceof ServerError) {
    console.error('Server error:', error.message);
  } else if (error instanceof FlowMynaError) {
    console.error('FlowMyna error:', error.message);
  }
}

Documentation

Full documentation available at flowmyna.com/api/sdks/nodejs

License

MIT