the job's result once it reaches a terminal state. Supplied
by TrueNasApi.job from the job directory. Defaults to unknown,
which is what a job reached by id alone deserves — an id carries no evidence
of what the job returns.
Optionalmessage_ids?: string[]Array of JSON-RPC request IDs that triggered this job. Used in v26+ to correlate API calls with their jobs.
The job's result once it succeeds; null while it runs, and on failure.
A middleware job.
The generated shape, refined where it is demonstrably weaker than what the server sends. Each override is a field where following the dump would lose information the client already has, so they are listed one by one rather than the shape being replaced wholesale — anything not named here comes from the generated entry and moves with it.
stateis a barestringin the dump. JobState is the set middleware uses, and tracking a job means comparing against it to know when the job is done.time_started/time_finishedare modelled as ISO strings and arrive as{$date: <epoch ms>}— confirmed against a live appliance, and systemic rather than specific to jobs. Following the dump would makenew Date(job.time_started)type-check and yieldInvalid Date. Only the encoding is corrected: both stay nullable, because that is what the dump says and nothing observed contradicts it. Narrowing one and not the other was an inconsistency inherited from the hand-written shape.description, andprogress.description, are returned by the server and absent from the dump.message_idsisunknown[]. They are the JSON-RPC request ids that started the job, andTrueNasApi.callAndGetJobIdmatches its own request id against them.resultisunknown, which is honest forcore.get_jobsin general: the method returns every job at once, of every kind. It stops being honest once you know which method you started, so it becomes the parameter — but it stays nullable, because a job that has not finished has no result. Measured on a live appliance: aRUNNINGemission carriesresult: null, and only the terminal one carries the value. A failed job ends withnulltoo, so reaching a terminal state is not on its own enough to assume a result — checkerror, or checkstateagainstJobState.Success.progressis the one place the generated shape is kept rather than replaced. It gainsdescription, which the server sends and the dump omits, and keepspercentnullable andextrapresent: the dump sayspercentmay be null and nothing observed disproves that, so narrowing it would be inventing a guarantee rather than correcting one.