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:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user