import { IFeatureServiceDefinition } from "@esri/arcgis-rest-feature-service";
import { IItem } from "@esri/arcgis-rest-portal";
import { IHubEditableContent } from "../core/types/IHubEditableContent";
import { ServiceCapabilities } from "./enums/serviceCapabilities";
/**
 * Determines whether an item represents the main item of a hosted feature service
 * (i.e. the item that was created when the service was published, not an item that
 * referenced the service via url after it was created).
 *
 * NOTE: This check works for both hosted feature service items created in ArcGIS Online
 * and in ArcGIS Enterprise.
 *
 * @param item item to check
 * @returns whether the item passes the hosted feature service check
 */
export declare function isHostedFeatureServiceMainItem(item: IItem): boolean;
/**
 * Determines whether an entity represents the main entity of a hosted feature service
 * (i.e. the entity that was created when the service was published, not an entity that
 * referenced the service via url after it was created)
 *
 * NOTE: This check works for both hosted feature service entities created in ArcGIS Online
 * and in ArcGIS Enterprise.
 *
 * @param content content entity to check
 * @returns
 */
export declare function isHostedFeatureServiceMainEntity(content: IHubEditableContent): boolean;
export declare function isAGOFeatureServiceUrl(url: string): boolean;
/**
 * Portal secure proxy services are identified by looking for these patterns in the `url`:
 * - /sharing/servers/
 * - /sharing/appservices/
 * - /usrsvcs/servers/
 * - /usrsvcs/appservices/
 *
 * This function was given to us by the JSAPI team, so we trust the regex's are correct,
 * and won't be adding additional tests for it.
 * @param url
 */
export declare function isSecureProxyServiceUrl(url: string): boolean;
/**
 * Returns a whether a service has a capability
 * @param capability
 * @param serviceDefinition
 *
 * @returns {boolean}
 */
export declare function hasServiceCapability(capability: ServiceCapabilities, serviceDefinition: Partial<IFeatureServiceDefinition>): boolean;
/**
 * Toggles a single capability on a given feature service.
 * Returns a service definition object with updated capabilities
 * @param capability capability to toggle
 * @param serviceDefinition current definition of the service
 *
 * @returns updated definition
 */
export declare function toggleServiceCapability(capability: ServiceCapabilities, serviceDefinition: Partial<IFeatureServiceDefinition>): Partial<IFeatureServiceDefinition>;
