import { G as GenericCreateAppRegisterHandlerOptions } from '../../saleor-webhook-De0XK_dM.js'; import { NextRequest } from 'next/server.js'; import { d as WebApiAdapter, c as WebApiWebhookHandler } from '../../saleor-webhook-B8fq5KbJ.js'; import { C as CreateManifestHandlerOptions$1, P as ProtectedHandlerContext, G as GenericSaleorWebhook, a as GenericWebhookConfig } from '../../generic-saleor-webhook-wKiXRuB5.js'; import { APL } from '../../APL/index.js'; import { Permission, AsyncWebhookEventType, SyncWebhookEventType } from '../../types.js'; import '../../saleor-app.js'; import 'graphql'; import '../../verify-signature-mKf0fpOE.js'; type NextAppRouterHandlerInput = NextRequest; type NextAppRouterHandler = (req: NextRequest) => Response | Promise; declare class NextAppRouterAdapter extends WebApiAdapter { request: NextRequest; constructor(request: NextRequest); } type CreateAppRegisterHandlerOptions = GenericCreateAppRegisterHandlerOptions; declare const createAppRegisterHandler: (config: CreateAppRegisterHandlerOptions) => NextAppRouterHandler; type CreateManifestHandlerOptions = CreateManifestHandlerOptions$1; /** Returns app manifest API route handler for Web API compatible request handlers * (examples: Next.js app router, hono, deno, etc.) * that use signature: (req: Request) => Response * where Request and Response are Fetch API objects * * App manifest is an endpoint that Saleor will call your App metadata. * It has the App's name and description, as well as all the necessary information to * register webhooks, permissions, and extensions. * * **Recommended path**: `/api/manifest` * * To learn more check Saleor docs * @see {@link https://docs.saleor.io/developer/extending/apps/architecture/app-requirements#manifest-url} * * @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 const createManifestHandler: (config: CreateManifestHandlerOptions) => NextAppRouterHandler; type NextAppRouterProtectedHandler = (request: NextRequest, ctx: ProtectedHandlerContext) => Response | Promise; declare const createProtectedHandler: (handlerFn: NextAppRouterProtectedHandler, apl: APL, requiredPermissions?: Permission[]) => NextAppRouterHandler; type WebhookConfig = GenericWebhookConfig; type NextAppRouterWebhookHandler = WebApiWebhookHandler; declare abstract class SaleorNextAppRouterWebhook extends GenericSaleorWebhook { createHandler(handlerFn: NextAppRouterWebhookHandler): NextAppRouterHandler; } declare class SaleorAsyncWebhook extends SaleorNextAppRouterWebhook { readonly event: AsyncWebhookEventType; protected readonly eventType: "async"; constructor(configuration: WebhookConfig); createHandler(handlerFn: NextAppRouterWebhookHandler): NextAppRouterHandler; } type NextAppRouterSyncWebhookHandler = NextAppRouterWebhookHandler; declare class SaleorSyncWebhook extends SaleorNextAppRouterWebhook { readonly event: TEvent; protected readonly eventType: "sync"; constructor(configuration: WebhookConfig); createHandler(handlerFn: NextAppRouterSyncWebhookHandler): NextAppRouterHandler; } export { type CreateAppRegisterHandlerOptions, type CreateManifestHandlerOptions, NextAppRouterAdapter, type NextAppRouterHandler, type NextAppRouterHandlerInput, type NextAppRouterProtectedHandler, type NextAppRouterSyncWebhookHandler, type NextAppRouterWebhookHandler, SaleorAsyncWebhook, SaleorSyncWebhook, createAppRegisterHandler, createManifestHandler, createProtectedHandler };