1
0
Fork 0
mirror of synced 2024-05-17 10:53:15 +12:00

Adding IDs to backup events.

This commit is contained in:
mike12345567 2022-11-21 12:12:57 +00:00
parent 33827af592
commit fd80ceed6e
2 changed files with 5 additions and 0 deletions

View file

@ -11,6 +11,7 @@ import { publishEvent } from "../events"
export async function appBackupRestored(backup: AppBackup) {
const properties: AppBackupRestoreEvent = {
appId: backup.appId,
restoreId: backup._id!,
backupCreatedAt: backup.timestamp,
}
@ -19,11 +20,13 @@ export async function appBackupRestored(backup: AppBackup) {
export async function appBackupTriggered(
appId: string,
backupId: string,
type: AppBackupType,
trigger: AppBackupTrigger
) {
const properties: AppBackupTriggeredEvent = {
appId: appId,
backupId,
type,
trigger,
}

View file

@ -3,10 +3,12 @@ import { AppBackupTrigger, AppBackupType } from "../../documents"
export interface AppBackupRestoreEvent extends BaseEvent {
appId: string
restoreId: string
backupCreatedAt: string
}
export interface AppBackupTriggeredEvent extends BaseEvent {
backupId: string
appId: string
trigger: AppBackupTrigger
type: AppBackupType