- Added user_invites table to manage invitation tokens. - Created invite router with procedures for sending, verifying, and accepting invites. - Implemented email sending functionality for invites. - Updated user controller to handle password setting during invite acceptance. - Introduced mustChangePassword flag in user schema and related logic. - Added middleware to enforce password change requirement. - Created forms for accepting invites and changing passwords. - Updated database migrations to reflect new user invite structure and fields.
46 lines
1.4 KiB
TypeScript
46 lines
1.4 KiB
TypeScript
// @generated
|
|
// This file is automatically generated by Kanel. Do not modify manually.
|
|
|
|
import type { ColumnType, Selectable, Insertable, Updateable } from 'kysely';
|
|
|
|
/** Identifier type for public.users */
|
|
export type UsersId = string & { __brand: 'public.users' };
|
|
|
|
/** Represents the table public.users */
|
|
export default interface UsersTable {
|
|
id: ColumnType<UsersId, UsersId | undefined, UsersId>;
|
|
|
|
username: ColumnType<string, string, string>;
|
|
|
|
email: ColumnType<string, string, string>;
|
|
|
|
isAdmin: ColumnType<boolean, boolean | undefined, boolean>;
|
|
|
|
isBlocked: ColumnType<boolean, boolean | undefined, boolean>;
|
|
|
|
password: ColumnType<string, string, string>;
|
|
|
|
nome: ColumnType<string, string, string>;
|
|
|
|
cognome: ColumnType<string, string, string>;
|
|
|
|
created_at: ColumnType<Date, Date | string | undefined, Date | string>;
|
|
|
|
reset_password_token: ColumnType<string | null, string | null, string | null>;
|
|
|
|
reset_password_expires: ColumnType<Date | null, Date | string | null, Date | string | null>;
|
|
|
|
telefono: ColumnType<string, string, string>;
|
|
|
|
isAdminMade: ColumnType<boolean | null, boolean | null, boolean | null>;
|
|
|
|
salt: ColumnType<string, string, string>;
|
|
|
|
mustChangePassword: ColumnType<boolean, boolean | undefined, boolean>;
|
|
}
|
|
|
|
export type Users = Selectable<UsersTable>;
|
|
|
|
export type NewUsers = Insertable<UsersTable>;
|
|
|
|
export type UsersUpdate = Updateable<UsersTable>;
|