import type { RestartRequestFile, RestartScope } from "../contracts/core.js"; import type { Profile, ServiceName } from "../profiles/types.js"; /** * AR: يترجم نطاقًا إلى الخدمات التي يشملها، أو ‎undefined‎ ليعني «كلّ ما في ملفّ التشغيل بترتيبه». * **القائمة الشاملة لا تُكتب يدويًا**: الجهاز خدمتان والمستودع ثلاث، وقائمةٌ ثابتة هنا كانت * ستحاول إعادة تشغيل واجهةٍ لا وجود لها على الجهاز فتُبلّغ فشلًا كاذبًا. * EN: Translates a scope into the services it covers, or `undefined` meaning "everything in the * profile, in its order". **The catch-all list is not written by hand**: the appliance has two * services and the repository three, and a fixed list here would try to restart a portal that * does not exist on the appliance and report a false failure. */ export declare function servicesForScope(scope: RestartScope): ServiceName[] | undefined; export interface RestartExecution { scope: RestartScope; reason: RestartRequestFile["reason"]; ok: boolean; detail: string; } export interface ConsumeOptions { /** * AR: يُسأل قبل التنفيذ حين يطلب الطلب تأجيلًا (‎force:false‎ وجدولٌ يحترم المشاهدين). يعيد * سببًا عربيًّا للتأجيل، أو ‎null‎ للمضيّ. المشرف لا يعرف من يشاهد — النواة تعرف — فيُحقن. * EN: Asked before executing when the request permits deferral (`force:false` on a schedule that * respects viewers). Returns an Arabic reason to defer, or `null` to proceed. The supervisor * does not know who is watching — the core does — so it is injected. */ deferIf?: () => Promise; onEvent?: (message: string) => void; } /** * AR: يستهلك الطلب المعلّق إن وُجد وينفّذه. يعيد ‎null‎ حين لا طلب — وهي الحالة الغالبة في كل جولة. * EN: Consumes the pending request if there is one and executes it. Returns `null` when there is no * request — which is the usual case on every round. */ export declare function consumeRestartRequest(profile: Profile, options?: ConsumeOptions): Promise; export declare function executeRestart(profile: Profile, request: RestartRequestFile, options?: ConsumeOptions): Promise; //# sourceMappingURL=restart-consumer.d.ts.map