import { B as BaseNotificationPayload, C as ChannelType, F as FeatureFlags, M as MaybePromise, N as NotificationEvent, a as NotificationResult, R as Result } from "./types.d-C7l7qdMG.js"; /** * Standard provider interface for notification channels. Every provider belongs to * exactly one {@link ChannelType} and accepts a channel-specific payload. */ interface Provider { /** The channel this provider delivers on. */ readonly channel: ChannelType; endpoint?: string; features?: FeatureFlags; getInstance?: () => InstanceT; /** Unique provider id, e.g. `"twilio"`, `"slack"`, `"fcm"`. */ readonly id: string; initialize: () => MaybePromise; isAvailable: () => MaybePromise; options?: OptionsT; /** Map a provider webhook body to a normalised lifecycle event. */ parseEventBody?: (body: unknown, headers?: Record) => MaybePromise; send: (payload: PayloadT) => MaybePromise>; shutdown?: () => MaybePromise; validateCredentials?: () => MaybePromise; } /** * Type for a provider factory function. */ type ProviderFactory = (options?: OptionsT) => Provider; /** * Helper to define a notification provider (identity function for type inference). * @param factory The provider factory function. * @returns The same factory function. */ declare const defineProvider: (factory: ProviderFactory) => ProviderFactory; export { Provider as P, ProviderFactory as a, defineProvider as d };