2022-05-21 08:16:29 +12:00
|
|
|
import { Document } from "../document"
|
|
|
|
|
|
|
|
export interface User extends Document {
|
2022-05-26 08:32:08 +12:00
|
|
|
tenantId: string
|
|
|
|
email: string
|
2022-05-19 19:19:25 +12:00
|
|
|
roles: UserRoles
|
2022-05-21 08:16:29 +12:00
|
|
|
builder?: {
|
|
|
|
global: boolean
|
|
|
|
}
|
|
|
|
admin?: {
|
|
|
|
global: boolean
|
|
|
|
}
|
2022-05-24 09:14:44 +12:00
|
|
|
providerType?: string
|
2022-05-25 07:01:13 +12:00
|
|
|
password?: string
|
|
|
|
status?: string
|
2022-07-27 07:04:29 +12:00
|
|
|
createdAt?: number // override the default createdAt behaviour - users sdk historically set this to Date.now()
|
|
|
|
userGroups?: string[]
|
2022-08-23 20:37:13 +12:00
|
|
|
forceResetPassword?: boolean
|
2022-09-06 23:25:57 +12:00
|
|
|
dayPassRecordedAt?: string
|
2022-05-19 19:19:25 +12:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface UserRoles {
|
|
|
|
[key: string]: string
|
|
|
|
}
|
2022-08-23 20:37:13 +12:00
|
|
|
|
|
|
|
// utility types
|
|
|
|
|
|
|
|
export interface BuilderUser extends User {
|
|
|
|
builder: {
|
|
|
|
global: boolean
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface AdminUser extends User {
|
|
|
|
admin: {
|
|
|
|
global: boolean
|
2022-08-26 06:41:47 +12:00
|
|
|
}
|
2022-08-23 20:37:13 +12:00
|
|
|
builder: {
|
|
|
|
global: boolean
|
|
|
|
}
|
2022-08-26 06:41:47 +12:00
|
|
|
}
|