feat(mall): address book wave 7 frontend, contract, and archive

Live addresses domain for the mall: shared contract (AddressBookEntry +
five client methods), mock adapter state v3, live domain pick, addresses
page CRUD, checkout saved-address picker with manual fallback, demo seed,
and the archived change plus address-book capability spec.
This commit is contained in:
Chengdong Zhang
2026-09-18 16:00:05 +08:00
parent 5e866d08f4
commit c51e96ae41
17 changed files with 467 additions and 88 deletions
+10 -1
View File
@@ -17,7 +17,8 @@ type LiveDomain =
| "cart"
| "orders"
| "shipments"
| "invoices";
| "invoices"
| "addresses";
/**
* Explicit per-domain method picks rather than a string allowlist: indexing
@@ -56,6 +57,13 @@ const LIVE_PICKS = {
requestInvoice: a.requestInvoice,
listMyInvoices: a.listMyInvoices,
}),
addresses: (a: ApiClient) => ({
listMyAddresses: a.listMyAddresses,
createAddress: a.createAddress,
updateAddress: a.updateAddress,
deleteAddress: a.deleteAddress,
setDefaultAddress: a.setDefaultAddress,
}),
} satisfies Record<LiveDomain, (a: ApiClient) => Partial<ApiClient>>;
const KNOWN_DOMAINS = Object.keys(LIVE_PICKS) as LiveDomain[];
@@ -72,6 +80,7 @@ const DEFAULT_LIVE_DOMAINS: LiveDomain[] = [
"orders",
"shipments",
"invoices",
"addresses",
];
export default defineNuxtPlugin(() => {