UNPKG

studiocms

Version:

Astro Native CMS for AstroDB. Built from the ground up by the Astro community.

77 lines (76 loc) 3.19 kB
import { Effect } from '../../effect.js'; import type { UserNotificationOptions } from './client.js'; /** * An object containing notification messages for user-related events. */ declare const userNotifications: { account_updated: (name: string) => string; }; /** * An object containing functions to generate notification messages for various editor events. */ declare const editorNotifications: { page_updated: (title: string) => string; page_deleted: (title: string) => string; new_page: (title: string) => string; folder_updated: (name: string) => string; folder_deleted: (name: string) => string; new_folder: (name: string) => string; }; /** * An object containing functions to generate notification messages for various admin events. */ declare const adminNotifications: { user_updated: (username: string) => string; user_deleted: (username: string) => string; new_user: (username: string) => string; }; /** * An object containing notification titles for each notification type. */ export declare const notificationTitleStrings: Record<UserNotificationOptions, string>; /** * The type of the `userNotifications` object. */ type UserNotifications = typeof userNotifications; /** * The type of the `editorNotifications` object. */ type EditorNotifications = typeof editorNotifications; /** * The type of the `adminNotifications` object. */ type AdminNotifications = typeof adminNotifications; /** * An object containing all notification types. */ export declare const notificationTypes: { user: string[]; editor: string[]; admin: string[]; }; /** * The type of the `userNotificationTypes` array. */ export type UserNotification = keyof UserNotifications; /** * The type of the `editorNotificationTypes` array. */ export type EditorNotification = keyof EditorNotifications; /** * The type of the `adminNotificationTypes` array. */ export type AdminNotification = keyof AdminNotifications; export declare const makeLogger: Effect.Effect<import("astro").AstroIntegrationLogger, never, never>; declare const Notifications_base: Effect.Service.Class<Notifications, "studiocms/lib/notifier/Notifications", { readonly effect: Effect.Effect<{ sendUserNotification: <T extends UserNotification>(notification: T, userId: string) => Effect.Effect<void, Error | import("../sdk/errors.js").SDKCoreError, never>; sendEditorNotification: <T extends EditorNotification, K extends Parameters<EditorNotifications[T]>[0]>(notification: T, data: K) => Effect.Effect<void, Error | import("../sdk/errors.js").SDKCoreError, never>; sendAdminNotification: <T extends AdminNotification, K extends Parameters<AdminNotifications[T]>[0]>(notification: T, data: K) => Effect.Effect<void, Error | import("../sdk/errors.js").SDKCoreError, never>; }, never, import("../mailer/index.js").Mailer>; readonly dependencies: readonly [import("effect/Layer").Layer<import("../mailer/index.js").Mailer, Error, never>]; }>; export declare class Notifications extends Notifications_base { static Provide: <A, E, R>(self: Effect.Effect<A, E, R>) => Effect.Effect<A, Error | E, Exclude<R, Notifications>>; } export {};