import type { AddressWrite, CategoryWrite, CustomerWrite, EntityServices, ProductWrite } from '../services/ports/services.js'; export interface RecordedCall { method: 'createCategory' | 'updateCategory' | 'createProduct' | 'updateProduct' | 'createVariantGroup' | 'addVariantItem' | 'recordRedirects' | 'createCustomer' | 'updateCustomer' | 'setCustomerMetafields' | 'createCustomerAddress'; /** The uuid of an update, or of the product of a join or of redirects. */ uuid?: string; /** What the call was given (the fields of whichever write it is). */ input: Record; } /** * TEST-ONLY (ยง 4.5, point 2). Wraps another `EntityServices`, records every call * (also the ones that fail) and can make a call fail: `failOn(match, error)`. */ export declare class RecordingServices implements EntityServices { private readonly inner; readonly calls: RecordedCall[]; private readonly failures; constructor(inner: EntityServices); /** * Makes the calls that `match` throw `error`, `times` times (always by * default). A call that is let through is passed on. */ failOn(match: (call: RecordedCall) => boolean, error: Error | (() => Error), times?: number): this; /** Forgets every failure that was asked for: the cause was fixed. */ clearFailures(): void; private check; createCategory(input: CategoryWrite): Promise<{ id: number; uuid: string; }>; updateCategory(uuid: string, input: CategoryWrite): Promise; createProduct(input: ProductWrite): Promise<{ id: number; uuid: string; }>; updateProduct(uuid: string, input: ProductWrite): Promise; createVariantGroup(input: { attributeGroupId: number; axisCodes: string[]; }): Promise<{ id: number; uuid: string; }>; addVariantItem(groupUuid: string, productUuid: string): Promise; createCustomerAddress(customerUuid: string, input: AddressWrite): Promise<{ id: number; uuid: string; }>; createCustomer(input: CustomerWrite): Promise<{ id: number; uuid: string; }>; updateCustomer(uuid: string, input: CustomerWrite): Promise; setCustomerMetafields(customerId: number, values: Record>): Promise; recordRedirects(productUuid: string, fromPaths: string[]): Promise; }