{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.demiton.io/registers/document_location/v1.json",
  "title": "document_location contract v1",
  "type": "object",
  "required": [
    "connector_ref",
    "coordinate_key",
    "entity_type",
    "sources",
    "system"
  ],
  "properties": {
    "system": {
      "type": "string",
      "description": "The storage system of one source; only SharePoint and Dropbox are crawlable",
      "x-demiton-requiredness": "required"
    },
    "sources": {
      "type": "array",
      "description": "The ordered list of places to look: each element is one complete declarative locator",
      "x-demiton-requiredness": "required"
    },
    "doc_type": {
      "type": "string",
      "description": "The specific document type this binding locates, or null for the entity type's general home; part of the supersede key",
      "x-demiton-requiredness": "optional"
    },
    "file_glob": {
      "type": "string",
      "description": "The file match for this doc type, either `*` (no filter) or a single `*.ext` glob",
      "x-demiton-requiredness": "optional"
    },
    "store_root": {
      "type": "string",
      "description": "The path under the store root to start from (null/empty for systems addressed by site+drive)",
      "x-demiton-requiredness": "optional"
    },
    "doc_subpath": {
      "type": "string",
      "description": "An optional fixed sub-path inside the entity folder where this doc type's files sit",
      "x-demiton-requiredness": "tenant-specific"
    },
    "entity_type": {
      "type": "string",
      "description": "The entity kind whose documents this binding locates; part of the binding's own supersede key",
      "x-demiton-requiredness": "required"
    },
    "connector_ref": {
      "type": "string",
      "description": "The logical alias of the connector that reaches this source; also the field the export/import scope filter compares",
      "x-demiton-requiredness": "required"
    },
    "store_site_id": {
      "type": "string",
      "description": "The store's site identifier; required to reach a source on systems that address by site",
      "x-demiton-requiredness": "optional"
    },
    "binding_status": {
      "type": "string",
      "description": "Whether the operator has confirmed the binding or it is still a candidate",
      "x-demiton-requiredness": "optional"
    },
    "coordinate_key": {
      "type": "string",
      "description": "The override discriminator stored in the fact's identity — bare when there is no coordinate override, else an 8-hex hash of the coordinate selector",
      "x-demiton-requiredness": "required"
    },
    "folder_pattern": {
      "type": "string",
      "description": "A case-insensitive regex matched against folder names at any depth, used where no single sub-path name holds",
      "x-demiton-requiredness": "tenant-specific"
    },
    "store_drive_id": {
      "type": "string",
      "description": "The store's drive identifier",
      "x-demiton-requiredness": "optional"
    },
    "store_drive_name": {
      "type": "string",
      "description": "The drive's display name, used to translate between the store root and display paths",
      "x-demiton-requiredness": "optional"
    },
    "lifecycle_folders": {
      "type": "array",
      "description": "The status-tagged folders to traverse, each with a folder name and the entity status it holds",
      "x-demiton-requiredness": "tenant-specific"
    },
    "entity_folder_pattern": {
      "type": "string",
      "description": "How each entity's own folder is named, binding a folder to an entity by its number token",
      "x-demiton-requiredness": "tenant-specific"
    }
  },
  "x-demiton-register-type": "document_location",
  "x-demiton-contract-version": "1.0.3",
  "x-demiton-store": "tenant",
  "x-demiton-axes": [],
  "x-demiton-measures": [],
  "x-demiton-provenance": {
    "standards": [
      {
        "code": "AS ISO 19650.1:2019 / AS ISO 19650.2:2019",
        "title": "Organization and digitization of information about buildings and civil engineering works, including BIM - Information management using BIM - Part 1: Concepts and principles",
        "access": "public_summary",
        "region": "Australia",
        "edition": "2019",
        "checked_on": "2026-09-14"
      },
      {
        "code": "AS ISO 19650.2:2019",
        "title": "Information management using BIM - Part 2: Delivery phase of the assets",
        "access": "public_summary",
        "region": "Australia",
        "edition": "2019",
        "checked_on": "2026-09-14"
      },
      {
        "code": "ISO 19650-1:2018 / ISO 19650-2:2018",
        "title": "Information management using building information modelling - Part 1: Concepts and principles",
        "access": "public_summary",
        "region": "International",
        "edition": "2018",
        "checked_on": "2026-09-14"
      },
      {
        "code": "ISO 19650-2:2018",
        "title": "Information management using building information modelling - Part 2: Delivery phase of the assets",
        "access": "public_summary",
        "region": "International",
        "edition": "2018",
        "checked_on": "2026-09-14"
      }
    ]
  },
  "description": "Where an entity's source documents live: a SharePoint or Dropbox folder.",
  "x-demiton-contract-url": "https://docs.demiton.io/registers/document_location/",
  "x-demiton-register-catalog": "https://docs.demiton.io/concepts/register-catalog"
}