JavaScript SDKModulesInventory

Inventory SDK

Read inventory items with typed SDK methods.

Feature flag: inventory

Status: available

Use the Inventory SDK model when you need item records from Karybase without managing HTTP paths directly.

import { createKarybaseClient } from "@karybase/sdk";

const karybase = createKarybaseClient({
  apiKey: process.env.KARYBASE_API_KEY!,
});

const item = await karybase.inventory.get({
  itemId: "item_123",
});

Methods

MethodPurpose
karybase.inventory.list(options?)List inventory item summaries
karybase.inventory.get(options)Get one inventory item
karybase.inventory.info()Read module metadata

karybase.inventory.items.list() and karybase.inventory.items.get() remain as backwards-compatible aliases.

Field Selection

Pass fields to request only the model fields you need. The SDK narrows the TypeScript return type from the field list.

const item = await karybase.inventory.get({
  itemId: "item_123",
  fields: ["_id", "name", "quantity"] as const,
});

item.quantity;

Read Options, Results, and Types for the full contract.

On this page