// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { HubUploadFailure } from "./HubUploadFailure";

/**
 * Result of `coder_hub_upload_all_sessions` — the bulk "push
 * every local session JSONL into the bound bucket" affordance
 * the settings modal exposes.
 *
 * The op groups every folder bound to the workspace under one
 * `xet-write-token` fetch and one `/batch` POST (the Hub's NDJSON
 * add-file endpoint accepts a stream of entries), so a workspace
 * with N stale sessions does roughly **two** Hub-API round-trips
 * plus N parallel Xet CAS uploads — instead of the 3·N round-
 * trips the per-row "Upload" button would cost.
 */
export type HubUploadAllSummary = { 
/**
 * Sessions whose CAS upload + `addFile` landed cleanly.
 * Already-synced sessions (matching length in the workspace's
 * `uploaded` marker map) don't count here — they bypass the
 * upload entirely and are reported in [`skipped`] instead.
 */
uploaded: number, 
/**
 * Sessions skipped because the local JSONL hadn't grown since
 * the last successful push. The Hub already has the bytes
 * thanks to Xet dedup; we just avoid the round-trip.
 */
skipped: number, 
/**
 * Per-session failure details. Best-effort partial success:
 * every uploadable session is attempted independently, so
 * one failure doesn't poison the rest.
 */
failed: Array<HubUploadFailure>, };
