import type { Request } from 'express'; import type { hooks } from '@balena/pinejs'; /** * Trigger a prefetch of the api key which is not awaited, stored in `req.prefetchApiKey`, which can be later consumed by `retrieveAPIKey` */ export declare const prefetchAPIKey: (req: (hooks.HookReq & Pick) | Request, tx: Tx | undefined) => void; /** * Ensure `req.apiKey` is set if it should be, using the prefetched apiKey if it exists */ export declare const retrieveAPIKey: (req: (hooks.HookReq & Pick) | Request, tx: Tx | undefined) => Promise;