import { IProcessorConversionOutput, IProcessor, IItemTemplate, IDeployedTemplateResponse, IPostProcessResult, ISolutionVariables, IDeployable, IRemovedItem } from '@esri/templates-common'; import { IUser, UserSession } from '@esri/arcgis-rest-auth'; import { IItem } from '@esri/arcgis-rest-portal'; /** * Handle Processing for `Hub Page` (ArcGIS Online) and * `Site Page` (ArcGIS Enterprise) items. */ export default class HubPageProcessor implements IProcessor { constructor(); name: string; /** * Can this processor convert this type of item * * @param {IItem} item * @return {*} {boolean} */ canConvert(item: IItem): boolean; /** * Can this processor deploy this item template? * * @param {IItemTemplate} itemTemplate * @return {*} {boolean} */ canDeploy(itemTemplate: IItemTemplate): boolean; /** * Can this handle post-processing for a specific item * * @param {IItem} item * @return {*} {boolean} */ canPostProcess(item: IItem): boolean; /** * Con this processor remove this type of item * * @param {IItem} item * @return {*} {boolean} */ canRemove(item: IItem): boolean; canUserDeploy(item: IItemTemplate, user: IUser): IDeployable; /** * Convert a Page to a Template * * @param {IItem} item * @param {UserSession} srcSession Credentials for fetching information * @param {Record} [params] * @return {*} {Promise} */ convertToTemplate(item: IItem, srcSession: UserSession, _params?: Record): Promise; deployFromTemplate(template: IItemTemplate, variables: ISolutionVariables, srcSession: UserSession, destSession: UserSession): Promise; /** * Post Process a Page Item * * Post processing of a page is pretty simple - it just * re-interpolates using the SolutionVariables * * @param item * @param allItems * @param solutionVariables * @param destSession */ postProcess(item: IItem, allItems: IItem[], solutionVariables: ISolutionVariables, destSession: UserSession): Promise; /** * Remove a Hub Page item * * @param {IItem} item * @param {UserSession} session * @return {*} {Promise} */ remove(item: IItem, session: UserSession): Promise; }