{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cm-com/json-schema/cm-com-archive-schema.json",
  "title": "Archive",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cm-com-archive-api-openapi.yml#/components/schemas/Archive",
  "allOf": [
    {
      "$ref": "#/$defs/Pagination"
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/$defs/DossierId"
              },
              "name": {
                "type": "string",
                "description": "Name of the dossier"
              },
              "invitees": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/ArchiveInvitee"
                }
              },
              "files": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/ArchiveFile"
                }
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "description": "The date the dossier was updated",
                "readOnly": true
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "description": "The date the dossier was created",
                "readOnly": true
              }
            }
          }
        }
      }
    }
  ],
  "$defs": {
    "ArchiveFile": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The ID of the file",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "Original name of the file without extension",
          "maxLength": 255
        },
        "contentType": {
          "type": "string",
          "description": "The content type identifying the type of file",
          "readOnly": true
        },
        "size": {
          "type": "integer",
          "description": "The size of the file in bytes"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The date the file was updated",
          "readOnly": true
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The date the file was created",
          "readOnly": true
        }
      }
    },
    "ArchiveInvitee": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/InviteeId"
        },
        "name": {
          "type": "string",
          "description": "Name of the person invited to read and/or sign the document",
          "maxLength": 255
        },
        "email": {
          "type": "string",
          "format": "email",
          "description": "A valid email address",
          "maxLength": 255
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The date the invitee was updated",
          "readOnly": true
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The date the invitee was created",
          "readOnly": true
        }
      }
    },
    "DossierId": {
      "$ref": "#/$defs/DossierReference",
      "readOnly": true
    },
    "DossierReference": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the dossier"
    },
    "InviteeId": {
      "$ref": "#/$defs/InviteeReference",
      "readOnly": true
    },
    "InviteeReference": {
      "description": "Optional. Indicates that only a particular invitee is allowed/required to use a field.",
      "type": "string",
      "format": "uuid"
    },
    "Pagination": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "description": "The total number of items",
          "minimum": 1
        },
        "perPage": {
          "type": "integer",
          "description": "The number of items per page"
        },
        "currentPage": {
          "type": "integer",
          "description": "The current page number"
        },
        "lastPage": {
          "type": "integer",
          "description": "The page number of the last available page"
        },
        "from": {
          "type": "integer",
          "description": "The number of the first item in the current page"
        },
        "to": {
          "type": "integer",
          "description": "The number of the last item in the current page"
        }
      }
    }
  }
}