export type Jwt = { /** * JWT encoded string. */ jwt: string; } export type IdentityList = { /** * Total number of identities documents that matched your query. */ total: number; /** * List of identities. */ identities: Identity[]; } /** * Identity */ export type Identity = { /** * Identity ID. */ $id: string; /** * Identity creation date in ISO 8601 format. */ $createdAt: string; /** * Identity update date in ISO 8601 format. */ $updatedAt: string; /** * User ID. */ userId: string; /** * Identity Provider. */ provider: string; /** * ID of the User in the Identity Provider. */ providerUid: string; /** * Email of the User in the Identity Provider. */ providerEmail: string; /** * Identity Provider Access Token. */ providerAccessToken: string; /** * The date of when the access token expires in ISO 8601 format. */ providerAccessTokenExpiry: string; /** * Identity Provider Refresh Token. */ providerRefreshToken: string; } export type Preferences = { [key: string]: any; } export type User = { /** * User ID. */ $id: string; /** * User creation date in ISO 8601 format. */ $createdAt: string; /** * User update date in ISO 8601 format. */ $updatedAt: string; /** * User name. */ name: string; /** * Hashed user password. */ password?: string; /** * Password hashing algorithm. */ hash?: string; /** * Password hashing algorithm configuration. */ hashOptions?: object; /** * User registration date in ISO 8601 format. */ registration: string; /** * User status. Pass `true` for enabled and `false` for disabled. */ status: boolean; /** * Labels for the user. */ labels: string[]; /** * Password update time in ISO 8601 format. */ passwordUpdate: string; /** * User email address. */ email: string; /** * User phone number in E.164 format. */ phone: string; /** * Email verification status. */ emailVerification: boolean; /** * Phone verification status. */ phoneVerification: boolean; /** * Multi factor authentication status. */ mfa: boolean; /** * User preferences as a key-value object */ prefs: Preferences; /** * A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider. */ targets: Target[]; /** * Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours. */ accessedAt: string; } export type LogList = { /** * Total number of logs documents that matched your query. */ total: number; /** * List of logs. */ logs: Log[]; } export type Log = { $id: string; /** * Target creation time in ISO 8601 format. */ $createdAt?: string; /** * Target update date in ISO 8601 format. */ $updatedAt?: string; tenantId: string; userId: string; apiKeyId: string; rowId: string; url: string; action: string; details: string | null; commentId: string | null; } export type MfaType = { /** * Secret token used for TOTP factor. */ secret: string; /** * URI for authenticator apps. */ uri: string; } export type MfaChallenge = { /** * Token ID. */ $id: string; /** * Token creation date in ISO 8601 format. */ $createdAt: string; /** * User ID. */ userId: string; /** * Token expiration date in ISO 8601 format. */ expire: string; } export type MfaFactors = { /** * Can TOTP be used for MFA challenge for this account. */ totp: boolean; /** * Can phone (SMS) be used for MFA challenge for this account. */ phone: boolean; /** * Can email be used for MFA challenge for this account. */ email: boolean; /** * Can recovery code be used for MFA challenge for this account. */ recoveryCode: boolean; } export type MfaRecoveryCodes = { /** * Recovery codes. */ recoveryCodes: string[]; } export type Token = { /** * Token ID. */ $id: string; /** * Token creation date in ISO 8601 format. */ $createdAt: string; /** * User ID. */ userId: string; /** * Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload. */ secret: string; /** * Token expiration date in ISO 8601 format. */ expire: string; /** * Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email. */ phrase: string; } export type SessionList = { /** * Total number of sessions documents that matched your query. */ total: number; /** * List of sessions. */ sessions: Session[]; } export type Session = { /** * Session ID. */ $id: string; /** * Session creation date in ISO 8601 format. */ $createdAt: string; /** * Session update date in ISO 8601 format. */ $updatedAt: string; /** * User ID. */ userId: string; /** * Session expiration date in ISO 8601 format. */ expire: string; /** * Session Provider. */ provider: string; /** * Session Provider User ID. */ providerUid: string; /** * Session Provider Access Token. */ providerAccessToken: string; /** * The date of when the access token expires in ISO 8601 format. */ providerAccessTokenExpiry: string; /** * Session Provider Refresh Token. */ providerRefreshToken: string; /** * IP in use when the session was created. */ ip: string; /** * Operating system code name. View list of [available options](https://github.com/appconda/appconda/blob/master/docs/lists/os.json). */ osCode: string; /** * Operating system name. */ osName: string; /** * Operating system version. */ osVersion: string; /** * Client type. */ clientType: string; /** * Client code name. View list of [available options](https://github.com/appconda/appconda/blob/master/docs/lists/clients.json). */ clientCode: string; /** * Client name. */ clientName: string; /** * Client version. */ clientVersion: string; /** * Client engine name. */ clientEngine: string; /** * Client engine name. */ clientEngineVersion: string; /** * Device name. */ deviceName: string; /** * Device brand name. */ deviceBrand: string; /** * Device model name. */ deviceModel: string; /** * Country two-character ISO 3166-1 alpha code. */ countryCode: string; /** * Country name. */ countryName: string; /** * Returns true if this the current user session. */ current: boolean; /** * Returns a list of active session factors. */ factors: string[]; /** * Secret used to authenticate the user. Only included if the request was made with an API key */ secret: string; /** * Most recent date in ISO 8601 format when the session successfully passed MFA challenge. */ mfaUpdatedAt: string; } export type Target = { /** * Target ID. */ $id: string; /** * Target creation time in ISO 8601 format. */ $createdAt: string; /** * Target update date in ISO 8601 format. */ $updatedAt: string; /** * Target Name. */ name: string; /** * User ID. */ userId: string; /** * Provider ID. */ providerId?: string; /** * The target provider type. Can be one of the following: `email`, `sms` or `push`. */ providerType: string; /** * The target identifier. */ identifier: string; }