export type DownloadProgress = { receivedBytes: number; totalBytes: number; percent: number; }; export type DownloadOptions = { url: string; destination: string; /** الحجم المتوقَّع كما أعلنه البيان الموقَّع — يُستعمل للنسبة فقط، والتحقّق بالبصمة. */ expectedBytes: number; onProgress?: (progress: DownloadProgress) => void; }; export type DownloadResult = { ok: true; bytes: number; } | { ok: false; reason: string; unreachable: boolean; }; /** * AR: ينزّل إلى ملفّ مؤقّت، مستأنفًا ما كُتب منه إن وُجد. * * **لا شيء في التثبيت يُلمَس هنا.** الوجهة مجلد مؤقّت، والملفّ الناقص يبقى بين المحاولات * عمدًا — هو رأس مال الاستئناف. ويُحذَف عند فشلٍ نهائيّ لئلّا يبقى نصفُ حزمةٍ يُستأنف * يومًا فوق إصدارٍ آخر. * * و**الرمز الموقَّع في الرابط ينتهي بعد ربع ساعة** (P5.3): تنزيلٌ أطول من ذلك يُقابَل * بـ‎403‎ عند محاولة الاستئناف. لذلك يُميَّز الرفض عن الانقطاع هنا أيضًا — الرفض يوقف * المحاولات، والانقطاع يعيدها. * * EN: Downloads to a temporary file, resuming whatever was already written. * * **Nothing in the installation is touched here.** The destination is a temporary directory, * and a partial file survives between attempts deliberately — it is the capital resumption is * built on. It is removed on final failure so half a bundle is not resumed one day on top of a * different release. * * And **the signed token in the URL expires after fifteen minutes** (P5.3): a download longer * than that meets a `403` when it tries to resume. So refusal is separated from interruption * here too — refusal stops the attempts, interruption repeats them. */ export declare function downloadBundle(options: DownloadOptions): Promise; //# sourceMappingURL=download.d.ts.map