Documentation Index
Fetch the complete documentation index at: https://86d.app/docs/llms.txt
Use this file to discover all available pages before exploring further.
The customers module manages the customer record that backs every authenticated shopper. It exposes account self-service endpoints (profile read and update, change email, change password) and a complete admin CRUD surface for searching, filtering, and editing customer records. It is required by @86d-app/loyalty, @86d-app/saved-addresses, @86d-app/customer-groups, and most engagement modules.
Source: modules/customers · npm: @86d-app/customers
Installation
Then run 86d generate.
Configuration
The customers module accepts no configuration options. Initialize it with no arguments:
import customers from "@86d-app/customers";
import { createModuleClient } from "@86d-app/core";
const client = createModuleClient([customers()]);
Store endpoints
| Method | Path | Description |
|---|
GET | /customers/me | Get the authenticated customer’s profile |
PUT | /customers/me | Update profile (name, phone, marketing opt-in) |
POST | /customers/me/change-email | Request an email change (sends verification) |
POST | /customers/me/change-password | Change the password |
DELETE | /customers/me | Soft-delete the account |
All store endpoints require an authenticated session.
Admin endpoints
| Method | Path | Description |
|---|
GET | /admin/customers | List customers (paginated, filterable by status, tag) |
GET | /admin/customers/search | Full-text search by name, email, or phone |
GET | /admin/customers/:id | Get a customer record |
PUT | /admin/customers/:id | Update fields |
POST | /admin/customers/:id/suspend | Suspend account |
POST | /admin/customers/:id/reactivate | Reactivate account |
DELETE | /admin/customers/:id | Hard-delete (use with care) |
Components
| Component | Purpose |
|---|
<AccountPage /> | Full customer self-service page (profile, addresses, orders, loyalty) |
<CustomerDetails /> | Editable name and contact form |
<EmailChangeForm /> | Inline email-change form with verification |
Types
type CustomerStatus = "active" | "suspended" | "closed";
interface Customer {
id: string;
email: string;
firstName?: string;
lastName?: string;
phone?: string;
status: CustomerStatus;
marketingOptIn: boolean;
tags: string[];
metadata: Record<string, unknown>;
createdAt: Date;
updatedAt: Date;
}