import { z } from 'zod';

// Contratos canônicos de C6 — Notificações e Push.

export const SubscribePayloadSchema = z.object({
  endpoint: z.string().url(),
  keys: z.object({
    p256dh: z.string().min(1),
    auth: z.string().min(1),
  }),
});
export type SubscribePayload = z.infer<typeof SubscribePayloadSchema>;

export const UnsubscribePayloadSchema = z.object({
  endpoint: z.string().url(),
});
export type UnsubscribePayload = z.infer<typeof UnsubscribePayloadSchema>;

export const PendingCountResponseSchema = z.object({
  count: z.number().int().min(0),
});
export type PendingCountResponse = z.infer<typeof PendingCountResponseSchema>;
