|
| 1 | +/** |
| 2 | + * Identity user management types — response shapes and enums. |
| 3 | + */ |
| 4 | + |
| 5 | +/** |
| 6 | + * Defines how a user was created and how it is supposed to be used. |
| 7 | + */ |
| 8 | +export enum UserType { |
| 9 | + /** Standard interactive user. */ |
| 10 | + User = 'user', |
| 11 | + /** Robot user driving unattended automation. */ |
| 12 | + Robot = 'robot', |
| 13 | + /** User provisioned from an external directory (e.g. Azure AD). */ |
| 14 | + DirectoryUser = 'directoryUser', |
| 15 | + /** Group provisioned from an external directory. */ |
| 16 | + DirectoryGroup = 'directoryGroup', |
| 17 | + /** Robot account (non-interactive machine identity). */ |
| 18 | + RobotAccount = 'robotAccount', |
| 19 | + /** External application identity. */ |
| 20 | + Application = 'application', |
| 21 | +} |
| 22 | + |
| 23 | +/** |
| 24 | + * Discriminates a user by how they relate to directory provisioning. |
| 25 | + */ |
| 26 | +export enum UserCategory { |
| 27 | + /** Local account managed in UiPath. */ |
| 28 | + Local = 'local', |
| 29 | + /** Local account linked to a directory identity. */ |
| 30 | + LinkedLocal = 'linkedLocal', |
| 31 | + /** Account provisioned from an external directory. */ |
| 32 | + Directory = 'directory', |
| 33 | +} |
| 34 | + |
| 35 | +/** |
| 36 | + * User as returned by the Identity user management API. |
| 37 | + * |
| 38 | + * Field selection: `legacyId` (an internal platform synchronization field) is returned |
| 39 | + * by the API but dropped from the SDK because it has no use for an application developer. |
| 40 | + */ |
| 41 | +export interface RawUserGetResponse { |
| 42 | + /** User GUID. */ |
| 43 | + id: string; |
| 44 | + /** The username. */ |
| 45 | + userName: string; |
| 46 | + /** Email address. Empty string when the user has no email. */ |
| 47 | + email: string; |
| 48 | + /** Whether the email address has been confirmed. */ |
| 49 | + emailConfirmed: boolean; |
| 50 | + /** First name. */ |
| 51 | + name: string | null; |
| 52 | + /** Last name. */ |
| 53 | + surname: string | null; |
| 54 | + /** Display name. */ |
| 55 | + displayName: string | null; |
| 56 | + /** When the user was created. */ |
| 57 | + createdTime: string; |
| 58 | + /** When the user was last modified. */ |
| 59 | + lastModifiedTime: string | null; |
| 60 | + /** When the user last logged in. `null` if the user has never logged in. */ |
| 61 | + lastLoginTime: string | null; |
| 62 | + /** GUIDs of the groups the user is a member of. */ |
| 63 | + groupIds: string[]; |
| 64 | + /** Whether the user is active. */ |
| 65 | + isActive: boolean; |
| 66 | + /** Whether this user bypasses the basic authentication restriction. */ |
| 67 | + bypassBasicAuthRestriction: boolean; |
| 68 | + /** How the user was created and is supposed to be used. */ |
| 69 | + type: UserType; |
| 70 | + /** How the user relates to directory provisioning. */ |
| 71 | + category: UserCategory; |
| 72 | + /** Whether the user has accepted their invitation. */ |
| 73 | + invitationAccepted: boolean; |
| 74 | +} |
0 commit comments