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

@vansite/ts-sharetribe-flex-sdk

v3.0.7

Published

This is a TypeScript SDK for Sharetribe Flex API. It reduces the complexity of the API and provides a more user-friendly interface.

Readme

@vansite/ts-sharetribe-flex-sdk

TypeScript MIT License Version

This is a TypeScript SDK for the Sharetribe Flex API. It simplifies interaction with the API, providing a more user-friendly and intuitive interface for developers and reduces the size of the SDK.

Features

  • Unified SDK: Combines both the Sharetribe SDK and Integration SDK in one package
  • Cross-platform: Works seamlessly in both Node.js and browser environments without additional configuration
  • Fully typed: Complete TypeScript definitions based on the official Sharetribe documentation
  • Lightweight: Optimized bundle size for better performance
  • Developer-friendly: Intuitive API design for easier integration
  • Built-in support for cookie handling and UUID generation

Installation

npm

npm install @vansite/ts-sharetribe-flex-sdk

yarn

yarn add @vansite/ts-sharetribe-flex-sdk

Usage

See also the migration section to see how things changed.

import {
  SharetribeSdk,
  IntegrationSdk,
} from "@vansite/ts-sharetribe-flex-sdk";

// Regular SDK for client-side operations
const sharetribeSdk = new SharetribeSdk({
  clientId: "your-client-id",
});

sharetribeSdk.authInfo().then((response) => {
  console.log(response);
});

// Integration SDK for server-side operations
const integrationSdk = new IntegrationSdk({
  clientId: "your-client-id",
  clientSecret: "your-client-secret",
});

integrationSdk.users.show({ id: "user-id" }).then((response) => {
  console.log(response);
});

Migration

SDK Loader

The Sdk loader is not needed anymore, because there is no difference between the node and web sdk

  • Remove the sdkLoader file
  • Exchange all sdkTypes with the types from the new sdk

before

import { types as sdkTypes } from "./sdkLoader";
const { Money } = sdkTypes;

after:

import { sdkTypes } from "@vansite/ts-sharetribe-flex-sdk";
const { Money } = sdkTypes;

Transit

before:

import { transit } from "./sdkLoader";

const serialize = (data) => {
  return transit.write(data, {
    typeHandlers,
    verbose: config.sdk.transitVerbose,
  });
};

const deserialize = (str) => {
  return transit.read(str, { typeHandlers });
};

after:

import { transit } from "@vansite/ts-sharetribe-flex-sdk";

const serialize = (data) => {
  return transit.write(data, {
    typeHandlers,
    verbose: config.sdk.transitVerbose,
  });
};

const deserialize = (str) => {
  return transit.read(str, { typeHandlers });
};

TokenStores

before:

const sharetribeSdk = require("sharetribe-flex-sdk");
const store = sharetribeSdk.tokenStore.memoryStore();

after:

const { TokenStores } = require("@vansite/ts-sharetribe-flex-sdk");
const store = new TokenStores.MemoryStore();

or

const { TokenStores } = require("@vansite/ts-sharetribe-flex-sdk");
const cookieTokenStore = new TokenStores.ExpressStore({
  clientId: "client-id",
  req,
  secure: true,
});

Scripts

Build the project:

yarn build

Run tests:

yarn test

Analyze the bundle size:

yarn analyze

Contributing

Contributions are welcome and appreciated! If you'd like to help improve this library, please feel free to:

  • Submit bug reports or feature requests through issues
  • Propose improvements through pull requests
  • Help expand test coverage
  • Improve documentation

Please follow standard GitHub flow (fork, branch, pull request) for contributions.

License

This project is licensed under the MIT License. See the LICENSE file for details.


Tags

  • Sharetribe Flex
  • TypeScript SDK
  • Node.js
  • Browser
  • API Integration