import { ServiceNowInstance } from "../ServiceNowInstance.js"; import { SyncScriptOptions, SyncResult, SyncAllOptions, SyncAllResult, ParsedFileName } from './ScriptSyncModels.js'; /** * ScriptSync provides bidirectional synchronization between local files * and ServiceNow script records (Script Includes, Business Rules, etc.). */ export declare class ScriptSync { private _logger; private _req; private _tableAPI; private _instance; constructor(instance: ServiceNowInstance); /** * Pull a script from ServiceNow and write it to a local file. * Queries the appropriate table by name and writes the script field to filePath. */ pullScript(options: SyncScriptOptions): Promise; /** * Push a local file to ServiceNow by updating the script field on the matching record. * Reads the file from filePath, queries the table by name to find the sys_id, * then updates the script field via TableAPIRequest.put(). */ pushScript(options: SyncScriptOptions): Promise; /** * Sync all scripts in a directory. Reads filenames, parses them to determine * script name and type, and pushes each to ServiceNow. */ syncAllScripts(options: SyncAllOptions): Promise; /** * Parse a filename in the format "{name}.{type}.js" to extract the script name and type. * Valid types are keys of SCRIPT_TYPES. */ static parseFileName(fileName: string): ParsedFileName; /** * Generate a filename in the format "{name}.{type}.js". */ static generateFileName(scriptName: string, scriptType: string): string; }