import { StreetAddress } from '..'; import { BaseClass } from '../base/base'; export declare enum CLIENT_OPERATING_SYSTEM { ANDROID = "android", IOS = "ios", IPadOS = "iPadOS", Unknown = "unknown" } /** * Registration status * - may be used for user and device (planned) */ export declare enum REGISTRATION_STATUS { NOT_REGISTERED = "not_registered", REGISTERED = "registered", REVOKED = "revoked" } export declare enum USER_ROLES_GLOBAL { PUBLIC = "public", EXTERNAL = "external", USER = "user", OFFICER = "officer", SUPERVISOR = "supervisor", ADMIN = "admin", MASTER = "master" } export declare const userRoleIndex: { role: USER_ROLES_GLOBAL; index: number; canChangeRole: boolean; }[]; /** * The identity assurance level reflects how well the user is known * * none = public sign-up, no verification * basic = basic verification by role OFFICER and above (manually enter details) * complete = verification by role OFFICER and above * maximum = proper KYC verification with face match */ export declare enum USER_IDENTITY_ASSURANCE_LEVEL { NONE = "none", BASIC = "basic", COMPLETE = "complete", MAXIMUM = "maximum" } export declare enum USER_IDENTITY_DOCUMENT { NONE = "none", PASSPORT = "passport", NATIONAL_ID = "national_id", DRIVING_LICENSE = "driving_license" } /** * Currency: Would usually be btc, eth, ... * Address: The related wallet address * Description: A description for the user to identity fhe wallet */ export declare class BlockchainWallet { title: string; currency: string; address: string; description?: string; } /** * Primarily used for profile links * Label: for ex. Mastodon * Address: Link to Mastodon profile */ export interface UserProfileMeta { label: string; address: string; } /** * User-editable profile * * This is for the user to have more control over the experience */ export declare class UserProfile { displayName?: string; about?: string; meta?: UserProfileMeta[]; preferredLanguage?: string; wallets?: BlockchainWallet[]; } /** * Not-editable user profile * * A note on identity documents: * - when identityDocumentIsValidIndefinitely is true * identityDocumentExpiryDate should be undefined */ export interface AdditionalUserInfo { primaryLanguage: string; localizedTitle: string | undefined; localizedFirstName: string | undefined; localizedLastName: string | undefined; identityDocumentNumber: string | undefined; identityDocumentType: USER_IDENTITY_DOCUMENT; identityDocumentIssueDate: Date | undefined; identityDocumentExpiryDate: Date | string | undefined; identityDocumentIsValidIndefinitely: boolean | undefined; identityDocumentIssuer?: undefined; dateOfBirth: Date | undefined; gender: string | undefined; } export interface UserMobileClientInfo { system: CLIENT_OPERATING_SYSTEM; systemName: string; systemVersion: string; buildId: string; networkCarrier: string; } export declare abstract class UserBaseEntityClass extends BaseClass { /** * This field will be constructed automatically: * input username: max.moritz * input primaryDomain.name: pantherx.org * saved username: max.moritz@pantherx.org * * The primary domain does not have to be a FQDN */ username: string; /** * This is the username without domain * primarily to better support other schemes like Matrix */ usernameWithoutDomain: string; email: string; phoneNumber: string; roles: USER_ROLES_GLOBAL[]; title: string; firstName: string; lastName: string; profile: UserProfile; /** * This is meant to store additional user info * like names in another language, gender and so on */ additionalInfo: AdditionalUserInfo; address: StreetAddress[]; /** * This is meant to store additional system related user info * like for ex. settings */ userData: any; /** * This is meant to store additional mobile client related user info * like for ex. settings */ clientData: UserMobileClientInfo; isBlocked: boolean; /** * Primary indicator on whether the user has completed registration. * Users without completed registration cannot interact with the system. * * @deprecated use registrationStatus instead */ registrationCompleted: boolean; /** * Primary indicator on whether the user has completed registration. * Users without completed registration cannot interact with the system. * * - not_registered * - registered * - revoked */ registrationStatus: REGISTRATION_STATUS; /** * Primary indicate on whether the user has completed some sort of verification. * This signals that the user identity is known at least vaguely * * This is applicable to identity assurance level: * - basic * - complete * - maximum */ isVerified: boolean; /** * Indicates to what degree the user's identity has been verified. */ identityAssuranceLevel: USER_IDENTITY_ASSURANCE_LEVEL; constructor(partial: Partial); isActive(): boolean; }