Adding IDs to backup events.
This commit is contained in:
parent
12a9ed6dcb
commit
3c93101fdb
2 changed files with 5 additions and 0 deletions
|
@ -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,
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue