1
0
Fork 0
mirror of synced 2024-06-22 16:10:40 +12:00
budibase/packages/types/src/documents/global/user.ts
2022-09-06 12:25:57 +01:00

42 lines
745 B
TypeScript

import { Document } from "../document"
export interface User extends Document {
tenantId: string
email: string
roles: UserRoles
builder?: {
global: boolean
}
admin?: {
global: boolean
}
providerType?: string
password?: string
status?: string
createdAt?: number // override the default createdAt behaviour - users sdk historically set this to Date.now()
userGroups?: string[]
forceResetPassword?: boolean
dayPassRecordedAt?: string
}
export interface UserRoles {
[key: string]: string
}
// utility types
export interface BuilderUser extends User {
builder: {
global: boolean
}
}
export interface AdminUser extends User {
admin: {
global: boolean
}
builder: {
global: boolean
}
}