feat(bot): add observable notification management

This commit is contained in:
2026-03-24 03:58:00 +04:00
parent 7e9ae75a41
commit 83ffd7df72
18 changed files with 1267 additions and 58 deletions

View File

@@ -17,7 +17,8 @@ export {
type AdHocNotificationTimePrecision,
type CancelAdHocNotificationInput,
type ClaimAdHocNotificationDeliveryResult,
type CreateAdHocNotificationInput
type CreateAdHocNotificationInput,
type UpdateAdHocNotificationInput
} from './notifications'
export type {
ClaimProcessedBotMessageInput,

View File

@@ -53,6 +53,15 @@ export interface CancelAdHocNotificationInput {
cancelledAt: Instant
}
export interface UpdateAdHocNotificationInput {
notificationId: string
scheduledFor?: Instant
timePrecision?: AdHocNotificationTimePrecision
deliveryMode?: AdHocNotificationDeliveryMode
dmRecipientMemberIds?: readonly string[]
updatedAt: Instant
}
export interface ClaimAdHocNotificationDeliveryResult {
notificationId: string
claimed: boolean
@@ -66,6 +75,7 @@ export interface AdHocNotificationRepository {
asOf: Instant
): Promise<readonly AdHocNotificationRecord[]>
cancelNotification(input: CancelAdHocNotificationInput): Promise<AdHocNotificationRecord | null>
updateNotification(input: UpdateAdHocNotificationInput): Promise<AdHocNotificationRecord | null>
listDueNotifications(asOf: Instant): Promise<readonly AdHocNotificationRecord[]>
markNotificationSent(
notificationId: string,