import { ServiceNowRequest } from "../comm/http/ServiceNowRequest.js"; import { Logger } from "../util/Logger.js"; import { ServiceNowInstance } from "./ServiceNowInstance.js"; export declare abstract class SNRequestBase { private _snInstance; private _req; _logger: Logger; constructor(instance: ServiceNowInstance); get request(): ServiceNowRequest; set request(value: ServiceNowRequest); get snInstance(): ServiceNowInstance; /** * Swapping the instance rebuilds the bound request. * * Without this, the setter changed `_snInstance` while `_req` kept serving the * previous instance — and because that handler's bound id and its session id * both stayed pointed at the old instance, they still MATCHED each other. So * RequestHandler's dispatch guard saw nothing wrong and requests silently kept * going to the old instance: exactly the class of bug this guard exists to * close, reachable through a public setter on exported API. * * Rebuilding discards the old session deliberately. A session minted for the * previous instance must never be reused, so the next call re-authenticates. */ set snInstance(value: ServiceNowInstance); }