import { UserSession } from '@esri/arcgis-rest-auth'; import { IServiceItemInfo } from '@esri/templates-common'; /** * Given the url of a service layer, get the layer info * and return the itemId, and the array of fields * * Make a request to the service layer url, and extract the `serviceItemId` property * from the response. If the service fails to respond, or does not have a * `serviceItemId`, this function will simply return isHosted: false without * and itemId. * * This is needed because although the webmap json *may* have an `itemId` * on a layer or table, there is no assurance that it is present or that * it reflects the actual service. * * Moreso - the `serviceItemId` in the getLayer response is indicative * of the layer being a hosted service, and thus something we are interested * and capable of templating * * Additional information: * - https://github.com/Esri/solution.js/issues/178 * * @export * @param {string} layerUrl * @param {UserSession} session * @return {*} {Promise} */ export declare function getServiceLayerInfo(layerUrl: string, session: UserSession): Promise;