import { G as GenericSaleorWebhook, a as GenericWebhookConfig } from './generic-saleor-webhook-wKiXRuB5.js'; import { P as PlatformAdapterInterface, A as ActionHandlerResult, d as WebhookContext } from './saleor-webhook-De0XK_dM.js'; import { AsyncWebhookEventType, SyncWebhookEventType } from './types.js'; type WebApiHandlerInput = Request; type WebApiHandler = (req: Request) => Response | Promise; /** PlatformAdapter for Web API (Fetch API: Request and Response) * * Platform adapters are used in Actions to handle generic request logic * like getting body, headers, etc. * * Thanks to this Actions logic can be re-used for each platform * @see {PlatformAdapterInterface} * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Response} * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request} * * */ declare class WebApiAdapter implements PlatformAdapterInterface { request: TRequest; ResponseConstructor: { new (...args: any): TResponse; }; constructor(request: TRequest, ResponseConstructor: { new (...args: any): TResponse; }); getHeader(name: string): string | null; getBody(): Promise; getRawBody(): Promise; getBaseUrl(): string; get method(): "POST" | "GET"; send(result: ActionHandlerResult): Promise; } type WebhookConfig = GenericWebhookConfig; /** Function type provided by consumer in `SaleorWebApiWebhook.createHandler` */ type WebApiWebhookHandler = (req: TRequest, ctx: WebhookContext) => TResponse | Promise; declare abstract class SaleorWebApiWebhook extends GenericSaleorWebhook { createHandler(handlerFn: WebApiWebhookHandler): WebApiHandler; } export { SaleorWebApiWebhook as S, type WebApiHandlerInput as W, type WebApiHandler as a, type WebhookConfig as b, type WebApiWebhookHandler as c, WebApiAdapter as d };