export { createDefaultBookingDocumentAttachment } from "./service-booking-documents.js"; export type { NotificationService } from "./service-shared.js"; export { createNotificationService, NotificationError, NotificationIdempotencyConflictError, previewNotificationTemplate, renderNotificationTemplate, summarizeNotificationAttachments, } from "./service-shared.js"; import { createDefaultBookingDocumentAttachment } from "./service-booking-documents.js"; import { getDeliveryById, listDeliveries, resendDelivery, sendInvoiceNotification, sendPaymentSessionNotification } from "./service-deliveries.js"; import { composeNotificationReminderRule } from "./service-reminder-authoring.js"; import { runDueReminders } from "./service-reminders.js"; import { previewReminders } from "./service-sequence.js"; import { previewNotificationTemplate } from "./service-shared.js"; import { createReminderRuleStage, createStageChannel, deleteReminderRuleStage, deleteStageChannel, getNotificationSettingsRecord, getReminderRuleStageById, listReminderRuleStages, listStageChannels, reorderReminderRuleStages, updateReminderRuleStage, updateStageChannel, upsertNotificationSettings } from "./service-stages.js"; import { createReminderRule, createTemplate, deleteReminderRule, deleteTemplate, getReminderRuleById, getReminderRunById, getTemplateById, getTemplateBySlug, listReminderRules, listReminderRuns, listTemplates, updateReminderRule, updateTemplate } from "./service-templates.js"; export declare const notificationsService: { listTemplates: typeof listTemplates; getTemplateById: typeof getTemplateById; getTemplateBySlug: typeof getTemplateBySlug; createTemplate: typeof createTemplate; updateTemplate: typeof updateTemplate; deleteTemplate: typeof deleteTemplate; previewNotificationTemplate: typeof previewNotificationTemplate; listDeliveries: typeof listDeliveries; getDeliveryById: typeof getDeliveryById; resendDelivery: typeof resendDelivery; listReminderRules: typeof listReminderRules; getReminderRuleById: typeof getReminderRuleById; getReminderRunById: typeof getReminderRunById; createReminderRule: typeof createReminderRule; composeNotificationReminderRule: typeof composeNotificationReminderRule; updateReminderRule: typeof updateReminderRule; deleteReminderRule: typeof deleteReminderRule; listReminderRuns: typeof listReminderRuns; runDueReminders: typeof runDueReminders; previewReminders: typeof previewReminders; listReminderRuleStages: typeof listReminderRuleStages; getReminderRuleStageById: typeof getReminderRuleStageById; createReminderRuleStage: typeof createReminderRuleStage; updateReminderRuleStage: typeof updateReminderRuleStage; deleteReminderRuleStage: typeof deleteReminderRuleStage; reorderReminderRuleStages: typeof reorderReminderRuleStages; listStageChannels: typeof listStageChannels; createStageChannel: typeof createStageChannel; updateStageChannel: typeof updateStageChannel; deleteStageChannel: typeof deleteStageChannel; getNotificationSettings: typeof getNotificationSettingsRecord; upsertNotificationSettings: typeof upsertNotificationSettings; sendPaymentSessionNotification: typeof sendPaymentSessionNotification; sendInvoiceNotification: typeof sendInvoiceNotification; listBookingDocumentBundle: (db: import("drizzle-orm/postgres-js").PostgresJsDatabase, bookingId: string) => Promise<{ bookingId: string; documents: { key: string; source: "products" | "legal" | "finance"; documentType: "invoice" | "contract" | "proforma" | "brochure"; bookingId: string; name: string; createdAt: string; contractId?: string | null | undefined; invoiceId?: string | null | undefined; attachmentId?: string | null | undefined; renditionId?: string | null | undefined; contractStatus?: string | null | undefined; invoiceStatus?: string | null | undefined; format?: string | null | undefined; mimeType?: string | null | undefined; storageKey?: string | null | undefined; downloadUrl?: string | null | undefined; language?: string | null | undefined; metadata?: Record | null | undefined; }[]; } | null>; sendBookingDocumentsNotification: (db: import("drizzle-orm/postgres-js").PostgresJsDatabase, dispatcher: import("./service-shared.js").NotificationService, bookingId: string, input: import("./service-shared.js").SendBookingDocumentsNotificationInput, runtime?: import("./service-booking-documents.js").SendBookingDocumentsRuntimeOptions) => Promise<{ status: "not_found"; bookingId?: undefined; recipient?: undefined; documents?: undefined; delivery?: undefined; } | { status: "no_documents"; bookingId?: undefined; recipient?: undefined; documents?: undefined; delivery?: undefined; } | { status: "no_recipient"; bookingId?: undefined; recipient?: undefined; documents?: undefined; delivery?: undefined; } | { status: "no_attachments"; bookingId?: undefined; recipient?: undefined; documents?: undefined; delivery?: undefined; } | { status: "send_failed"; bookingId?: undefined; recipient?: undefined; documents?: undefined; delivery?: undefined; } | { status: "pending"; bookingId: string; recipient: string; documents: { key: string; source: "products" | "legal" | "finance"; documentType: "invoice" | "contract" | "proforma" | "brochure"; bookingId: string; name: string; createdAt: string; contractId?: string | null | undefined; invoiceId?: string | null | undefined; attachmentId?: string | null | undefined; renditionId?: string | null | undefined; contractStatus?: string | null | undefined; invoiceStatus?: string | null | undefined; format?: string | null | undefined; mimeType?: string | null | undefined; storageKey?: string | null | undefined; downloadUrl?: string | null | undefined; language?: string | null | undefined; metadata?: Record | null | undefined; }[]; delivery: { bookingId: string | null; provider: string; id: string; channel: "email" | "sms"; status: "pending" | "sent" | "failed" | "cancelled"; fromAddress: string | null; metadata: Record | null; createdAt: Date; updatedAt: Date; templateId: string | null; templateSlug: string | null; targetType: "booking" | "booking_payment_schedule" | "booking_guarantee" | "invoice" | "payment_session" | "person" | "organization" | "other"; targetId: string | null; personId: string | null; organizationId: string | null; invoiceId: string | null; paymentSessionId: string | null; providerMessageId: string | null; toAddress: string; subject: string | null; htmlBody: string | null; textBody: string | null; payloadData: Record | null; errorMessage: string | null; scheduledFor: Date | null; sentAt: Date | null; failedAt: Date | null; }; }>; confirmAndDispatchBooking: (db: import("drizzle-orm/postgres-js").PostgresJsDatabase, dispatcher: import("./service-shared.js").NotificationService, bookingId: string, input: { sendNotification: false; documentTypes?: import("./service-shared.js").SendBookingDocumentsNotificationInput["documentTypes"]; } | ({ sendNotification?: true; } & import("./service-shared.js").SendBookingDocumentsNotificationInput), runtime?: import("./service-booking-documents.js").SendBookingDocumentsRuntimeOptions) => Promise<{ status: "not_found"; bookingId?: undefined; documents?: undefined; skipReason?: undefined; recipient?: undefined; delivery?: undefined; } | { status: "preview"; bookingId: string; documents: { key: string; source: "products" | "legal" | "finance"; documentType: "invoice" | "contract" | "proforma" | "brochure"; bookingId: string; name: string; createdAt: string; contractId?: string | null | undefined; invoiceId?: string | null | undefined; attachmentId?: string | null | undefined; renditionId?: string | null | undefined; contractStatus?: string | null | undefined; invoiceStatus?: string | null | undefined; format?: string | null | undefined; mimeType?: string | null | undefined; storageKey?: string | null | undefined; downloadUrl?: string | null | undefined; language?: string | null | undefined; metadata?: Record | null | undefined; }[]; skipReason?: undefined; recipient?: undefined; delivery?: undefined; } | { status: "skipped"; bookingId: string; documents: { key: string; source: "products" | "legal" | "finance"; documentType: "invoice" | "contract" | "proforma" | "brochure"; bookingId: string; name: string; createdAt: string; contractId?: string | null | undefined; invoiceId?: string | null | undefined; attachmentId?: string | null | undefined; renditionId?: string | null | undefined; contractStatus?: string | null | undefined; invoiceStatus?: string | null | undefined; format?: string | null | undefined; mimeType?: string | null | undefined; storageKey?: string | null | undefined; downloadUrl?: string | null | undefined; language?: string | null | undefined; metadata?: Record | null | undefined; }[]; skipReason: "no_documents" | "no_recipient" | "no_attachments" | "send_failed"; recipient?: undefined; delivery?: undefined; } | { status: "dispatched"; bookingId: string; documents: { key: string; source: "products" | "legal" | "finance"; documentType: "invoice" | "contract" | "proforma" | "brochure"; bookingId: string; name: string; createdAt: string; contractId?: string | null | undefined; invoiceId?: string | null | undefined; attachmentId?: string | null | undefined; renditionId?: string | null | undefined; contractStatus?: string | null | undefined; invoiceStatus?: string | null | undefined; format?: string | null | undefined; mimeType?: string | null | undefined; storageKey?: string | null | undefined; downloadUrl?: string | null | undefined; language?: string | null | undefined; metadata?: Record | null | undefined; }[]; recipient: string; delivery: { bookingId: string | null; provider: string; id: string; channel: "email" | "sms"; status: "pending" | "sent" | "failed" | "cancelled"; fromAddress: string | null; metadata: Record | null; createdAt: Date; updatedAt: Date; templateId: string | null; templateSlug: string | null; targetType: "booking" | "booking_payment_schedule" | "booking_guarantee" | "invoice" | "payment_session" | "person" | "organization" | "other"; targetId: string | null; personId: string | null; organizationId: string | null; invoiceId: string | null; paymentSessionId: string | null; providerMessageId: string | null; toAddress: string; subject: string | null; htmlBody: string | null; textBody: string | null; payloadData: Record | null; errorMessage: string | null; scheduledFor: Date | null; sentAt: Date | null; failedAt: Date | null; }; skipReason?: undefined; }>; createDefaultBookingDocumentAttachment: typeof createDefaultBookingDocumentAttachment; };