import { IComposerDone } from "./Composer"; import { LoadByUrlMatchingRule, DomMatchingRule, FeatureActiveRule, LoadIfManifestLoaded, ClientResolvableLoadRule, LicenseRule, ResolvedUserIdentity, UserPropertyBagModel, OmniaClientRuntimes, OmniaBackendRuntimes } from '../../fx-models'; export interface ILogicalOperatorSelector extends IComposerDone { and: () => ICompletableCombinableRuleComposer; or: () => ICompletableCombinableRuleComposer; } export interface ICombinableRuleComposer { /** Rules applied clientside Every rule is compared to the current server relative url of the page (i.e. from arrow in: https://mydomain.com--->/something1/somethingelse?query1=test) */ loadByUrlMatching: (urlRule: LoadByUrlMatchingRule) => ILogicalOperatorSelector; /** Rule applied clientside Every rule is executed and matched against the DOM */ loadByDomMatching: (domRule: DomMatchingRule) => ILogicalOperatorSelector; /** Rule applied clientside Every rule is matched against the activated features */ loadIfFeatureActivated: (featureRule: FeatureActiveRule) => ILogicalOperatorSelector; /** Rule applied clientside Every rule is matched against the activated features */ loadWhenHavingLicense: (licenseRule: LicenseRule) => ILogicalOperatorSelector; /** Add a rule when the manifest should be loaded Make sure to add rules which is not to generic, i.e. only load when needed This rules load's your manifest after another manifest has been loaded */ loadIfManifestLoaded: (loadRule: LoadIfManifestLoaded) => ILogicalOperatorSelector; /** * Rule applied clientside. Match against clientRuntime in omnia environment context. * */ loadByClientRuntimeMatching: (clientRuntimes: OmniaClientRuntimes | OmniaClientRuntimes[]) => ILogicalOperatorSelector; /** * Rule applied clientside. Match against backendRuntime in omnia environment context. * */ loadByBackendRuntimeMatching: (backendRuntimes: OmniaBackendRuntimes | OmniaBackendRuntimes[]) => ILogicalOperatorSelector; /** Rule applied clientside Every rule is matched against the in omnia app domain. Support regExp if that user property type is String like ".*?(play=true)". Default with User type so use like .loadByUserMatching("type", UserTypes.AzureAd). Otherwise specific your object type to set property and value like .loadByUserMatching(AzureAdUserTypeObject, "mailboxSettings", { timeZone: "" }) or for user property bag like const UserAccessibilitySettingsObject = new UserAccessibilitySettings(); .loadByUserMatching(UserAccessibilitySettingsObject, "useContrastTheme", true) */ loadByUserMatching: { (propertyName: K2, value: ResolvedUserIdentity[K2]): ILogicalOperatorSelector; (model: T3, propertyName: K3, value: T3[K3]): ILogicalOperatorSelector; (model: T3, propertyName: K3, value: T3[K3]): ILogicalOperatorSelector; }; } export interface ICompletableCombinableRuleComposer extends ICombinableRuleComposer, IComposerDone { } export declare class CombinableRuleComposer implements ICombinableRuleComposer, ILogicalOperatorSelector { private newRuleCb; private composerForDone; private rules; private selectedLogicalOperator?; constructor(newRuleCb: (allRules: Array) => void, composerForDone: T); done: () => T; loadByUrlMatching: (urlRule: LoadByUrlMatchingRule) => this; loadIfFeatureActivated: (featureRule: FeatureActiveRule) => this; loadWhenHavingLicense: (licenseRule: LicenseRule) => this; loadByDomMatching: (domRule: DomMatchingRule) => this; loadIfManifestLoaded: (manifestLoadedRule: LoadIfManifestLoaded) => this; loadByClientRuntimeMatching: (clientRuntimes: OmniaClientRuntimes | OmniaClientRuntimes[]) => this; loadByBackendRuntimeMatching: (backendRuntimes: OmniaBackendRuntimes | OmniaBackendRuntimes[]) => this; loadByUserMatching: (...args: any[]) => this; and: () => this; or: () => this; private addRule; }