2024-03-11 09:28:59 +07:00
|
|
|
import type { Request } from "express";
|
|
|
|
|
|
|
|
|
|
export type RequestWithUser = Request & {
|
|
|
|
|
user: {
|
2024-03-12 16:49:07 +07:00
|
|
|
sub: string;
|
2024-03-11 09:28:59 +07:00
|
|
|
name: string;
|
|
|
|
|
given_name: string;
|
|
|
|
|
familiy_name: string;
|
|
|
|
|
preferred_username: string;
|
|
|
|
|
email: string;
|
|
|
|
|
role: string[];
|
2026-02-27 10:05:13 +07:00
|
|
|
profileId?: string;
|
|
|
|
|
prefix?: string;
|
|
|
|
|
orgRootDnaId?: string;
|
|
|
|
|
orgChild1DnaId?: string;
|
|
|
|
|
orgChild2DnaId?: string;
|
|
|
|
|
orgChild3DnaId?: string;
|
|
|
|
|
orgChild4DnaId?: string;
|
|
|
|
|
empType?: string;
|
2024-03-11 09:28:59 +07:00
|
|
|
};
|
|
|
|
|
};
|
2025-08-07 17:14:56 +07:00
|
|
|
|
|
|
|
|
export type RequestWithUserWebService = Request & {
|
|
|
|
|
user: {
|
|
|
|
|
id: string;
|
|
|
|
|
name: string;
|
|
|
|
|
accessApi: string[];
|
2026-05-21 11:44:28 +07:00
|
|
|
accessType?: string;
|
|
|
|
|
dnaRootId?: string | null;
|
|
|
|
|
dnaChild1Id?: string | null;
|
|
|
|
|
dnaChild2Id?: string | null;
|
|
|
|
|
dnaChild3Id?: string | null;
|
|
|
|
|
dnaChild4Id?: string | null;
|
2025-08-07 17:14:56 +07:00
|
|
|
};
|
|
|
|
|
};
|