//#region src/proxy/types.d.ts interface RariURL { href: string; origin: string; protocol: string; hostname: string; port: string; pathname: string; search: string; searchParams: URLSearchParams; hash: string; } interface RequestCookies { get: (name: string) => { name: string; value: string; path?: string; } | undefined; getAll: () => Array<{ name: string; value: string; path?: string; }>; has: (name: string) => boolean; delete: (name: string) => void; set: ((name: string, value: string, options?: CookieOptions) => void) & ((options: { name: string; value: string; } & CookieOptions) => void); } interface ResponseCookies { get: (name: string) => { name: string; value: string; path?: string; } | undefined; getAll: () => Array<{ name: string; value: string; path?: string; }>; set: ((name: string, value: string, options?: CookieOptions) => void) & ((options: { name: string; value: string; } & CookieOptions) => void); delete: (name: string) => void; } interface CookieOptions { path?: string; domain?: string; maxAge?: number; expires?: Date; httpOnly?: boolean; secure?: boolean; sameSite?: 'strict' | 'lax' | 'none'; } interface RariFetchEvent { waitUntil: (promise: Promise) => void; } type ProxyFunction = (request: any, event?: RariFetchEvent) => Promise | any; interface ProxyCondition { type: 'header' | 'query' | 'cookie'; key: string; value?: string; } type ProxyRuleCondition = ProxyCondition | { type: 'host'; key: string; value?: string; }; interface ProxyMatcher { source: string; locale?: boolean; has?: Array; missing?: Array; } interface ProxyConfig { matcher?: string | string[] | ProxyMatcher | ProxyMatcher[]; } interface ProxyModule { proxy?: ProxyFunction; default?: ProxyFunction; config?: ProxyConfig; } interface ProxyResult { continue: boolean; response?: Response; requestHeaders?: Record; responseHeaders?: Record; rewrite?: string; redirect?: { destination: string; permanent: boolean; }; } //#endregion export { ProxyModule as a, RariURL as c, ProxyMatcher as i, RequestCookies as l, ProxyConfig as n, ProxyResult as o, ProxyFunction as r, RariFetchEvent as s, CookieOptions as t, ResponseCookies as u };