Added error handling and now possible to post employees
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { AccessGroup, mapPegaAccessGroupToAccessGroups, PegaAccessGroup } from '@dafa-enums/access-group.enum';
|
||||
import { UserResponse } from './api/user-response.model';
|
||||
|
||||
export interface User {
|
||||
id: string;
|
||||
@@ -16,7 +15,31 @@ export interface User {
|
||||
service: string;
|
||||
}
|
||||
|
||||
export function mapUserReponseToUser(data: UserResponse): User {
|
||||
export interface UserApiResponse {
|
||||
pxInsName: string;
|
||||
pxLimitedAccess: string;
|
||||
pxObjClass: string;
|
||||
pyAccessGroup: string;
|
||||
pyFirstName: string;
|
||||
pyLastName: string;
|
||||
pyLastSignon: string;
|
||||
pyOrganization: string;
|
||||
pyOrgDivision: string;
|
||||
pyOrgUnit: string;
|
||||
pyTelephone: string;
|
||||
pyUserIdentifier: string;
|
||||
pyUserName: string;
|
||||
pyAccessGroupsAdditional: string[];
|
||||
pyAddresses: {
|
||||
Email: {
|
||||
pxObjClass: string;
|
||||
pxSubscript: string;
|
||||
pyEmailAddress: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export function mapUserApiReponseToUser(data: UserApiResponse): User {
|
||||
return {
|
||||
id: data.pyUserIdentifier,
|
||||
lastName: data.pyLastName,
|
||||
|
||||
Reference in New Issue
Block a user