import type { PayloadRequest, Plugin, TypedUser } from 'payload'; import type { AcceptInvitationURLFn, EmailSenderOption, VerificationFlowConfig } from './types'; export type { AcceptInvitationURLFn, EmailSender, EmailSenderOption, VerificationFlowConfig, } from './types'; export { acceptInvite } from './utils/accept-invite'; export { getInviteData } from './utils/get-invite-data'; export type { SendInvitationEmailResult } from './utils/send-invitation-email'; export { sendInvitationEmail } from './utils/send-invitation-email'; export { verifyAndLogin } from './utils/verify-and-login'; export interface InvitationsPluginConfig { /** * Custom URL for the accept-invitation page. * * - String: appended with `?token=...` and used in invitation emails. The built-in admin view is not registered. * - Function: called with `{ token, user, req, defaultURL }` to generate the full URL. The built-in admin view is still registered. * - Not set: uses the default admin panel invitation page. */ acceptInvitationURL?: string | AcceptInvitationURLFn; /** * Custom email sender for invitation emails. * * - Object: `{ email: 'noreply@acme.com', name: 'Acme Corp' }` * - Function: `async ({ req, user }) => ({ email, name })` for dynamic resolution (e.g., from a tenant document) * * Falls back to the Payload email adapter defaults when not set. */ emailSender?: EmailSenderOption; /** * Customize the invitation email. */ generateInvitationEmailHTML?: (args: { req: PayloadRequest; invitationURL: string; user: TypedUser; }) => string | Promise; /** * Customize the invitation email subject. */ generateInvitationEmailSubject?: (args: { req: PayloadRequest; invitationURL: string; user: TypedUser; }) => Promise | string; /** * Named verification flows for non-invite user creation paths. * * Each flow defines its own email sender, template, and verification URL. * The consumer triggers a flow by passing `_verificationFlow: ''` * during `payload.create`. */ verificationFlows?: Record; } export declare const invitationsPlugin: ({ acceptInvitationURL, emailSender, generateInvitationEmailHTML, generateInvitationEmailSubject, verificationFlows, }?: InvitationsPluginConfig) => Plugin; //# sourceMappingURL=index.d.ts.map