type: object
description: |
    Manufacturing job — one per cushion to machine. Mirrors `FabricatorSchemas.Job`.
    Created from a verified `ScanRequest`; advances through `JobState` via `JobAction`
    transitions. Carries the WaxId / NfcTag / toolpath snapshots used by the factory
    pipeline.
required: [id, scanRequestId, ownerBigscreenAccountId, jobType]
properties:
    id: { type: string }
    createdAt: { type: string, format: date-time }
    ownerBigscreenAccountId: { type: string }
    creatorBigscreenAccountId: { type: string }
    scanRequestId:
        type: string
        description: Source scan request.
    bigOrderId:
        type: string
        description: Convenience pointer to the Big Order.
    shopifyOrderId:
        type: string
        description: Convenience pointer to the Shopify order.
    name:
        type: string
        description: Operator-supplied label.
    jobType:
        type: string
        description: "`FabricatorSchemas.JobType` (e.g. `PersonalizedCushion`, `Unknown`)."
    jobState:
        type: string
        description: |
            State-machine position. Values in `FabricatorSchemas.JobState`
            (`AwaitingInit`, `AwaitingCustomerScan`, `AwaitingScanVerification`,
            `AwaitingToolPathCreation`, `AwaitingManufacture`, `AwaitingQA`,
            `AwaitingNFC`, `AwaitingFulfilment`, `ScanVerificationFailed`,
            `ManufacturingFailed`, etc.). Immutable except via `applyAction`.
    history:
        type: array
        items: { type: object, additionalProperties: true }
    scanSnapshot:
        type: object
        additionalProperties: true
        description: Frozen copy of the scan that drove this job.
    toolPathSnapshots:
        type: array
        items: { type: object, additionalProperties: true }
        description: Each entry is a `ToolPath` record; the most recent drives the CNC.
    waxIdSnapshots:
        type: array
        items: { type: object, additionalProperties: true }
        description: One entry per `WaxId` allocation event.
    toolPathBitFieldSnapshot:
        type: object
        additionalProperties: true
    customerIpd:
        type: integer
        description: IPD specified by the customer on Shopify (-1 if unset).
    preprocessorIpd:
        type: integer
        description: IPD measured by the preprocessor (-1 if unset).
    preprocessorLeftPupil:
        type: array
        items: { type: number }
    preprocessorRightPupil:
        type: array
        items: { type: number }
    preprocessorResult:
        type: string
        description: "`FabricatorSchemas.PreprocessorResult`."
    ipd:
        type: integer
        description: Final IPD applied to the job.
    ipdSource:
        type: string
        description: "`FabricatorSchemas.BigOrderIpdSource` — where the final IPD came from."
    waxId:
        type: string
        description: 20-bit BitField identifier stamped on the wax block (allocated under a Redis lock).
    nfcTagId:
        type: string
        description: NFC tag id assigned at the QA station.
    nfcTagSnapshot:
        type: object
        additionalProperties: true
    priority:
        type: integer
        description: "Operator-set priority (clamped to `[-1, 100]`)."
    stats:
        type: object
        additionalProperties: true
    version:
        type: string
        example: V3
    bigscreenAccountId:
        type: string
        deprecated: true
        description: Legacy field — use `ownerBigscreenAccountId`.
example:
    id: "job_01HXY8ZW7Q9V0K3M5RPQ4ABCDE"
    createdAt: "2026-04-09T14:01:32.000Z"
    ownerBigscreenAccountId: "acct_01HXJ4Q12345"
    creatorBigscreenAccountId: "acct_01HXJ4Q12345"
    scanRequestId: "scan_01HXJ58DQX5N9P2VRC8B3MZ7Y4"
    bigOrderId: "01HXJ4S3M0Q3TRBQ3JV9P5W2VC"
    shopifyOrderId: "6107853586649"
    jobType: "PersonalizedCushion"
    jobState: "AwaitingToolPathCreation"
    history: []
    customerIpd: 63
    preprocessorIpd: 62
    preprocessorLeftPupil: [302.4, 478.1]
    preprocessorRightPupil: [482.7, 478.0]
    preprocessorResult: "Success"
    ipd: 62
    ipdSource: "Preprocessor"
    waxId: "AB12CD34EF56GH78IJ90"
    priority: 0
    version: "V3"
    toolPathSnapshots: []
    waxIdSnapshots: []
