import { ServiceNowInstance } from "../ServiceNowInstance.js"; import { AddCommentOptions, AssignTaskOptions, ResolveIncidentOptions, CloseIncidentOptions, ApproveChangeOptions, TaskRecord } from './TaskModels.js'; /** * Provides convenience operations for common task-related actions in ServiceNow, * such as adding comments, assigning tasks, resolving/closing incidents, * and approving change requests. */ export declare class TaskOperations { private _logger; private _req; private _tableAPI; private _instance; constructor(instance: ServiceNowInstance); /** * Add a comment or work note to a task record. * * @param options The comment options including table, record sys_id, and comment text * @returns The updated task record * @throws Error if the API call fails */ addComment(options: AddCommentOptions): Promise; /** * Assign a task record to a user and optionally to an assignment group. * * @param options The assignment options * @returns The updated task record * @throws Error if the API call fails */ assignTask(options: AssignTaskOptions): Promise; /** * Resolve an incident by setting its state to 6 (Resolved). * * @param options The resolve options including sys_id and resolution notes * @returns The updated incident record * @throws Error if the API call fails */ resolveIncident(options: ResolveIncidentOptions): Promise; /** * Close an incident by setting its state to 7 (Closed). * * @param options The close options including sys_id and close notes * @returns The updated incident record * @throws Error if the API call fails */ closeIncident(options: CloseIncidentOptions): Promise; /** * Approve a change request by setting its approval field to 'approved'. * * @param options The approval options including sys_id and optional comments * @returns The updated change request record * @throws Error if the API call fails */ approveChange(options: ApproveChangeOptions): Promise; /** * Find a task record by its number field (e.g., "INC0010001"). * * @param table The table to search in * @param number The task number to find * @returns The matching TaskRecord, or null if not found * @throws Error if the API call fails */ findByNumber(table: string, number: string): Promise; }