import { HubEntityType } from "../../core/types/HubEntityType"; import { IArcGISContext } from "../../types/IArcGISContext"; /** * Adds or updates a layout asset resource (image, video, * etc.) and returns the URL reference to the resource. * * Note that layout resources are typically stored with: * - an "assets/" prefix (so we can find them) * - a name that starts with the cardId * - and a -{timestamp} suffix (to bust the cache) * Thus, 'update' is not really an update, it is: * 1. upload the new one * 2. find the old one (which has a different suffix) * and delete it. * * This is why we cannot simply use upsertHubEntityResource * * @param type - type of the entity to upsert the resource for * @param id - id of the entity to upsert the resource for * @param owner - owner of the resource to add/update * @param resource - the resource to add/update * @param name - name of the new/existing resource file * @param extension - file extension of the resource (e.g. 'png', 'json', etc.) * @param context - contextual portal and auth information * @returns a URL reference to the newly added/updated resource */ export declare function upsertLayoutAssetResource(type: HubEntityType, identifier: string, owner: string, resource: unknown, name: string, extension: string, context: IArcGISContext): Promise;