Skip to content

@ab-ecosystem

Headless SDKs for the AB Ecosystem core.

An SDK house, not a platform you have to live inside. Every package is a typed client over our core — messaging, commerce admin, storefront — with zero runtime dependencies. You build the frontend; we answer the API.

$ npm i @ab-ecosystem/cpaas
Browse 3 packages
Packages
3
Runtime deps
0
Types bundled
100%
Node
18+

3 packages in @ab-ecosystem

View the org on npm →
  • @ab-ecosystem/cpaas

    TypeScript SDK for the AB Ecosystem CPaaS platform: WhatsApp Business API channels, CRM contacts, bulk campaigns, message templates and a realtime live chat inbox.

    • cpaas
    • crm
    • crm-sdk
    • sdk
    • typescript
    • whatsapp
    • whatsapp-business-api
    • whatsapp-cloud-api

    automationsbuilderpublished1.1.0··MIT·844.9 kB unpacked

    Messaging & CRM

    WhatsApp Business API, CRM and campaigns behind one typed client

    $ npm install @ab-ecosystem/cpaas
  • @ab-ecosystem/aistore-admin

    Headless ecommerce admin API SDK for AI Store - a typed TypeScript REST client for products, orders, customers, inventory, shipping, taxes, themes and webhooks, over the SSO /dashboard and api-key /api/dashboard endpoints.

    • ai-store
    • headless-ecommerce
    • headless-commerce
    • ecommerce
    • ecommerce-api
    • ecommerce-sdk
    • admin-api
    • api-client

    automationsbuilderpublished0.1.0··ISC·465.5 kB unpacked

    Headless commerce · admin

    The headless ecommerce admin API, fully typed

    $ npm install @ab-ecosystem/aistore-admin
  • @ab-ecosystem/aistore-storefront

    Headless ecommerce storefront SDK for AI Store - a typed TypeScript REST client for product catalog, cart, checkout, customer accounts, payments, search and theme assets.

    • ai-store
    • headless-ecommerce
    • headless-commerce
    • headless-storefront
    • ecommerce
    • ecommerce-api
    • ecommerce-sdk
    • storefront

    automationsbuilderpublished0.1.0··ISC·262.5 kB unpacked

    Headless commerce · storefront

    Catalog, cart, checkout and search for any frontend

    $ npm install @ab-ecosystem/aistore-storefront

What every package agrees on

The packages cover different products, but they are built to the same six rules — so moving between them costs you nothing.

01

Headless by construction

Every surface is a typed REST or socket client. Nothing renders, nothing assumes a framework, nothing fights your router. Next.js, Nuxt, Astro, React Native or a bot — same client.

02

Zero runtime dependencies

Nothing but the platform fetch. Nothing to audit, nothing to patch, and a pluggable fetch option when you want logging, tracing or retries in one place.

03

Types are the contract

Declarations ship inside each package — no @types to install. Inputs and outputs are exported, so you import a type instead of hand-writing an object literal.

04

Tokens that rotate

Pass a function instead of a string and it resolves before every request. A short-lived SSO token or a rotating gateway token never needs the client rebuilt.

05

Errors you can branch on

Typed error classes separate "the server said no" from "the request never arrived", and carry status, code and body — so you never parse a message string.

06

Docs that travel with the code

Reference pages and JSDoc ship in the tarball. Readable offline, greppable by your editor, and ground truth for a coding agent working in your repo.

Quickstart

Install, construct one client, call a method. Each package has a full reference on its own page.

@ab-ecosystem/cpaas

WhatsApp Business API, CRM and campaigns behind one typed client

$ npm install @ab-ecosystem/cpaas
Full documentation →
import { CrmClient } from '@ab-ecosystem/cpaas';

const crm = new CrmClient({
  gatewayUrl: 'https://api.example.com',
  clientId: 'tpc_xxxxxxxxxxxxxxxx',
  authToken: process.env.CRM_TOKEN!,
  origin: 'https://app.example.com', // required on Node, ignored in browsers
});

// Audience
const contacts = await crm.contacts.list({ search: 'acme', rows: 50 });
const tag = await crm.contactTags.create({ name: 'VIP', color: '#f59e0b' });
await crm.contacts.update(contacts.data[0].id, { tags: [tag.id] });

