@tmlmobilidade/types
Version:
83 lines (82 loc) • 3.06 kB
TypeScript
import { z } from 'zod';
export declare const SessionSchema: z.ZodObject<Omit<{
_id: z.ZodString;
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
created_by: z.ZodOptional<z.ZodString>;
is_locked: z.ZodDefault<z.ZodBoolean>;
updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
updated_by: z.ZodOptional<z.ZodString>;
}, "is_locked"> & {
expires_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
token: z.ZodString;
user_id: z.ZodString;
}, "strip", z.ZodTypeAny, {
_id: string;
created_at: number & {
__brand: "UnixTimestamp";
};
updated_at: number & {
__brand: "UnixTimestamp";
};
expires_at: number & {
__brand: "UnixTimestamp";
};
token: string;
user_id: string;
created_by?: string | undefined;
updated_by?: string | undefined;
}, {
_id: string;
created_at: number;
updated_at: number;
expires_at: number;
token: string;
user_id: string;
created_by?: string | undefined;
updated_by?: string | undefined;
}>;
export declare const CreateSessionSchema: z.ZodObject<Omit<Omit<{
_id: z.ZodString;
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
created_by: z.ZodOptional<z.ZodString>;
is_locked: z.ZodDefault<z.ZodBoolean>;
updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
updated_by: z.ZodOptional<z.ZodString>;
}, "is_locked"> & {
expires_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
token: z.ZodString;
user_id: z.ZodString;
}, "_id" | "created_at" | "updated_at">, "strip", z.ZodTypeAny, {
expires_at: number & {
__brand: "UnixTimestamp";
};
token: string;
user_id: string;
created_by?: string | undefined;
updated_by?: string | undefined;
}, {
expires_at: number;
token: string;
user_id: string;
created_by?: string | undefined;
updated_by?: string | undefined;
}>;
export declare const UpdateSessionSchema: z.ZodObject<{
updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
expires_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
token: z.ZodOptional<z.ZodString>;
user_id: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
updated_by?: string | undefined;
expires_at?: import("../_common/unix-timestamp.js").UnixTimestamp | undefined;
token?: string | undefined;
user_id?: string | undefined;
}, {
updated_by?: string | undefined;
expires_at?: number | undefined;
token?: string | undefined;
user_id?: string | undefined;
}>;
export type Session = z.infer<typeof SessionSchema>;
export type CreateSessionDto = z.infer<typeof CreateSessionSchema>;
export type UpdateSessionDto = z.infer<typeof UpdateSessionSchema>;