import { IServiceNowInstance } from "../../sn/IServiceNowInstance.js"; import { IHttpResponse } from "./IHttpResponse.js"; /** * HTTP wrapper for the ServiceNow ProcessFlow REST API (`/api/now/processflow/`). * * Provides typed GET and POST methods with path interpolation for operations * such as retrieving flow definitions, testing flows, and other Flow Designer * REST interactions. * * Usage: * ```ts * const pfr = new ProcessFlowRequest(instance); * const def = await pfr.get('flow/{flow_sys_id}', { flow_sys_id: id }, queryParams); * const res = await pfr.post('flow/{flow_sys_id}/test', { flow_sys_id: id }, queryParams, body); * ``` * * Note: The `as ServiceNowInstance` cast in `_doRequest` mirrors the pattern * used by TableAPIRequest. The root fix (accepting IServiceNowInstance in * ServiceNowRequest's constructor) is a broader refactor tracked separately. */ export declare class ProcessFlowRequest { private _headers; private _snInstance; constructor(instance: IServiceNowInstance); /** * GET a resource from the processflow API. * @param pathTemplate Path template relative to /api/now/processflow/ (e.g. "flow/{flow_sys_id}") * @param pathVars Variables to interpolate into the path template * @param query Optional query parameters */ get(pathTemplate: string, pathVars: Record, query?: Record): Promise>; /** * POST to a resource on the processflow API. * @param pathTemplate Path template relative to /api/now/processflow/ (e.g. "flow/{flow_sys_id}/test") * @param pathVars Variables to interpolate into the path template * @param query Optional query parameters * @param body JSON body to send */ post(pathTemplate: string, pathVars: Record, query?: Record, body?: object): Promise>; private _doRequest; private _buildUri; }