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

@nakamotosbutt/medusa-plugins-sdk

v0.0.6

Published

SDK for Medusa plugins

Downloads

7

Readme

@lambdacurry/medusa-plugins-sdk

SDK for Medusa plugins by Lambda Curry.

This package is built on top of @medusajs/js-sdk and adds a set of resources and methods for interacting with the Medusa Plugins Collection.

Installation

yarn install @lambdacurry/medusa-plugins-sdk

# or, if you're using yarn workspaces
yarn workspace my-app add @lambdacurry/medusa-plugins-sdk

Read more about working with monorepos in the Development section.

Usage

import {
  MedusaPluginsSDK,
  StoreListProductReviewsQuery,
  StoreListProductReviewStatsQuery,
} from '@lambdacurry/medusa-plugins-sdk';

// Initialize the SDK
const sdk = new MedusaPluginsSDK({
  baseUrl: process.env.MEDUSA_BACKEND_URL || 'http://localhost:9000',
  publishableKey: process.env.MEDUSA_PUBLISHABLE_KEY,
});

// List product reviews
const productReviews = await sdk.store.productReviews.list({
  product_id: product.id,
  offset: 0,
  limit: 10,
})

Extending my own SDK

If you need to extend the SDK with your own resources, you can do so by creating your own classes and extending the SDK.

Available resources:

  • AdminProductReviewsResource
  • StoreProductReviewsResource

Example

import Medusa, { Admin, Store, type Client, type Config } from '@medusajs/js-sdk';
import { AdminProductReviewsResource } from '@lambdacurry/medusa-plugins-sdk';

type MyCustom = {
  id: string;
  name: string;
};

type MyQuery = {
  name: string;
};

type MyResponse = {
  myCustom: MyCustom[];
};

export class AdminMyCustomResource {
  constructor(private client: Client) {}

  // example admin method
  async list(query: MyQuery) {
    return this.client.fetch<MyResponse>(`/admin/my-custom`, {
      method: 'GET',
      query,
    });
  }

  // custom admin methods
}

class MyAdmin extends Admin {
  public productReviews: AdminProductReviewsResource;
  public myCustom: AdminMyCustomResource;

  constructor(client: Client) {
    super(client);

    this.productReviews = new AdminProductReviewsResource(client);
    this.myCustom = new AdminMyCustomResource(client);
  }
}

class StoreMyCustomResource {
  constructor(private client: Client) {}

  // custom store methods
}

class MyStore extends Store {
  public store: StoreMyCustomResource;

  constructor(client: Client) {
    super(client);
    this.store = new StoreMyCustomResource(client);
  }
}

export class MyExtendedSDK extends Medusa {
  public override admin: MyAdmin;
  public override store: MyStore;

  constructor(config: Config) {
    super(config);
    this.admin = new MyAdmin(this.client);
    this.store = new MyStore(this.client);
  }
}

Development

Visit the README.md for setting up the development environment.

We use yalc for local development, which allows us to publish the package locally and use it in other projects. So, make sure you have yalc installed as a dev dependency in your project.

To publish the package locally, run:

# from medusa-plugins/packages/plugins-sdk
yarn dev:publish

# from your project
yarn yalc add @lambdacurry/medusa-plugins-sdk

Working with medusa applications

When working with a Medusa application, you need to ensure that the SDK is included in the Vite config's optimizeDeps option.

// medusa-config.ts

module.exports = defineConfig({
  // other configs...
  admin: {
    // other admin configs...
    vite: () => {
      return {
        optimizeDeps: {
          include: ['@lambdacurry/medusa-plugins-sdk'],
        },
      };
    },
  },
});

Working with Vite applications

When working with a Vite application, you need to ensure that the SDK is included in the Vite config's ssr.noExternal option.

// vite.config.ts

export default defineConfig({
  // other configs...
  ssr: {
    noExternal: ['@medusajs/js-sdk', '@lambdacurry/medusa-plugins-sdk'],
  },
});

Working with monorepos

If you're using a monorepo setup, you can use the hoistingLimits option in your package.json to ensure that the SDK is installed in the correct location.

// monorepo/path-to/your-app/package.json
{
  "installConfig": {
    "hoistingLimits": "workspaces"
  },
}

License

MIT © Lambda Curry