import { IProcessorConversionOutput, IProcessor, IItemTemplate, IServiceUrlTemplate, IDeployedTemplateResponse, IPostProcessResult, ISolutionVariables, IDeployable, IRemovedItem } from '@esri/templates-common'; import { IWebmap } from '@esri/arcgis-rest-types'; import { IItem } from '@esri/arcgis-rest-portal'; import { IUser, UserSession } from '@esri/arcgis-rest-auth'; import { IPortal } from '@esri/arcgis-rest-portal'; /** * Handles Web Map Items */ export default class WebMapProcessor implements IProcessor { constructor(); name: string; /** * Check the item to determine of this processor should handle * the conversion to a Template * * @param {IItem} item * @returns {boolean} */ canConvert(item: IItem): boolean; /** * Can this processor deploy this item template? * * @param {IItemTemplate} itemTemplate * @return {*} {boolean} */ canDeploy(itemTemplate: IItemTemplate): boolean; canRemove(item: IItem): boolean; /** * Can this handle post-processing for a specific item * * @param {IItem} item * @return {*} {boolean} */ canPostProcess(item: IItem): boolean; /** * Can a specific user deploy this web map item? * * @param {IItemTemplate} item * @param {IUser} user * @return {*} {IDeployable} */ canUserDeploy(item: IItemTemplate, user: IUser, _portal: IPortal): IDeployable; /** * Convert a WebMap into a Template * * This is broken into two phases. The first phase collects * a bunch of information about the various services that * we are going to include as dependencies. * * The second phase uses that information to templatize the * webmap itself. * * @param {IItem} item * @param {UserSession} srcSession Credentials for fetching information * @param {Record} [params] * @return {*} {Promise} */ convertToTemplate(item: IItem, srcSession: UserSession): Promise; /** * Deploy a webmap itemm from a 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 the Web Map */ postProcess(): Promise; /** * Remove a Web Map item * * @param {IItem} item * @param {UserSession} session * @return {*} {Promise} */ remove(item: IItem, session: UserSession): Promise; } /** * Apply templating into webmap (IWebmap) * * @export * @param {IWebmap} webmap * @param {IServiceItemInfo[]} services * @return {*} {IWebmap} */ export declare function templatizeWebMap(webmap: IWebmap, serviceUrlTemplates: IServiceUrlTemplate[]): IWebmap;