hrms-api-org/src/middlewares/user.ts
waruneeauy b714dfe239
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m26s
add script update org and sync keycloak, setup time run cronjob
2026-02-27 10:05:13 +07:00

29 lines
597 B
TypeScript

import type { Request } from "express";
export type RequestWithUser = Request & {
user: {
sub: string;
name: string;
given_name: string;
familiy_name: string;
preferred_username: string;
email: string;
role: string[];
profileId?: string;
prefix?: string;
orgRootDnaId?: string;
orgChild1DnaId?: string;
orgChild2DnaId?: string;
orgChild3DnaId?: string;
orgChild4DnaId?: string;
empType?: string;
};
};
export type RequestWithUserWebService = Request & {
user: {
id: string;
name: string;
accessApi: string[];
};
};