mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
* added svix to docker compose * connect webhook sending with local svix * added svix token endpoint * added svix dashbaord * added endpoint table * updated danger items * added more info on the webhook page * added create endpoints dialog * added edit and delete endpoint * added log history * added webhook secret * updated sidebar layout * fixed flashes * updated webhook sending function * removed unused imports * updated endpoint code structure * commented event types * added webhooks docs * added webhooks doc gen * updated webhooks docs * added webhook events * updated teams docs * fixed bugs * fixed docker
22 lines
615 B
TypeScript
22 lines
615 B
TypeScript
import * as yup from "yup";
|
|
import { teamCreatedWebhookEvent, teamDeletedWebhookEvent, teamUpdatedWebhookEvent } from "./crud/teams";
|
|
import { userCreatedWebhookEvent, userDeletedWebhookEvent, userUpdatedWebhookEvent } from "./crud/users";
|
|
|
|
export type WebhookEvent<S extends yup.Schema> = {
|
|
type: string,
|
|
schema: S,
|
|
metadata: {
|
|
summary: string,
|
|
description: string,
|
|
tags?: string[],
|
|
},
|
|
};
|
|
|
|
export const webhookEvents = [
|
|
userCreatedWebhookEvent,
|
|
userUpdatedWebhookEvent,
|
|
userDeletedWebhookEvent,
|
|
teamCreatedWebhookEvent,
|
|
teamUpdatedWebhookEvent,
|
|
teamDeletedWebhookEvent,
|
|
] as const; |