{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/chalmers-university-of-technology/json-schema/chalmers-university-of-technology-electronic-publication-agreement-signature-schema.json",
  "title": "ElectronicPublicationAgreementSignature",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/chalmers-university-of-technology-electronicpublicationagreementsignature-api-openapi.yml#/components/schemas/ElectronicPublicationAgreementSignature",
  "type": "object",
  "properties": {
    "ID": {
      "format": "int32",
      "description": "Internal id number for contract",
      "type": "integer"
    },
    "PersonID": {
      "description": "ResearchId-number for the person that signs the contract",
      "type": "string"
    },
    "Person": {
      "$ref": "#/$defs/PersonPerson",
      "description": "Person that signs the contract"
    },
    "PublicationType": {
      "description": "Used for writing out Publication Type in Emails",
      "type": "string"
    },
    "PublicationYear": {
      "description": "Used for writing our Publication Year in Emails",
      "type": "string"
    },
    "PublicationTitle": {
      "description": "Title of publication",
      "type": "string"
    },
    "PubID": {
      "format": "int32",
      "description": "PubId from CPL",
      "type": "integer"
    },
    "Agree": {
      "description": "True if contract is signed",
      "type": "boolean"
    },
    "Date": {
      "format": "date-time",
      "description": "Date and time in UTC of contract signment",
      "type": "string"
    },
    "ContractText": {
      "description": "Complete contract text",
      "type": "string"
    },
    "Checksum": {
      "description": "SHA256 hash calculated on the UTF-8 representation of the \n            string \"Person.Firstname+Person.Lastname+PublictionTitle+ContractText+Date(DateTime.ToString(\"o\"))",
      "type": "string"
    },
    "PrintAt": {
      "description": "Print location",
      "type": "string"
    },
    "Decision": {
      "description": "Signees decision",
      "type": "string"
    },
    "Message": {
      "description": "Message to admin",
      "type": "string"
    },
    "IpV4": {
      "description": "Originating IP-address",
      "type": "string"
    }
  },
  "$defs": {
    "OrganizationHome": {
      "type": "object",
      "properties": {
        "Id": {
          "type": "string"
        },
        "OrganizationId": {
          "type": "string"
        },
        "OrganizationData": {
          "$ref": "#/$defs/PersonOrganization"
        },
        "LastUpdatedDate": {
          "format": "date-time",
          "type": "string"
        },
        "TitleSwe": {
          "type": "string"
        },
        "TitleEng": {
          "type": "string"
        },
        "StartDate": {
          "format": "date-time",
          "type": "string"
        },
        "EndDate": {
          "format": "date-time",
          "type": "string"
        },
        "Source": {
          "type": "string"
        },
        "Priority": {
          "type": "string"
        }
      }
    },
    "PdbCategory": {
      "type": "object",
      "properties": {
        "Id": {
          "type": "string"
        },
        "Name": {
          "type": "string"
        },
        "StartDate": {
          "format": "date-time",
          "type": "string"
        },
        "EndDate": {
          "format": "date-time",
          "type": "string"
        }
      }
    },
    "PersonDisplayPath": {
      "type": "object",
      "properties": {
        "DisplayPathSwe": {
          "type": "string"
        },
        "DisplayPathEng": {
          "type": "string"
        }
      }
    },
    "PersonIdentifier": {
      "type": "object",
      "properties": {
        "Id": {
          "type": "string"
        },
        "Type": {
          "$ref": "#/$defs/PersonIdentifierType"
        },
        "CreatedBy": {
          "type": "string"
        },
        "CreatedAt": {
          "format": "date-time",
          "type": "string"
        },
        "UpdatedBy": {
          "type": "string"
        },
        "UpdatedAt": {
          "format": "date-time",
          "type": "string"
        },
        "IsActive": {
          "type": "boolean"
        },
        "Value": {
          "type": "string"
        }
      }
    },
    "PersonIdentifierType": {
      "type": "object",
      "properties": {
        "Id": {
          "type": "string"
        },
        "Value": {
          "type": "string"
        },
        "DescriptionSwe": {
          "type": "string"
        },
        "DescriptionEng": {
          "type": "string"
        }
      }
    },
    "PersonOrganization": {
      "type": "object",
      "properties": {
        "Id": {
          "type": "string"
        },
        "NameSwe": {
          "type": "string"
        },
        "NameEng": {
          "type": "string"
        },
        "DisplayNameSwe": {
          "type": "string"
        },
        "DisplayNameEng": {
          "type": "string"
        },
        "DisplayPathSwe": {
          "type": "string"
        },
        "DisplayPathEng": {
          "type": "string"
        },
        "DisplayPathShortSwe": {
          "type": "string"
        },
        "DisplayPathShortEng": {
          "type": "string"
        },
        "PossibleDisplayPaths": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PersonDisplayPath"
          }
        },
        "City": {
          "type": "string"
        },
        "PostalNo": {
          "type": "string"
        },
        "Country": {
          "type": "string"
        },
        "GeoLat": {
          "type": "string"
        },
        "GeoLong": {
          "type": "string"
        },
        "Level": {
          "format": "int32",
          "type": "integer"
        },
        "StartYear": {
          "format": "int32",
          "type": "integer"
        },
        "EndYear": {
          "format": "int32",
          "type": "integer"
        },
        "OrganizationTypes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PersonOrganizationType"
          }
        },
        "OrganizationParents": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PersonOrganizationParent"
          }
        },
        "ActiveOrganizationParentIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "HasIdentifiers": {
          "type": "boolean"
        },
        "IdentifiersCount": {
          "format": "int32",
          "type": "integer"
        },
        "Identifiers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PersonOrganizationIdentifier"
          }
        },
        "IdentifierLdapCode": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "IdentifierCplDepartmentId": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "CreatedBy": {
          "type": "string"
        },
        "CreatedAt": {
          "format": "date-time",
          "type": "string"
        },
        "UpdatedBy": {
          "type": "string"
        },
        "UpdatedAt": {
          "format": "date-time",
          "type": "string"
        },
        "ValidatedBy": {
          "type": "string"
        },
        "ValidatedDate": {
          "format": "date-time",
          "type": "string"
        },
        "DeletedBy": {
          "type": "string"
        },
        "DeletedAt": {
          "format": "date-time",
          "type": "string"
        },
        "NeedsAttention": {
          "type": "boolean"
        },
        "IsReplacedById": {
          "type": "string"
        },
        "IsActive": {
          "type": "boolean"
        }
      }
    },
    "PersonOrganizationIdentifier": {
      "type": "object",
      "properties": {
        "Id": {
          "type": "string"
        },
        "Type": {
          "$ref": "#/$defs/PersonOrganizationIdentifierType"
        },
        "CreatedBy": {
          "type": "string"
        },
        "CreatedAt": {
          "format": "date-time",
          "type": "string"
        },
        "UpdatedBy": {
          "type": "string"
        },
        "UpdatedAt": {
          "format": "date-time",
          "type": "string"
        },
        "IsActive": {
          "type": "boolean"
        },
        "Value": {
          "type": "string"
        }
      }
    },
    "PersonOrganizationIdentifierType": {
      "type": "object",
      "properties": {
        "Id": {
          "type": "string"
        },
        "Value": {
          "type": "string"
        },
        "DescriptionSwe": {
          "type": "string"
        },
        "DescriptionEng": {
          "type": "string"
        }
      }
    },
    "PersonOrganizationParent": {
      "type": "object",
      "properties": {
        "Id": {
          "type": "string"
        },
        "FromDate": {
          "format": "date-time",
          "type": "string"
        },
        "ToDate": {
          "format": "date-time",
          "type": "string"
        },
        "ParentOrganizationId": {
          "type": "string"
        },
        "ParentOrganizationData": {
          "$ref": "#/$defs/PersonOrganization"
        }
      }
    },
    "PersonOrganizationType": {
      "type": "object",
      "properties": {
        "Id": {
          "type": "string"
        },
        "NameSwe": {
          "type": "string"
        },
        "NameEng": {
          "type": "string"
        },
        "LegacyOrganizationTypeId": {
          "format": "int32",
          "type": "integer"
        }
      }
    },
    "PersonPerson": {
      "type": "object",
      "properties": {
        "Id": {
          "type": "string"
        },
        "FirstName": {
          "type": "string"
        },
        "LastName": {
          "type": "string"
        },
        "DisplayName": {
          "type": "string"
        },
        "BirthYear": {
          "format": "int32",
          "type": "integer"
        },
        "IsReplacedById": {
          "type": "string"
        },
        "IsReplacingId": {
          "type": "string"
        },
        "IsActive": {
          "type": "boolean"
        },
        "IsDeleted": {
          "type": "boolean"
        },
        "HasOrganizationHome": {
          "type": "boolean"
        },
        "HasIdentifiers": {
          "type": "boolean"
        },
        "HasPublications": {
          "type": "boolean"
        },
        "HasProjects": {
          "type": "boolean"
        },
        "OrganizationHomeCount": {
          "format": "int32",
          "type": "integer"
        },
        "IdentifiersCount": {
          "format": "int32",
          "type": "integer"
        },
        "IdentifierCid": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "IdentifierCplPersonId": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "IdentifierOrcid": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "Identifiers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PersonIdentifier"
          }
        },
        "OrganizationHome": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OrganizationHome"
          }
        },
        "PdbCategories": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PdbCategory"
          }
        },
        "CreatedBy": {
          "type": "string"
        },
        "CreatedAt": {
          "format": "date-time",
          "type": "string"
        },
        "UpdatedBy": {
          "type": "string"
        },
        "UpdatedAt": {
          "format": "date-time",
          "type": "string"
        },
        "DeletedBy": {
          "type": "string"
        },
        "DeletedAt": {
          "format": "date-time",
          "type": "string"
        },
        "SightedBy": {
          "type": "string"
        },
        "SightedAt": {
          "format": "date-time",
          "type": "string"
        },
        "ValidatedBy": {
          "type": "string"
        },
        "ValidatedDate": {
          "format": "date-time",
          "type": "string"
        },
        "NeedsAttention": {
          "type": "boolean"
        }
      }
    }
  }
}