UNPKG

@becomes/cms-cloud-client

Version:

SDK for accessing BCMS Cloud API

41 lines (40 loc) 1.26 kB
import { FSDBEntity } from '@becomes/purple-cheetah-mod-fsdb/types'; import { JWT, JWTRole, JWTRoleName } from '@becomes/purple-cheetah-mod-jwt/types'; import type { ObjectSchema } from '@becomes/purple-cheetah/types'; import { UserAdmin } from './admin'; import { UserOrg } from './org'; import { UserPersonal } from './personal'; import { UserQuestions } from './questions'; export interface UserJwtProps { email: string; personal: UserPersonal; orgs: UserOrg[]; instances: Array<{ iid: string; ine: string; oi: string; one: string; r: JWTRoleName; }>; admin?: UserAdmin; setupDone: boolean; } export type UserJwt = JWT<UserJwtProps>; export type UserSignUpType = 'email' | 'github' | 'google'; export interface User extends FSDBEntity { email: string; password: string; roles: JWTRole[]; personal: UserPersonal; orgs: UserOrg[]; verified: boolean; admin?: UserAdmin; signUpType: UserSignUpType; oauthId?: string; suspended?: boolean; suspendedMessage?: string; setupDone: boolean; questions?: UserQuestions; } export type UserProtected = Omit<User, 'password' | 'refreshTokens' | 'otp'>; export declare const UserSchema: ObjectSchema;