2022-05-05 19:32:14 +12:00
|
|
|
import { Event } from "@budibase/types"
|
2022-05-10 21:33:59 +12:00
|
|
|
import { processors } from "./processors"
|
2022-05-24 09:14:44 +12:00
|
|
|
import * as identification from "./identification"
|
2022-04-02 09:29:44 +13:00
|
|
|
|
2022-05-24 09:14:44 +12:00
|
|
|
export const publishEvent = async (event: Event, properties: any) => {
|
|
|
|
// in future this should use async events via a distributed queue.
|
|
|
|
const identity = identification.getCurrentIdentity()
|
|
|
|
await processors.processEvent(event, identity, properties)
|
2022-04-02 09:29:44 +13:00
|
|
|
}
|