@omnia/fx-models
Version:
Provide Omnia Fx Models Stuffs.
104 lines (103 loc) • 4.27 kB
TypeScript
import { GuidValue } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
import { IOmniaPropertyBag, OmniaNamedModel } from "../NamedProperty";
import { EmailPropertyDefinition, EmailPropertyValue, ImagePropertyDefinition, LanguagePropertyDefinition, PhoneNumberPropertyValue, PropertyValueBinding, TextPropertyDefinition } from "../properties";
import { IResolvedIdentity, Identity } from "./Identity";
import { IdentityTypes } from "./IdentityTypes";
import { ScopeTypes } from "./ScopeTypes";
declare class AzureAdUserPropertyValues {
private resolvedUser;
objectId: GuidValue;
profileUrl: string;
constructor(resolvedUser: ResolvedUserIdentity);
}
export declare class UserIdentity extends Identity {
type: IdentityTypes;
}
export declare class ResolvedUserIdentity extends UserIdentity implements IResolvedIdentity {
userTypeId: GuidValue;
providerId: GuidValue;
propertyValues: Array<PropertyValueBinding<any>>;
displayName: PropertyValueBinding<TextPropertyDefinition>;
username: PropertyValueBinding<TextPropertyDefinition>;
image: PropertyValueBinding<ImagePropertyDefinition>;
email: PropertyValueBinding<EmailPropertyDefinition>;
preferredLanguage: PropertyValueBinding<LanguagePropertyDefinition>;
uiLanguage: PropertyValueBinding<LanguagePropertyDefinition>;
providerIdentity: string;
scope: string;
isRemoved: boolean;
firstLogin: Date;
lastLogin: Date;
replacedByIdentity: Identity;
replacesIdentity: Identity;
scopeType: ScopeTypes;
static create(options: Partial<ResolvedUserIdentity>): ResolvedUserIdentity;
static isAzureAdUser(resolvedUser: ResolvedUserIdentity): boolean;
static isOmniaUser(resolvedUser: ResolvedUserIdentity): boolean;
static tryToGetAzureAdProperties(resolvedUser: ResolvedUserIdentity): AzureAdUserPropertyValues;
static safeGetUiLanguage(resolvedUser: ResolvedUserIdentity): PropertyValueBinding<LanguagePropertyDefinition>;
static isAnonymousUser(resolvedUser: ResolvedUserIdentity): boolean;
static getDisplayName(user: ResolvedUserIdentity, deletedUserText: string): string;
}
export declare abstract class UserPropertyBagModel extends OmniaNamedModel {
}
export interface UserWithProperties extends ResolvedUserIdentity {
properties: Array<UserPropertyBagModel>;
}
export interface UserWithPropertyBag extends ResolvedUserIdentity {
propertyBag: IOmniaPropertyBag<UserPropertyBagModel>;
}
export declare class UserAccessibilitySettings extends UserPropertyBagModel {
useContrastTheme: boolean;
useAccessibilityFeature: boolean;
constructor();
}
export declare class DocumentDirectionSettings extends UserPropertyBagModel {
useContrastTheme: boolean;
isRTLDocument: boolean;
constructor();
}
export declare enum UserSortColumn {
DisplayName = 1,
Email = 2,
Username = 3,
ProviderId = 4,
UserTypeId = 5
}
export interface UserIdentityAddRequest {
id: GuidValue;
providerId: GuidValue;
userTypeId: GuidValue;
displayName: PropertyValueBinding<TextPropertyDefinition>;
username: PropertyValueBinding<TextPropertyDefinition>;
image: PropertyValueBinding<ImagePropertyDefinition>;
email: PropertyValueBinding<EmailPropertyDefinition>;
preferredLanguage: PropertyValueBinding<LanguagePropertyDefinition>;
uiLanguage: PropertyValueBinding<LanguagePropertyDefinition>;
propertyValues: Array<PropertyValueBinding<any>>;
scope: string;
scopeType: ScopeTypes;
}
export interface UserIdentityAddOrUpdateRequestWithPassword extends UserIdentityAddRequest {
password: string;
}
export interface UserIdentityAddOrUpdateWithAuthInformation extends UserIdentityAddRequest {
authenticationInformation: UserAuthenticationInformation;
}
export interface UserAuthenticationInformation {
authenticationEmail: EmailPropertyValue;
authenticationMobile: PhoneNumberPropertyValue;
disabled?: boolean;
validFrom?: Date;
validTo?: Date;
}
export interface UserAddWithAuthInfoReponse {
user: ResolvedUserIdentity;
setupAuthLink: string;
emailSent: boolean;
}
export interface ResetAccountRequest {
sendAuthSetupLinkByEmail: boolean;
redirectUrl: string;
}
export {};