import type { LoggerInterface } from "@vue-storefront/logger"; import type { AlokaiLocal } from "../types"; type Metadata = { alokai: AlokaiLocal["metadata"] & Record; }; type DeepPartial = T extends object ? { [P in keyof T]?: DeepPartial; } : T; /** * Wraps provided logger in guard function to prevent overwriting "alokai" key in metadata object. * It's private function of the package that cannot be exported. */ export declare function lockLogger(logger: LoggerInterface): LoggerInterface; /** * Returns version of logger without guard. * It's private function of the package that cannot be exported. */ export declare function unlockLogger(logger: LoggerInterface): any; /** * Function wrapping passed logger with additional metadata. So when log function is called * then metadata will be available without explicitly passing it. * * It solves a problem of having access to metadata in different moment than log function * is called. * * @remarks Multiple wrapping is supported. Use metadata parameter in passed getter to decide * which fields should be overwritten. */ export declare function injectMetadata(logger: LoggerInterface, metadataGetter: (metadata: Metadata) => DeepPartial): LoggerInterface; export {}; //# sourceMappingURL=injectMetadata.d.ts.map