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

23 lines
474 B
TypeScript
Raw Normal View History

2022-10-25 00:06:50 +13:00
import { Context, Request } from "koa"
import { User, Role, UserRoles } from "../documents"
import { License } from "../sdk"
2022-07-19 08:11:52 +12:00
export interface ContextUser extends Omit<User, "roles"> {
2022-07-19 08:11:52 +12:00
globalId?: string
license: License
userId?: string
roleId?: string | null
role?: Role
roles?: UserRoles
csrfToken?: string
2022-07-19 08:11:52 +12:00
}
2022-10-25 00:06:50 +13:00
export interface BBRequest extends Request {
body: any
}
export interface BBContext extends Context {
request: BBRequest
2022-07-19 08:11:52 +12:00
user?: ContextUser
}