import { PortalItemUrlInfo } from "./shared";
import { ChannelProvider } from "../core/ChannelProvider";
import { Task } from "../../Task";
/**
 * Represents a parameter used when running a Print or Report job.
 */
export interface JobParameter {
    name: string;
    containsMultipleValues?: boolean;
    containsSingleValue?: boolean;
    description?: string;
    item?: any;
    itemData?: any;
    purpose?: string;
    value?: any;
    values?: any;
    valueType?: string;
    visible?: boolean;
}
/**
 * Represents a data source for VertiGIS Studio Reporting. A data source
 * created at report design time will be replaced by this data
 * source at runtime.
 */
export interface DataSource {
    name: string;
    value: any;
}
/** Minimal definition of a serialized webmap. */
export interface Webmap {
    operationalLayers: any[];
    spatialReference: __esri.SpatialReference;
    baseLayers?: any[];
    groundLayers?: any[];
}
/** The parameters that are required for including a map in a
 * report or print job.
 */
export interface WebmapPrintParameters {
    extent?: __esri.Extent;
    mapName: string;
    scale?: number;
    webmap: Webmap;
}
/**
 * Checks the staatus of a Print/Report job.
 * @param serviceUrl The URL of the Printing or Reporting service.
 * @param token The Bearer token.
 * @param ticket The ticket returned from the original job/run request.
 * @param channelProvider The ChannelProvider to use when making a web request.
 * @param cancellationToken The cancellation token.
 */
export declare function checkJobStatus(serviceUrl: string, token: string, ticket: string, channelProvider: ChannelProvider, cancellationToken: Task<void>): Promise<string | null>;
/**
 * Checks the status of a Print/Report job.
 * @param serviceUrl The URL of the Printing or Reporting service.
 * @param token The Bearer token.
 * @param ticket The ticket returned from the original job/run request.
 * @param timeDelay The time in milliseconds to wait before making a request.
 * @param channelProvider The ChannelProvider to use for sending requests.
 * @param cancellationToken The cancellation token.
 */
export declare function checkResult(serviceUrl: string, token: string, ticket: string, timeDelay: number, channelProvider: ChannelProvider, cancellationToken: Task<void>): any;
/**
 * Retrieves a list of the names of all map controls in the specified Report or Print template.
 * @param portalItemUrlInfo The PortalItemUrlInfo containing the portal URL and AGOL/Portal itemId.
 * @param serviceUrl The URL to the printing/reporting service.
 * @param token The bearer token for the printing/reporting service.
 * @param channelProvider The ChannelProvider to use for sending requests.
 * @param cancellationToken The cancellation token.
 */
export declare function getMapControlNames(portalItemUrlInfo: PortalItemUrlInfo, serviceUrl: string, token: string, channelProvider: ChannelProvider, cancellationToken: Task<void>): Promise<string[]>;
/**
 * Gets a bearer token from the Workflow/Printing/Reporting service.
 * @param serviceUrl The URL to the workflow/printing/reporting service.
 * @param portalUrl The URL to an ArcGIS portal.
 * @param token The token for accessing the ArcGIS portal.
 * @param channelProvider The ChannelProvider to use when making a web request.
 */
export declare function getServiceToken(serviceUrl: string, portalUrl: string, token: string, channelProvider: ChannelProvider): Promise<string | undefined>;
/**
 * Runs a Server Workflow, Print or Report job.
 * @param serviceUrl The URL to the Workflow/Printing/Reporting service.
 * @param runToken The bearer token.
 * @param data The data to send when running the job.
 * @param channelProvider The ChannelProvider to use when making a web request.
 */
export declare function runJob(serviceUrl: string, runToken: string, data: object, channelProvider: ChannelProvider): Promise<any>;
export declare function getServiceUrl(itemUrl: string, service: "printing" | "reporting"): string;
