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

@omnixdp/typegen

v0.8.4

Published

TypeScript type generator for Omni xDP SDK response models.

Readme

@omnixdp/typegen

Generate TypeScript types for Omni xDP SDK responses from live CMS, Business Objects, and Ratings and Reviews schemas.

Install

npm install -D @omnixdp/typegen

Generate

npx omnixdp-typegen \
  --api-url https://api.example.com \
  --management-client-id "$OMNIXDP_MANAGEMENT_CLIENT_ID" \
  --management-client-secret "$OMNIXDP_MANAGEMENT_CLIENT_SECRET" \
  --business-objects-client-id "$OMNIXDP_BO_CLIENT_ID" \
  --business-objects-client-secret "$OMNIXDP_BO_CLIENT_SECRET" \
  --ratings-and-reviews-client-id "$OMNIXDP_RR_CLIENT_ID" \
  --ratings-and-reviews-client-secret "$OMNIXDP_RR_CLIENT_SECRET" \
  --cms-space marketing \
  --bo-space products \
  --rr-space storefront-reviews \
  --impex \
  --out src/omnixdp.generated.ts

Space arguments can be a space id, slug, or exact name. Typegen loads .env and .env.local before evaluating config files, then exchanges client credentials for short-lived access tokens. Existing --management-token, --business-objects-token, and --ratings-and-reviews-token flags remain supported when you already have bearer tokens. Regenerate the output after changing content types, taxonomies, taxonomy types, data types, or global fields in the admin.

Generated CMS taxonomy response aliases use the delivery SDK's typed taxonomy tree shape: term slug and url are part of nested node data when those taxonomy fields are exposed through the Delivery API.

For CMS content types, typegen also emits Cms...References types and a CmsContentReferences map for Delivery API reference expansion results. CmsDeliveryEntry<TApiIdentifier> includes that reference map, so entry.references is typed for requested CMS, Business Objects, and Ratings and Reviews references when the field target is known. Generated CMS delivery entries also include publishedData.taxonomySelections, keyed by taxonomy API identifier, and generated field selectors include this.taxonomySelections plus <referenceName>.taxonomySelections for CMS entry references.

Typegen also emits CmsDeliveryClient and CmsDeliveryOptions for createTypedDeliveryClient. CmsDeliveryClient is the ready-to-use typed client alias, while CmsDeliveryOptions is the generated option map that narrows Delivery SDK method options such as fields, references, filters, taxonomy, sort, and expand to selectors known from the generated CMS content and taxonomy schemas. Generated sort values include id, updatedAt, and content field API identifiers marked Sortable, with -field variants for descending order.

import { createDeliveryClientFromEnv, createTypedDeliveryClient } from "@omnixdp/delivery";
import type { CmsDeliveryClient } from "./omnixdp.generated";

export const delivery: CmsDeliveryClient = createTypedDeliveryClient(createDeliveryClientFromEnv());

Typegen also emits generated client aliases for the CMS Management, Business Objects, Ratings and Reviews, and optional IMPEX SDKs:

import { createBusinessObjectsClient, createTypedBusinessObjectsClient } from "@omnixdp/business-objects";
import type { BusinessObjectsClient } from "./omnixdp.generated";

export const businessObjects: BusinessObjectsClient = createTypedBusinessObjectsClient(
  createBusinessObjectsClient({
    baseUrl: process.env.OMNIXDP_API_URL!,
    accessToken: process.env.OMNIXDP_BO_TOKEN!
  })
);

For Business Objects and Ratings and Reviews DataTree fields, typegen emits node data maps plus method aliases for getDataTreeNode, createDataTreeNode, updateDataTreeNode, moveDataTreeNode, and deleteDataTreeNode request/response shapes. The generated BusinessObjectsClient and RatingsReviewsClient aliases bind those maps so DataTree node data is inferred from dataTypeApiIdentifier and fieldApiIdentifier. Use aliases such as BusinessObjectCreateDataTreeNodeBody<"product", "comments"> or RatingsReviewGetDataTreeNodeResponse<"review_bank", "reviews"> with the matching SDK methods when you need standalone request or response types.

IMPEX has no live schema surface, so pass --impex or set impex: true in config to emit static ImpexResourceTypes and ImpexClient aliases backed by @omnixdp/impex defaults.

Check in CI

npx omnixdp-typegen --config omnixdp.typegen.config.js --check

--check fails when the generated output is stale. The generated timestamp is ignored during comparison so a current file does not fail just because the check ran at a different time.

Config File

module.exports = {
  apiUrl: process.env.OMNIXDP_API_URL,
  managementClientId: process.env.OMNIXDP_MANAGEMENT_CLIENT_ID,
  managementClientSecret: process.env.OMNIXDP_MANAGEMENT_CLIENT_SECRET,
  businessObjectsClientId: process.env.OMNIXDP_BO_CLIENT_ID,
  businessObjectsClientSecret: process.env.OMNIXDP_BO_CLIENT_SECRET,
  ratingsAndReviewsClientId: process.env.OMNIXDP_RR_CLIENT_ID,
  ratingsAndReviewsClientSecret: process.env.OMNIXDP_RR_CLIENT_SECRET,
  cmsSpace: "marketing",
  boSpace: "products",
  rrSpace: "storefront-reviews",
  impex: true,
  out: "src/omnixdp.generated.ts"
};