/** * @module notification.create.task * * Convenience factory for creating task-type notification templates. * Wraps {@link createNotificationTemplate} with task-specific defaults. */ import { type Maybe } from '@dereekb/util'; import { type NotificationTaskCheckpointString } from './notification'; import { type CreateNotificationTemplate, type CreateNotificationTemplateInput } from './notification.create'; /** * Template for creating a task-type {@link Notification}. Alias for {@link CreateNotificationTemplate}. */ export type CreateNotificationTaskTemplate = CreateNotificationTemplate; /** * Simplified input for creating task notification templates. Omits fields not applicable to tasks * (recipients, send type, recipient flags) and makes `notificationModel` optional. * * When `notificationModel` is omitted, defaults to {@link DEFAULT_NOTIFICATION_TASK_NOTIFICATION_MODEL_KEY}. */ export interface CreateNotificationTaskTemplateInput extends Omit, Partial> { /** * Corresponds with the tpr field in the Notification. * * Provide this if some checkpoints have already been completed. */ readonly completedCheckpoints?: Maybe; } /** * Creates a {@link CreateNotificationTaskTemplate} with `TASK_NOTIFICATION` send type and no recipients. * * @param input - task template input parameters * @returns the configured task notification template * @throws {Error} When `unique=true` but no `notificationModel` or target model is specified. * * @example * ```ts * const template = createNotificationTaskTemplate({ * type: 'generate-report', * targetModel: 'project/abc123', * unique: true, * data: { reportType: 'monthly' } * }); * ``` */ export declare function createNotificationTaskTemplate(input: CreateNotificationTaskTemplateInput): CreateNotificationTaskTemplate;