UNPKG

contentful-management

Version:
63 lines (62 loc) 1.56 kB
import type { DefaultElements, BasicMetaSysProps, MakeRequest } from '../common-types'; export type UserProps = { /** * System metadata */ sys: BasicMetaSysProps; /** * First name of the user */ firstName: string; /** * Last name of the user */ lastName: string; /** * Url to the users avatar */ avatarUrl: string; /** * Email address of the user */ email: string; /** * Activation flag */ activated: boolean; /** * Number of sign ins */ signInCount: number; /** * User confirmation flag */ confirmed: boolean; '2faEnabled': boolean; cookieConsentData: string; /** * Language used in the interface and email communications. * Overrides the organization default language. */ preferredLanguage: string | null; }; export interface User extends UserProps, DefaultElements<UserProps> { } /** * @internal * @param makeRequest - function to make requests via an adapter * @param data - Raw data * @returns Normalized user */ export declare function wrapUser<T = UserProps>(_makeRequest: MakeRequest, data: T): T & { toPlainObject(): T; }; /** * @internal * @param makeRequest - function to make requests via an adapter * @param data - Raw data collection * @returns Normalized user collection */ export declare const wrapUserCollection: <T = UserProps>(makeRequest: MakeRequest, data: import("..").CollectionProp<T>) => import("..").Collection<T & { toPlainObject(): T; }, T>;