/
dimamir
/
undb
Обзор
Документация
Войти
/
dimamir
/
undb
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
packages/webhook/src/webhook.message.ts
19 строк
478 B
nichenqin
feat: accept webhook
31 май 2024, 12:38
31 май 2024, 12:38
bfab6de
Код
Авторство
О чём код?
import { z } from "@undb/zod" import { webhookHeadersSchema } from "./webhook-headers.vo" const webhookMessageBody = z.object({ id: z.string().uuid(), operatorId: z.string(), timestamp: z.date(), // TODO: type event: z.any(), }) export type IWebhookMessageBody = z.infer<typeof webhookMessageBody> export const webhookMessage = z.object({ headers: webhookHeadersSchema, body: webhookMessageBody, }) export type IWebhookMessage = z.infer<typeof webhookMessage>