import { HubEntity } from "../core/types/HubEntity"; import { IArcGISContext } from "../types/IArcGISContext"; import { ILayout } from "./types"; import { IWithVersions } from "../core/traits/IWithVersions"; /** * Publishes a Hub entity layout by: * 1. Uploading any layout asset resources and updating the * layout variables to point to the resource urls * 2. Upserting the layout as a resource on the entity * 3. Updating the entity's currentVersions to point to the * new layout resource * 4. Updating the entity * * TODO: in the future, we'll add layout versioning support, so * we'll want this to work with the existing versioning utils. * For now, we'll keep it simple and just directly upsert the * single published version * * @param entity - the Hub entity of the layout to publish * @param layout - the layout to publish * @param versionName - the name of the version to publish * @param context - contextual portal and auth information * @returns the published layout * @throws {HubError} if there is an error during the publish process */ export declare function publishHubEntityLayout(entity: HubEntity & IWithVersions, layout: ILayout, versionName: string, context: IArcGISContext): Promise<{ entity: HubEntity; layout: ILayout; }>;