import { D as DataTransformerOptions } from './transformer-BrEsAU6i.cjs'; import { Elysia } from 'elysia'; /** * Generic type for an Elysia plugin function. * * Plugins take an Elysia instance and return the same instance (or a modified version) * with additional functionality. The generic parameter preserves the exact type including * decorators, store, derive, and resolve additions. * * @template T - The type of Elysia instance, defaults to base Elysia */ type GenericElysiaPlugin = (app: T) => T; /** * Individual request data that can be extracted from a {@link Request} that contains * information about multiple requests. */ type BatchedRequestData = { /** * The path for this request. */ path: string; /** * The HTTP method for this request. */ method?: string; /** * The body of the request. It may either be JSON or FormData. */ body?: any; /** * The type of the body. */ body_type?: 'formdata' | 'json'; /** * All headers specifically for the request. */ headers?: Headers; /** * Any query parameters for the request. */ query?: URLSearchParams; }; type BatchPluginOptions = { endpoint?: string; }; /** * This may result in a TS error if you have "declaration": true in your tsconfig. * TS 4118 The type of this node cannot be serialized because its property '[EdenQueryStoreKey]' cannot be serialized. */ declare function safeBatchPlugin(options?: BatchPluginOptions): (elysia: Elysia) => Elysia; derive: {}; resolve: {}; }>; declare function batchPlugin(options?: BatchPluginOptions): GenericElysiaPlugin; /** * Custom key for storing metadata for this library in an Elysia.js store. */ declare const EdenQueryStoreKey: unique symbol; /** * Constraints that are stored on an Elysia.js application that can be read by the client. * * Plugins will mutate the store at the {@link EdenQueryStoreKey} key. * * e.g. The batch plugin will set store[EdenQueryStoreKey].batch = true on the type-level. */ type EdenQueryConstraints = { /** * Whether the application uses a transformer. */ transformer?: DataTransformerOptions; /** * Whether the application has applied the batch plugin. * * @fixme * This file, "constraints", is a general file, but it's importing {@link BatchPluginOptions} * from a specific implementation file... */ batch?: boolean | BatchPluginOptions; }; export { type BatchPluginOptions as B, EdenQueryStoreKey as E, type GenericElysiaPlugin as G, type EdenQueryConstraints as a, type BatchedRequestData as b, batchPlugin as c, safeBatchPlugin as s };