import type { IClientSideComponentManifest, ILocalizedString } from './IClientSideComponentManifest'; /** * This is the manifest for a PREFAB application. * * @alpha */ export interface IPrefabAppManifest extends IClientSideComponentManifest { /** * Title of the application as a dictionary of locale keys to title values. This value will be * displayed to the user in the (page creation) interface. * * @remarks * * Supported values: a dictionary of locale keys to strings. Should always have a 'default' key. * * Example: `"My Application"` * * ``` * { * "default": "My Application" * "en-us": "My Application", * "fr-fr": "Ma demande", * "zh": "我的應用程式" * } * ``` */ title: ILocalizedString; /** * Description of the application represented as a dictionary of locale keys to description values. * This value will be displayed to the user in the (page creation) interface. * * @remarks * * Supported values: a dictionary of locale keys to strings. Should always have a 'default' key. * * Examples: * * ``` * "An application for searching for things." * ``` * or * ``` * { * "default": "An application for searching for things.", * "en-us": "An application for searching for things.", * "fr-fr": "Une demande pour la recherche de choses.", * "zh": "申請尋找的東西。" * } * ``` */ description: ILocalizedString; /** * Specifies if there is a FCR (Finish Run Configuration) available for the app. True if no FCE is available. */ isConfigured: boolean; /** * Describes how the PREFAB app can be installed: NewSite or ExistingSite. If omitted the app supports both. */ appInstallationTypes?: Array<'NewSite' | 'ExistingSite'>; /** * Site Script actions. * * @remarks - See https://developer.microsoft.com/json-schemas/sp/site-design-script-actions.schema.json for a list of actions. * - The `onInstall` actions will be run when the app is installed on a site. * - The `onDemand` actions will not run automatically, but can be referenced by an App developer. */ actions?: Record; /** * Links to be rendered in the suite nav site settings menu for the PREFAB App. */ siteSettingsLinks?: IPrefabAppSiteSettingsLink[]; /** * Toolbox entries for the PREFAB app. */ toolboxEntries?: IPrefabAppToolboxEntry[]; } /** * Available types of Site Scripts. * - onInstall - Site Script that will be applied when the app is installed. * - onDemand - Site Script that will be applied on demand by a PREFAB developer. * * @alpha */ export type SiteScriptType = 'onInstall' | 'onDemand'; /** * Base definition for Site Script. * * @alpha */ export interface IPrefabAppSiteScriptBase { /** * The type of the Site Script. */ type: SiteScriptType; /** * Actions to run as part of the Site Script. * @remarks - See https://developer.microsoft.com/json-schemas/sp/site-design-script-actions.schema.json for a list of actions. */ actions: ISiteScriptActionBase[]; } /** * Site Script that will be applied when the app is installed. * * @alpha */ export interface IPrefabAppOnInstallSiteScript extends IPrefabAppSiteScriptBase { /** * The type of the Site Script - onInstall. */ type: 'onInstall'; } /** * Site Script that will be applied by a PREFAB developer. * * @alpha */ export interface IPrefabAppOnDemandSiteScript extends IPrefabAppSiteScriptBase { /** * The type of the Site Script - onUpdate. */ type: 'onDemand'; } /** * Site Script that will be applied when the app is installed or on demand by a PREFAB app developer. * * @alpha */ export type PrefabAppSiteScript = IPrefabAppOnInstallSiteScript | IPrefabAppOnDemandSiteScript; /** * Base definition for Site Script action. * * @alpha */ export interface ISiteScriptActionBase { verb: string; [key: string]: any; } /** * Represents an item that should be rendered in the suite nav site settings menu. * * @alpha */ export interface IPrefabAppSiteSettingsLink { /** * The unique identifier of the route to be rendered when the settings link is selected. */ viewId: string; /** * Text of the link represented as a dictionary of locale keys to title values. This value will be displayed to the user in the suite nav site settings menu. * * @remarks * This text should be used in the suite nav site settings menu. * * Supported values: a dictionary of locale keys to strings. Should always have a `'default'` key. * * Example: `"My App Settings"` * ``` * { * "default": "My App Settings", * "en-us": "My App Settings", * "fr-fr": "Mes paramètres d'application", * "zh": "我的應用程式設定" * } * ``` * */ text: ILocalizedString; } /** * This interface specifies the set of that can be provided by a PREFAB developer if the application should be available in the modern SharePoint toolbox. * * @alpha */ export interface IPrefabAppToolboxEntry { /** * The unique identifier of the route to be rendered if the entry is added to the page. */ viewId: string; /** * Title of the PREFAB entry represented as a single a dictionary of locale keys to title values. This * value will be displayed to the user in the toolbox. * * @remarks * This title should be used in the Toolbox and other display areas. * * Usage: display the name of the PREFAB route in the toolbox, and the page. * * Supported values: a dictionary of locale keys to strings. Should always have a `'default'` key. * * Example: `"My PREFAB App"` * ``` * { * "default": "My PREFAB App" * "en-us": "My PREFAB App", * "fr-fr": "My PREFAB App", * "zh": "我的 PREFAB 應用程式" * } * ``` */ title: ILocalizedString; /** * Description of the PREFAB entry represented as a dictionary of locale keys to description values. This * value will be displayed to the user in the toolbox. This description should be used in the Toolbox tooltip and * other display areas. * * @remarks * * Usage: display the description of the PREFAB route in the toolbox tooltip, and the page. * * Supported values: a dictionary of locale keys to strings. Should always have a `'default'` key. * * Example: `"A tool for displaying neat information."` * * ``` * { * "default": "A tool for displaying neat information.", * "en-us": "A tool for displaying neat information.", * "fr-fr": "Un outil d'affichage des informations soignées.", * "zh": "用於顯示整潔資訊的工具。" * } * ``` */ description: ILocalizedString; /** * The icon for the PREFAB entry, to be displayed in the toolbox, represented as a character name in the * Office 365 icon font file. * * @remarks * The icon font is specified here: {@link https://aka.ms/uifabric-icons} If this field has * a value, the {@link IPrefabAppToolboxEntry.iconImageUrl} field will be ignored. * * Supported values: Any character name in the Office 365 Icon Font. * * Example: "graph" */ officeFabricIconFontName?: string; /** * The icon for the PREFAB app, to be displayed in the toolbox, represented as image URL. The image at the * URL must be exactly 40x28 px (SPPPLAT VSO#218660 to fix the size of the icon image). * * @remarks * If the {@link IPrefabAppToolboxEntry.officeFabricIconFontName} field does not have a value, * this field must have a value. This value can be an absolute URL (e.g. `"http://example.com/icons/my-icon.png"`) or * a relative file path (e.g. `"./icons/my-icon.png"`). In the latter case, the path will be resolved relative to * the folder containing the input manifest. The icon file will be copied to the deployment folder like an asset, * and the output manifest's iconImageUrl will be replaced with a URL relative to the URL used to load all other * assets (the loaderConfig.internalModuleBaseUrls property). * * Supported values: Any absolute URL. * * Example: `"https://contoso.akamaihd.net/files/myPREFABIcon.png"` */ iconImageUrl?: string; } //# sourceMappingURL=IPrefabAppManifest.d.ts.map