import type { NamedRecord, PasswordCheck, StoredCustomer, StoredMetafield } from '../../ports/lookup.js'; import type { ConvertedRow, EntityValidator } from '../definition.js'; /** What a customer row says, typed. A blank cell is left out: "not provided". */ export interface CustomerData { /** As written (trimmed): its letter case is kept, the key is lower case. */ email?: string; full_name?: string; status?: 0 | 1; /** The name of the customer group, as written. */ group?: string; /** Not trimmed: a space is a character of a password. */ password?: string; /** As written; judged at create only (CUS-06, CUS-09). */ password_hash?: string; /** `namespace.key` → the cell. */ metafields?: Record; } export type CustomerRow = ConvertedRow; /** The reserved keys of the template's example rows (§ 5, ALL-18). */ export declare const CUSTOMER_EXAMPLE_KEYS: readonly string[]; /** What the errors download writes for a password, so as not to echo a secret (§ 5.4.1). */ export declare const HIDDEN_PASSWORD = "(hidden)"; /** The columns of a customers file (not the `metafield:` ones), in the order of the template. */ export declare const CUSTOMER_COLUMNS: readonly string[]; /** Everything that is remembered across the rows of a customer file. */ export interface CustomerState { /** The e-mail in lower case → the row where it first appears. */ firstRow: Map; /** The e-mail in lower case → the customers of the store (none: not stored). */ stored: Map; /** The group name in lower case → the groups of that name. */ groups: Map; passwordCheck: PasswordCheck | null; /** The custom-field definitions of customers, asked once (§ 5.9). */ metafields: ReadonlyMap | null; } export declare const customerValidator: EntityValidator;