import { ApiHandler } from '../Types/ApiHandler'; /** * @description A middleware that executes before a route handler. Same as `withOcWebhookAuth()` except sends error responses instead of throwing. * @param {Function} routeHandler A function to handle the request and response. * @param {string} hashKey Optional. If not provided, defaults to process.env.OC_WEBHOOK_HASH_KEY. * @returns {Function} A function to handle the request and response. */ export declare function withErrorHandledOcWebhookAuth(routeHandler: ApiHandler, hashKey?: string): ApiHandler; /** * @description A middleware that executes before a route handler. Verifies the request header "x-oc-hash" matches the configured hash key. * @param {Function} routeHandler A function to handle the request and response. * @param {string} hashKey Optional. If not provided, defaults to process.env.OC_WEBHOOK_HASH_KEY. * @returns {Function} A function to handle the request and response. */ export declare function withOcWebhookAuth(routeHandler: ApiHandler, hashKey?: string): ApiHandler; /** * @description Does the request header "x-oc-hash" match the configured hash key? * @param {Function} req The request object, including body and headers. * @param {string} hashKey Optional. If not provided, defaults to process.env.OC_WEBHOOK_HASH_KEY. */ export declare function isOcHashValid(req: any, hashKey?: string): Promise;