import type { Lookup, AddressRules, NamedRecord, PasswordCheck, StoredAddress, StoredCustomer, StoredMetafield, StoredAttribute, StoredCategory, StoredProduct, StoredRedirect, StoredVariantGroup, StoreFixture } from '../services/ports/lookup.js'; import type { ImportEntity } from '../services/types.js'; /** A product in the memory store: what `StoredProduct` is built from. */ export interface MemoryProduct { id: number; uuid: string; sku: string; urlKey: string; status: 0 | 1; attributeGroupId: number; packageId: number | null; noShippingRequired: boolean; categoryUrlKey: string | null; variantGroupId: number | null; /** Attribute code → the option texts (a list for a multiselect) or the text. */ values: Record; metaData: Record>; } /** A customer in the memory store: what `StoredCustomer` is built from. */ export interface MemoryCustomer { id: number; uuid: string; email: string; name: string; status: 0 | 1; groupId: number | null; metaData: Record>; } /** An address in the memory store. */ export interface MemoryAddress { id: number; uuid: string; customerId: number; /** The 14 shared columns, `''` where empty. */ fields: Record; extra: Record | null; isDefault: boolean; } interface MemoryAttribute extends StoredAttribute { /** option id → text */ options: Map; } /** * TEST-ONLY. A `Lookup` over a store described as data (`StoreFixture`). It * records what it was asked, so a test can check that the questions are batched. */ export declare class MemoryLookup implements Lookup { /** Every call of `categories`, with the keys it was given. */ readonly categoryCalls: string[][]; /** How many times each question was asked (batching: not once per row). */ readonly calls: Record; /** * The categories of the store by `url_key`. `MemoryServices` writes here, so a * category it creates is found by the next question. */ readonly stored: Map; /** The products by SKU. `MemoryServices` writes here. */ readonly products_: Map; readonly attributeGroups_: Array<{ id: number; name: string; attributes: Set; }>; readonly packages_: Array; readonly taxClasses_: NamedRecord[]; readonly attributes_: MemoryAttribute[]; readonly variantGroups_: Map; /** The customers by id. `MemoryServices` writes here. */ readonly customers_: Map; readonly customerGroups_: NamedRecord[]; /** The addresses of the customers. `MemoryServices` writes here. */ readonly addresses_: MemoryAddress[]; private readonly addressSellTo; private readonly addressNameFormat; /** The ids of the extra address fields, by country (those a store registered). */ readonly addressExtras_: Record; /** The shortest password the store accepts. */ passwordMinLength: number; readonly redirects_: Map; readonly rewrites_: Set; private readonly reserved; private readonly definitions; private readonly fields; private nextOptionId; constructor(fixture?: StoreFixture); private groupId; private count; categories(urlKeys: readonly string[]): Promise>; reservedUrlKeys(): Promise>; metafieldKeys(entity: ImportEntity): Promise>; metafields(entity: ImportEntity): Promise>; customers(emails: readonly string[]): Promise>; customerGroups(names: readonly string[]): Promise>; addressRules(): Promise; customerAddresses(customerIds: readonly number[]): Promise>; passwordCheck(): Promise; products(skus: readonly string[]): Promise>; private toStored; productUrlKeyOwners(urlKeys: readonly string[]): Promise>; private named; attributeGroups(names: readonly string[]): Promise>; packages(names: readonly string[]): Promise>; taxClasses(names: readonly string[]): Promise>; defaultPackage(): Promise; attributeCodes(): Promise; attributes(codes: readonly string[]): Promise>; attributeGroupLinks(groupId: number): Promise<{ linked: ReadonlySet; required: StoredAttribute[]; }>; attributeOptions(attributeId: number, texts: readonly string[]): Promise>; /** The text of an option by its id (the memory services write ids). */ optionText(id: number): string | null; /** The id of an option of an attribute by its text, for a test or a service. */ optionId(code: string, text: string): number | null; variantGroups(ids: readonly number[]): Promise>; redirects(paths: readonly string[]): Promise>; rewritePaths(paths: readonly string[]): Promise>; } export {};