{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "urn:altium-toolkit:normalized-model:a1",
    "$comment": "SPDX-FileCopyrightText: 2026 André Fiedler; SPDX-License-Identifier: CC-BY-SA-4.0",
    "title": "Altium Toolkit Normalized Model A1",
    "description": "Root contract for normalized models emitted by Altium Toolkit parser entrypoints.",
    "type": "object",
    "required": [
        "schema",
        "kind",
        "fileType",
        "fileName",
        "summary",
        "diagnostics",
        "bom"
    ],
    "properties": {
        "schema": {
            "const": "urn:altium-toolkit:normalized-model:a1"
        },
        "kind": {
            "enum": [
                "schematic",
                "pcb",
                "pcb-library",
                "schematic-library",
                "project",
                "project-script",
                "project-annotation",
                "integrated-library",
                "draftsman",
                "design-bundle"
            ]
        },
        "fileType": {
            "enum": [
                "SchDoc",
                "PcbDoc",
                "PcbLib",
                "SchLib",
                "PrjPcb",
                "PrjScr",
                "Annotation",
                "IntLib",
                "PCBDwf",
                "ProjectDesignBundle"
            ]
        },
        "fileName": {
            "type": "string"
        },
        "summary": {
            "type": "object",
            "additionalProperties": {
                "type": ["number", "string", "boolean", "null"]
            }
        },
        "diagnostics": {
            "type": "array",
            "items": {
                "type": "object",
                "required": ["severity", "message"],
                "properties": {
                    "code": {
                        "type": "string"
                    },
                    "severity": {
                        "enum": ["info", "warning", "error"]
                    },
                    "message": {
                        "type": "string"
                    },
                    "fileName": {
                        "type": "string"
                    },
                    "sourceStream": {
                        "type": "string"
                    },
                    "recordType": {
                        "type": ["number", "string"]
                    },
                    "errorKind": {
                        "type": "string"
                    }
                },
                "additionalProperties": true
            }
        },
        "schematic": {
            "type": "object",
            "properties": {
                "recordTypes": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/schematicRecordType"
                    }
                },
                "nets": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/schematicNet"
                    }
                },
                "images": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/schematicImage"
                    }
                },
                "thumbnails": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/schematicThumbnail"
                    }
                },
                "hyperlinks": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/schematicHyperlink"
                    }
                },
                "opaqueRecords": {
                    "$ref": "#/$defs/opaqueRecords"
                },
                "nativeStreams": {
                    "$ref": "#/$defs/nativeStreamInventory"
                },
                "roundedRectangles": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "ieeeSymbols": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "renderDiagnostics": {
                    "$ref": "#/$defs/schematicRenderDiagnostics"
                },
                "qa": {
                    "type": "object",
                    "properties": {
                        "fieldCoverage": {
                            "$ref": "#/$defs/schematicFieldCoverage"
                        }
                    },
                    "additionalProperties": true
                },
                "directiveSemantics": {
                    "type": "object",
                    "properties": {
                        "noErc": {
                            "type": "array"
                        },
                        "parameterSets": {
                            "type": "array"
                        },
                        "differentialPairs": {
                            "type": "array"
                        },
                        "compileMasks": {
                            "type": "array"
                        },
                        "blankets": {
                            "type": "array"
                        }
                    },
                    "additionalProperties": true
                },
                "ownership": {
                    "$ref": "#/$defs/ownershipSidecar"
                }
            },
            "additionalProperties": true
        },
        "pcb": {
            "type": "object",
            "properties": {
                "vias": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/pcbVia"
                    }
                },
                "pads": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/pcbPad"
                    }
                },
                "viaStructures": {
                    "$ref": "#/$defs/pcbViaStructures"
                },
                "extendedPrimitiveInformation": {
                    "$ref": "#/$defs/pcbExtendedPrimitiveInformation"
                },
                "customPadShapes": {
                    "$ref": "#/$defs/pcbCustomPadShapes"
                },
                "unions": {
                    "$ref": "#/$defs/pcbUnions"
                },
                "components": {
                    "type": "array",
                    "items": {
                        "allOf": [
                            {
                                "$ref": "#/$defs/pcbComponent"
                            }
                        ],
                        "properties": {
                            "componentKind": {
                                "$ref": "#/$defs/componentKindPolicy"
                            }
                        }
                    }
                },
                "rules": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/pcbRule"
                    }
                },
                "bomProfile": {
                    "$ref": "#/$defs/pcbBomProfile"
                },
                "dimensions": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/pcbDimension"
                    }
                },
                "differentialPairs": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/pcbDifferentialPair"
                    }
                },
                "differentialPairClasses": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/pcbDifferentialPairClass"
                    }
                },
                "embeddedBoards": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "rooms": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "pickPlace": {
                    "$ref": "#/$defs/pickPlaceModel"
                },
                "routeAnalysis": {
                    "$ref": "#/$defs/pcbRouteAnalysis"
                },
                "reviewMetadata": {
                    "$ref": "#/$defs/pcbReviewMetadata"
                },
                "footprintExtractionManifest": {
                    "$ref": "#/$defs/pcbPlacedFootprintExtraction"
                },
                "embeddedFonts": {
                    "$ref": "#/$defs/embeddedFonts"
                },
                "rawRecords": {
                    "$ref": "#/$defs/rawRecords"
                },
                "nativeStreams": {
                    "$ref": "#/$defs/nativeStreamInventory"
                },
                "layerSubstacks": {
                    "$ref": "#/$defs/layerSubstacks"
                },
                "layerStackReadModel": {
                    "$ref": "#/$defs/pcbLayerStackReadModel"
                },
                "rigidFlexTopology": {
                    "$ref": "#/$defs/pcbRigidFlexTopology"
                },
                "boardRegionContexts": {
                    "$ref": "#/$defs/boardRegionContexts"
                },
                "mechanicalLayerPairs": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "layerFlipMetadata": {
                    "type": "object",
                    "additionalProperties": true
                },
                "componentPrimitives": {
                    "type": "array",
                    "items": {
                        "anyOf": [
                            {
                                "$ref": "#/$defs/componentPrimitiveGroup"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    }
                },
                "componentPrimitiveGroups": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/componentPrimitiveGroup"
                    }
                },
                "ownership": {
                    "$ref": "#/$defs/ownershipSidecar"
                },
                "statistics": {
                    "$ref": "#/$defs/pcbStatistics"
                },
                "texts": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/pcbText"
                    }
                }
            },
            "additionalProperties": true
        },
        "pcbLibrary": {
            "type": "object",
            "properties": {
                "embeddedFonts": {
                    "$ref": "#/$defs/embeddedFonts"
                },
                "embeddedModels": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "componentBodies": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "footprints": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "rawRecords": {
                                "$ref": "#/$defs/rawRecords"
                            }
                        },
                        "additionalProperties": true
                    }
                },
                "indexes": {
                    "$ref": "#/$defs/libraryIndexes"
                },
                "renderManifest": {
                    "$ref": "#/$defs/libraryRenderManifest"
                },
                "parityReport": {
                    "$ref": "#/$defs/pcbLibraryParityReport"
                },
                "nativeStreams": {
                    "$ref": "#/$defs/nativeStreamInventory"
                }
            },
            "additionalProperties": true
        },
        "schematicLibrary": {
            "type": "object",
            "properties": {
                "libraryHeader": {
                    "type": "object",
                    "additionalProperties": true
                },
                "sectionKeys": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "symbols": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "indexes": {
                    "$ref": "#/$defs/libraryIndexes"
                },
                "renderManifest": {
                    "$ref": "#/$defs/libraryRenderManifest"
                },
                "embeddedFiles": {
                    "type": "object",
                    "additionalProperties": true
                },
                "opaqueRecords": {
                    "$ref": "#/$defs/opaqueRecords"
                },
                "nativeStreams": {
                    "$ref": "#/$defs/nativeStreamInventory"
                },
                "qa": {
                    "$ref": "#/$defs/libraryQaReport"
                }
            },
            "additionalProperties": true
        },
        "project": {
            "type": "object",
            "properties": {
                "documentGraph": {
                    "$ref": "#/$defs/projectDocumentGraph"
                },
                "outJobDigest": {
                    "$ref": "#/$defs/projectOutJobDigest"
                }
            },
            "additionalProperties": true
        },
        "projectScript": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string"
                },
                "documents": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "scripts": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "sections": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                }
            },
            "additionalProperties": true
        },
        "units": {
            "$ref": "#/$defs/units"
        },
        "variants": {
            "type": "array",
            "items": {
                "type": "object",
                "additionalProperties": true
            }
        },
        "sheets": {
            "type": "array",
            "items": {
                "$ref": "#/$defs/designBundleSheet"
            }
        },
        "components": {
            "type": "array",
            "items": {
                "$ref": "#/$defs/designBundleComponent"
            }
        },
        "schematic_hierarchy": {
            "$ref": "#/$defs/schematicHierarchy"
        },
        "schematicHierarchyReport": {
            "$ref": "#/$defs/projectHierarchyReport"
        },
        "nets": {
            "type": "array",
            "items": {
                "$ref": "#/$defs/designBundleNet"
            }
        },
        "indexes": {
            "$ref": "#/$defs/designBundleIndexes"
        },
        "effectiveVariant": {
            "$ref": "#/$defs/effectiveVariantView"
        },
        "annotations": {
            "type": "object",
            "additionalProperties": true
        },
        "integratedLibrary": {
            "$ref": "#/$defs/integratedLibrary"
        },
        "draftsman": {
            "$ref": "#/$defs/draftsmanDigest",
            "properties": {
                "boardViewMetadata": {
                    "$ref": "#/$defs/draftsmanBoardViewCache"
                }
            }
        },
        "bom": {
            "type": "array",
            "items": {
                "type": "object"
            }
        },
        "pnp": {
            "$ref": "#/$defs/pickPlaceModel"
        },
        "reconciliation": {
            "$ref": "#/$defs/projectBomPnpReconciliation"
        }
    },
    "oneOf": [
        {
            "required": ["schematic"],
            "properties": {
                "kind": {
                    "const": "schematic"
                },
                "fileType": {
                    "const": "SchDoc"
                }
            }
        },
        {
            "required": ["pcb"],
            "properties": {
                "kind": {
                    "const": "pcb"
                },
                "fileType": {
                    "const": "PcbDoc"
                }
            }
        },
        {
            "required": ["pcbLibrary"],
            "properties": {
                "kind": {
                    "const": "pcb-library"
                },
                "fileType": {
                    "const": "PcbLib"
                }
            }
        },
        {
            "required": ["schematicLibrary"],
            "properties": {
                "kind": {
                    "const": "schematic-library"
                },
                "fileType": {
                    "const": "SchLib"
                }
            }
        },
        {
            "required": ["project"],
            "properties": {
                "kind": {
                    "const": "project"
                },
                "fileType": {
                    "const": "PrjPcb"
                }
            }
        },
        {
            "required": ["annotations"],
            "properties": {
                "kind": {
                    "const": "project-annotation"
                },
                "fileType": {
                    "const": "Annotation"
                }
            }
        },
        {
            "required": ["integratedLibrary"],
            "properties": {
                "kind": {
                    "const": "integrated-library"
                },
                "fileType": {
                    "const": "IntLib"
                }
            }
        },
        {
            "required": ["draftsman"],
            "properties": {
                "kind": {
                    "const": "draftsman"
                },
                "fileType": {
                    "const": "PCBDwf"
                }
            }
        },
        {
            "required": ["project", "sheets", "schematic_hierarchy", "indexes"],
            "properties": {
                "kind": {
                    "const": "design-bundle"
                },
                "fileType": {
                    "const": "ProjectDesignBundle"
                }
            }
        }
    ],
    "$defs": {
        "schematicRecordType": {
            "type": "object",
            "required": ["recordType", "name", "family", "supported", "count"],
            "properties": {
                "recordType": {
                    "type": "number"
                },
                "name": {
                    "type": "string"
                },
                "family": {
                    "type": "string"
                },
                "supported": {
                    "type": "boolean"
                },
                "count": {
                    "type": "number"
                }
            },
            "additionalProperties": true
        },
        "ownershipSidecar": {
            "type": "object",
            "required": ["schema"],
            "properties": {
                "schema": {
                    "type": "string"
                }
            },
            "additionalProperties": true
        },
        "nativeStreamInventory": {
            "type": "object",
            "required": ["schema", "summary", "streams"],
            "properties": {
                "schema": {
                    "const": "altium-toolkit.native-stream-inventory.a1"
                },
                "summary": {
                    "type": "object",
                    "additionalProperties": true
                },
                "streams": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                }
            },
            "additionalProperties": true
        },
        "projectDocumentGraph": {
            "type": "object",
            "required": ["schema", "summary", "documents", "groups", "indexes"],
            "properties": {
                "schema": {
                    "const": "altium-toolkit.project.document-graph.a1"
                },
                "summary": {
                    "type": "object",
                    "additionalProperties": true
                },
                "documents": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "groups": {
                    "type": "object",
                    "additionalProperties": true
                },
                "indexes": {
                    "type": "object",
                    "additionalProperties": true
                }
            },
            "additionalProperties": true
        },
        "projectOutJobDigest": {
            "type": "object",
            "required": [
                "schema",
                "summary",
                "documents",
                "outputGroups",
                "expectedArtifacts",
                "outputsByDocumentPath"
            ],
            "properties": {
                "schema": {
                    "const": "altium-toolkit.project.outjob-digest.a1"
                },
                "summary": {
                    "type": "object",
                    "additionalProperties": true
                },
                "documents": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "outputGroups": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "expectedArtifacts": {
                    "type": "object",
                    "additionalProperties": true
                },
                "outputsByDocumentPath": {
                    "type": "object",
                    "additionalProperties": true
                }
            },
            "additionalProperties": true
        },
        "draftsmanDigest": {
            "type": "object",
            "required": ["schema", "pages"],
            "properties": {
                "schema": {
                    "const": "altium-toolkit.draftsman.digest.a1"
                },
                "sourceDocumentName": {
                    "type": "string"
                },
                "pages": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "styles": {
                    "type": "object",
                    "additionalProperties": true
                },
                "boardViewMetadata": {
                    "$ref": "#/$defs/draftsmanBoardViewCache"
                },
                "indexes": {
                    "type": "object",
                    "additionalProperties": true
                }
            },
            "additionalProperties": true
        },
        "draftsmanBoardViewCache": {
            "type": "object",
            "required": [
                "schema",
                "summary",
                "layerColors",
                "pcbParameters",
                "boardAssemblyViews",
                "boardFabricationViews",
                "boardProjections",
                "generatedGeometry",
                "cacheLayers",
                "displayLayers",
                "cachePrimitives",
                "highlightGroups",
                "layerTiles",
                "diagnostics"
            ],
            "properties": {
                "schema": {
                    "const": "altium-toolkit.draftsman.board-view-cache.a1"
                },
                "summary": {
                    "type": "object",
                    "additionalProperties": true
                },
                "layerColors": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "pcbParameters": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "boardAssemblyViews": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "boardFabricationViews": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "boardProjections": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "generatedGeometry": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "cacheLayers": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "displayLayers": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "cachePrimitives": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "highlightGroups": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "layerTiles": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "diagnostics": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                }
            },
            "additionalProperties": true
        },
        "schematicRenderDiagnostics": {
            "type": "object",
            "required": ["schema", "fontFallbacks"],
            "properties": {
                "schema": {
                    "const": "altium-toolkit.schematic.render-diagnostics.a1"
                },
                "fontFallbacks": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "required": [
                            "code",
                            "severity",
                            "fontId",
                            "sourceFamily",
                            "resolvedFamily",
                            "message"
                        ],
                        "properties": {
                            "code": {
                                "const": "schematic.font.family-fallback"
                            },
                            "severity": {
                                "enum": ["warning"]
                            },
                            "fontId": {
                                "type": "string"
                            },
                            "sourceFamily": {
                                "type": "string"
                            },
                            "resolvedFamily": {
                                "type": "string"
                            },
                            "message": {
                                "type": "string"
                            }
                        },
                        "additionalProperties": true
                    }
                }
            },
            "additionalProperties": true
        },
        "schematicFieldCoverage": {
            "type": "object",
            "required": ["schema", "summary", "recordTypes"],
            "properties": {
                "schema": {
                    "const": "altium-toolkit.schematic.field-coverage.a1"
                },
                "summary": {
                    "type": "object",
                    "properties": {
                        "recordTypeCount": {
                            "type": "integer",
                            "minimum": 0
                        },
                        "unrecognizedFieldCount": {
                            "type": "integer",
                            "minimum": 0
                        },
                        "unrecognizedOccurrenceCount": {
                            "type": "integer",
                            "minimum": 0
                        }
                    },
                    "additionalProperties": true
                },
                "recordTypes": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "required": [
                            "recordType",
                            "name",
                            "family",
                            "supported",
                            "recordCount",
                            "unrecognizedFields"
                        ],
                        "properties": {
                            "recordType": {
                                "type": "integer"
                            },
                            "name": {
                                "type": "string"
                            },
                            "family": {
                                "type": "string"
                            },
                            "supported": {
                                "type": "boolean"
                            },
                            "recordCount": {
                                "type": "integer",
                                "minimum": 0
                            },
                            "unrecognizedFields": {
                                "type": "array",
                                "items": {
                                    "type": "object",
                                    "required": ["name", "count", "recordKeys"],
                                    "properties": {
                                        "name": {
                                            "type": "string"
                                        },
                                        "count": {
                                            "type": "integer",
                                            "minimum": 1
                                        },
                                        "recordKeys": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        }
                                    },
                                    "additionalProperties": true
                                }
                            }
                        },
                        "additionalProperties": true
                    }
                }
            },
            "additionalProperties": true
        },
        "schematicHyperlink": {
            "type": "object",
            "required": ["key", "recordKey"],
            "properties": {
                "key": {
                    "type": "string"
                },
                "recordKey": {
                    "type": "string"
                },
                "indexInSheet": {
                    "type": "number"
                },
                "ownerIndex": {
                    "type": "string"
                },
                "ownerPartId": {
                    "type": "number"
                },
                "uniqueId": {
                    "type": "string"
                },
                "text": {
                    "type": "string"
                },
                "url": {
                    "type": "string"
                },
                "x": {
                    "type": "number"
                },
                "y": {
                    "type": "number"
                },
                "fontId": {
                    "type": "string"
                },
                "fontSize": {
                    "type": "number"
                },
                "fontFamily": {
                    "type": "string"
                },
                "fontWeight": {
                    "type": "number"
                },
                "fontStyle": {
                    "type": "string"
                },
                "color": {
                    "type": "string"
                },
                "areaColor": {
                    "type": "string"
                },
                "orientation": {
                    "type": "number"
                },
                "rotation": {
                    "type": "number"
                },
                "justification": {
                    "type": "number"
                },
                "isNotAccessible": {
                    "type": "boolean"
                }
            },
            "additionalProperties": true
        },
        "schematicImage": {
            "type": "object",
            "required": [
                "x",
                "y",
                "cornerX",
                "cornerY",
                "fileName",
                "embedded",
                "keepAspect",
                "mimeType",
                "dataBase64",
                "renderOrder",
                "diagnosticState"
            ],
            "properties": {
                "x": {
                    "type": "number"
                },
                "y": {
                    "type": "number"
                },
                "cornerX": {
                    "type": "number"
                },
                "cornerY": {
                    "type": "number"
                },
                "fileName": {
                    "type": "string"
                },
                "embedded": {
                    "type": "boolean"
                },
                "keepAspect": {
                    "type": "boolean"
                },
                "mimeType": {
                    "type": "string"
                },
                "sourceMimeType": {
                    "type": "string"
                },
                "nativeClass": {
                    "type": "string"
                },
                "hasAlpha": {
                    "type": "boolean"
                },
                "dataBase64": {
                    "type": "string"
                },
                "renderOrder": {
                    "type": "number"
                },
                "diagnosticState": {
                    "type": "string"
                }
            },
            "additionalProperties": true
        },
        "schematicThumbnail": {
            "type": "object",
            "required": [
                "kind",
                "width",
                "height",
                "mimeType",
                "dataBase64",
                "sourceStream",
                "pixelFormat"
            ],
            "properties": {
                "kind": {
                    "type": "string"
                },
                "width": {
                    "type": "number"
                },
                "height": {
                    "type": "number"
                },
                "mimeType": {
                    "type": "string"
                },
                "dataBase64": {
                    "type": "string"
                },
                "sourceStream": {
                    "type": "string"
                },
                "pixelFormat": {
                    "type": "string"
                }
            },
            "additionalProperties": true
        },
        "holeTolerance": {
            "type": "object",
            "properties": {
                "positive": {
                    "type": "number"
                },
                "negative": {
                    "type": "number"
                }
            },
            "additionalProperties": false
        },
        "pcbVia": {
            "type": "object",
            "properties": {
                "positiveTolerance": {
                    "type": "number"
                },
                "negativeTolerance": {
                    "type": "number"
                },
                "holeTolerance": {
                    "$ref": "#/$defs/holeTolerance"
                },
                "propagationDelayPs": {
                    "type": "number"
                },
                "viaStructureIndex": {
                    "type": "number"
                },
                "ipc4761Type": {
                    "type": ["number", "string"]
                },
                "viaProtection": {
                    "$ref": "#/$defs/pcbViaProtection"
                },
                "drill": {
                    "$ref": "#/$defs/drillMetadata"
                }
            },
            "additionalProperties": true
        },
        "pcbPad": {
            "type": "object",
            "properties": {
                "positiveTolerance": {
                    "type": "number"
                },
                "negativeTolerance": {
                    "type": "number"
                },
                "holeTolerance": {
                    "$ref": "#/$defs/holeTolerance"
                },
                "customShape": {
                    "type": "object",
                    "additionalProperties": true
                },
                "extendedPrimitiveInformation": {
                    "$ref": "#/$defs/pcbExtendedPrimitiveInformationEntry"
                },
                "localStack": {
                    "$ref": "#/$defs/pcbPadLocalStack"
                }
            },
            "additionalProperties": true
        },
        "pcbPadLocalStack": {
            "type": "object",
            "required": ["schema", "mode", "modeName", "source", "layers"],
            "properties": {
                "schema": {
                    "const": "altium-toolkit.pcb.pad-local-stack.a1"
                },
                "mode": {
                    "type": "number"
                },
                "modeName": {
                    "type": "string"
                },
                "source": {
                    "type": "string"
                },
                "layers": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "hole": {
                    "type": "object",
                    "additionalProperties": true
                }
            },
            "additionalProperties": true
        },
        "drillMetadata": {
            "type": "object",
            "properties": {
                "holeKind": {
                    "enum": ["pad", "via"]
                },
                "plating": {
                    "enum": ["plated", "non-plated"]
                },
                "renderState": {
                    "enum": ["open", "covered", "filled", "capped"]
                },
                "ipc4761Type": {
                    "type": ["number", "string"]
                }
            },
            "additionalProperties": true
        },
        "pcbDimension": {
            "type": "object",
            "required": [
                "dimensionIndex",
                "kind",
                "kindCode",
                "references",
                "raw"
            ],
            "properties": {
                "dimensionIndex": {
                    "type": "number"
                },
                "kind": {
                    "enum": [
                        "linear",
                        "angular",
                        "radial",
                        "datum",
                        "baseline",
                        "ordinate"
                    ]
                },
                "kindCode": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "layer": {
                    "type": "string"
                },
                "text": {
                    "type": "string"
                },
                "prefix": {
                    "type": "string"
                },
                "suffix": {
                    "type": "string"
                },
                "precision": {
                    "type": ["number", "null"]
                },
                "measuredValue": {
                    "type": ["number", "null"]
                },
                "angleValue": {
                    "type": ["number", "null"]
                },
                "unit": {
                    "type": "string"
                },
                "references": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/indexedPoint"
                    }
                },
                "textLocation": {
                    "anyOf": [
                        {
                            "$ref": "#/$defs/point"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "raw": {
                    "type": "object",
                    "additionalProperties": true
                }
            },
            "additionalProperties": true
        },
        "point": {
            "type": "object",
            "required": ["x", "y"],
            "properties": {
                "x": {
                    "type": "number"
                },
                "y": {
                    "type": "number"
                }
            },
            "additionalProperties": true
        },
        "indexedPoint": {
            "allOf": [
                {
                    "$ref": "#/$defs/point"
                },
                {
                    "type": "object",
                    "required": ["index"],
                    "properties": {
                        "index": {
                            "type": "number"
                        }
                    },
                    "additionalProperties": true
                }
            ]
        },
        "pcbExtendedPrimitiveInformation": {
            "type": "object",
            "required": ["entries", "byPrimitiveIndex", "byPrimitiveKey"],
            "properties": {
                "entries": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/pcbExtendedPrimitiveInformationEntry"
                    }
                },
                "byPrimitiveIndex": {
                    "type": "object",
                    "additionalProperties": {
                        "$ref": "#/$defs/pcbExtendedPrimitiveInformationEntry"
                    }
                },
                "byPrimitiveKey": {
                    "type": "object",
                    "additionalProperties": {
                        "$ref": "#/$defs/pcbExtendedPrimitiveInformationEntry"
                    }
                }
            },
            "additionalProperties": true
        },
        "pcbExtendedPrimitiveInformationEntry": {
            "type": "object",
            "required": [
                "primitiveIndex",
                "primitiveObjectId",
                "sourceStream",
                "maskExpansion"
            ],
            "properties": {
                "primitiveIndex": {
                    "type": "number"
                },
                "primitiveObjectId": {
                    "type": ["number", "null"]
                },
                "primitiveType": {
                    "type": "string"
                },
                "type": {
                    "type": "string"
                },
                "sourceStream": {
                    "const": "ExtendedPrimitiveInformation/Data"
                },
                "maskExpansion": {
                    "type": "object",
                    "properties": {
                        "paste": {
                            "$ref": "#/$defs/pcbMaskExpansionSidecar"
                        },
                        "solder": {
                            "$ref": "#/$defs/pcbMaskExpansionSidecar"
                        }
                    },
                    "additionalProperties": true
                }
            },
            "additionalProperties": true
        },
        "pcbMaskExpansionSidecar": {
            "type": "object",
            "properties": {
                "mode": {
                    "type": ["number", "null"]
                },
                "source": {
                    "type": "string"
                },
                "manualExpansion": {
                    "type": ["number", "null"]
                }
            },
            "additionalProperties": true
        },
        "pcbCustomPadShapes": {
            "type": "object",
            "required": ["entries", "byPrimitiveIndex"],
            "properties": {
                "entries": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "byPrimitiveIndex": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "array"
                    }
                }
            },
            "additionalProperties": true
        },
        "pcbUnions": {
            "type": "object",
            "required": [
                "userUnions",
                "smartUnions",
                "byIndex",
                "smartByIndex",
                "membersByPrimitiveKey"
            ],
            "properties": {
                "userUnions": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/pcbUserUnion"
                    }
                },
                "smartUnions": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/pcbSmartUnion"
                    }
                },
                "byIndex": {
                    "type": "object"
                },
                "smartByIndex": {
                    "type": "object"
                },
                "membersByPrimitiveKey": {
                    "type": "object"
                }
            },
            "additionalProperties": true
        },
        "pcbUserUnion": {
            "type": "object",
            "required": ["index", "name", "sourceStream"],
            "properties": {
                "index": {
                    "type": "number"
                },
                "name": {
                    "type": "string"
                },
                "sourceStream": {
                    "const": "UnionNames/Data"
                }
            },
            "additionalProperties": true
        },
        "pcbSmartUnion": {
            "type": "object",
            "required": [
                "index",
                "name",
                "type",
                "typeName",
                "sourceStream",
                "members"
            ],
            "properties": {
                "index": {
                    "type": "number"
                },
                "name": {
                    "type": "string"
                },
                "type": {
                    "type": ["number", "string"]
                },
                "typeName": {
                    "type": "string"
                },
                "sourceStream": {
                    "const": "SmartUnions/Data"
                },
                "members": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/pcbSmartUnionMember"
                    }
                }
            },
            "additionalProperties": true
        },
        "pcbSmartUnionMember": {
            "type": "object",
            "required": ["primitiveObjectId", "primitiveIndex"],
            "properties": {
                "primitiveObjectId": {
                    "type": "number"
                },
                "primitiveIndex": {
                    "type": "number"
                }
            },
            "additionalProperties": true
        },
        "pcbViaStructures": {
            "type": "object",
            "required": ["structures", "links", "byPrimitiveIndex"],
            "properties": {
                "structures": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/pcbViaStructure"
                    }
                },
                "links": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/pcbViaStructureLink"
                    }
                },
                "byPrimitiveIndex": {
                    "type": "object",
                    "additionalProperties": {
                        "$ref": "#/$defs/pcbViaProtection"
                    }
                }
            },
            "additionalProperties": true
        },
        "pcbViaStructure": {
            "type": "object",
            "required": ["index", "sourceStream", "features"],
            "properties": {
                "index": {
                    "type": "number"
                },
                "ipc4761Type": {
                    "type": ["number", "string"]
                },
                "structureType": {
                    "type": ["number", "string"]
                },
                "sourceStream": {
                    "type": "string"
                },
                "features": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/pcbViaProtectionFeature"
                    }
                }
            },
            "additionalProperties": true
        },
        "pcbViaStructureLink": {
            "type": "object",
            "required": ["primitiveIndex", "viaStructureIndex", "sourceStream"],
            "properties": {
                "primitiveIndex": {
                    "type": "number"
                },
                "viaStructureIndex": {
                    "type": "number"
                },
                "sourceStream": {
                    "type": "string"
                }
            },
            "additionalProperties": true
        },
        "pcbViaProtection": {
            "type": "object",
            "properties": {
                "viaStructureIndex": {
                    "type": "number"
                },
                "ipc4761Type": {
                    "type": ["number", "string"]
                },
                "structureType": {
                    "type": ["number", "string"]
                },
                "features": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/pcbViaProtectionFeature"
                    }
                }
            },
            "additionalProperties": true
        },
        "pcbViaProtectionFeature": {
            "type": "object",
            "required": ["index", "type", "side", "material"],
            "properties": {
                "index": {
                    "type": "number"
                },
                "type": {
                    "type": "string"
                },
                "side": {
                    "type": "string"
                },
                "material": {
                    "type": "string"
                }
            },
            "additionalProperties": true
        },
        "rawRecords": {
            "type": "array",
            "items": {
                "type": "object",
                "required": [
                    "registryId",
                    "source",
                    "sourceStream",
                    "family",
                    "type",
                    "recordIndex",
                    "offset",
                    "byteLength",
                    "encoding",
                    "supported",
                    "parsed",
                    "rawBase64"
                ],
                "properties": {
                    "registryId": {
                        "type": "string"
                    },
                    "source": {
                        "enum": ["pcbdoc", "pcblib"]
                    },
                    "sourceStorage": {
                        "type": "string"
                    },
                    "sourceStream": {
                        "type": "string"
                    },
                    "headerStream": {
                        "type": "string"
                    },
                    "family": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string"
                    },
                    "typeId": {
                        "type": ["number", "null"]
                    },
                    "recordIndex": {
                        "type": "number"
                    },
                    "offset": {
                        "type": "number"
                    },
                    "byteLength": {
                        "type": "number"
                    },
                    "payloadByteLength": {
                        "type": ["number", "null"]
                    },
                    "encoding": {
                        "type": "string"
                    },
                    "supported": {
                        "type": "boolean"
                    },
                    "parsed": {
                        "type": "boolean"
                    },
                    "rawBase64": {
                        "type": "string"
                    }
                },
                "additionalProperties": true
            }
        },
        "opaqueRecords": {
            "type": "array",
            "items": {
                "type": "object",
                "required": [
                    "source",
                    "frameType",
                    "recordIndex",
                    "byteLength",
                    "rawBase64"
                ],
                "properties": {
                    "source": {
                        "type": "string"
                    },
                    "sourceStorage": {
                        "type": "string"
                    },
                    "sourceStream": {
                        "type": "string"
                    },
                    "frameType": {
                        "type": "number"
                    },
                    "typeId": {
                        "type": ["number", "null"]
                    },
                    "recordIndex": {
                        "type": "number"
                    },
                    "byteLength": {
                        "type": "number"
                    },
                    "rawBase64": {
                        "type": "string"
                    }
                },
                "additionalProperties": true
            }
        },
        "pcbComponent": {
            "type": "object",
            "required": [
                "componentIndex",
                "designator",
                "x",
                "y",
                "layer",
                "pattern",
                "rotation",
                "source",
                "description",
                "height"
            ],
            "properties": {
                "componentIndex": {
                    "type": "number"
                },
                "designator": {
                    "type": "string"
                },
                "baseDesignator": {
                    "type": "string"
                },
                "displayDesignator": {
                    "type": "string"
                },
                "designatorSource": {
                    "const": "Texts6/Data"
                },
                "uniqueId": {
                    "type": "string"
                },
                "parameters": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "parameterSource": {
                    "const": "PrimitiveParameters/Data"
                },
                "x": {
                    "type": "number"
                },
                "y": {
                    "type": "number"
                },
                "layer": {
                    "type": "string"
                },
                "pattern": {
                    "type": "string"
                },
                "rotation": {
                    "type": "number"
                },
                "source": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "height": {
                    "type": ["number", "null"]
                },
                "componentKind": {
                    "$ref": "#/$defs/componentKindPolicy"
                },
                "provenance": {
                    "$ref": "#/$defs/pcbComponentProvenance"
                }
            },
            "additionalProperties": true
        },
        "componentKindPolicy": {
            "type": "object",
            "required": [
                "value",
                "name",
                "displayName",
                "includeInBom",
                "includeInNetlist",
                "includeInPlacement"
            ],
            "properties": {
                "value": {
                    "type": "number"
                },
                "name": {
                    "type": "string"
                },
                "displayName": {
                    "type": "string"
                },
                "includeInBom": {
                    "type": "boolean"
                },
                "includeInNetlist": {
                    "type": "boolean"
                },
                "includeInPlacement": {
                    "type": "boolean"
                }
            },
            "additionalProperties": true
        },
        "pcbComponentProvenance": {
            "type": "object",
            "properties": {
                "channelOffset": {
                    "type": "number"
                },
                "sourceDesignator": {
                    "type": "string"
                },
                "sourceUniqueId": {
                    "type": "string"
                },
                "sourceUniqueIdSegments": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "sourceHierarchicalPath": {
                    "type": "string"
                },
                "sourceHierarchySegments": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "sourceFootprintLibrary": {
                    "type": "string"
                },
                "sourceFootprintLibraryName": {
                    "type": "string"
                },
                "sourceLibReference": {
                    "type": "string"
                },
                "sourceComponentLibrary": {
                    "type": "string"
                },
                "sourceComponentLibraryIdentifierKind": {
                    "type": "number"
                },
                "sourceComponentLibraryIdentifier": {
                    "type": "string"
                },
                "footprintDescription": {
                    "type": "string"
                },
                "nameAutoPosition": {
                    "type": "number"
                },
                "commentAutoPosition": {
                    "type": "number"
                },
                "lockStrings": {
                    "type": "boolean"
                },
                "enablePinSwapping": {
                    "type": "boolean"
                },
                "enablePartSwapping": {
                    "type": "boolean"
                }
            },
            "additionalProperties": true
        },
        "pcbRule": {
            "type": "object",
            "required": [
                "ruleIndex",
                "name",
                "ruleKind",
                "ruleType",
                "constraints",
                "constraintValues",
                "typedConstraints"
            ],
            "properties": {
                "ruleIndex": {
                    "type": "number"
                },
                "name": {
                    "type": "string"
                },
                "ruleKind": {
                    "type": "string"
                },
                "enabled": {
                    "type": ["boolean", "null"]
                },
                "priority": {
                    "type": ["number", "null"]
                },
                "uniqueId": {
                    "type": "string"
                },
                "scope1": {
                    "$ref": "#/$defs/pcbRuleScope"
                },
                "scope2": {
                    "$ref": "#/$defs/pcbRuleScope"
                },
                "ruleType": {
                    "$ref": "#/$defs/pcbRuleType"
                },
                "constraints": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "constraintValues": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "typedConstraints": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "object",
                        "additionalProperties": true
                    }
                }
            },
            "additionalProperties": true
        },
        "pcbRuleScope": {
            "type": "object",
            "required": ["rawExpression", "predicate", "arguments", "isAll"],
            "properties": {
                "rawExpression": {
                    "type": "string"
                },
                "predicate": {
                    "type": "string"
                },
                "arguments": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "isAll": {
                    "type": "boolean"
                }
            },
            "additionalProperties": true
        },
        "pcbRuleType": {
            "type": "object",
            "required": ["rawKind", "kind", "category", "displayName"],
            "properties": {
                "rawKind": {
                    "type": "string"
                },
                "kind": {
                    "type": "string"
                },
                "category": {
                    "type": "string"
                },
                "displayName": {
                    "type": "string"
                }
            },
            "additionalProperties": true
        },
        "pcbDifferentialPair": {
            "type": "object",
            "required": [
                "pairIndex",
                "name",
                "positiveNetName",
                "negativeNetName",
                "netNames",
                "gatherControl",
                "classNames"
            ],
            "properties": {
                "pairIndex": {
                    "type": "number"
                },
                "name": {
                    "type": "string"
                },
                "positiveNetName": {
                    "type": "string"
                },
                "negativeNetName": {
                    "type": "string"
                },
                "netNames": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "gatherControl": {
                    "type": "boolean"
                },
                "uniqueId": {
                    "type": "string"
                },
                "classNames": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            },
            "additionalProperties": true
        },
        "pcbDifferentialPairClass": {
            "type": "object",
            "required": [
                "classIndex",
                "name",
                "members",
                "pairNames",
                "unresolvedMembers"
            ],
            "properties": {
                "classIndex": {
                    "type": "number"
                },
                "name": {
                    "type": "string"
                },
                "members": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "pairNames": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "unresolvedMembers": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            },
            "additionalProperties": true
        },
        "pickPlaceModel": {
            "type": "object",
            "required": ["positionMode", "entries", "modes"],
            "properties": {
                "units": {
                    "$ref": "#/$defs/units"
                },
                "positionMode": {
                    "enum": ["altium-pick-place", "component-origin"]
                },
                "entries": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/pickPlaceEntry"
                    }
                },
                "modes": {
                    "type": "object",
                    "properties": {
                        "componentOrigin": {
                            "type": "object",
                            "required": ["positionMode", "entries"],
                            "properties": {
                                "units": {
                                    "$ref": "#/$defs/units"
                                },
                                "positionMode": {
                                    "const": "component-origin"
                                },
                                "entries": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/$defs/pickPlaceEntry"
                                    }
                                }
                            },
                            "additionalProperties": true
                        }
                    },
                    "additionalProperties": true
                }
            },
            "additionalProperties": true
        },
        "pickPlaceEntry": {
            "type": "object",
            "required": [
                "designator",
                "pattern",
                "layer",
                "rotation",
                "x",
                "y",
                "componentOriginX",
                "componentOriginY",
                "padAnchorCount",
                "positionSource"
            ],
            "properties": {
                "designator": {
                    "type": "string"
                },
                "pattern": {
                    "type": "string"
                },
                "layer": {
                    "type": "string"
                },
                "rotation": {
                    "type": "number"
                },
                "x": {
                    "type": "number"
                },
                "y": {
                    "type": "number"
                },
                "componentOriginX": {
                    "type": "number"
                },
                "componentOriginY": {
                    "type": "number"
                },
                "padAnchorCount": {
                    "type": "number"
                },
                "positionSource": {
                    "type": "string"
                },
                "componentKind": {
                    "$ref": "#/$defs/componentKindPolicy"
                }
            },
            "additionalProperties": true
        },
        "pcbText": {
            "type": "object",
            "properties": {
                "text": {
                    "type": "string"
                },
                "rawText": {
                    "type": "string"
                },
                "resolvedText": {
                    "type": "string"
                },
                "specialString": {
                    "type": "object",
                    "additionalProperties": true
                },
                "textSource": {
                    "const": "WideStrings6/Data"
                },
                "role": {
                    "type": "string"
                },
                "isDesignator": {
                    "type": "boolean"
                },
                "isComment": {
                    "type": "boolean"
                },
                "isPlaceholder": {
                    "type": "boolean"
                },
                "componentIndex": {
                    "type": ["number", "null"]
                },
                "embeddedFontIndex": {
                    "type": "number"
                },
                "fontMetrics": {
                    "type": "object",
                    "additionalProperties": {
                        "type": ["number", "string", "boolean", "null"]
                    }
                }
            },
            "additionalProperties": true
        },
        "layerSubstacks": {
            "type": "array",
            "items": {
                "type": "object",
                "required": ["index", "fieldFamily", "id", "name"],
                "properties": {
                    "index": {
                        "type": "number"
                    },
                    "fieldFamily": {
                        "type": "string"
                    },
                    "id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "isFlex": {
                        "type": ["boolean", "null"]
                    },
                    "showTopDielectric": {
                        "type": ["boolean", "null"]
                    },
                    "showBottomDielectric": {
                        "type": ["boolean", "null"]
                    },
                    "serviceStackup": {
                        "type": ["boolean", "null"]
                    },
                    "usedByPrimitives": {
                        "type": ["boolean", "null"]
                    },
                    "rawStackupType": {
                        "type": "string"
                    }
                },
                "additionalProperties": true
            }
        },
        "boardRegionContexts": {
            "type": "array",
            "items": {
                "type": "object",
                "required": [
                    "regionIndex",
                    "name",
                    "layerStackId",
                    "substackIndex",
                    "substackName",
                    "isFlex",
                    "locked3d",
                    "bendingLineCount"
                ],
                "properties": {
                    "regionIndex": {
                        "type": "number"
                    },
                    "name": {
                        "type": "string"
                    },
                    "layerStackId": {
                        "type": "string"
                    },
                    "substackIndex": {
                        "type": ["number", "null"]
                    },
                    "substackName": {
                        "type": "string"
                    },
                    "isFlex": {
                        "type": ["boolean", "null"]
                    },
                    "locked3d": {
                        "type": "boolean"
                    },
                    "bendingLineCount": {
                        "type": "number"
                    }
                },
                "additionalProperties": true
            }
        },
        "pcbBomProfile": {
            "type": "object",
            "required": [
                "schema",
                "source",
                "summary",
                "groups",
                "components",
                "exclusions"
            ],
            "properties": {
                "schema": {
                    "const": "altium-toolkit.pcb.bom-profile.a1"
                },
                "source": {
                    "type": "string"
                },
                "summary": {
                    "type": "object",
                    "additionalProperties": true
                },
                "groups": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "components": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "exclusions": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                }
            },
            "additionalProperties": true
        },
        "pcbLayerStackReadModel": {
            "type": "object",
            "required": [
                "schema",
                "summary",
                "source",
                "layers",
                "substacks",
                "branches",
                "impedanceProfiles",
                "transmissionLines",
                "viaSpans",
                "backdrillSpans",
                "diagnostics"
            ],
            "properties": {
                "schema": {
                    "const": "altium-toolkit.pcb.layer-stack.a1"
                },
                "summary": {
                    "type": "object",
                    "additionalProperties": true
                },
                "source": {
                    "type": "object",
                    "additionalProperties": true
                },
                "layers": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "substacks": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "branches": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "impedanceProfiles": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "transmissionLines": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "viaSpans": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "backdrillSpans": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "fidelityReport": {
                    "$ref": "#/$defs/pcbLayerStackFidelityReport"
                },
                "diagnostics": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                }
            },
            "additionalProperties": true
        },
        "pcbLayerStackFidelityReport": {
            "type": "object",
            "required": [
                "schema",
                "sourceDocument",
                "summary",
                "capabilities",
                "semanticSections",
                "nativeCacheSections",
                "interchangeOnlySections",
                "unsupportedRegeneration",
                "diagnostics"
            ],
            "properties": {
                "schema": {
                    "const": "altium-toolkit.pcb.layer-stack-fidelity.a1"
                },
                "sourceDocument": {
                    "type": "string"
                },
                "summary": {
                    "type": "object",
                    "additionalProperties": true
                },
                "capabilities": {
                    "type": "object",
                    "additionalProperties": true
                },
                "semanticSections": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "nativeCacheSections": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "interchangeOnlySections": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "unsupportedRegeneration": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "diagnostics": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                }
            },
            "additionalProperties": true
        },
        "pcbRigidFlexTopology": {
            "type": "object",
            "required": [
                "schema",
                "summary",
                "substackRegionJoins",
                "branchGraph",
                "bendLines",
                "diagnostics"
            ],
            "properties": {
                "schema": {
                    "const": "altium-toolkit.pcb.rigid-flex-topology.a1"
                },
                "summary": {
                    "type": "object",
                    "additionalProperties": true
                },
                "substackRegionJoins": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "branchGraph": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "bendLines": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "diagnostics": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                }
            },
            "additionalProperties": true
        },
        "embeddedFonts": {
            "type": "array",
            "items": {
                "type": "object",
                "required": [
                    "index",
                    "name",
                    "style",
                    "fileName",
                    "sourceStream",
                    "format",
                    "mimeType",
                    "byteCount",
                    "compressedByteCount",
                    "payloadBase64",
                    "metrics"
                ],
                "properties": {
                    "index": {
                        "type": "number"
                    },
                    "name": {
                        "type": "string"
                    },
                    "style": {
                        "type": "string"
                    },
                    "fileName": {
                        "type": "string"
                    },
                    "sourceStream": {
                        "type": "string"
                    },
                    "format": {
                        "enum": ["truetype", "opentype", "unknown"]
                    },
                    "mimeType": {
                        "type": "string"
                    },
                    "byteCount": {
                        "type": "number"
                    },
                    "compressedByteCount": {
                        "type": "number"
                    },
                    "payloadBase64": {
                        "type": "string"
                    },
                    "metrics": {
                        "type": "object",
                        "additionalProperties": {
                            "type": ["number", "string", "boolean", "null"]
                        }
                    }
                },
                "additionalProperties": true
            }
        },
        "componentPrimitiveGroup": {
            "type": "object",
            "required": [
                "componentIndex",
                "designator",
                "pads",
                "tracks",
                "arcs",
                "fills",
                "vias",
                "regions",
                "shapeBasedRegions",
                "texts",
                "componentBodies"
            ],
            "properties": {
                "componentIndex": {
                    "type": "number"
                },
                "designator": {
                    "type": "string"
                },
                "pads": {
                    "type": "array"
                },
                "tracks": {
                    "type": "array"
                },
                "arcs": {
                    "type": "array"
                },
                "fills": {
                    "type": "array"
                },
                "vias": {
                    "type": "array"
                },
                "regions": {
                    "type": "array"
                },
                "shapeBasedRegions": {
                    "type": "array"
                },
                "texts": {
                    "type": "array"
                },
                "componentBodies": {
                    "type": "array"
                }
            },
            "additionalProperties": true
        },
        "designBundleSheet": {
            "type": "object",
            "required": ["bundleIndex", "fileName", "title"],
            "properties": {
                "bundleIndex": {
                    "type": "number"
                },
                "fileName": {
                    "type": "string"
                },
                "title": {
                    "type": "string"
                },
                "documentPath": {
                    "type": "string"
                },
                "uniqueId": {
                    "type": "string"
                },
                "componentCount": {
                    "type": "number"
                },
                "netCount": {
                    "type": "number"
                }
            },
            "additionalProperties": true
        },
        "designBundleComponent": {
            "type": "object",
            "required": ["bundleIndex", "designator"],
            "properties": {
                "bundleIndex": {
                    "type": "number"
                },
                "designator": {
                    "type": "string"
                },
                "schematic": {
                    "type": ["object", "null"],
                    "additionalProperties": true
                },
                "pcb": {
                    "type": ["object", "null"],
                    "additionalProperties": true
                }
            },
            "additionalProperties": true
        },
        "schematicHierarchy": {
            "type": "object",
            "required": ["mode", "modeName", "sheets", "sheetSymbols"],
            "properties": {
                "mode": {
                    "type": "string"
                },
                "modeName": {
                    "type": "string"
                },
                "sheets": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "sheetSymbols": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                }
            },
            "additionalProperties": true
        },
        "projectHierarchyReport": {
            "type": "object",
            "required": [
                "schema",
                "summary",
                "hierarchyMode",
                "sheets",
                "links",
                "roots",
                "diagnostics"
            ],
            "properties": {
                "schema": {
                    "const": "altium-toolkit.project.hierarchy.a1"
                },
                "summary": {
                    "type": "object",
                    "additionalProperties": true
                },
                "hierarchyMode": {
                    "type": "object",
                    "additionalProperties": true
                },
                "sheets": {
                    "type": "array"
                },
                "links": {
                    "type": "array"
                },
                "roots": {
                    "type": "array"
                },
                "diagnostics": {
                    "type": "array"
                }
            },
            "additionalProperties": true
        },
        "schematicNet": {
            "type": "object",
            "required": ["name"],
            "properties": {
                "name": {
                    "type": "string"
                },
                "autoName": {
                    "type": "string"
                },
                "autoNameSource": {
                    "type": "string",
                    "enum": [
                        "component-pin",
                        "component-pin-name",
                        "owner-pin",
                        "owner-pin-name",
                        "pin-name"
                    ]
                },
                "aliasCandidates": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "pins": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "componentDesignator": {
                                "type": "string"
                            }
                        },
                        "additionalProperties": true
                    }
                }
            },
            "additionalProperties": true
        },
        "designBundleNet": {
            "type": "object",
            "required": ["bundleIndex", "name", "schematic", "pcb", "pins"],
            "properties": {
                "bundleIndex": {
                    "type": "number"
                },
                "name": {
                    "type": "string"
                },
                "schematic": {
                    "type": "array"
                },
                "pcb": {
                    "type": "array"
                },
                "pins": {
                    "type": "array"
                }
            },
            "additionalProperties": true
        },
        "designBundleIndexes": {
            "type": "object",
            "properties": {
                "documentsByPath": {
                    "type": "object"
                },
                "sheetsByFileName": {
                    "type": "object"
                },
                "componentsByDesignator": {
                    "type": "object"
                },
                "netsByName": {
                    "type": "object"
                },
                "pnpByDesignator": {
                    "type": "object"
                }
            },
            "additionalProperties": true
        },
        "effectiveVariantView": {
            "type": "object",
            "required": [
                "name",
                "dnp",
                "parameterOverrides",
                "bom",
                "pnp",
                "nets",
                "components"
            ],
            "properties": {
                "name": {
                    "type": "string"
                },
                "uniqueId": {
                    "type": "string"
                },
                "dnp": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "parameterOverrides": {
                    "type": "object"
                },
                "bom": {
                    "type": "array"
                },
                "pnp": {
                    "$ref": "#/$defs/pickPlaceModel"
                },
                "nets": {
                    "type": "array"
                },
                "components": {
                    "type": "array"
                }
            },
            "additionalProperties": true
        },
        "pcbStatistics": {
            "type": "object",
            "properties": {
                "schema": {
                    "const": "altium-toolkit.pcb.statistics.a1"
                },
                "units": {
                    "$ref": "#/$defs/units"
                },
                "board": {
                    "type": "object",
                    "additionalProperties": true
                },
                "drills": {
                    "type": "object",
                    "additionalProperties": true
                },
                "primitiveWidths": {
                    "type": "object",
                    "additionalProperties": true
                },
                "layers": {
                    "type": "object",
                    "additionalProperties": true
                },
                "planning": {
                    "type": "object",
                    "additionalProperties": true
                }
            },
            "additionalProperties": true
        },
        "pcbRouteAnalysis": {
            "type": "object",
            "required": ["schema", "units", "summary", "byNet"],
            "properties": {
                "schema": {
                    "const": "altium-toolkit.pcb.route-analysis.a1"
                },
                "units": {
                    "$ref": "#/$defs/units"
                },
                "summary": {
                    "type": "object",
                    "additionalProperties": true
                },
                "byNet": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "classes": {
                    "type": "array"
                },
                "differentialPairs": {
                    "type": "array"
                }
            },
            "additionalProperties": true
        },
        "pcbReviewMetadata": {
            "type": "object",
            "required": [
                "schema",
                "summary",
                "routeGroups",
                "routeHighlightProfiles",
                "polygonRealizations",
                "drillReview",
                "boardAssemblyViews",
                "indexes"
            ],
            "properties": {
                "schema": {
                    "const": "altium-toolkit.pcb.review-metadata.a1"
                },
                "summary": {
                    "type": "object",
                    "additionalProperties": true
                },
                "routeGroups": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "routeHighlightProfiles": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "polygonRealizations": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "drillReview": {
                    "type": "object",
                    "additionalProperties": true
                },
                "boardAssemblyViews": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "indexes": {
                    "type": "object",
                    "additionalProperties": true
                }
            },
            "additionalProperties": true
        },
        "pcbPlacedFootprintExtraction": {
            "type": "object",
            "required": [
                "schema",
                "sourceDocument",
                "summary",
                "outputs",
                "indexes"
            ],
            "properties": {
                "schema": {
                    "const": "altium-toolkit.pcb.placed-footprint-extraction.a1"
                },
                "sourceDocument": {
                    "type": "string"
                },
                "summary": {
                    "type": "object",
                    "additionalProperties": true
                },
                "outputs": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "indexes": {
                    "type": "object",
                    "additionalProperties": true
                }
            },
            "additionalProperties": true
        },
        "projectBomPnpReconciliation": {
            "type": "object",
            "required": [
                "schema",
                "summary",
                "schematicBomDesignators",
                "pcbBomDesignators",
                "pnpDesignators",
                "effectiveBomDesignators",
                "noBomDesignators",
                "issues"
            ],
            "properties": {
                "schema": {
                    "const": "altium-toolkit.project.bom-pnp-reconciliation.a1"
                },
                "summary": {
                    "type": "object",
                    "additionalProperties": true
                },
                "schematicBomDesignators": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "pcbBomDesignators": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "pnpDesignators": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "effectiveBomDesignators": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "noBomDesignators": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "issues": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                }
            },
            "additionalProperties": true
        },
        "units": {
            "type": "object",
            "additionalProperties": {
                "type": "string"
            }
        },
        "libraryRenderManifest": {
            "type": "object",
            "properties": {
                "schema": {
                    "const": "altium-toolkit.library.render-manifest.a1"
                },
                "libraryKind": {
                    "enum": ["schematic-symbols", "pcb-footprints"]
                },
                "outputs": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "embeddedAssets": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                }
            },
            "additionalProperties": true
        },
        "pcbLibraryParityReport": {
            "type": "object",
            "required": ["schema", "summary", "footprints"],
            "properties": {
                "schema": {
                    "const": "altium-toolkit.pcblib.parity.a1"
                },
                "summary": {
                    "type": "object",
                    "additionalProperties": true
                },
                "footprints": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                }
            },
            "additionalProperties": true
        },
        "libraryIndexes": {
            "type": "object",
            "properties": {
                "symbolsByName": {
                    "type": "object"
                },
                "footprintsByName": {
                    "type": "object"
                }
            },
            "additionalProperties": true
        },
        "libraryQaReport": {
            "type": "object",
            "properties": {
                "schema": {
                    "const": "altium-toolkit.library.qa.a1"
                },
                "summary": {
                    "type": "object",
                    "additionalProperties": true
                },
                "duplicates": {
                    "type": "object",
                    "additionalProperties": true
                },
                "staleImplementations": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "missingModels": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "multipartMismatches": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "mergePlan": {
                    "type": "object",
                    "additionalProperties": true
                },
                "libraryLint": {
                    "type": "object",
                    "additionalProperties": true
                },
                "issues": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                }
            },
            "additionalProperties": true
        },
        "integratedLibraryIndexes": {
            "type": "object",
            "properties": {
                "sourcesByFileName": {
                    "type": "object"
                },
                "sourcesByKind": {
                    "type": "object"
                },
                "modelsByComponent": {
                    "type": "object"
                },
                "symbolsByComponent": {
                    "type": "object"
                },
                "footprintsByComponent": {
                    "type": "object"
                }
            },
            "additionalProperties": true
        },
        "integratedLibrary": {
            "type": "object",
            "required": [
                "version",
                "streamNames",
                "crossReferences",
                "parameters",
                "parameterRecords",
                "sources"
            ],
            "properties": {
                "version": {
                    "type": "string"
                },
                "streamNames": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "crossReferences": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "parameters": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "parameterRecords": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "indexes": {
                    "$ref": "#/$defs/integratedLibraryIndexes"
                },
                "sources": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/integratedLibrarySource"
                    }
                }
            },
            "additionalProperties": true
        },
        "integratedLibrarySource": {
            "type": "object",
            "required": [
                "path",
                "fileName",
                "fileType",
                "libraryKind",
                "compression",
                "byteLength",
                "payloadBase64",
                "payloadText"
            ],
            "properties": {
                "path": {
                    "type": "string"
                },
                "fileName": {
                    "type": "string"
                },
                "fileType": {
                    "type": "string"
                },
                "libraryKind": {
                    "type": "string"
                },
                "compression": {
                    "enum": ["none", "zlib", "zlib-wrapper"]
                },
                "byteLength": {
                    "type": "number"
                },
                "payloadBase64": {
                    "type": "string"
                },
                "payloadText": {
                    "type": "string"
                }
            },
            "additionalProperties": true
        }
    },
    "additionalProperties": true
}
