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[];
    accessType?: string;
    dnaRootId?: string | null;
    dnaChild1Id?: string | null;
    dnaChild2Id?: string | null;
    dnaChild3Id?: string | null;
    dnaChild4Id?: string | null;
  };
};
