import { ServiceNowInstance } from "../ServiceNowInstance.js"; import { SetUpdateSetOptions, ListUpdateSetsOptions, CreateUpdateSetOptions, MoveRecordsOptions, MoveRecordsResult, CloneUpdateSetResult, InspectUpdateSetResult, UpdateSetRecord } from './UpdateSetModels.js'; /** * UpdateSetManager provides operations for managing ServiceNow update sets. * Supports setting/getting the current update set, listing, creating, * moving records between update sets, cloning, and inspecting update sets. */ export declare class UpdateSetManager { private static readonly UI_UPDATESET_PATH; private static readonly UI_CONCOURSEPICKER_CURRENT_PATH; private static readonly UPDATE_SET_TABLE; private static readonly UPDATE_XML_TABLE; private static readonly UPDATE_SET_EXPORT_PATH; private static readonly UPLOAD_DO_PATH; private _logger; private _req; private _tableAPI; private _instance; constructor(instance: ServiceNowInstance); /** * Set the current update set for the session. * Uses PUT /api/now/ui/concoursepicker/updateset * * @param options The update set name and sysId to set as current * @throws Error if name or sysId is empty or if the API call fails */ setCurrentUpdateSet(options: SetUpdateSetOptions): Promise; /** * Get the current update set. * Uses GET /api/now/ui/concoursepicker/current * * @returns The current update set record or null if not set */ getCurrentUpdateSet(): Promise; /** * List update sets from the sys_update_set table. * Uses Table API GET on sys_update_set. * * @param options Optional query, limit, and fields options * @returns Array of UpdateSetRecord */ listUpdateSets(options?: ListUpdateSetsOptions): Promise; /** * Create a new update set. * Uses Table API POST on sys_update_set. * * @param options The update set name and optional description, application, state * @returns The created UpdateSetRecord * @throws Error if name is empty or if the API call fails */ createUpdateSet(options: CreateUpdateSetOptions): Promise; /** * Move records to a target update set. * Queries sys_update_xml records based on options and updates each to the target update set. * * @param targetUpdateSetId The sys_id of the target update set * @param options Options for selecting which records to move * @returns Result summary of the move operation * @throws Error if targetUpdateSetId is empty or no selection criteria provided */ moveRecordsToUpdateSet(targetUpdateSetId: string, options?: MoveRecordsOptions): Promise; /** * Clone an update set by creating a new update set and copying all sys_update_xml records. * * @param sourceUpdateSetId The sys_id of the source update set to clone * @param newName The name for the new cloned update set * @param onProgress Optional callback for progress updates * @returns Result of the clone operation * @throws Error if sourceUpdateSetId or newName is empty */ cloneUpdateSet(sourceUpdateSetId: string, newName: string, onProgress?: (message: string) => void): Promise; /** * Inspect an update set by querying its sys_update_xml records and grouping by type. * * @param updateSetSysId The sys_id of the update set to inspect * @returns Inspection result with grouped components * @throws Error if updateSetSysId is empty or the update set is not found */ inspectUpdateSet(updateSetSysId: string): Promise; exportUpdateSet(updateSetSysId: string): Promise; /** * Fetch the CSRF token from /upload.do by parsing the sysparm_ck hidden input. */ private _getUploadCSRFToken; }