import type { Task } from "../../Task"; import type { ChannelProvider } from "../core/ChannelProvider"; /** * Gets the authentication token, if any, for the supplied portal. * @param portalUrl * @param forceOAuthForIWA If true, forces an OAuth sign in for IWA secured * portals if an OAuth token isn't already available. If you do not need a token * when working with IWA secured portals, like in most use cases when accessing * portal resources normally, do not set this to true. This is only really * needed for cases where we are forwarding the token to a backend server that * requires it to access secured resources on the portal (server workflow, * reporting, printing, etc.). */ export declare function getAuthenticationToken(portalUrl: string, forceOAuthForIWA?: boolean): Promise; export declare function parsePortalItemUrl(url: string): PortalItemUrlInfo | undefined; export declare function getPortalDataUrl(portalItemUrlInfo: PortalItemUrlInfo, token: string): string; /** * Gets the data from the specified portal item. * * This method always uses the `"arcgis"` channel to allow us to * respect any CORS configuration made using the Register Cors Url activity. * @param itemUrl The data url of the item to get. * @param ChannelProviderType The type of ChannelProvider registered with the application. * @param cancellationToken A cancellation token. */ export declare function getPortalItem(itemUrl: string, ChannelProviderType: typeof ChannelProvider, cancellationToken: Task): Promise; export interface PortalItemUrlInfo { itemId: string; portalUrl: string; } /** * This method ensures that the value is enclosed in `{}` characters. * @param globalId A globally unique identifier for a feature. */ export declare function formatGlobalId(globalId: string): string; /** * When `globalIds` are passed to the ArcGIS REST API, they must be in this format: * ["{1A9F8368-F9BB-428B-BB03-F45724362DB5}","{6CE34136-EC3A-40D7-80BF-E1D9BE33812A}"] * * This method ensures the values are surrounded in curly braces and also adds the quotes, commas and * square brackets. */ export declare function combineGlobalIds(globalIds: string[]): string; /** * Performs a case-insensitive comparison between two strings to see if they are equal. * @param str1 * @param str2 * @returns */ export declare function equalsIgnoreCase(str1: string | undefined | null, str2: string | undefined | null): boolean; /** * Looks up the field name of an attribute by performing a case-insensitive search * using the supplied value. Returns the actual field name or `undefined` if no match was found. * @param fieldName The name of a field to look up. * @param attributes A set of attributes. * @returns The name of a case-insensitive matching name, or `undefined` if no match was found. */ export declare function getFieldName(fieldName: string | undefined, attributes: object): string | undefined; /** * Returns true if the value is present based on a case-insensitive match, false otherwise. * @param values A set of values to inspect. * @param value A value to look up. * @returns True if the value is present based on a case-insensitive match, false otherwise. */ export declare function containsIgnoreCase(values: string[], value: string): boolean; export declare function calculateOrigin(geometry: __esri.GeometryUnion, origin: __esri.Point | undefined): __esri.Point;