1
0
Fork 0
mirror of synced 2024-06-29 11:31:06 +12:00
budibase/packages/types/src/core/context.ts

20 lines
433 B
TypeScript
Raw Normal View History

import { User, Account } from "../documents"
import { IdentityType } from "./identification"
export interface BaseContext {
_id: string
type: IdentityType
}
export interface AccountUserContext extends BaseContext {
tenantId: string
account: Account
}
export interface UserContext extends BaseContext, User {
_id: string
account?: Account
}
export type IdentityContext = BaseContext | AccountUserContext | UserContext