3U

SDK Overview

The threeu-sdk package provides typed SDKs for every development surface.

Installation

The ThreeU SDK is distributed as a single npm package with multiple entry points.

Install
Shell
npm install threeu-sdk

SDK Exports

The package provides these entry points:

SDK Entry Points
TypeScript
// Core client — server-side, full access
import { Threeu } from "threeu-sdk";

// Admin SDK — admin dashboard development
import { ThreeuAdmin } from "threeu-sdk/admin";

// POS SDK — point-of-sale development
import { ThreeuPOS } from "threeu-sdk/pos";

// Storefront SDK — client-side storefront
import { ThreeuStorefront } from "threeu-sdk/storefront";

// Theme SDK — theme development
import { createTheme } from "threeu-sdk/theme";

// Plugin SDK — plugin development
import { createPlugin } from "threeu-sdk/plugin";

Brand-Scoped SDK Model

The core SDK uses a brand-scoped model. Initialize with your secret key, then scope operations to a brand:

Brand-Scoped Operations
TypeScript
import { Threeu } from "threeu-sdk";

const threeu = new Threeu(process.env.THREEU_SECRET_KEY!);
const brand = await threeu.brand("my-store");

await brand.products.create({
  name: "Black Abaya",
  price: 350,
  currency: "QAR"
});

const orders = await brand.orders.list();

Brand Resources

ResourceMethods
brand.productscreate(), list(), get(), update(), delete()
brand.orderslist(), get(), update()
brand.customerslist(), get(), create(), update()
brand.inventoryadjust(), get(), list()
brand.collectionslist(), get(), create(), update()
brand.discountslist(), create(), update(), delete()
brand.paymentslist(), get()
brand.shippinggetRates(), createShipment()
brand.locationslist(), get()
brand.possession()
brand.analyticssummary(), sales(), products()
brand.marketingcampaigns.list(), campaigns.create()
brand.themeget(), update()

Each resource method is a scoped SDK object with full type safety and error handling.