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

@flipdish/orgmanagement

v2.0.3

Published

APIs for managing Flipdish client organisations, brands, properties, and sales channels.

Readme

@flipdish/orgmanagement

This package provides a TypeScript/JavaScript client for Flipdish's Organisation Management APIs over HTTP.

It is generated with Hey API and uses the native fetch API, so it has no runtime dependencies. It works in Node.js 18+, Bun, Deno and browsers, and ships both ES modules and CommonJS.

Example code

import { createFlipdishClient, SDK_INFO } from "@flipdish/orgmanagement";
import { describe, expect, test } from "@jest/globals";

const orgManagement = createFlipdishClient({
  baseUrl: "https://api-prod-staging.flipdishdev.com",
  // to get the API key, you should follow these docs:
  // https://developers.flipdish.com/docs/getting-started
  accessToken: process.env.FLIPDISH_BEARER_TOKEN,
  // optional: identifies your app in the X-Flipdish-Client header,
  // and in User-Agent outside browsers. Defaults to env vars such as DD_SERVICE.
  clientName: "sdk-test-app",
});

describe("Org Management Tests", () => {
  describe("Orgs", () => {
    // test("Get org by id", async () => {
    //   const { data, error } = await orgManagement.getOrgById({
    //     path: { orgId: "org12345" },
    //   });
    //   expect(error).toBeUndefined();
    //   expect(data?.data.orgId).toBe("org12345");
    // });

    test("client is created", () => {
      expect(orgManagement.getAllOrgs).toBeInstanceOf(Function);
    });
  });

  describe("Client identity", () => {
    test("sends User-Agent and X-Flipdish-Client in Node", async () => {
      let sent: Request | undefined;
      const sdk = createFlipdishClient({
        clientName: "sdk-test-app",
        clientVersion: "1.2.3",
        fetch: async (input) => {
          sent = input as Request;
          return new Response(JSON.stringify({ data: [] }), {
            headers: { "content-type": "application/json" },
          });
        },
      });

      await sdk.getAllOrgs();

      const expected = `Flipdish-orgmanagement-ts/${SDK_INFO.version} sdk-test-app/1.2.3`;
      expect(sent?.headers.get("user-agent")).toMatch(
        new RegExp(`^${expected.replace(/[.+]/g, "\\$&")} `),
      );
      expect(sent?.headers.get("x-flipdish-client")).toBe(
        sent?.headers.get("user-agent"),
      );
    });
  });
});

Client identity

Every request carries an X-Flipdish-Client header identifying the SDK and the app using it. Outside browsers the same value is also sent as User-Agent, for example:

Flipdish-orgmanagement-ts/2.0.3 menu-service/2.3.1 env/production node/22.18.0

Each part can be set in code or with an environment variable. The first one that is set wins, with the option checked first:

| Part | Option | Environment variables | |------|--------|-----------------------| | App name | clientName | FLIPDISH_CLIENT_NAME, DD_SERVICE, AWS_LAMBDA_FUNCTION_NAME, npm_package_name | | App version | clientVersion | FLIPDISH_CLIENT_VERSION, DD_VERSION, npm_package_version | | Environment | clientEnvironment | FLIPDISH_CLIENT_ENVIRONMENT, DD_ENV, NODE_ENV | | Runtime | runtime | FLIPDISH_CLIENT_RUNTIME, then the detected Node.js, Bun or Deno version | | Suffix | userAgentSuffix | FLIPDISH_CLIENT_USER_AGENT_SUFFIX |

Pass the options to createFlipdishClient, or call configureClientIdentity to set them on the default client:

import { configureClientIdentity } from "@flipdish/orgmanagement";

configureClientIdentity({ clientName: "menu-service", clientVersion: "2.3.1", clientEnvironment: "production" });

Browsers have no environment variables, so set at least clientName in code there. Anything passed in headers overrides these values.