Adding IDs to backup events.
This commit is contained in:
parent
12a9ed6dcb
commit
3c93101fdb
|
@ -11,6 +11,7 @@ import { publishEvent } from "../events"
|
||||||
export async function appBackupRestored(backup: AppBackup) {
|
export async function appBackupRestored(backup: AppBackup) {
|
||||||
const properties: AppBackupRestoreEvent = {
|
const properties: AppBackupRestoreEvent = {
|
||||||
appId: backup.appId,
|
appId: backup.appId,
|
||||||
|
restoreId: backup._id!,
|
||||||
backupCreatedAt: backup.timestamp,
|
backupCreatedAt: backup.timestamp,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,11 +20,13 @@ export async function appBackupRestored(backup: AppBackup) {
|
||||||
|
|
||||||
export async function appBackupTriggered(
|
export async function appBackupTriggered(
|
||||||
appId: string,
|
appId: string,
|
||||||
|
backupId: string,
|
||||||
type: AppBackupType,
|
type: AppBackupType,
|
||||||
trigger: AppBackupTrigger
|
trigger: AppBackupTrigger
|
||||||
) {
|
) {
|
||||||
const properties: AppBackupTriggeredEvent = {
|
const properties: AppBackupTriggeredEvent = {
|
||||||
appId: appId,
|
appId: appId,
|
||||||
|
backupId,
|
||||||
type,
|
type,
|
||||||
trigger,
|
trigger,
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,10 +3,12 @@ import { AppBackupTrigger, AppBackupType } from "../../documents"
|
||||||
|
|
||||||
export interface AppBackupRestoreEvent extends BaseEvent {
|
export interface AppBackupRestoreEvent extends BaseEvent {
|
||||||
appId: string
|
appId: string
|
||||||
|
restoreId: string
|
||||||
backupCreatedAt: string
|
backupCreatedAt: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AppBackupTriggeredEvent extends BaseEvent {
|
export interface AppBackupTriggeredEvent extends BaseEvent {
|
||||||
|
backupId: string
|
||||||
appId: string
|
appId: string
|
||||||
trigger: AppBackupTrigger
|
trigger: AppBackupTrigger
|
||||||
type: AppBackupType
|
type: AppBackupType
|
||||||
|
|
Loading…
Reference in New Issue