import { ServiceNowInstance } from "../ServiceNowInstance.js"; import { BatchCreateOptions, BatchCreateResult, BatchUpdateOptions, BatchUpdateResult } from './BatchModels.js'; /** * Provides batch create and update operations against ServiceNow tables. * Operations are executed sequentially, with optional transactional (stop-on-error) behavior * and variable reference resolution between operations. */ export declare class BatchOperations { private _logger; private _req; private _tableAPI; private _instance; constructor(instance: ServiceNowInstance); /** * Execute a batch of create operations sequentially. * Supports variable references: if an operation has saveAs="myKey", later operations * can reference ${myKey} in their data values to substitute the created sys_id. * * @param options Batch create options including operations list and transaction flag * @returns BatchCreateResult with counts, sys_ids, errors, and timing */ batchCreate(options: BatchCreateOptions): Promise; /** * Execute a batch of update operations sequentially. * * @param options Batch update options including updates list and stopOnError flag * @returns BatchUpdateResult with counts, errors, and timing */ batchUpdate(options: BatchUpdateOptions): Promise; /** * Resolve ${variable} references in data values using the sysIds map. * Serializes the data to JSON, replaces all ${key} patterns with the * corresponding sys_id value, then deserializes back. * * @param data The record data that may contain variable references * @param sysIds Map of variable names to sys_id values * @returns A new data object with all references resolved */ private resolveVariableReferences; }