export declare const ACTIVATION_HEADER = "X-Activation-Code"; export interface AvailableRelease { version: string; sha256: string; sizeBytes: number; fileName: string; product: string; /** فارغٌ لحزمٍ رُفعت قبل ٠٢٦. الواجهة تعامل الفراغ كـ«بلا اشتراط». */ minCliVersion: string; /** * AR: أيّ ملفٍّ هذا (2026-10-14): الحزمة الكاملة، أو ملف التحديث (ما تغيّر منذ ‎coversFrom‎). **غيابه يعني * الكاملة** — كل مسارٍ قبل هذا التاريخ، ومسار ‎/setup/*‎ بالكود. * EN: Which file this is (2026-10-14): the full bundle, or the update file (what changed since `coversFrom`). * **Its absence means the full one** — every route before that date, and the code-based `/setup/*` route. */ kind?: "full" | "update"; /** مع ملف التحديث وحده: أقدم نسخةٍ يكفيها. */ coversFrom?: string; } export declare class CentralRefused extends Error { readonly status: number; constructor(status: number, message: string); } /** * AR: **الافتراض صار منصّة هذه الآلة لا ‎win-x64‎ مكتوبةً.** * * المركز يفهرس المُثبِّتات بـ‎(product, platform, version)‎، وسؤالٌ يحمل منصّةً ثابتة كان * يعني جهاز لينكس ينزّل ‎139‎ ميغابايت من حزمة ويندوز ثم يُرفض عند فحص البيان — إن أُحسن * الظنّ. والاستنتاج لا العلَم: من يشغّل الأمر لا يُسأل عن منصّته. * EN: **The default is now this machine's platform rather than a written `win-x64`.** * * The centre indexes installers by `(product, platform, version)`, and a request carrying a * fixed platform meant a Linux appliance downloading 139 MB of a Windows bundle and then having * it refused at the manifest check — at best. Detected, not flagged: whoever runs the command is * not asked what platform they are on. */ export declare function releaseUrl(path: string, product: string, platform?: import("../packaging/platform.js").BundlePlatformId, /** * AR: إصدارٌ مسمًّى. **غيابه يعني «الأحدث»** كما كان منذ أوّل يوم؛ وذكرُه يثبّت ما يعود — للرجوع * إلى إصدارٍ سابق، ولتنزيلٍ يطلب بالضبط ما وُعد ببصمته. مركزٌ أقدم يتجاهل المعامل ويردّ الأحدث، * فتكشفه البصمة لا يخفيه. * EN: A named version. **Its absence means "the newest"**, as it has since day one; naming it pins * what comes back — for rolling back to a previous version, and for a download asking for * exactly what it was promised the digest of. An older centre ignores the parameter and answers * with the newest, which the digest then exposes rather than hides. */ version?: string): string; /** * AR: يسأل المركز عن أحدث حزمة. **لا يُستعمل عميل HTTP خارجيّ**: ‎fetch‎ مدمجٌ في Node ‏20، * والدستور يمنع عميلًا ثانيًا — وحزمةٌ إضافية هنا تُشحن إلى كل جهاز فنّيّ بلا مقابل. * EN: Asks the centre for the newest bundle. **No external HTTP client is used**: `fetch` is built * into Node 20 and the constitution forbids a second client — and an extra package here ships to * every technician's machine for nothing. */ export declare function fetchLatest(code: string, product: string, platform?: import("../packaging/platform.js").BundlePlatformId, timeoutMs?: number): Promise; /** * AR: يسأل المركز عن حزمةٍ **بإصدارٍ مسمًّى**، أو عن الأحدث حين لا يُسمّى شيء. **دالّةٌ واحدة * للسؤالين**: نفس المسار ونفس القارئ ونفس الترجمة — والفرق معاملٌ في الاستعلام؛ ونسختان كانتا * ستفترقان في قراءة ردٍّ يُضاف إليه حقل. * * **ومركزٌ لا يعرف المعامل يردّ الأحدث.** فيُفحَص ما عاد: إصدارٌ سُمّي وعاد غيرُه يعني مركزًا * لم يُحدَّث بعد، ويُقال ذلك صراحةً بدل تنزيل نصف غيغابايت ثم «البصمة لا تطابق». * EN: Asks the centre for a bundle **by a named version**, or for the newest when none is named. * **One function for both questions**: the same route, the same reader and the same translation — * the difference is a query parameter; two copies would have drifted the day a field was added to * the reply. * * **And a centre that does not know the parameter answers with the newest.** So what came back is * checked: a version named and another returned means a centre not yet updated, and that is said * plainly rather than downloading half a gigabyte and then "the digest does not match". */ export declare function fetchRelease(code: string, product: string, version: string | undefined, platform?: import("../packaging/platform.js").BundlePlatformId, timeoutMs?: number): Promise; /** صفٌّ في قائمة الرجوع: حزمةٌ ومعها لحظةُ نشرها، للعرض لا للترتيب. */ export interface OfferedRelease extends AvailableRelease { publishedAt: string | null; } /** * AR: يحوّل ردّ ‎/versions‎ إلى قائمة. **منطقٌ خالص يُختبَر وحده**: صفٌّ بلا إصدارٍ أو بلا بصمة * يُسقَط لا يُعرَض — ما لا يمكن التحقّق منه لا يُقدَّم خيارًا. * EN: Turns the `/versions` reply into a list. **Pure logic, tested on its own**: a row with no * version or no digest is dropped rather than shown — what cannot be verified is not offered * as a choice. */ export declare function parseVersions(payload: unknown, product: string, platform: string): OfferedRelease[]; /** * AR: يسأل المركز عن **كل** الحزم المنشورة لهذا المنتج على هذه المنصّة — للرجوع إلى واحدةٍ منها. * * **‎404‎ هنا سببان لا يُفرَّق بينهما بالرمز**: كودٌ غير صحيح، أو مركزٌ لم يُنشَر فيه هذا * المسار بعد — فيُقال كلاهما، لأن رسالةً تتّهم الكود عن مركزٍ قديم ترسل الفنّي يعيد كتابة كودٍ * صحيح. * EN: Asks the centre for **every** published bundle of this product on this platform — to roll * back to one of them. * * **A `404` here has two causes the status cannot tell apart**: an invalid code, or a centre * where this route is not deployed yet — so both are said, because a message blaming the code * about an old centre sends the technician retyping a correct code. */ export declare function fetchVersions(code: string, product: string, platform?: import("../packaging/platform.js").BundlePlatformId, timeoutMs?: number): Promise; //# sourceMappingURL=latest.d.ts.map