Created
April 24, 2020 08:28
-
-
Save danielkcz/cd1a240e12e682c6c7805da3bf0d5b8a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type TEventTriggerPayload<TData> = { | |
event: ( | |
| TEvent<'INSERT', null, TData> | |
| TEvent<'UPDATE', TData, TData> | |
| TEvent<'DELETE', TData, null> | |
| TEvent<'MANUAL', null, TData> | |
) & { | |
session_variables: Dictionary | |
} | |
created_at: ISODateTime | |
id: ID | |
trigger: { | |
name: string | |
} | |
table: { | |
schema: string | |
name: string | |
} | |
} | |
type TEvent<TOp, TOld, TNew> = { | |
op: TOp | |
data: { | |
old: TOld | |
new: TNew | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment