import { GuidValue } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models"; import { IMessageBusTopicSubscription } from "./Messaging"; export interface NamedPropertyIdentifier { serviceId: string; name: string; } export interface NamedProperty extends NamedPropertyIdentifier { value: T; } export interface TypedNamedProperty extends NamedPropertyIdentifier { } export interface INamedPropertiesOperations { /** * Gets a property or null if not found * */ getProperty: (typedPropertyDefinition: TypedNamedProperty) => T; } export type NamedPropertyCollection = Array>; export interface IOmniaPropertyBag { /** * Get a model from current values, i.e. assumes that the propertybag has been either initialized by calling getAllValues or initialized with values * Returns an instance of the the model with model values populated or null if not found (or if no values have been loaded for this bag) * */ getModel: (model: new () => Model) => Model; addOrUpdate: (...args: Array) => Promise>; getAllValues: (forceGetFromServer?: boolean) => Promise>; removeValues: (...args: Array) => Promise; removeAllValues: () => Promise; removeOmniaServiceValues: (omniaServiceId: GuidValue) => Promise; onChanged: () => IMessageBusTopicSubscription; } /** * This is the new base for omnia named typed properties * */ export declare abstract class OmniaNamedModel { readonly omniaServiceId: GuidValue; readonly uniqueModelName: string; constructor(omniaServiceId: GuidValue, uniqueModelName: string); }