import { EnterprisePropertyDefinition, IExtendApiManifestWithConfiguration, PropertyBindingProviderId, PropertyDataSourceId, PropertyDefinition, PropertyValuePrimitiveConverter } from "@omnia/fx-models"; import { GuidValue } from "../../../shared/models"; import { VueComponentBase } from "../../VueComponentBase"; import { PropertyDefinitionId, PropertySettings } from "./Properties"; import { IPropertyDataSourceRegistrationApi } from "./DataSource"; import { DataSourcePropertyDefintionHandlerId } from "@omnia/fx/services"; import { IPropertyBindingProviderRegistrationApi } from "./PropertyBindingProvider"; export type PropertyRegistrationId = GuidValue; export interface PropertyRegistration { id: PropertyRegistrationId; title: string; settingsElement?: string; properties?: Array PropertyDefinition>; enterpriseProperties?: EnterprisePropertyDefinition[]; } export interface PropertyProviderBaseConstructor { componentRef: VueComponentBase; propertyId: PropertyDefinitionId; propertySettings?: PropertySettings; } export interface IPropertyRegistrationApi { register(registration: PropertyRegistration): void; } export interface IPropertyDefinitionRegistrationApi { register>(propertyDefinitionConstructor: new () => TPropertyDef, readRenderComponentManifestId: GuidValue, editRendererComponentManifestId: GuidValue, propertyValuePrimitiveConverterCtor: new () => PropertyValuePrimitiveConverter, configurationRendererComponentManifestId?: GuidValue): any; getPropertyDefinitionsByIds(propertyDefinitionIds: Array): Promise>; getPropertyDefinitions(): Promise>; } export interface ResolvedPropertyDefinition { omniaServiceId: GuidValue; propertyDefinitionId: GuidValue; propertyDefinition: new () => PropertyDefinition; readRenderComponentManifestId: GuidValue; editRendererComponentManifestId: GuidValue; propertyValuePrimitiveConverterCtor: new () => PropertyValuePrimitiveConverter; configurationRendererComponentManifestId?: GuidValue; } declare module "@omnia/fx-models" { interface IOmniaUxApi { properties: { definitions: Promise; dataSources: { registrations: Promise; }; bindingProviders: { registrations: Promise; }; }; } interface IOmniaUxExtendApiManifest { properties: { definitions: IExtendApiManifestWithConfiguration; dataSources: { /** * Register the manifest/bundle that contains the propertydatasource * */ registrations: IExtendApiManifestWithConfiguration; /** * Register any external plugin/dataSourcePropertyDefinitionHandler for a property data source * */ pluginRegistration: IExtendApiManifestWithConfiguration<{ dataSourceId: PropertyDataSourceId; dataSourcePropertyDefinitionHandlerId: DataSourcePropertyDefintionHandlerId; }>; }; bindingProviders: { registrations: IExtendApiManifestWithConfiguration; }; }; } }