UNPKG

@arc-publishing/sdk-identity

Version:
77 lines (76 loc) 1.98 kB
import { UserIdentity } from './userIdentity'; export interface BaseUserProfile { addresses?: Array<Address>; attributes?: Array<Attribute>; birthDay?: string; birthMonth?: string; birthYear?: string; contacts?: Array<Contact>; createdOn?: number; deletedOn?: number | null; deletionRule?: number; displayName?: string; email?: string; emailVerified: boolean; firstName?: string; gender?: string; lastName?: string; legacyId?: string; modifiedOn?: number; picture?: string; secondLastName?: string; status?: 'Active' | 'Disabled'; unverifiedEmail?: string; } export interface UserProfile extends BaseUserProfile { uuid?: string; identities: Array<ProfileIdentity>; } export interface SignUpProfile extends BaseUserProfile { email: string; } export interface Contact { phone: string; type: ContactType; } export type ContactType = 'WORK' | 'HOME' | 'PRIMARY' | 'OTHER'; export interface Attribute { name: string; value: string; } export interface Address { line1: string; line2?: string; locality: string; region?: string; postal?: string; country?: string; type: ContactType; } export declare function isUserProfile(object: any): object is UserProfile; export interface SignUpRequest { identity: { userName: string; credentials: string; }; profile: BaseUserProfile | null; } export interface ProfileIdentity { createdOn: string; createdBy: string; modifiedOn: string; modifiedBy: string; deletedOn: string; id: number; userName: string; passwordReset: boolean; type: 'Identity' | 'Facebook' | 'Google'; lastLoginDate: string; locked: boolean; } export interface SignUpResponse extends UserIdentity { uuid: string; identities: Array<ProfileIdentity>; profile: UserProfile; } export declare function isSignUpResponse(object: any): object is SignUpResponse;