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 Site Application` (ArcGIS Online) and * `Site Application` (ArcGIS Enterprise) items. */ export default class HubSiteProcessor implements IProcessor { constructor(); name: string; /** * Can this processor convert a specific 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; /** * Can a given user deploy a specific site template * * Essentially checks user privs and returns information * about the specific missing privs * * @param {IItemTemplate} item * @param {IUser} user * @return {*} {IDeployable} */ canUserDeploy(item: IItemTemplate, user: IUser): IDeployable; /** * Convert a Site 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; /** * Deploy a Site template * * @param {IItemTemplate} template * @param {ISolutionVariables} variables * @param {UserSession} srcSession Credentials for fetching information * @param {UserSession} destSession Credentials for writing information * @return {*} {Promise} */ deployFromTemplate(template: IItemTemplate, variables: ISolutionVariables, srcSession: UserSession, destSession: UserSession): Promise; /** * Post-Process for Site * * - fetch the site data * - share all items to the Hub teams created as part of the site * - link any created page to the site item * - re-interpolate any remaining item ids that were not direct deps of the site * * @param {IItem} item * @param {IItem[]} allItems * @param {UserSession} destSession * @return {*} {Promise} */ postProcess(item: IItem, allItems: IItem[], solutionVariables: ISolutionVariables, destSession: UserSession): Promise; /** * Remove a Site item * * This will correctly clean up domain service entries * and unlink any Page items that may be connected to * this item. * * @param {IItem} item * @param {UserSession} session * @return {*} {Promise} */ remove(item: IItem, session: UserSession): Promise; }