import { GuidValue } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models"; import { AppInstance, AppTemplate, AppDefinition, AppInstanceCreateInfo } from "."; import { MultilingualString } from "@omnia/fx-models"; export interface AppProvisioningStepRegistration { /** * The title of the app provisioning step */ info: AppProvisioningStepInfo; /** * This influence the order of the app provisioning steps displayed in Provisioning Template flow, be nice, use ordering with gap -100, 0, 100, 200 So other extensions etc can inject between Note: Users can still be able to change the order in Provisioning Template flow */ weight: number; madantory?: boolean; } export interface AppProvisioningStepContext { stepId: GuidValue; stepTitle: string; appInstance: AppInstance; appTemplate: AppTemplate; appDefinition: AppDefinition; /** * Omnia will render a default input ui for app title/description/showInPublicListings. * If we want to get rid of the default ui to have full control on the ux, * we can define a web component and put the ManifestId into this property * * */ overriddenInformationInputManifestId?: GuidValue; /** * In case we want to append extra ui to configure more information, * we can define a web component and put the ManifestId into this property * * */ appendInformationInputManifestId?: GuidValue; } export interface AppProvisioningStepInfo { id: GuidValue; title: MultilingualString; elementToRender: string; summaryElementToRender?: string; appDefinitionId: GuidValue; isFeature: boolean; shouldRender?: (appTemplate: AppTemplate) => boolean; isDefaultStep?: boolean; } export interface IAppProvisioningStepComponent { context: AppProvisioningStepContext; registerOnGoToNext: (onGoToNext: () => Promise) => void; registerOnGoToPrev: (onGoToPrev: () => Promise) => void; allowMultipleAppAdministrators?: boolean; allowMemberAndGroup?: boolean; isJourneyProvisioning?: boolean; } export interface InformationSummaryRenderer { /** * There is default UI for information summary i.e. show title, description, image and public listing... * Hide it to render the whole UI itself * */ hideDefaultUI?: boolean; /** * The web-component to render information summary. * If the default UI is not hidden, this will be rendered under that. * * */ element: string; } export interface AppInstanceValidationRules { descriptionMaximumLength?: number; } export interface AppProvisioningHandler { /** * Register callback to run right before app instance provisioning flow is triggered */ onBeforeCreateAppInstance: (appInstance: AppInstance, appInstanceCreateInfo: AppInstanceCreateInfo) => Promise; /** * Manifest Id for the approval blade for the app definition in Omnia Admin */ adminApprovalBladeManifestId?: GuidValue; /** * Get overrideen information input manifest id */ getOverriddenInformationInputManifestId?: (appInstance: AppInstance, appTemplate: AppTemplate) => GuidValue; /** * Get append information input manifest id */ getAppendInformationInputManifestId?: (appInstance: AppInstance, appTemplate: AppTemplate) => GuidValue; /** * Get information summary renderer * */ getInformationSummaryRenderer?: (appInstance: AppInstance, appTemplate: AppTemplate) => InformationSummaryRenderer; getPendingRequestUrl?: (appInstance: AppInstance) => string; getValidationRules?: (appTemplate: AppTemplate) => AppInstanceValidationRules; } export declare const AppProvisioningEnterprisePropertiesStepId = "9330B10C-1473-475B-8AFA-AB03686058FA"; export declare const AppProvisioningUserStepId = "992857a6-0c9f-4ee4-a9ae-aa9b0d9ee998"; export declare const AppProvisioningDefaultSteps: AppProvisioningStepRegistration[];