Webhooks to support event type association (#1889)
* --init database and queries * fixed type check * added webhook api for event types * added webhook list in team event * delete, edit webhook in team event * updated webhook subtext for event type * added discord integration to event type webhook * check fix * consistency * minor code improvement * lint fix * Adds missing zod schemas * requested changes pt1 --WIP * requested changes pt2 --WIP Co-authored-by: zomars <zomars@me.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -46,6 +46,7 @@ model EventType {
|
||||
teamId Int?
|
||||
bookings Booking[]
|
||||
availability Availability[]
|
||||
webhooks Webhook[]
|
||||
destinationCalendar DestinationCalendar?
|
||||
eventName String?
|
||||
customInputs EventTypeCustomInput[]
|
||||
@@ -345,11 +346,13 @@ enum WebhookTriggerEvents {
|
||||
|
||||
model Webhook {
|
||||
id String @id @unique
|
||||
userId Int
|
||||
userId Int?
|
||||
eventTypeId Int?
|
||||
subscriberUrl String
|
||||
payloadTemplate String?
|
||||
createdAt DateTime @default(now())
|
||||
active Boolean @default(true)
|
||||
eventTriggers WebhookTriggerEvents[]
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
eventType EventType? @relation(fields: [eventTypeId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user