UNPKG

@tmlmobilidade/types

Version:
189 lines (188 loc) • 6.03 kB
import { z } from 'zod'; export type Notification = z.infer<typeof NotificationSchema>; export declare const NotificationSchema: z.ZodObject<Omit<{ _id: z.ZodString; created_at: z.ZodEffects<z.ZodNumber, import("./index.js").UnixTimestamp, number>; created_by: z.ZodOptional<z.ZodString>; is_locked: z.ZodDefault<z.ZodBoolean>; updated_at: z.ZodEffects<z.ZodNumber, import("./index.js").UnixTimestamp, number>; updated_by: z.ZodOptional<z.ZodString>; }, "is_locked"> & { is_read: z.ZodBoolean; payload: z.ZodObject<{ body: z.ZodString; href: z.ZodOptional<z.ZodString>; icon: z.ZodOptional<z.ZodString>; title: z.ZodString; }, "strip", z.ZodTypeAny, { title: string; body: string; href?: string | undefined; icon?: string | undefined; }, { title: string; body: string; href?: string | undefined; icon?: string | undefined; }>; priority: z.ZodDefault<z.ZodEnum<["high", "normal", "low"]>>; scope: z.ZodString; topic: z.ZodString; user_id: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { _id: string; created_at: number & { __brand: "UnixTimestamp"; }; updated_at: number & { __brand: "UnixTimestamp"; }; scope: string; is_read: boolean; payload: { title: string; body: string; href?: string | undefined; icon?: string | undefined; }; priority: "high" | "normal" | "low"; topic: string; created_by?: string | undefined; updated_by?: string | undefined; user_id?: string | undefined; }, { _id: string; created_at: number; updated_at: number; scope: string; is_read: boolean; payload: { title: string; body: string; href?: string | undefined; icon?: string | undefined; }; topic: string; created_by?: string | undefined; updated_by?: string | undefined; user_id?: string | undefined; priority?: "high" | "normal" | "low" | undefined; }>; export declare const CreateNotificationSchema: z.ZodObject<Omit<Omit<{ _id: z.ZodString; created_at: z.ZodEffects<z.ZodNumber, import("./index.js").UnixTimestamp, number>; created_by: z.ZodOptional<z.ZodString>; is_locked: z.ZodDefault<z.ZodBoolean>; updated_at: z.ZodEffects<z.ZodNumber, import("./index.js").UnixTimestamp, number>; updated_by: z.ZodOptional<z.ZodString>; }, "is_locked"> & { is_read: z.ZodBoolean; payload: z.ZodObject<{ body: z.ZodString; href: z.ZodOptional<z.ZodString>; icon: z.ZodOptional<z.ZodString>; title: z.ZodString; }, "strip", z.ZodTypeAny, { title: string; body: string; href?: string | undefined; icon?: string | undefined; }, { title: string; body: string; href?: string | undefined; icon?: string | undefined; }>; priority: z.ZodDefault<z.ZodEnum<["high", "normal", "low"]>>; scope: z.ZodString; topic: z.ZodString; user_id: z.ZodOptional<z.ZodString>; }, "_id" | "created_at" | "updated_at">, "strip", z.ZodTypeAny, { scope: string; is_read: boolean; payload: { title: string; body: string; href?: string | undefined; icon?: string | undefined; }; priority: "high" | "normal" | "low"; topic: string; created_by?: string | undefined; updated_by?: string | undefined; user_id?: string | undefined; }, { scope: string; is_read: boolean; payload: { title: string; body: string; href?: string | undefined; icon?: string | undefined; }; topic: string; created_by?: string | undefined; updated_by?: string | undefined; user_id?: string | undefined; priority?: "high" | "normal" | "low" | undefined; }>; export declare const UpdateNotificationSchema: z.ZodObject<{ updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>; scope: z.ZodOptional<z.ZodString>; user_id: z.ZodOptional<z.ZodOptional<z.ZodString>>; is_read: z.ZodOptional<z.ZodBoolean>; payload: z.ZodOptional<z.ZodObject<{ body: z.ZodString; href: z.ZodOptional<z.ZodString>; icon: z.ZodOptional<z.ZodString>; title: z.ZodString; }, "strip", z.ZodTypeAny, { title: string; body: string; href?: string | undefined; icon?: string | undefined; }, { title: string; body: string; href?: string | undefined; icon?: string | undefined; }>>; priority: z.ZodOptional<z.ZodDefault<z.ZodEnum<["high", "normal", "low"]>>>; topic: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { updated_by?: string | undefined; scope?: string | undefined; user_id?: string | undefined; is_read?: boolean | undefined; payload?: { title: string; body: string; href?: string | undefined; icon?: string | undefined; } | undefined; priority?: "high" | "normal" | "low" | undefined; topic?: string | undefined; }, { updated_by?: string | undefined; scope?: string | undefined; user_id?: string | undefined; is_read?: boolean | undefined; payload?: { title: string; body: string; href?: string | undefined; icon?: string | undefined; } | undefined; priority?: "high" | "normal" | "low" | undefined; topic?: string | undefined; }>; export type CreateNotificationDto = z.infer<typeof CreateNotificationSchema>; export type UpdateNotificationDto = z.infer<typeof UpdateNotificationSchema>; export declare const NotificationPermissionSchema: z.ZodObject<{ send_mail: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodBoolean>>>; }, "strip", z.ZodTypeAny, { send_mail?: boolean | null | undefined; }, { send_mail?: boolean | null | undefined; }>; export type NotificationPermission = z.infer<typeof NotificationPermissionSchema>;