// Channels
const channels = await crm.channels.list({ type: 'whatsapp', active: true });
const templates = await crm.templates.list(channels.data[0].id, { status: 'approved' });

@ab-ecosystem/aistore-admin

The headless ecommerce admin API, fully typed

$ npm install @ab-ecosystem/aistore-admin
Full documentation →
import { AIStoreAdmin, AIStoreApiError } from "@ab-ecosystem/aistore-admin";

const admin = new AIStoreAdmin({
  baseUrl: "https://api.your-domain.com",
  accessToken: () => getSsoToken(),      // used by client.dashboard.*
  apiKey: process.env.AISTORE_API_KEY,   // used by client.api.*
  timeoutMs: 15_000,
});

// Merchant dashboard (SSO token)
const { data: products, total } = await admin.dashboard.products.fetch({ status: "publish", page: 1, size: 20 });
await admin.dashboard.orders.update({ orderId, order_status: "shipped" });

// Integrations and automations (API key)
const orders = await admin.api.orders.fetch({ page: 1, size: 50 });
await admin.api.products.create({ name: "Mug", price: 299, quantity: 10, image_urls: [url] });

try {
  await admin.dashboard.store.fetch();
} catch (err) {
  if (err instanceof AIStoreApiError) console.error(err.status, err.code, err.message, err.body);
}

@ab-ecosystem/aistore-storefront

Catalog, cart, checkout and search for any frontend

$ npm install @ab-ecosystem/aistore-storefront
Full documentation →
import { AIStoreStorefront, AIStoreApiError } from "@ab-ecosystem/aistore-storefront";

const store = new AIStoreStorefront({
  baseUrl: "https://api.your-domain.com",
  origin: "https://shop.your-domain.com",   // required in Node; browsers set Origin themselves
  accessToken: saved?.access_token,         // optional: restore a customer session
  refreshToken: saved?.refresh_token,
  onTokensChanged: (tokens) => save(tokens),
});

// Catalogue (guest or logged-in; prices follow the customer's segment)
const { data: products } = await store.products.fetch({ status: "publish", page: 1, size: 24 });
const results = await store.search.fuzzy({ q: "blue shirt", limit: 10 });

// Account
await store.customers.login({ phone_no: "919876543210", password: "secret" });
const me = await store.customers.me();

// Cart
await store.cart.batch({
  operations: [{ action: "add", product_id, variant_id, quantity: 2 }],
});
const cart = await store.cart.populate();

// Checkout
const order = await store.orders.create({
  userType: "logged_in",
  personalDetails: { fullname: "Asha", email: "[email protected]", phone: "919876543210" },
  shipping: { address_1: "12 MG Road", city: "Bengaluru", state: "KA", zipCode: "560001", country: "IN" },
  summary: { total: 1298, tax: 0, shipping_charge: 0, currency: "INR" },
  items: [{ product_id, variant_id, quantity: 2, price: 649 }],
  payment: { method: "cod" },
});

For AI coding agents

The reference pages and type declarations ship inside each tarball, so an agent working in your repo has ground truth on disk and does not have to guess a method name.

  • Read the docs in node_modules. The reference under each package is authoritative — read the page for the resource you are touching before writing the call.
  • Then the declarations. The bundled .d.ts files are the second source of truth. Do not invent a method that appears in neither.
  • Never hand-write a URL. Every route is a method, and the client adds the required headers itself.

Stuck on something the docs do not answer? Email [email protected].

Entry points, all three

import { CrmClient } from '@ab-ecosystem/cpaas';        // REST, everything
import { Inbox } from '@ab-ecosystem/cpaas/realtime';   // Socket.IO live chat

import { AIStoreAdmin, AIStoreApiError } from '@ab-ecosystem/aistore-admin';
const { AIStoreAdmin } = require('@ab-ecosystem/aistore-admin'); // CommonJS

import { AIStoreStorefront, AIStoreApiError } from '@ab-ecosystem/aistore-storefront';
const { AIStoreStorefront } = require('@ab-ecosystem/aistore-storefront'); // CommonJS

Each package page lists the invariants that are easy to get wrong.