stack/packages/stack-shared/src/interface/webhooks.ts
Zai Shi fb31827dc3
Some checks are pending
Runs E2E API Tests / build (20.x) (push) Waiting to run
Lint & build / lint_and_build (18.x) (push) Waiting to run
Lint & build / lint_and_build (20.x) (push) Waiting to run
Webhooks (#157)
* 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
2024-08-01 02:44:35 +02:00

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;