UNPKG

@altostra/core

Version:

Core library for shared types and logic

23 lines (22 loc) 1.06 kB
import type { EmailAddress } from "../CustomTypes/EmailAddress"; import type { ISODate } from "../CustomTypes/ISODate"; import type { NonEmptyString } from "../CustomTypes/NonEmptyString"; import type { Maybe } from "../Maybe"; import type { AltostraAccountId, UserRoleName } from "./AltostraAccount"; export interface UserResponse { id: AltostraAccountId; name: NonEmptyString; email: EmailAddress; role: UserRoleName; lastLogin: ISODate; image: Maybe<NonEmptyString>; authProvider: NonEmptyString; } export interface GetUsersInOrganizationResponse { users: UserResponse[]; } export declare const isUserResponse: import("@altostra/type-validations").ObjectOfTypeValidation<UserResponse>; export declare const isGetUsersInOrganizationResponse: import("@altostra/type-validations").ObjectOfTypeValidation<GetUsersInOrganizationResponse>; export declare const FAKE_MAIL_SUFFIX = "@noreply.altostra.com"; export declare function defaultEmail(): EmailAddress; export declare function isDefaultEmail(email: EmailAddress): boolean;