bigbuffet-rw/packages/pl-api/lib/entities/web-push-subscription.ts
marcin mikołajczak 036fa32cd3 Add pl-api to workspace
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-08-28 13:43:23 +02:00

13 lines
399 B
TypeScript

import { z } from 'zod';
/** @see {@link https://docs.joinmastodon.org/entities/WebPushSubscription/} */
const webPushSubscriptionSchema = z.object({
id: z.coerce.string(),
endpoint: z.string(),
alerts: z.record(z.boolean()),
server_key: z.string(),
});
type WebPushSubscription = z.infer<typeof webPushSubscriptionSchema>;
export { webPushSubscriptionSchema, type WebPushSubscription };