import { AuthenticateRequestOptions, SignedInAuthObject, SignedOutAuthObject } from '@clerk/backend/internal'; import { ClerkClient } from '@clerk/backend'; export { AllowlistIdentifier, Client, EmailAddress, ExternalAccount, Invitation, OauthAccessToken, Organization, OrganizationDomain, OrganizationInvitation, OrganizationMembership, OrganizationMembershipPublicUserData, OrganizationMembershipRole, PhoneNumber, SMSMessage, Session, SignInToken, Token, User, WebhookEvent, WebhookEventType, createClerkClient, verifyToken } from '@clerk/backend'; import { d as AuthFn, a as AstroMiddlewareContextParam, b as AstroMiddlewareNextParam, c as AstroMiddlewareReturn, A as AstroMiddleware } from '../types-BP9MNEP9.js'; import { PathMatcherParam } from '@clerk/shared/pathMatcher'; import { APIContext } from 'astro'; type ClerkAstroMiddlewareHandler = (auth: AuthFn, context: AstroMiddlewareContextParam, next: AstroMiddlewareNextParam) => AstroMiddlewareReturn | undefined; type ClerkAstroMiddlewareOptions = AuthenticateRequestOptions; /** * Middleware for Astro that handles authentication and authorization with Clerk. */ interface ClerkMiddleware { /** * @example * export default clerkMiddleware((auth, context, next) => { ... }, options); */ (handler: ClerkAstroMiddlewareHandler, options?: ClerkAstroMiddlewareOptions): AstroMiddleware; /** * @example * export default clerkMiddleware(options); */ (options?: ClerkAstroMiddlewareOptions): AstroMiddleware; } declare const clerkMiddleware: ClerkMiddleware; type RouteMatcherParam = PathMatcherParam; /** * Returns a function that accepts a `Request` object and returns whether the request matches the list of * predefined routes that can be passed in as the first argument. * * You can use glob patterns to match multiple routes or a function to match against the request object. * Path patterns and regular expressions are supported, for example: `['/foo', '/bar(.*)'] or `[/^\/foo\/.*$/]` * For more information, see: https://clerk.com/docs */ declare const createRouteMatcher: (routes: RouteMatcherParam) => (req: Request) => boolean; declare const clerkClient: (context: APIContext) => ClerkClient; /** * @deprecated Use `AuthObject` instead. This type only supports session auth. * `context.locals.auth()` can now return an `AuthObject` with session and machine auth support. */ type GetAuthReturn = SignedInAuthObject | SignedOutAuthObject; export { AuthFn, type GetAuthReturn, clerkClient, clerkMiddleware, createRouteMatcher };