// Generated by dts-bundle-generator v9.5.1

import { User } from 'better-auth';
import { z } from 'zod';

declare const appInvitationSchema: z.ZodObject<{
	id: z.ZodDefault<z.ZodString>;
	name: z.ZodOptional<z.ZodString>;
	email: z.ZodOptional<z.ZodString>;
	status: z.ZodDefault<z.ZodEnum<[
		"pending",
		"accepted",
		"rejected",
		"canceled"
	]>>;
	/**
	 * The id of the user who invited the user.
	 */
	inviterId: z.ZodString;
	expiresAt: z.ZodDate;
	domainWhitelist: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
	id: string;
	status: "pending" | "accepted" | "rejected" | "canceled";
	inviterId: string;
	expiresAt: Date;
	name?: string | undefined;
	email?: string | undefined;
	domainWhitelist?: string | undefined;
}, {
	inviterId: string;
	expiresAt: Date;
	id?: string | undefined;
	name?: string | undefined;
	email?: string | undefined;
	status?: "pending" | "accepted" | "rejected" | "canceled" | undefined;
	domainWhitelist?: string | undefined;
}>;
export type AppInvitation = z.infer<typeof appInvitationSchema>;
export interface AppInviteOptions {
	/**
	 * Define whether a user is allowed to send invitations.
	 *
	 * You can also pass a function that returns a boolean.
	 *
	 * 	@example
	 * ```ts
	 * allowUserToCreateInvitation: async (user) => {
	 * 		const canInvite: boolean = await hasPermission(user, 'send-invitation');
	 *      return canInvite;
	 * }
	 * ```
	 * @default true
	 */
	allowUserToCreateInvitation?: boolean | ((user: User, type: "personal" | "public") => Promise<boolean> | boolean);
	/**
	 * Define whether a user is allowed to cancel invitations.
	 *
	 * By default users can only cancel invitations issued by themself.
	 */
	allowUserToCancelInvitation?: (data: {
		user: User;
		invitation: AppInvitation;
	}) => Promise<boolean> | boolean;
	/**
	 * The expiration time for the invitation link.
	 *
	 * @default 48 hours
	 */
	invitationExpiresIn?: number;
	/**
	 * Send an email with the
	 * invitation link to the user.
	 */
	sendInvitationEmail?: (data: {
		/**
		 * the invitation id
		 */
		id: string;
		/**
		 * the name of the user
		 */
		name?: string;
		/**
		 * the email of the user
		 */
		email: string;
		/**
		 * the member who is inviting the user
		 */
		inviter: User;
	}, request?: Request) => Promise<void>;
	/**
	 * The schema for the app-invite plugin.
	 */
	schema?: {
		appInvitation?: {
			modelName?: string;
			fields?: {
				[key in keyof Omit<AppInvitation, "id">]?: string;
			};
		};
	};
	/**
	 * Automatically sign in the user after sign up
	 */
	autoSignIn?: boolean;
	/**
	 * Rate limit configuration.
	 *
	 * @default {
	 *  window: 60,
	 *  max: 5,
	 * }
	 */
	rateLimit?: {
		window: number;
		max: number;
	};
	$Infer?: {
		/**
		 * Infer additional fields for the user
		 */
		AdditionalFields?: Record<string, any>;
	};
}
/**
 * App Invite plugin for Better Auth. This plugin allows you to invite other users the the app.
 *
 * @example
 * ```ts
 * const auth createAuth({
 *  plugins: [
 *      appInvite({
 *          sendInvitationEmail: async (data) => {
 *              // ...
 *          }
 *      })
 *  ]
 * })
 * ```
 */
