The SDK ships prebuilt inside the Starter download together with its
drop-core-libtypes — you do not build it yourself. The section below is the package README's own quick start.
import { DropCore, getDropCoreAdmin } from 'drop-core-sdk';
DropCore.start({
store: 'my-store-id',
access_token: 'eyJhbGciOi...', // server-issued access token
});
const admin = getDropCoreAdmin();
const store = await admin.store.get(); // StoreEntity
const orders = admin.store.orders;
await orders.load();
console.log(orders.items, orders.count);DropCore.start registers the connection in a named session (default
'main') so module factories can later resolve it via DropCore.get(session).
For multiple stores in one process, pass a session name:
DropCore.start({ store: 'a', access_token: tokenA }, 'a');
DropCore.start({ store: 'b', access_token: tokenB }, 'b');
const adminA = getDropCoreAdmin('a');
const adminB = getDropCoreAdmin('b');A combined facade is available too — DropCoreInstance bundles all nine:
import { initDropCore, getDropCoreInstance } from 'drop-core-sdk';
// start a session and get the instance in one call…
const drop = initDropCore('my-store-id', 'eyJhbGciOi...');
// …the same with full options (env, target, identity_token, client)…
const demo = initDropCore({ store: 'my-store-id', access_token: 'eyJ…', env: 'demo' });
// …or build one over an already-started session
const same = getDropCoreInstance(); // DropCoreInstance
drop.admin.store; // -> Store
drop.process.order.make({...});
drop.promo.credits.value('uid');
drop.public.store.get();
drop.gen.seo.generate({...});Don't confuse
getDropCoreInstance(session?)withgetDropCore(session)— the latter is the session registry lookup and returns the underlyingDropCoreconnection (orundefined), not the facade bundle.
One barrel, three surfaces. The root
index.tsused to be a stale fork ofsrc/index.ts— a six-facadeDropCoreInstance(nogen) and a localgetDropCorethat shadowed the registry lookup — which reached the esbuild bundle (npm run bundle→dist/drop_core_admin.js) and, becausetypesnamed a nonexistentindex.d.ts, the type resolution as well. Fixed 2026-08-03: the root file is nowexport * from './src'(plusdrop-core-lib), andtypespoints at the emittedlib/index.d.ts. All three surfaces —require, types, bundle — now describe what is on this page. Keep the root barrel a pure re-export.