1
0
Fork 0
mirror of synced 2024-06-28 02:50:50 +12:00
budibase/packages/types/src/documents/global/user.ts

42 lines
745 B
TypeScript
Raw Normal View History

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
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
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
}
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-23 20:37:13 +12:00
builder: {
global: boolean
}
}