export declare const appInvite: <O extends AppInviteOptions>(opts?: O) => {
	id: "app-invite";
	endpoints: {
		createAppInvitation: {
			<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
				body: {
					name?: string | undefined;
					email?: string | undefined;
					domainWhitelist?: string | undefined;
					resend?: boolean | undefined;
				};
			} & {
				method?: "POST" | undefined;
			} & {
				query?: Record<string, any> | undefined;
			} & {
				params?: Record<string, any>;
			} & {
				request?: Request;
			} & {
				headers?: HeadersInit;
			} & {
				asResponse?: boolean;
				returnHeaders?: boolean;
				use?: import("better-call").Middleware[];
				path?: string;
			} & {
				asResponse?: AsResponse | undefined;
				returnHeaders?: ReturnHeaders | undefined;
			}): Promise<[
				AsResponse
			] extends [
				true
			] ? Response : [
				ReturnHeaders
			] extends [
				true
			] ? {
				headers: Headers;
				response: {
					id: string;
					status: "pending" | "accepted" | "rejected" | "canceled";
					inviterId: string;
					expiresAt: Date;
					name?: string | undefined;
					email?: string | undefined;
					domainWhitelist?: string | undefined;
				};
			} : {
				id: string;
				status: "pending" | "accepted" | "rejected" | "canceled";
				inviterId: string;
				expiresAt: Date;
				name?: string | undefined;
				email?: string | undefined;
				domainWhitelist?: string | undefined;
			}>;
			options: {
				method: "POST";
				use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
					session: {
						session: Record<string, any> & {
							id: string;
							createdAt: Date;
							updatedAt: Date;
							userId: string;
							expiresAt: Date;
							token: string;
							ipAddress?: string | null | undefined;
							userAgent?: string | null | undefined;
						};
						user: Record<string, any> & {
							id: string;
							name: string;
							email: string;
							emailVerified: boolean;
							createdAt: Date;
							updatedAt: Date;
							image?: string | null | undefined;
						};
					};
				}>)[];
				body: z.ZodObject<{
					name: z.ZodOptional<z.ZodString>;
					email: z.ZodOptional<z.ZodString>;
					resend: z.ZodOptional<z.ZodBoolean>;
					domainWhitelist: z.ZodOptional<z.ZodString>;
				}, "strip", z.ZodTypeAny, {
					name?: string | undefined;
					email?: string | undefined;
					domainWhitelist?: string | undefined;
					resend?: boolean | undefined;
				}, {
					name?: string | undefined;
					email?: string | undefined;
					domainWhitelist?: string | undefined;
					resend?: boolean | undefined;
				}>;
				metadata: {
					openapi: {
						operationId: string;
						description: string;
						responses: {
							"200": {
								description: string;
								content: {
									"application/json": {
										schema: {
											$ref: string;
										};
									};
								};
							};
						};
					};
				};
			} & {
				use: any[];
			};
			path: "/invite-user";
		};
		getAppInvitation: {
			<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
				body?: undefined;
			} & {
				method?: "GET" | undefined;
			} & {
				query: {
					id: string;
				};
			} & {
				params?: Record<string, any>;
			} & {
				request?: Request;
			} & {
				headers?: HeadersInit;
			} & {
				asResponse?: boolean;
				returnHeaders?: boolean;
				use?: import("better-call").Middleware[];
				path?: string;
			} & {
				asResponse?: AsResponse | undefined;
				returnHeaders?: ReturnHeaders | undefined;
			}): Promise<[
				AsResponse
			] extends [
				true
			] ? Response : [
				ReturnHeaders
			] extends [
				true
			] ? {
				headers: Headers;
				response: {
					inviterEmail: string;
					id: string;
					status: "pending" | "accepted" | "rejected" | "canceled";
					inviterId: string;
					expiresAt: Date;
					name?: string | undefined;
					email?: string | undefined;
					domainWhitelist?: string | undefined;
				};
			} : {
				inviterEmail: string;
				id: string;
				status: "pending" | "accepted" | "rejected" | "canceled";
				inviterId: string;
				expiresAt: Date;
				name?: string | undefined;
				email?: string | undefined;
				domainWhitelist?: string | undefined;
			}>;
			options: {
				method: "GET";
				query: z.ZodObject<{
					id: z.ZodString;
				}, "strip", z.ZodTypeAny, {
					id: string;
				}, {
					id: string;
				}>;
				metadata: {
					openapi: {
						operationId: string;
						description: string;
						responses: {
							"200": {
								description: string;
								content: {
									"application/json": {
										schema: {
											$ref: string;
											type: "object";
											properties: {
												id: {
													type: string;
												};
												name: {
													type: string;
												};
												email: {
													type: string;
												};
												inviterId: {
													type: string;
												};
												status: {
													type: string;
												};
												expiresAt: {
													type: string;
												};
												inviterEmail: {
													type: string;
												};
											};
											required: string[];
										};
									};
								};
							};
						};
					};
				};
			} & {
				use: any[];
			};
			path: "/get-app-invitation";
		};
		acceptAppInvitation: {
			<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(...inputCtx: import("better-call").HasRequiredKeys<import("better-call").InputContext<"/accept-invitation", {
				method: "POST";
				query: z.ZodOptional<z.ZodObject<{
					callbackURL: z.ZodOptional<z.ZodString>;
				}, "strip", z.ZodTypeAny, {
					callbackURL?: string | undefined;
				}, {
					callbackURL?: string | undefined;
				}>>;
				use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
				body: z.ZodIntersection<z.ZodObject<{
					invitationId: z.ZodString;
				}, "strip", z.ZodTypeAny, {
					invitationId: string;
				}, {
					invitationId: string;
				}>, z.ZodRecord<z.ZodString, z.ZodAny>>;
				metadata: {
					$Infer: {
						body: {
							invitationId: string;
							name?: string;
							email?: string;
							password: string;
						} & (O["$Infer"] extends {
							AdditionalFields: Record<string, any>;
						} ? O["$Infer"]["AdditionalFields"] : {});
					};
					openapi: {
						operationId: string;
						description: string;
						requestBody: {
							content: {
								"application/json": {
									schema: {
										type: "object";
										properties: {
											name: {
												type: string;
												description: string;
											};
											email: {
												type: string;
												description: string;
											};
											password: {
												type: string;
												description: string;
											};
										};
										required: string[];
									};
								};
							};
						};
						responses: {
							"200": {
								description: string;
								content: {
									"application/json": {
										schema: {
											type: "object";
											properties: {
												token: {
													type: string;
												};
												invitation: {
													type: string;
												};
												user: {
													type: string;
												};
											};
										};
									};
								};
							};
						};
					};
				};
			} & {
				use: any[];
			}>> extends true ? [
				import("better-call").InferBodyInput<{
					method: "POST";
					query: z.ZodOptional<z.ZodObject<{
						callbackURL: z.ZodOptional<z.ZodString>;
					}, "strip", z.ZodTypeAny, {
						callbackURL?: string | undefined;
					}, {
						callbackURL?: string | undefined;
					}>>;
					use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
					body: z.ZodIntersection<z.ZodObject<{
						invitationId: z.ZodString;
					}, "strip", z.ZodTypeAny, {
						invitationId: string;
					}, {
						invitationId: string;
					}>, z.ZodRecord<z.ZodString, z.ZodAny>>;
					metadata: {
						$Infer: {
							body: {
								invitationId: string;
								name?: string;
								email?: string;
								password: string;
							} & (O["$Infer"] extends {
								AdditionalFields: Record<string, any>;
							} ? O["$Infer"]["AdditionalFields"] : {});
						};
						openapi: {
							operationId: string;
							description: string;
							requestBody: {
								content: {
									"application/json": {
										schema: {
											type: "object";
											properties: {
												name: {
													type: string;
													description: string;
												};
												email: {
													type: string;
													description: string;
												};
												password: {
													type: string;
													description: string;
												};
											};
											required: string[];
										};
									};
								};
							};
							responses: {
								"200": {
									description: string;
									content: {
										"application/json": {
											schema: {
												type: "object";
												properties: {
													token: {
														type: string;
													};
													invitation: {
														type: string;
													};
													user: {
														type: string;
													};
												};
											};
										};
									};
								};
							};
						};
					};
				} & {
					use: any[];
				}, {
					invitationId: string;
					name?: string;
					email?: string;
					password: string;
				} & (O["$Infer"] extends {
					AdditionalFields: Record<string, any>;
				} ? O["$Infer"]["AdditionalFields"] : {})> & {
					method?: "POST" | undefined;
				} & {
					query?: {
						callbackURL?: string | undefined;
					} | undefined;
				} & {
					params?: Record<string, any>;
				} & {
					request?: Request;
				} & {
					headers?: HeadersInit;
				} & {
					asResponse?: boolean;
					returnHeaders?: boolean;
					use?: import("better-call").Middleware[];
					path?: string;
				} & {
					asResponse?: AsResponse | undefined;
					returnHeaders?: ReturnHeaders | undefined;
				}
			] : [
				((import("better-call").InferBodyInput<{
					method: "POST";
					query: z.ZodOptional<z.ZodObject<{
						callbackURL: z.ZodOptional<z.ZodString>;
					}, "strip", z.ZodTypeAny, {
						callbackURL?: string | undefined;
					}, {
						callbackURL?: string | undefined;
					}>>;
					use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
					body: z.ZodIntersection<z.ZodObject<{
						invitationId: z.ZodString;
					}, "strip", z.ZodTypeAny, {
						invitationId: string;
					}, {
						invitationId: string;
					}>, z.ZodRecord<z.ZodString, z.ZodAny>>;
					metadata: {
						$Infer: {
							body: {
								invitationId: string;
								name?: string;
								email?: string;
								password: string;
							} & (O["$Infer"] extends {
								AdditionalFields: Record<string, any>;
							} ? O["$Infer"]["AdditionalFields"] : {});
						};
						openapi: {
							operationId: string;
							description: string;
							requestBody: {
								content: {
									"application/json": {
										schema: {
											type: "object";
											properties: {
												name: {
													type: string;
													description: string;
												};
												email: {
													type: string;
													description: string;
												};
												password: {
													type: string;
													description: string;
												};
											};
											required: string[];
										};
									};
								};
							};
							responses: {
								"200": {
									description: string;
									content: {
										"application/json": {
											schema: {
												type: "object";
												properties: {
													token: {
														type: string;
													};
													invitation: {
														type: string;
													};
													user: {
														type: string;
													};
												};
											};
										};
									};
								};
							};
						};
					};
				} & {
					use: any[];
				}, {
					invitationId: string;
					name?: string;
					email?: string;
					password: string;
				} & (O["$Infer"] extends {
					AdditionalFields: Record<string, any>;
				} ? O["$Infer"]["AdditionalFields"] : {})> & {
					method?: "POST" | undefined;
				} & {
					query?: {
						callbackURL?: string | undefined;
					} | undefined;
				} & {
					params?: Record<string, any>;
				} & {
					request?: Request;
				} & {
					headers?: HeadersInit;
				} & {
					asResponse?: boolean;
					returnHeaders?: boolean;
					use?: import("better-call").Middleware[];
					path?: string;
				} & {
					asResponse?: AsResponse | undefined;
					returnHeaders?: ReturnHeaders | undefined;
				}) | undefined)?
			]): Promise<[
				AsResponse
			] extends [
				true
			] ? Response : [
				ReturnHeaders
			] extends [
				true
			] ? {
				headers: Headers;
				response: {
					token: null;
					user: {
						id: string;
						email: string;
						name: string;
						image: string | null | undefined;
						emailVerified: boolean;
						createdAt: Date;
						updatedAt: Date;
					};
					invitation: {
						id: string;
						status: "pending" | "accepted" | "rejected" | "canceled";
						inviterId: string;
						expiresAt: Date;
						name?: string | undefined;
						email?: string | undefined;
						domainWhitelist?: string | undefined;
					} | null;
				} | {
					token: string;
					user: {
						id: string;
						email: string;
						name: string;
						image: string | null | undefined;
						emailVerified: boolean;
						createdAt: Date;
						updatedAt: Date;
					};
					invitation: {
						id: string;
						status: "pending" | "accepted" | "rejected" | "canceled";
						inviterId: string;
						expiresAt: Date;
						name?: string | undefined;
						email?: string | undefined;
						domainWhitelist?: string | undefined;
					} | null;
				};
			} : {
				token: null;
				user: {
					id: string;
					email: string;
					name: string;
					image: string | null | undefined;
					emailVerified: boolean;
					createdAt: Date;
					updatedAt: Date;
				};
				invitation: {
					id: string;
					status: "pending" | "accepted" | "rejected" | "canceled";
					inviterId: string;
					expiresAt: Date;
					name?: string | undefined;
					email?: string | undefined;
					domainWhitelist?: string | undefined;
				} | null;
			} | {
				token: string;
				user: {
					id: string;
					email: string;
					name: string;
					image: string | null | undefined;
					emailVerified: boolean;
					createdAt: Date;
					updatedAt: Date;
				};
				invitation: {
					id: string;
					status: "pending" | "accepted" | "rejected" | "canceled";
					inviterId: string;
					expiresAt: Date;
					name?: string | undefined;
					email?: string | undefined;
					domainWhitelist?: string | undefined;
				} | null;
			}>;
			options: {
				method: "POST";
				query: z.ZodOptional<z.ZodObject<{
					callbackURL: z.ZodOptional<z.ZodString>;
				}, "strip", z.ZodTypeAny, {
					callbackURL?: string | undefined;
				}, {
					callbackURL?: string | undefined;
				}>>;
				use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
				body: z.ZodIntersection<z.ZodObject<{
					invitationId: z.ZodString;
				}, "strip", z.ZodTypeAny, {
					invitationId: string;
				}, {
					invitationId: string;
				}>, z.ZodRecord<z.ZodString, z.ZodAny>>;
				metadata: {
					$Infer: {
						body: {
							invitationId: string;
							name?: string;
							email?: string;
							password: string;
						} & (O["$Infer"] extends {
							AdditionalFields: Record<string, any>;
						} ? O["$Infer"]["AdditionalFields"] : {});
					};
					openapi: {
						operationId: string;
						description: string;
						requestBody: {
							content: {
								"application/json": {
									schema: {
										type: "object";
										properties: {
											name: {
												type: string;
												description: string;
											};
											email: {
												type: string;
												description: string;
											};
											password: {
												type: string;
												description: string;
											};
										};
										required: string[];
									};
								};
							};
						};
						responses: {
							"200": {
								description: string;
								content: {
									"application/json": {
										schema: {
											type: "object";
											properties: {
												token: {
													type: string;
												};
												invitation: {
													type: string;
												};
												user: {
													type: string;
												};
											};
										};
									};
								};
							};
						};
					};
				};
			} & {
				use: any[];
			};
			path: "/accept-invitation";
		};
		rejectAppInvitation: {
			<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
				body: {
					invitationId: string;
				};
			} & {
				method?: "POST" | undefined;
			} & {
				query?: {
					callbackURL?: string | undefined;
				} | undefined;
			} & {
				params?: Record<string, any>;
			} & {
				request?: Request;
			} & {
				headers?: HeadersInit;
			} & {
				asResponse?: boolean;
				returnHeaders?: boolean;
				use?: import("better-call").Middleware[];
				path?: string;
			} & {
				asResponse?: AsResponse | undefined;
				returnHeaders?: ReturnHeaders | undefined;
			}): Promise<[
				AsResponse
			] extends [
				true
			] ? Response : [
				ReturnHeaders
			] extends [
				true
			] ? {
				headers: Headers;
				response: {
					token: null;
					invitation: {
						id: string;
						status: "pending" | "accepted" | "rejected" | "canceled";
						inviterId: string;
						expiresAt: Date;
						name?: string | undefined;
						email?: string | undefined;
						domainWhitelist?: string | undefined;
					} | null;
					user: null;
				};
			} : {
				token: null;
				invitation: {
					id: string;
					status: "pending" | "accepted" | "rejected" | "canceled";
					inviterId: string;
					expiresAt: Date;
					name?: string | undefined;
					email?: string | undefined;
					domainWhitelist?: string | undefined;
				} | null;
				user: null;
			}>;
			options: {
				method: "POST";
				query: z.ZodOptional<z.ZodObject<{
					callbackURL: z.ZodOptional<z.ZodString>;
				}, "strip", z.ZodTypeAny, {
					callbackURL?: string | undefined;
				}, {
					callbackURL?: string | undefined;
				}>>;
				body: z.ZodObject<{
					invitationId: z.ZodString;
				}, "strip", z.ZodTypeAny, {
					invitationId: string;
				}, {
					invitationId: string;
				}>;
				use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
				metadata: {
					openapi: {
						operationId: string;
						description: string;
						requestBody: {
							content: {
								"application/json": {
									schema: {
										type: "object";
										properties: {
											invitationId: {
												type: string;
											};
										};
										required: string[];
									};
								};
							};
						};
						responses: {
							"200": {
								description: string;
								content: {
									"application/json": {
										schema: {
											type: "object";
											properties: {
												token: {
													type: string;
												};
												invitation: {
													type: string;
												};
												user: {
													type: string;
												};
											};
										};
									};
								};
							};
						};
					};
				};
			} & {
				use: any[];
			};
			path: "/reject-invitation";
		};
		cancelAppInvitation: {
			<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
				body: {
					invitationId: string;
				};
			} & {
				method?: "POST" | undefined;
			} & {
				query?: Record<string, any> | undefined;
			} & {
				params?: Record<string, any>;
			} & {
				request?: Request;
			} & {
				headers?: HeadersInit;
			} & {
				asResponse?: boolean;
				returnHeaders?: boolean;
				use?: import("better-call").Middleware[];
				path?: string;
			} & {
				asResponse?: AsResponse | undefined;
				returnHeaders?: ReturnHeaders | undefined;
			}): Promise<[
				AsResponse
			] extends [
				true
			] ? Response : [
				ReturnHeaders
			] extends [
				true
			] ? {
				headers: Headers;
				response: {
					id: string;
					status: "pending" | "accepted" | "rejected" | "canceled";
					inviterId: string;
					expiresAt: Date;
					name?: string | undefined;
					email?: string | undefined;
					domainWhitelist?: string | undefined;
				} | null;
			} : {
				id: string;
				status: "pending" | "accepted" | "rejected" | "canceled";
				inviterId: string;
				expiresAt: Date;
				name?: string | undefined;
				email?: string | undefined;
				domainWhitelist?: string | undefined;
			} | null>;
			options: {
				method: "POST";
				body: z.ZodObject<{
					invitationId: z.ZodString;
				}, "strip", z.ZodTypeAny, {
					invitationId: string;
				}, {
					invitationId: string;
				}>;
				use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
					session: {
						session: Record<string, any> & {
							id: string;
							createdAt: Date;
							updatedAt: Date;
							userId: string;
							expiresAt: Date;
							token: string;
							ipAddress?: string | null | undefined;
							userAgent?: string | null | undefined;
						};
						user: Record<string, any> & {
							id: string;
							name: string;
							email: string;
							emailVerified: boolean;
							createdAt: Date;
							updatedAt: Date;
							image?: string | null | undefined;
						};
					};
				}>)[];
				openapi: {
					operationId: string;
					description: string;
					responses: {
						"200": {
							description: string;
							content: {
								"application/json": {
									schema: {
										$ref: string;
									};
								};
							};
						};
					};
				};
			} & {
				use: any[];
			};
			path: "/cancel-invitation";
		};
		listAppInvitations: {
			<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
				body?: undefined;
			} & {
				method?: "GET" | undefined;
			} & {
				query: {
					searchValue?: string | undefined;
					searchField?: "name" | "email" | "domainWhitelist" | undefined;
					searchOperator?: "contains" | "starts_with" | "ends_with" | undefined;
					limit?: string | number | undefined;
					offset?: string | number | undefined;
					sortBy?: string | undefined;
					sortDirection?: "asc" | "desc" | undefined;
					filterField?: string | undefined;
					filterValue?: string | number | undefined;
					filterOperator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
				};
			} & {
				params?: Record<string, any>;
			} & {
				request?: Request;
			} & {
				headers?: HeadersInit;
			} & {
				asResponse?: boolean;
				returnHeaders?: boolean;
				use?: import("better-call").Middleware[];
				path?: string;
			} & {
				asResponse?: AsResponse | undefined;
				returnHeaders?: ReturnHeaders | undefined;
			}): Promise<[
				AsResponse
			] extends [
				true
			] ? Response : [
				ReturnHeaders
			] extends [
				true
			] ? {
				headers: Headers;
				response: {
					invitations: {
						id: string;
						status: "pending" | "accepted" | "rejected" | "canceled";
						inviterId: string;
						expiresAt: Date;
						name?: string | undefined;
						email?: string | undefined;
						domainWhitelist?: string | undefined;
					}[];
					limit: number | undefined;
					offset: number | undefined;
				} | {
					invitations: never[];
				};
			} : {
				invitations: {
					id: string;
					status: "pending" | "accepted" | "rejected" | "canceled";
					inviterId: string;
					expiresAt: Date;
					name?: string | undefined;
					email?: string | undefined;
					domainWhitelist?: string | undefined;
				}[];
				limit: number | undefined;
				offset: number | undefined;
			} | {
				invitations: never[];
			}>;
			options: {
				method: "GET";
				use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
					session: {
						session: Record<string, any> & {
							id: string;
							createdAt: Date;
							updatedAt: Date;
							userId: string;
							expiresAt: Date;
							token: string;
							ipAddress?: string | null | undefined;
							userAgent?: string | null | undefined;
						};
						user: Record<string, any> & {
							id: string;
							name: string;
							email: string;
							emailVerified: boolean;
							createdAt: Date;
							updatedAt: Date;
							image?: string | null | undefined;
						};
					};
				}>)[];
				query: z.ZodObject<{
					searchValue: z.ZodOptional<z.ZodString>;
					searchField: z.ZodOptional<z.ZodEnum<[
						"name",
						"email",
						"domainWhitelist"
					]>>;
					searchOperator: z.ZodOptional<z.ZodEnum<[
						"contains",
						"starts_with",
						"ends_with"
					]>>;
					limit: z.ZodOptional<z.ZodUnion<[
						z.ZodString,
						z.ZodNumber
					]>>;
					offset: z.ZodOptional<z.ZodUnion<[
						z.ZodString,
						z.ZodNumber
					]>>;
					sortBy: z.ZodOptional<z.ZodString>;
					sortDirection: z.ZodOptional<z.ZodEnum<[
						"asc",
						"desc"
					]>>;
					filterField: z.ZodOptional<z.ZodString>;
					filterValue: z.ZodOptional<z.ZodUnion<[
						z.ZodString,
						z.ZodNumber
					]>>;
					filterOperator: z.ZodOptional<z.ZodEnum<[
						"eq",
						"ne",
						"lt",
						"lte",
						"gt",
						"gte"
					]>>;
				}, "strip", z.ZodTypeAny, {
					searchValue?: string | undefined;
					searchField?: "name" | "email" | "domainWhitelist" | undefined;
					searchOperator?: "contains" | "starts_with" | "ends_with" | undefined;
					limit?: string | number | undefined;
					offset?: string | number | undefined;
					sortBy?: string | undefined;
					sortDirection?: "asc" | "desc" | undefined;
					filterField?: string | undefined;
					filterValue?: string | number | undefined;
					filterOperator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
				}, {
					searchValue?: string | undefined;
					searchField?: "name" | "email" | "domainWhitelist" | undefined;
					searchOperator?: "contains" | "starts_with" | "ends_with" | undefined;
					limit?: string | number | undefined;
					offset?: string | number | undefined;
					sortBy?: string | undefined;
					sortDirection?: "asc" | "desc" | undefined;
					filterField?: string | undefined;
					filterValue?: string | number | undefined;
					filterOperator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
				}>;
				metadata: {
					openapi: {
						operationId: string;
						summary: string;
						description: string;
						responses: {
							200: {
								description: string;
								content: {
									"application/json": {
										schema: {
											type: "object";
											properties: {
												invitations: {
													type: string;
													items: {
														$ref: string;
													};
												};
												total: {
													type: string;
												};
												limit: {
													type: string[];
												};
												offset: {
													type: string[];
												};
											};
										};
									};
								};
							};
						};
					};
				};
			} & {
				use: any[];
			};
			path: "/list-invitations";
		};
	};
	rateLimit: {
		pathMatcher(path: string): boolean;
		window: number;
		max: number;
	}[];
	schema: {
		appInvitation: {
			modelName: string | undefined;
			fields: {
				name: {
					type: "string";
					required: false;
					sortable: true;
					fieldName: string | undefined;
				};
				email: {
					type: "string";
					required: false;
					sortable: true;
					fieldName: string | undefined;
				};
				status: {
					type: "string";
					required: true;
					sortable: true;
					defaultValue: string;
					fieldName: string | undefined;
				};
				expiresAt: {
					type: "date";
					required: true;
					fieldName: string | undefined;
				};
				inviterId: {
					type: "string";
					references: {
						model: string;
						field: string;
					};
					fieldName: string | undefined;
					required: true;
				};
				domainWhitelist: {
					type: "string";
					required: false;
					fieldName: string | undefined;
				};
			};
		};
	};
	$Infer: {
		AppInvitation: AppInvitation;
	};
	$ERROR_CODES: {
		readonly USER_IS_ALREADY_A_MEMBER_OF_THIS_APPLICATION: "User is already a member of this application";
		readonly USER_WAS_ALREADY_INVITED_TO_THIS_APPLICATION: "User was already invited to this application";
		readonly INVITER_IS_NO_LONGER_A_MEMBER_OF_THIS_APPLICATION: "Inviter is no longer a member of this application";
		readonly APP_INVITATION_NOT_FOUND: "App invitation not found";
		readonly YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_APP_INVITATION: "You are not allowed to cancel this app invitation";
		readonly YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_APPLICATION: "You are not allowed to invite users to this application";
		readonly THIS_APP_INVITATION_CANT_BE_REJECTED: "This app invitation can't be rejected";
		readonly EMAIL_DOMAIN_IS_NOT_IN_WHITELIST: "Email domain is not in whitelist";
	};
};

export {};
