import { ServiceNowInstance } from '../ServiceNowInstance.js'; import { ExportRecordOptions, ExportRecordResult, ImportRecordsOptions, ImportRecordsResult } from './XMLRecordModels.js'; /** * Manages XML record export (unload) and import (upload) operations * against ServiceNow `.do` processor endpoints. */ export declare class XMLRecordManager { private _snRequest; private _logger; constructor(instance: ServiceNowInstance); /** * Export a single record as XML (ServiceNow unload format). * * @param options - Table name and sys_id of the record to export * @returns The raw XML string plus parsed metadata (table, sysId, unloadDate) */ exportRecord(options: ExportRecordOptions): Promise; /** * Import XML records into ServiceNow via the sys_upload.do processor. * * Acquires a CSRF token first, then POSTs a multipart form with the XML content. * * @param options - XML content and target table name * @returns Success status and the target table */ importRecords(options: ImportRecordsOptions): Promise; /** * Fetch the CSRF token from /upload.do by parsing the sysparm_ck hidden input. */ private _getUploadCSRFToken; /** * Parse ServiceNow unload XML to extract metadata (table name, sys_id, unload_date). */ private _parseUnloadXml; }