2022-05-10 21:33:59 +12:00
|
|
|
import { publishEvent } from "../events"
|
2022-05-04 04:13:13 +12:00
|
|
|
import {
|
2022-05-05 19:32:14 +12:00
|
|
|
Event,
|
2022-05-04 04:13:13 +12:00
|
|
|
Screen,
|
|
|
|
ScreenCreatedEvent,
|
|
|
|
ScreenDeletedEvent,
|
|
|
|
} from "@budibase/types"
|
|
|
|
|
2022-05-26 08:32:08 +12:00
|
|
|
export async function created(screen: Screen, timestamp?: string) {
|
2022-05-04 04:13:13 +12:00
|
|
|
const properties: ScreenCreatedEvent = {}
|
2022-05-26 08:32:08 +12:00
|
|
|
await publishEvent(Event.SCREEN_CREATED, properties, timestamp)
|
2022-05-04 04:13:13 +12:00
|
|
|
}
|
|
|
|
|
2022-05-24 09:14:44 +12:00
|
|
|
export async function deleted(screen: Screen) {
|
2022-05-04 04:13:13 +12:00
|
|
|
const properties: ScreenDeletedEvent = {}
|
2022-05-24 09:14:44 +12:00
|
|
|
await publishEvent(Event.SCREEN_DELETED, properties)
|
2022-05-04 04:13:13 +12:00
|
|
|
}
|