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

@sitecore-marketplace-sdk/xmc

v0.4.1

Published

The `xmc` package extends the Client SDK and provides type-safe interfaces for interacting with the following Sitecore XM Cloud APIs: - [Authoring and Management GraphQL API](https://doc.sitecore.com/xmc/en/developers/xm-cloud/sitecore-authoring-and-man

Readme

Sitecore Marketplace SDK - xmc package

The xmc package extends the Client SDK and provides type-safe interfaces for interacting with the following Sitecore XM Cloud APIs:

Prerequisites

  • Node.js 16 or later. Check your installed version by using the node --version command.
  • npm 10 or later. Check your installed version by using the npm --version command.
  • An XM Cloud subscription.

Installation

npm install @sitecore-marketplace-sdk/xmc

Initialization

Before you use queries or mutations, you must initialize the XMC module.

  1. Update the code where you initialized the Client SDK by importing XMC and adding it to config:
// utils/hooks/useMarketplaceClient.ts
import { XMC } from '@sitecore-marketplace-sdk/xmc';

// ...
const config = {
  // ...
  modules: [XMC] // Extend Client SDK with `XMC`
};

Usage

Make a query

Use the query method to make one-off data requests and live subscriptions. Pass a value to the method depending on the data you want to retrieve. For examples:

  • pass 'xmc.sites.listSites' to retrieve a list of sites:
client.query("xmc.sites.listSites", {
    params: {
        query: {
            sitecoreContextId,
        },
    },
}).then((res) => {
    console.log(
        "Success retrieving xmc.sites.listSites:",
        res.data
    );
}).catch((error) => {
    console.error(
        "Error retrieving xmc.sites.listSites:",
        error
    );
});
  • pass 'xmc.pages.retrievePage' to retrieve information about a specific page:
client.query("xmc.pages.retrievePage", {
    params: {
        path: {
            pageId,
        },
        query: {
            site,
            sitecoreContextId,
            language,
        },
    },
}).then((res) => {
    console.log(
        "Success retrieving xmc.pages.retrievePage:",
        res.data
    );
}).catch((error) => {
    console.error(
        "Error retrieving xmc.pages.retrievePage:",
        error
    );
});

For an overview of all the possible values, refer to the QueryMap interface.

Make a mutation

Use the mutate method to trigger changes in Sitecore (the host). Pass a value to the method depending on the change you want to make.

For example, to open a different page in the XM Cloud Page builder in response to some other action:

const openDifferentPage = () => {
  client?.mutate("pages.context", {
    params: {
      itemId: "<ID_OF_NEW_PAGE>",
    },
  });
};

For an overview of all the possible values, refer to the MutationMap interface.

[!NOTE] Behind the scenes, the Host SDK (integrated via the internal core package) attaches the required user token and performs the HTTP request on behalf of the Marketplace app (the client).

Documentation

For more information, refer to the reference documentation in the /docs folder.

License

This package is part of the Sitecore Marketplace SDK, licensed under the Apache 2.0 License. Refer to the LICENSE file in the repository root.

Status

The client package is actively maintained as part of the Sitecore Marketplace SDK.