mirror of
https://github.com/whekin/household-bot.git
synced 2026-03-31 12:04:02 +00:00
feat(bot): add observable notification management
This commit is contained in:
@@ -17,7 +17,8 @@ export {
|
||||
type AdHocNotificationTimePrecision,
|
||||
type CancelAdHocNotificationInput,
|
||||
type ClaimAdHocNotificationDeliveryResult,
|
||||
type CreateAdHocNotificationInput
|
||||
type CreateAdHocNotificationInput,
|
||||
type UpdateAdHocNotificationInput
|
||||
} from './notifications'
|
||||
export type {
|
||||
ClaimProcessedBotMessageInput,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user