import { IMetadataProvider } from '@memberjunction/core';
/**
 * Input to {@link CreateShareNotification} — everything needed to deliver a
 * share notification to the grantee of a newly-created permission record.
 */
export interface ShareNotificationInput {
    /** Metadata provider — must be the Database provider (server-side). */
    Provider: IMetadataProvider;
    /** Context user to authorize the save. */
    ContextUser: import('@memberjunction/core').UserInfo;
    /** ID of the user who granted the share — the `from`. */
    GrantorUserID: string;
    /** ID of the user receiving the share — the `to` and the notification recipient. */
    GranteeUserID: string;
    /**
     * Human-readable resource type label used in notification text (e.g., "Dashboard",
     * "Collection"). Distinct from `ResourceTypeName` below — this is purely cosmetic.
     */
    ResourceTypeLabel: string;
    /**
     * Optional name from the {@link MJResourceTypeEntity} catalog (e.g., `"Dashboards"`,
     * `"Artifacts"`, `"Records"`). When provided AND found in the catalog, the resolved
     * ResourceType.ID is written to `MJUserNotification.ResourceTypeID` so the bell icon
     * can deep-link via the matching `DriverClass`.
     */
    ResourceTypeName?: string;
    /** Optional display name for the shared resource. */
    ResourceName?: string | null;
    /** Primary key of the shared resource. */
    ResourceRecordID: string;
    /** Short sentence describing what was granted. Goes in the notification body. */
    ActionsSummary?: string;
    /** Extra JSON payload for the notification (e.g., PermissionID, DomainName). */
    ExtraConfiguration?: Record<string, unknown>;
    /**
     * Optional override for the notification title. When omitted, the dispatcher
     * auto-generates `"<grantor> shared <resource> with you"`. Used by
     * access-request workflow notifications (e.g., "New request for access to …")
     * that don't match the default share-event phrasing.
     */
    Title?: string;
    /**
     * Optional override for the notification message body. When omitted, the
     * dispatcher auto-generates a short sentence from `ActionsSummary`.
     */
    Message?: string;
}
/**
 * Registerable handler that actually delivers a share notification. Declared
 * here so server-side code (e.g., `@memberjunction/notifications`) can plug in
 * richer delivery (in-app + email + SMS via `NotificationEngine`) without
 * `@memberjunction/core-entities` having to import the notifications package —
 * that direction would create a circular dependency.
 */
export type ShareNotificationHandler = (input: ShareNotificationInput) => Promise<boolean>;
/**
 * Register a custom dispatcher (e.g., one backed by `NotificationEngine.SendNotification`).
 * Typically called once at server startup. Subsequent calls replace the handler.
 * Passing `null` restores the default in-app-only behavior.
 */
export declare function RegisterShareNotificationHandler(handler: ShareNotificationHandler | null): void;
/**
 * Create and deliver a share notification. If a custom handler has been
 * registered via {@link RegisterShareNotificationHandler}, it's called first;
 * otherwise (and as a fallback on handler error) we write an in-app
 * `MJ: User Notifications` row directly.
 *
 * Returns `true` when the notification was delivered successfully. Never
 * throws — sharing succeeds even if notification delivery fails.
 */
export declare function CreateShareNotification(input: ShareNotificationInput): Promise<boolean>;
//# sourceMappingURL=shareNotification.d.ts.map