##########################   myA API GraphQL schema   ##########################
####################   Copyright (c) 2026 - tbmaestro, inc.   ##################

#############################   IMPORTANT NOTICE   #############################
#                                                                              #
# This GraphQL schema is provided for use solely under the terms of the        #
# commercial agreement between the client and tbmaestro, inc. Use of this API  #
# must comply with all applicable laws and regulations.                        #
#                                                                              #
# All requests to the API must be properly authenticated as documented. Any    #
# unauthorized, unlawful, or non-compliant use may result in suspension or     #
# termination of access to the API.                                            #
#                                                                              #
# This API and its schema are proprietary and confidential. Unauthorized       #
# redistribution, modification, or reverse engineering is strictly prohibited. #
#                                                                              #
# The schema and associated API may be updated or changed at any time without  #
# prior notice. It is the client's responsibility to stay informed of such     #
# changes via the official documentation or communication channels.            #
#                                                                              #
# Access to the API is provided "as is" without warranties of any kind, and    #
# availability is not guaranteed. Clients are responsible for the security of  #
# their credentials and ensuring safe use of the API.                          #
#                                                                              #
# By using this schema and the associated API, you agree to adhere to these    #
# terms.                                                                       #
#                                                                              #
# For more information, please email us at contact@tbmaestro.com.              #
#                                                                              #
# Date: Mon Jun 15 2026                                                        #
#                                                                              #
################################################################################


schema {
  query: Query
  mutation: Mutation
  subscription: Subscription
}

"""
An Actor is a user or API client that is involved in creating, updating or deleting an entity.
"""
type Actor {
  """Actor's ID."""
  actorId: String!
  """Actor's name."""
  name: String
}

"""
An aggregation operation to apply on a entity's field. For instance, this allows to compute the
sum of all values of a certain field for all entities in a group.
"""
input AggregationInput {
  """
  Field path to aggregate. For nested fields, use the dot-notation. E.g., 'properties.value'.
  Should be a valid field in the GraphQL type for the relevant entity.
  """
  field: String!
  """Aggregation operation to apply."""
  operation: AggregationOperation!
}

"""Available aggregation operations."""
enum AggregationOperation {
  """For use with numeric fields. Arithmetic mean (average)."""
  AVG
  """
  Count returned entities.
  Note: this operation does not depend on the field it applies to, however since the result is a number, ensure the
  field to which to store the result is compatible with number types.
  """
  COUNT
  """For use with numeric fields. Highest value."""
  MAX
  """For use with numeric fields. Lowest value."""
  MIN
  """For use with numeric fields. Sum of all values."""
  SUM
  """First value for field within a group."""
  FIRST
  """
  For use with boolean fields. Evaluates to true if the field is true for all entities in a group,
  or false if the field is false for at least one entity.
  """
  ALL
  """
  For use with boolean fields. Evaluates to true if the field is true for at least one entity in a group,
  or false if the field is false for all entities.
  """
  ANY
  """
  For use with boolean fields. Evaluates to true if the field is false for all entities in a group,
  or false if the field is true for at least one entity.
  """
  NONE
}

"""
A default type used to represent anything or for fields which can be of any
type.
"""
scalar Any

"""
An Asset entity represents anything of value an organization holds (e.g. a
building). It is the principal entity managed through this API: most other
entities will refer to one as part of that asset's operation and management
(e.g. interventions, inspections, projects, etc.)
Assets can be of different types which may be configured, see AssetType.
"""
type Asset {
  """Asset's ID."""
  id: String!
  """ID of the organization to which the asset belongs."""
  organizationId: String!
  """ID of the asset's type. See AssetType."""
  typeId: String!
  """Asset's name."""
  name: String!
  """Asset's unique identifier."""
  identifier: Int!
  """Asset's current state."""
  assetState: String!
  """Asset's properties."""
  properties: Object
  """Asset's computed properties (indicators)."""
  computedProperties: Object
  """Date and time at which the asset was created."""
  creationDate: DateTime!
  """Date and time at which the asset was last updated."""
  lastChangeDate: DateTime
  """Actor who created this asset."""
  creationActor: Actor!
  """Actor who last updated this asset."""
  lastChangeActor: Actor
  """Asset's data date."""
  dataDate: DateTime!
}

"""
An AssetAudit entity represents an asset's audit and its resulting observations.
Note: audits are created automatically when setting an asset's auditType
property, in an organization for which this property is enabled.
"""
type AssetAudit {
  """Audit's ID."""
  id: String!
  """ID of the organization to which the audit belongs."""
  organizationId: String!
  """ID of the asset to which this audit is related."""
  assetId: String!
  """Audit's properties."""
  properties: Object
  """Audit's computed properties (indicators)."""
  computedProperties: Object
  """Date and time at which the audit was created."""
  creationDate: DateTime!
  """Date and time at which the audit was last updated."""
  lastChangeDate: DateTime
  """Actor who created this audit."""
  creationActor: Actor!
  """Actor who last updated this audit."""
  lastChangeActor: Actor
}

"""
An AssetCrv entity contains all information relative to an asset's Current
Replacement Value (CRV). It is used for configuring how the asset's value is
calculated based on its purposes and technical categories that apply.
Suggestions based on the organization's configuration can be used.
"""
type AssetCrv {
  """Asset CRV's ID."""
  id: String!
  """ID of the asset this CRV is related to."""
  assetId: String!
  """
  Indicate whether this CRV is calculated based on the suggested unit
  replacement value or the one manually set in the entity's properties.
  """
  useSuggestedUnitReplacementValue: Boolean!
  """
  Indicate whether this CRV's breakdown into technical categories is based on
  suggested percentages for each category rather than manually set
  percentages in related TechnicalCategoryCrv entities.
  See TechnicalCategoryCrv for information on how breakdown by category works.
  """
  useSuggestedPercentReplacementValue: Boolean!
  """
  Breakdown of this CRV into different purposes, each associated with a
  unit quantity and replacement value. See UnitCrvDetail.
  """
  unitCrvDetailsList: [UnitCrvDetail!]
  """
  Breakdown of this CRV into technical categories. See TechnicalCategoryCrv.
  """
  technicalCategoryCrvsList: [TechnicalCategoryCrv!]
  """Asset CRV's properties."""
  properties: Object
  """Asset CRV's computed properties (indicators)."""
  computedProperties: Object
  """Date and time at which the asset CRV was created."""
  creationDate: DateTime!
  """Date and time at which the asset CRV was last updated."""
  lastChangeDate: DateTime
  """Actor who created this asset CRV."""
  creationActor: Actor!
  """Actor who last updated this asset CRV."""
  lastChangeActor: Actor
}

"""
An AssetType is a configuration entity that represents a possible type of asset.
A type of asset comes with a list of modules that are available only to assets
of this type.
"""
type AssetType {
  """Asset type's ID."""
  id: String!
  """ID of the organization to which this asset type belongs."""
  organizationId: String!
  """Asset type's name."""
  name: String!
  """List of the codes of enabled modules for assets of this type."""
  modulesList: [String!]!
  """Date and time at which the asset type was created."""
  creationDate: DateTime!
  """Date and time at which the asset type was last updated."""
  lastChangeDate: DateTime
  """Actor who created this asset type."""
  createdBy: String!
  """Actor who last updated this asset type."""
  updatedBy: String
}

"""A Check entity represents an inspection."""
type Check {
  """Inspection's ID."""
  id: String!
  """ID of the organization to which this check belongs."""
  organizationId: String!
  """ID of the asset to which this inspection is related."""
  assetId: String!
  """IDs of the inspected spaces."""
  spaceIdsList: [String!]!
  """Inspection's current state."""
  state: CheckStateEnum!
  """Inspection type."""
  type: String!
  """Inspection's properties."""
  properties: Object
  """Inspection's computed properties (indicators)."""
  computedProperties: Object
  """Date and time at which the inspection was created."""
  creationDate: DateTime!
  """Date and time at which the inspection was last updated."""
  lastChangeDate: DateTime
  """Actor who created this asset."""
  creationActor: Actor!
  """Actor who last updated this inspection."""
  lastChangeActor: Actor
  """Inspection's data date."""
  dataDate: DateTime!
}

"""Available inspection states."""
enum CheckStateEnum {
  CHECK_ABSENT
  CHECK_CLOSED
  CHECK_EXPIRED
  CHECK_UNDEFINED
  CHECK_VALIDATION_IN_PROGRESS
}

"""A type of inspection with associated outcome values and observations."""
type CheckType {
  """Inspection type code."""
  code: String!
  """Available outcome values for this type of inspection."""
  values: Object!
  """Available observation values for this type of inspection."""
  observation: Object
}

"""
Condition for a validator to be run. Sometimes, field validation is irrelevant
and conditions are used to avoid running a validator given the current state
of the entity.
"""
type Condition {
  """Field to check within the entity."""
  field: String!
  """Condition's operator."""
  operator: ConditionOperator!
  """Single value or list of values to check based on the operator."""
  value: Any
}

"""Possible types of validator condition operators."""
enum ConditionOperator {
  ALWAYS
  CONTAINS
  EMPTY
  EQUALS
  EXISTS
  FIRST
  GREATER_THAN
  LESS_THAN
  NEVER
  NOT_CONTAINS
  NOT_EQUALS
  PROJECT_HAS_NO_INACCESSIBLE_ASSETS
}

"""
A Contract entity represents a utility or service contract on an asset.
"""
type Contract {
  """Contract's ID."""
  id: String!
  """ID of the organization to which the contract belongs."""
  organizationId: String!
  """ID of the asset covered by the contract."""
  assetId: String!
  """IDs of spaces covered by the contract."""
  spaceIdsList: [String!]!
  """Name of the contractor or supplier."""
  provider: String!
  """Contract's current status."""
  status: ContractStatusEnum!
  """Contract's properties."""
  properties: Object
  """Contract's computed properties (indicators)."""
  computedProperties: Object
  """Date and time at which the contract was created."""
  creationDate: DateTime!
  """Date and time at which the contract was last updated."""
  lastChangeDate: DateTime
  """Actor who created this contract."""
  creationActor: Actor!
  """Actor who last updated this contract."""
  lastChangeActor: Actor
  """Contract's data date."""
  dataDate: DateTime!
}

"""Available contract statuses."""
enum ContractStatusEnum {
  CONTRACT_ACTIVE
  CONTRACT_CLOSED
  CONTRACT_EXPIRED
}

"""
Input data for creating an asset's CRV along with sub-entities for breaking down
the value into purposes and technical categories.
"""
input CreateAssetCrvInput {
  """ID of the asset for which to create a CRV."""
  assetId: String!
  """
  Manual unit current replacement value. May be ignored when using suggested
  unit replacement value.
  """
  unitReplacementValue: Float
}

"""Input data for creating an asset."""
input CreateAssetInput {
  """ID of the organization in which to create an asset."""
  organizationId: String!
  """ID of the type to assign the new asset. See AssetType."""
  typeId: String!
  """New asset's name."""
  name: String!
  """New asset's state."""
  assetState: String!
  """New asset's properties"""
  properties: Object
}

"""Data for creating an asset type."""
input CreateAssetTypeInput {
  """ID of the organization in which to create an asset type."""
  organizationId: String!
  """Asset type's name."""
  name: String!
  """List of the codes of enabled modules for assets of this type."""
  modules: [String!]!
}

"""Input data for creating an inspection."""
input CreateCheckInput {
  """ID of the asset for which the inspection is created."""
  assetId: String!
  """IDs of the inspected spaces."""
  spaceIds: [String!]!
  """Type of the new inspection."""
  type: String!
  """
  Inspection's state. If this field is empty, an attempt will be made to set it based on the inspection's dates in
  properties. Note: the state must be consistent with the dates even when set manually.
  """
  state: CheckStateEnum
  """Inspection's properties."""
  properties: Object
}

"""Data for creating a new contract."""
input CreateContractInput {
  """ID of the asset covered by the contract."""
  assetId: String!
  """IDs of spaces covered by the contract."""
  spaceIds: [String!]!
  """Name of the contractor or supplier."""
  provider: String!
  """Contract's status."""
  status: ContractStatusEnum
  """Contract's properties."""
  properties: Object
}

"""Data for creating a document linked to an uploaded file."""
input CreateDocumentInput {
  """ID of the entity to which the new document is related."""
  entityId: String!
  """Type of the entity to which the new document is related."""
  entityType: EntityType!
  """Name of the file the document relates to."""
  fileName: String!
  """Document's name."""
  name: String!
  """
  Type of the new document.
  Note: a document's type must be consistent with the file's type, i.e. only
  documents related to an image file may have their type set to PICTURE.
  """
  type: DocumentType!
  """Document's state."""
  state: DocumentState!
  """Document's properties."""
  properties: Object
}

"""Data for creating new equipment."""
input CreateEquipmentInput {
  """Equipment item's name."""
  name: String!
  """ID of the asset in which the equipment item is located."""
  assetId: String!
  """IDs of spaces in which the equipment item is located."""
  spaceIds: [String!]!
  """Equipment item's properties."""
  properties: Object
}

"""Data for creating an investment."""
input CreateInvestmentInput {
  """ID of the organization in which to create an investment."""
  organizationId: String!
  """ID of the entity the new investment relates to."""
  entityId: String!
  """Type of the entity the new investment relates to."""
  type: EntityType!
  """Investment's name."""
  name: String!
  """Investment's properties."""
  properties: Object
}

"""Data for creating a new lease."""
input CreateLeaseInput {
  """ID of the asset under lease."""
  assetId: String!
  """IDs of spaces under lease."""
  spaceIds: [String!]!
  """
  ID of the tenant for whom the new lease is for. See Occupant.
  This field is ignored when creating an occupant with a lease, but is
  required when renewing a lease.
  """
  occupantId: String
  """Lease's status."""
  status: LeaseStatusEnum
  """Lease's properties."""
  properties: Object
}

"""Data for creating a meeting."""
input CreateMeetingInput {
  """ID of the organization in which to create a meeting."""
  organizationId: String!
  """Meeting's name."""
  name: String!
  """Meeting's properties."""
  properties: Object
}

"""Data for creating a new tenant."""
input CreateOccupantInput {
  """Tenant's name."""
  name: String!
  """ID of the organization in which to create the tenant."""
  organizationId: String!
  """Tenant's properties."""
  properties: Object
}

"""Data for creating an organization CRV purpose configuration."""
input CreateOrganizationCrvInput {
  """
  ID of the organization for which to create a CRV purpose configuration.
  """
  organizationId: String!
  """Name of the purpose of an asset or part of an asset."""
  purpose: String!
  """Replacement value per unit for this purpose."""
  unitCrv: Float!
  """Unit used for this purpose. E.g. 'sq.ft.'"""
  unit: String!
  """
  Distribution among the organization's classification's categories for this
  purpose.
  """
  percentTechnicalCategories: [PercentTechnicalCategoryInput!]!
  """CRV purpose configuration's properties."""
  properties: Object
}

"""Data for creating a project."""
input CreateProjectInput {
  """ID of the organization in which to create a project."""
  organizationId: String!
  """IDs of the assets the project relates to."""
  assetIds: [String!]!
  """IDs of other projects the new project relates to, i.e. subprojects."""
  projectIds: [String!]
  """Project's name."""
  name: String!
  """Project's properties."""
  properties: Object
}

"""Data for creating a snapshot."""
input CreateSnapshotInput {
  """ID of the organization of which to take a snapshot."""
  organizationId: String!
  """
  Date at which to take the snapshot, in YYYY-MM-DD format. The actual
  snapshot will be at midnight UTC on this date.
  Note: the snapshot will start as soon as createSnapshot is called. This is
  the date at which to capture the organization's data, not the date at which
  the snapshot starts. Thus this date must be prior to today.
  """
  date: String!
  """Description of the snapshot, e.g. \"2023 financial year\"."""
  description: String
}

"""Data for creating a new space."""
input CreateSpaceInput {
  """Space's name."""
  name: String!
  """ID of the asset in which to create the space."""
  assetId: String!
  """Hierarchical list of parent spaces' IDs."""
  parentPath: [String!]!
  """Space's properties."""
  properties: Object
}

"""Input data for creating a CRV technical category detail."""
input CreateTechnicalCategoryCrvInput {
  """
  Technical category's code. Must exist in the organization's classification.
  """
  technicalCategoryCode: String!
  """Weight allocated to the category in the asset's CRV breakdown."""
  percent: Float!
}

"""Input data for creating a CRV purpose detail."""
input CreateUnitCrvDetailInput {
  """ID of the associated CRV purpose configuration entity."""
  organizationCrvId: String!
  """Quantity of the related CRV purpose to apply."""
  quantity: Float!
}

"""Data for creating an intervention."""
input CreateWorkInput {
  """ID of the organization in which to create an intervention."""
  organizationId: String!
  """Optional ID of an asset to which this intervention is related."""
  assetId: String
  """Optional IDs of spaces to which this intervention is related."""
  spaceIds: [String!]
  """Optional IDs of equipment items to which this intervention is related."""
  equipmentIds: [String!]
  """Optional IDs of projects to which this intervention is related."""
  projectIds: [String!]
  """Optional ID of a meeting about this intervention."""
  meetingId: String
  """Short description of the intervention."""
  action: String!
  """Intervention's state."""
  state: String!
  """Intervention's properties."""
  properties: Object
}

"""Available currencies."""
enum Currency {
  CAD
  EUR
}

"""Filter to apply on a date field."""
input DateFilterInput {
  """Type of date filter."""
  type: DateFilterType!
  """Lower bound of the date range for filter types which require one."""
  dateFrom: DateTime
  """Upper bound of the date range for filter types which require one."""
  dateTo: DateTime
}

"""
Available types of filter conditions for DATE filters.
Date-time fields are precise the second and comparison values must be provided as so.
"""
enum DateFilterType {
  """Match a date-time field whose value is exactly equal to dateFrom."""
  DATE_EQUALS
  """
  Match a date-time field whose value is exactly different from dateFrom.
  """
  DATE_NOT_EQUALS
  """Match a date-time field whose value is strictly before dateFrom."""
  DATE_BEFORE
  """Match a date-time field whose value is strictly after dateFrom."""
  DATE_AFTER
  """
  Match a date-time field whose value is after dateFrom (inclusively) and before dateTo (exclusively).
  """
  DATE_BETWEEN
  """Match a date-time field whose value is null."""
  DATE_BLANK
  """Match a date-time field whose value is not null."""
  DATE_NOT_BLANK
}

"""A date-time in ISO-8601 format, such as '2007-12-03T10:15:30+01:00'."""
scalar DateTime

"""
A Document entity is related to another entity and holds metadata and properties
of a file hosted in myA.
"""
type Document {
  """Document's ID."""
  id: String!
  """ID of the organization to which the document belongs."""
  organizationId: String!
  """ID of the entity to which the document is related."""
  entityId: String!
  """Type of the entity to which the document is related."""
  entityType: EntityType!
  """Document's name."""
  name: String!
  """Document's type."""
  type: DocumentType!
  """Document's current state."""
  state: DocumentState!
  """Size of the file to which this document relates (in bytes)."""
  size: Int!
  """
  MIME type of the file to which this document relates (e.g. image/jpeg).
  """
  mimeType: String!
  """Document's properties."""
  properties: Object
  """Document's computed properties (indicators)."""
  computedProperties: Object
  """Date and time at which the document was created."""
  creationDate: DateTime!
  """Date and time at which the document was last updated."""
  lastChangeDate: DateTime
  """Actor who created this document."""
  creationActor: Actor!
  """Actor who last updated this document."""
  lastChangeActor: Actor
}

"""
This type contains a presigned URL to access the file linked to a document
entity.
"""
type DocumentPresignedUrl {
  """ID of the document related to the file."""
  documentId: String!
  """URL to the document's related file."""
  url: String!
}

"""Available document states."""
enum DocumentState {
  ACTIVE
  ARCHIVED
}

"""Available document types."""
enum DocumentType {
  DOCUMENT
  PICTURE
  LOGO
}

"""Available types of entity."""
enum EntityType {
  ASSET
  ASSET_AUDIT
  ASSET_CRV
  ASSET_TYPE
  CHECK
  CONTRACT
  DOCUMENT
  EQUIPMENT
  FIELD
  INVESTMENT
  LEASE
  OCCUPANT
  ORGANIZATION
  ORGANIZATION_CRV
  MEETING
  PROJECT
  RISK
  SNAPSHOT
  SPACE
  TECHNICAL_CATEGORY_CRV
  UNIT_CRV_DETAIL
  WORK
}

"""
An Equipment entity can represent any technical part, item of machinery or
building structure that is part of an asset's operation and which may be subject
to maintenance needs and interventions.
"""
type Equipment {
  """Equipment item's ID."""
  id: String!
  """ID of the organization to which the equipment item belongs."""
  organizationId: String!
  """ID of the asset in which the equipment item is located."""
  assetId: String!
  """IDs of spaces in which the equipment item is located."""
  spaceIdsList: [String!]!
  """Equipment item's name."""
  name: String!
  """Equipment item's unique identifier."""
  identifier: Int!
  """Equipment item's properties."""
  properties: Object
  """Equipment item's computed properties (indicators)."""
  computedProperties: Object
  """Date and time at which the equipment item was created."""
  creationDate: DateTime!
  """Date and time at which the equipment item was last updated."""
  lastChangeDate: DateTime
  """Actor who created this equipment item."""
  creationActor: Actor!
  """Actor who last updated this equipment item."""
  lastChangeActor: Actor
  """Equipment item's data date."""
  dataDate: DateTime!
}

"""
A Field is a configuration entity representing a property within another entity.
"""
type Field {
  """Field's ID."""
  id: String!
  """ID of the organization to which the field belongs."""
  organizationId: String!
  """Field's code."""
  code: String!
  """Type of entity this field is for."""
  entityType: String!
  """Field's type."""
  fieldType: String!
  """Field's label."""
  label: String!
  """Field's tooltip."""
  tooltip: String
  """
  Specifically for fields used for the Check entity (inspections). Type of
  check the field is used for.
  """
  checkType: String
  """
  Specifically for list fields and fields with autosuggestion. List of
  available or suggested input values.
  """
  fieldValuesList: [String]
  """Field's validators."""
  validatorsList: [Validator!]
  """Property path down from the root of the entity to the value."""
  parentPathList: [String!]
  """Whether this field is computed, i.e. it is an indicator."""
  computed: Boolean
  """
  Specifically for computed fields. Formula for calculating the field's value.
  """
  formulaList: [Object!]
}

"""
Possible filter values for the 'computed' argument of the 'fields' query.
"""
enum FieldComputation {
  """Return all fields regardless of the computed flag."""
  ALL
  """Return only fields with computed = false."""
  NOT_COMPUTED
  """Return only fields with computed = true."""
  ONLY_COMPUTED
}

"""Possible types of property fields."""
enum FieldTypeEnum {
  ACTOR
  ASSET
  ASSETS
  BUDGET
  CHIPS
  CHIPS_AUTOCOMPLETE
  DATE
  DATETIME
  DOCUMENT_NAMES
  DOCUMENT_RELATED_ASSETS
  DOCUMENT_TYPE
  DPE_LIST
  EMAIL
  EQUIPMENTS
  FILE_NAME_HEADER
  LINK
  LIST
  LIST_CHECK_RESULT
  LIST_MULTIVALUE
  MEETING
  NUMERIC
  NUMERIC_LIST
  OBJECT_ID
  PERCENT_TECHNICAL_CATEGORY_LIST
  PROJECTS
  RADIOBUTTON
  SUGGESTBOX
  TECHNICAL_CATEGORY_CRV_LIST
  TECHNICAL_CATEGORY_PERCENT_CRV
  TEXT
  TEXT_AUTOCOMPLETE
  TEXT_HEADER
  TEXTAREA
  TREE
  TREE_PATH
  UNIT_CRV_DETAIL_LIST
  YEAR
}

"""A file hosted in myA."""
type FileResult {
  """File's name."""
  name: String!
  """File's path."""
  path: String!
  """
  Whether this file has been associated with an entity by creating a document.
  """
  associated: Boolean!
  """
  Whether this file has been validated after upload. Documents cannot be
  created for invalid files.
  """
  validated: Boolean!
}

"""A filter to apply on a query."""
input FilterInput {
  """Kind of filter."""
  kind: FilterKind!
  """
  Field path on which to apply this filter. Apart from OR, every kind of filter require field to be provided.
  For nested fields, use the dot-notation. E.g., 'properties.value'.
  """
  field: String
  """Required for EQUALS and NOT_EQUALS filters, comparison value."""
  value: Any
  """Required for IN filters, comparison list."""
  values: List
  """Required for OR and ELEM_MATCH filters, conditions to apply."""
  conditions: [FilterInput!]
  """Required for TEXT filters, condition to apply on text field."""
  textFilter: TextFilterInput
  """Required for NUMBER filters, condition to apply on number field."""
  numberFilter: NumberFilterInput
  """Required for DATE filters, condition to apply on date field."""
  dateFilter: DateFilterInput
}

"""Available kinds of filter."""
enum FilterKind {
  """Match field exactly against a single value."""
  EQUALS
  """Match field if it does not equal a single value."""
  NOT_EQUALS
  """Match field against at least one element in a list of values."""
  IN
  """Match field against all elements in a list of values."""
  ALL
  """Check if the field exists or not."""
  EXISTS
  """Combine multiple filters with logical OR."""
  OR
  """Apply nested conditions inside an array field ."""
  ELEM_MATCH
  """Text-specific filters (contains, startsWith...)"""
  TEXT
  """Number-specific filters (equals, greaterThan...)"""
  NUMBER
  """Date-specific filters (equals, inRange...)"""
  DATE
}

"""
Results emitted by import subscriptions, for tracking an import's progress.
"""
type ImportResults {
  """Name of the sheet currently being parsed."""
  sheetName: String
  """
  Current row number, in the spreadsheet file, this result corresponds to.
  """
  rowNumber: Int
  """
  Whether the spreadsheet row has been imported successfully.
  Possible values are: VALID, INVALID.
  """
  status: String!
  """
  List of error messages relative to the current row in case status = INVALID.
  """
  errorMessagesList: [String!]
  """Number of inserted entities up to now."""
  createCount: Int
  """Number of updated entities up to now."""
  updateCount: Int
  """Number of operations that were performed for the current result."""
  operationCount: Int
  """Total operations up to now."""
  totalOperations: Int
  """
  True if the import operation can be cancelled, false if no longer possible.
  """
  cancellable: Boolean
  """
  Optional import failure message. Set when an import fails or gets cancelled
  for a specific reason.
  """
  failMessage: String
}

"""
An Investment entity represents a financial investment in regards to another
entity, usually an intervention, piece of equipment, project or a whole asset.
"""
type Investment {
  """Investment's ID."""
  id: String!
  """ID of the organization to which this investment belongs"""
  organizationId: String!
  """ID of the entity this investment relates to."""
  entityId: String!
  """Type of the entity this investment relates to."""
  type: EntityType!
  """Investment's unique identifier."""
  identifier: Int!
  """Investment's name."""
  name: String!
  """Investment's properties."""
  properties: Object
  """Investment's computed properties (indicators)."""
  computedProperties: Object
  """Date and time at which the investment was created."""
  creationDate: DateTime!
  """Date and time at which the investment was last updated."""
  lastChangeDate: DateTime
  """Actor who created this investment."""
  creationActor: Actor!
  """Actor who last updated this investment."""
  lastChangeActor: Actor
  """Investment's data date."""
  dataDate: DateTime!
}

"""
A lease entity is a contract linking a tenant (see Occupant) to an asset.
"""
type Lease {
  """Lease's ID."""
  id: String!
  """ID of the organization to which the lease belongs."""
  organizationId: String!
  """ID of the asset under lease."""
  assetId: String!
  """IDs of spaces under lease."""
  spaceIdsList: [String!]!
  """ID of the tenant for whom the lease is for. See Occupant."""
  occupantId: String!
  """Lease's current status."""
  status: LeaseStatusEnum!
  """Lease's properties."""
  properties: Object
  """Lease's computed properties (indicators)."""
  computedProperties: Object
  """Date and time at which the lease was created."""
  creationDate: DateTime!
  """Date and time at which the lease was last updated."""
  lastChangeDate: DateTime
  """Actor who created this lease."""
  creationActor: Actor!
  """Actor who last updated this lease."""
  lastChangeActor: Actor
  """Lease's data date."""
  dataDate: DateTime!
}

"""Available lease statuses."""
enum LeaseStatusEnum {
  LEASE_ACTIVE
  LEASE_CLOSED
  LEASE_EXPIRED
}

"""An ordered list of values of any type. See Any."""
scalar List

"""Meeting regarding any subject concerning an organization."""
type Meeting {
  """Meeting's ID."""
  id: String!
  """ID of the organization to which this meeting belongs."""
  organizationId: String!
  """Meeting's unique identifier."""
  identifier: Int!
  """Meeting's name."""
  name: String!
  """Meeting's properties."""
  properties: Object
  """Meeting's computed properties (indicators)."""
  computedProperties: Object
  """Date and time at which the meeting was created."""
  creationDate: DateTime!
  """Date and time at which the meeting was last updated."""
  lastChangeDate: DateTime
  """Actor who created this meeting."""
  creationActor: Actor!
  """Actor who last updated this meeting."""
  lastChangeActor: Actor
}

type Mutation {
  """
  Links interventions to a list of projects and returns updated interventions.
  """
  addProjectsToWorks(
    """IDs of the interventions to update."""
    workIds: [String!]!
    """IDs of the projects to link to the interventions."""
    projectIds: [String!]!
  ): [Work!]!
  """Updates a document's status to ARCHIVED then returns that document."""
  archiveDocuments(
    """IDs of the documents to archive."""
    ids: [String!]!
  ): [Document!]!
  """Creates then returns a new asset."""
  createAsset(
    """Data for creating the asset."""
    assetInput: CreateAssetInput!
  ): Asset!
  """
  Creates then returns an asset's CRV, including breakdown into purpose
  details and technical categories.
  Note: the asset must not already have an associated CRV. If an asset
  already has a CRV, use to updateAssetCrv to change it.
  """
  createAssetCrv(
    """Data for creating the asset's CRV."""
    assetCrvInput: CreateAssetCrvInput!
    """A list of data inputs for creating related UnitCrvDetail entities."""
    unitCrvDetailInputs: [CreateUnitCrvDetailInput!]!
    """
    A list of data inputs for creating related TechnicalCategoryCrv
    entities.
    """
    technicalCategoryCrvInputs: [CreateTechnicalCategoryCrvInput!]
  ): AssetCrv!
  """Creates then returns a new asset type."""
  createAssetType(
    """Data for creating a new asset type."""
    assetTypeInput: CreateAssetTypeInput!
  ): AssetType!
  """Creates then returns a new inspection."""
  createCheck(
    """Data for creating a new inspection."""
    checkInput: CreateCheckInput!
  ): Check!
  """Creates then returns a new contract."""
  createContract(
    """Data for creating a contract."""
    contractInput: CreateContractInput!
  ): Contract!
  """Creates then returns new documents."""
  createDocuments(
    """A list of data inputs for creating documents."""
    documentInputs: [CreateDocumentInput!]!
  ): [Document!]!
  """Creates then returns new equipment item."""
  createEquipment(
    """Data for creating an equipment item."""
    equipmentInput: CreateEquipmentInput!
  ): Equipment!
  """Creates then returns a new investment."""
  createInvestment(
    """Data for creating an investment."""
    investmentInput: CreateInvestmentInput!
  ): Investment!
  """Creates then returns a new meeting."""
  createMeeting(
    """Data for creating a meeting."""
    meetingInput: CreateMeetingInput!
  ): Meeting!
  """
  Creates then returns a tenant with a lease.
  If a tenant with the same name already exists, the lease will be added
  to this tenant. Otherwise a new tenant will be created with their first
  lease.
  """
  createOccupant(
    """Data for creating the tenant."""
    occupantInput: CreateOccupantInput!
    """Data for creating the tenant's lease."""
    leaseInput: CreateLeaseInput!
  ): Occupant!
  """Creates then returns a CRV purpose configuration."""
  createOrganizationCrv(
    """Data for creating a CRV purpose configuration."""
    organizationCrvInput: CreateOrganizationCrvInput!
  ): OrganizationCrv!
  """Creates then returns a new project."""
  createProject(
    """Data for creating a project."""
    projectInput: CreateProjectInput!
  ): Project!
  """
  Creates then returns a snapshot entity, and initiates the process of
  capturing the organization's data at the specified date.
  """
  createSnapshot(
    """Data for creating the snapshot."""
    snapshotInput: CreateSnapshotInput!
  ): Snapshot!
  """Creates then returns a space."""
  createSpace(
    """Data for creating a space."""
    spaceInput: CreateSpaceInput!
  ): Space!
  """Creates then returns a new intervention."""
  createWork(
    """Data for creating an intervention."""
    workInput: CreateWorkInput!
  ): Work!
  """
  Deletes all leases on an asset for a given tenant, then returns a boolean
  value indicating whether the operation was successful.
  """
  deleteAllLeasesByAssetAndOccupant(
    """Asset's ID."""
    assetId: String!
    """Tenant's ID."""
    occupantId: String!
  ): Boolean!
  """
  Deletes an asset's CRV then returns a boolean value indicating whether the
  operation was successful.
  """
  deleteAssetCrv(
    """ID of the asset's CRV to delete."""
    id: String!
  ): Boolean!
  """
  Deletes a single asset type then returns a boolean value indicating whether
  the operation was successful. The type must not be used by any existing
  asset in order to be deleted.
  """
  deleteAssetType(
    """ID of the asset type entity to delete."""
    id: String!
  ): Boolean!
  """
  Deletes multiple assets then returns a boolean value indicating whether the
  operation was successful, i.e. all assets were deleted.
  """
  deleteAssets(
    """IDs of the asset entities to delete."""
    ids: [String!]!
  ): Boolean!
  """
  Deletes multiple inspections then returns a boolean value indicating whether
  the operation was successful.
  """
  deleteChecks(
    """IDs of the Check entities to delete."""
    ids: [String!]!
  ): Boolean!
  """
  Deletes multiple contracts then returns a boolean value indicating whether
  the operation was successful.
  """
  deleteContracts(
    """IDs of the contract entities to delete."""
    ids: [String!]!
  ): Boolean!
  """
  Deletes a single document and its associated file then returns a boolean
  value indicating whether the operation was successful.
  """
  deleteDocument(
    """ID of the document entity to delete."""
    id: String!
  ): Boolean!
  """
  Deletes multiple documents and their associated files then returns a boolean
  value indicating whether the operation was successful.
  """
  deleteDocuments(
    """IDs of the document entities to delete."""
    ids: [String!]!
  ): Boolean!
  """
  Delete multiple equipment items then returns a boolean value indicating
  whether the operation was successful, i.e. all entities were deleted.
  """
  deleteEquipments(
    """IDs of equipment items to delete."""
    ids: [String!]!
  ): Boolean!
  """
  Deletes multiple files then returns a boolean value indicating whether the
  operation was successful, i.e. all files were deleted.
  """
  deleteFiles(
    """Paths of files to delete."""
    filePaths: [String!]!
  ): Boolean!
  """
  Delete multiple investments then returns a boolean value indicating whether
  the operation was successful, i.e. all investments were deleted.
  """
  deleteInvestments(
    """IDs of the investment to delete."""
    ids: [String!]!
  ): Boolean!
  """
  Deletes multiple leases then returns a boolean value indicating whether the
  operation was successful.
  """
  deleteLeases(
    """IDs of the leases to delete."""
    ids: [String!]
  ): Boolean!
  """
  Deletes multiple meetings then returns a boolean value indicating whether
  the operation was successful.
  """
  deleteMeetings(
    """IDs of meeting entities to delete."""
    ids: [String!]!
  ): Boolean!
  """
  Deletes a CRV purpose configuration then returns a boolean value indicating
  whether the operation was successful.
  """
  deleteOrganizationCrv(
    """ID of the CRV purpose configuration to delete."""
    id: String!
  ): Boolean!
  """
  Delete multiple projects then returns a boolean value indicating whether the
  operation was successful, i.e. all projects were deleted.
  """
  deleteProjects(
    """IDs of the project entities to delete."""
    ids: [String!]!
  ): Boolean!
  """
  Deletes a snapshot then returns a boolean value indicating
  whether the operation was successful. Cancels any ongoing process.
  """
  deleteSnapshot(
    """Snapshot's ID."""
    id: String!
  ): Boolean!
  """
  Deletes a single space then returns a boolean value indicating whether the
  operation was successful.
  """
  deleteSpace(
    """ID of the space to delete."""
    id: String!
    """
    Whether to delete the space's children. If true all the space's
    descendants, all the way to the leaf spaces inclusively, are deleted.
    When false, the deleted space's children are reattached to its parent.
    """
    deleteChildren: Boolean!
  ): Boolean!
  """
  Deletes multiple spaces along with all their children recursively, then
  returns a boolean value indicating whether the operation was successful,
  i.e. all spaces were deleted.
  """
  deleteSpaces(
    """IDs of the spaces to delete."""
    ids: [String!]!
  ): Boolean!
  """
  Delete multiple interventions then returns a boolean value indicating
  whether the operation was successful, i.e. all entities were deleted.
  """
  deleteWorks(
    """IDs of interventions to delete."""
    ids: [String!]!
  ): Boolean!
  """Creates then returns a new asset type based on a existing asset type."""
  duplicateAssetType(
    """ID of existing asset type to duplicate."""
    id: String!
    """Name of the new asset type."""
    name: String!
  ): AssetType!
  """Creates then returns new equipment based on existing equipment."""
  duplicateEquipments(
    """IDs of existing equipment items to duplicate."""
    ids: [String!]!
    """ID of the asset in which to add the new equipment."""
    assetId: String!
    """IDs of spaces in which to add the new equipment."""
    spaceIds: [String!]!
  ): [Equipment!]!
  """
  Creates then returns new interventions based on existing interventions.
  """
  duplicateWorks(
    """IDs of existing interventions to duplicate."""
    ids: [String!]!
    """Optional ID of an asset to which to link the new interventions."""
    assetId: String
    """
    Optional IDs of spaces to which to link the new interventions."
    """
    spaceIds: [String!]
    """Optional IDs of equipment items to which this intervention is related."""
    equipmentIds: [String!]
    """Optional IDs of projects to which this intervention is related."""
    projectIds: [String!]
  ): [Work!]!
  """
  Creates then returns a new document for an existing file and linked
  to another entity.
  """
  linkDocument(
    """ID of the existing document entity to duplicate."""
    id: String!
    """ID of the entity to link the new document to."""
    entityId: String!
    """Type of the entity to link the new document to."""
    entityType: EntityType!
  ): Document!
  """
  Creates then returns a new inspection based on an existing inspection whose
  status will be updated to CHECK_CLOSED.
  """
  renewCheck(
    """ID of the inspection to renew."""
    id: String!
    """Data for creating a new inspection."""
    checkInput: CreateCheckInput!
  ): Check!
  """
  Creates then returns a new contract based on an existing contract whose status
  will be updated to CONTRACT_CLOSED.
  """
  renewContract(
    """ID of the contract to renew."""
    id: String!
    """Data for creating a new contract."""
    contractInput: CreateContractInput!
  ): Contract!
  """
  Creates then returns a new lease based on an existing lease whose status
  will be updated to LEASE_CLOSED.
  """
  renewLease(
    """ID of the lease to renew."""
    id: String!
    """Data for creating a new lease."""
    leaseInput: CreateLeaseInput!
  ): Lease!
  """
  Restores a previously deleted asset then returns a boolean value indicating
  whether the operation was successful.
  """
  restoreAsset(
    """ID of the asset to restore."""
    id: String!
  ): Boolean!
  """
  Manually triggers a workflow callback from the UI for a list of entities.
  The targeted workflow must be configured with the MANUAL trigger.
  """
  runWorkflow(
    """ID of the workflow to run."""
    workflowId: Int!
    """List of target entities' IDs."""
    entityIds: [String!]!
  ): Boolean!
  """
  Saves the field-parameter value mappings configuration to use for generating
  the import template for a risk assessment profile. Returns a key that must
  then be sent in the payload to the importRisks subscription along with
  the filled import template.
  """
  saveImportConfiguration(
    """Organization's ID."""
    organizationId: String!
    """
    Risk assessment profile configuration containing the field-parameter
    value mappings.
    """
    configuration: RiskConfigurationsInput!
  ): String!
  """
  Schedules a snapshot to be taken automatically at the given date every year.
  """
  scheduleSnapshot(
    """ID of the organization of which to take a snapshot."""
    organizationId: String!
    """Month in which to take the snapshot every year."""
    month: Int!
    """Day of the month the snapshot must be taken on."""
    day: Int!
  ): DateTime!
  """Unschedules a yearly snapshot."""
  unscheduleSnapshot(
    """ID of the Organization for which to unschedule the yearly snapshot."""
    organizationId: String!
  ): Boolean!
  """Updates then returns a single asset."""
  updateAsset(
    """Data for updating the asset."""
    assetInput: UpdateAssetInput!
  ): Asset!
  """Updates then returns a single audit."""
  updateAssetAudit(
    """Data for updating the audit."""
    assetAuditInput: UpdateAssetAuditInput!
  ): AssetAudit!
  """Updates then returns a list of audits."""
  updateAssetAudits(
    """A list of data inputs for updating audits."""
    assetAuditInputs: [UpdateAssetAuditInput!]!
  ): [AssetAudit!]!
  """Updates then returns an asset's CRV."""
  updateAssetCrv(
    """Data for updating the asset's CRV."""
    assetCrvInput: UpdateAssetCrvInput!
  ): AssetCrv!
  """Updates then returns an existing asset type."""
  updateAssetType(
    """Data for updating an asset type."""
    assetTypeInput: UpdateAssetTypeInput!
  ): AssetType!
  """Updates then returns a list of assets."""
  updateAssets(
    """A list of data inputs for updating assets."""
    assetInputs: [UpdateAssetInput!]!
  ): [Asset!]!
  """Updates then returns an existing inspection."""
  updateCheck(
    """Data for updating the inspection."""
    checkInput: UpdateCheckInput!
  ): Check!
  """Updates then returns a contract."""
  updateContract(
    """Data for updating a contract."""
    contractInput: UpdateContractInput!
  ): Contract!
  """Updates then returns an existing document."""
  updateDocument(
    """Data for updating a document."""
    documentInput: UpdateDocumentInput!
  ): Document!
  """Updates then returns an existing equipment item."""
  updateEquipment(
    """Data for updating an equipment item."""
    equipmentInput: UpdateEquipmentInput!
  ): Equipment!
  """Updates then returns a list of existing equipment items."""
  updateEquipments(
    """A list of data inputs for updating equipment."""
    equipmentInputs: [UpdateEquipmentInput!]!
  ): [Equipment!]!
  """Updates then returns an existing investment."""
  updateInvestment(
    """Data for updating an investment."""
    investmentInput: UpdateInvestmentInput!
  ): Investment!
  """Updates then returns a list of investments."""
  updateInvestments(
    """A list of data inputs for updating investments."""
    investmentInputs: [UpdateInvestmentInput!]!
  ): [Investment!]!
  """Updates then returns an existing lease."""
  updateLease(
    """Data for updating a lease."""
    leaseInput: UpdateLeaseInput!
  ): Lease!
  """Updates then returns an existing meeting."""
  updateMeeting(
    """Data for updating a meeting."""
    meetingInput: UpdateMeetingInput!
  ): Meeting!
  """Updates then returns an existing tenant."""
  updateOccupant(
    """Data for updating a tenant."""
    occupantInput: UpdateOccupantInput!
  ): Occupant!
  """Updates then returns a CRV purpose configuration."""
  updateOrganizationCrv(
    """Data for updating a CRV purpose configuration."""
    organizationCrvInput: UpdateOrganizationCrvInput!
  ): OrganizationCrv!
  """Updates then returns an existing project."""
  updateProject(
    """Data for updating a project."""
    projectInput: UpdateProjectInput!
  ): Project!
  """Updates then returns a list of projects."""
  updateProjects(
    """A list of data inputs for updating projects."""
    projectInputs: [UpdateProjectInput!]!
  ): [Project!]!
  """Updates then returns a risk assessment profile."""
  updateRiskProfile(
    """Risk profile's ID."""
    id: String!
    """
    Threshold to consider a risk as major when evaluating risk associated
    with interventions.
    """
    majorRiskMax: Int!
  ): Risk!
  """Updates then returns an existing snapshot's information."""
  updateSnapshot(
    """Data for updating the snapshot."""
    snapshotInput: UpdateSnapshotInput!
  ): Snapshot!
  """Updates then returns a single space."""
  updateSpace(
    """Data for updating a space."""
    spaceInput: UpdateSpaceInput!
  ): Space!
  """Updates then returns a list of spaces."""
  updateSpaces(
    """A list of data inputs for updating spaces."""
    spaceInputs: [UpdateSpaceInput!]!
  ): [Space!]!
  """Updates then returns a CRV technical category detail."""
  updateTechnicalCategoryCrv(
    """Data for updating a CRV technical category detail."""
    technicalCategoryCrvInput: UpdateTechnicalCategoryCrvInput!
  ): TechnicalCategoryCrv!
  """Updates an asset's CRV's breakdown into purpose details."""
  updateUnitCrvDetails(
    """ID of the asset CRV whose details to update."""
    assetCrvId: String!
    """A list of data inputs for adding new CRV purpose details."""
    createUnitCrvDetailInputs: [CreateUnitCrvDetailInput!]
    """A list of data inputs for updating existing CRV purpose details."""
    updateUnitCrvDetailInputs: [UpdateUnitCrvDetailInput!]
    """A list of unit purpose detail entities' IDs to delete."""
    deleteUnitCrvDetailIds: [String!]
  ): AssetCrv!
  """Updates then returns an existing intervention."""
  updateWork(
    """Data for updating an intervention."""
    workInput: UpdateWorkInput!
  ): Work!
  """Updates then returns a list of existing interventions."""
  updateWorks(
    """A list of data inputs for updating interventions."""
    workInputs: [UpdateWorkInput!]!
  ): [Work!]!
}

"""Filter to apply on a number field."""
input NumberFilterInput {
  """Type of number filter."""
  type: NumberFilterType!
  """First comparison value for filter types which require one."""
  filter: Float
  """Second comparison value for filter types which require one."""
  filterTo: Float
}

"""Available types of filter conditions for NUMBER filters."""
enum NumberFilterType {
  """Match a numeric field whose value is exactly equal to a filter value."""
  NUMBER_EQUALS
  """
  Match a numeric field whose value is exactly different from a filter value.
  """
  NUMBER_NOT_EQUALS
  """
  Match a numeric field whose value is strictly less than a filter value.
  """
  NUMBER_LESS_THAN
  """
  Match a numeric field whose value is less than or equal to a filter value.
  """
  NUMBER_LESS_THAN_OR_EQUAL
  """
  Match a numeric field whose value is strictly greater than a filter value.
  """
  NUMBER_GREATER_THAN
  """
  Match a numeric field whose value is greater than or equal to a filter value.
  """
  NUMBER_GREATER_THAN_OR_EQUAL
  """
  Match a numeric field whose value is between a filter value and a filterTo value, inclusively.
  """
  NUMBER_BETWEEN
  """Match a numeric field whose value is null."""
  NUMBER_BLANK
  """Match a numeric field whose value is not null."""
  NUMBER_NOT_BLANK
}

"""A key-value map represented as a JSON object."""
scalar Object

"""
An Occupant entity represents a tenant who can have leases on assets, or parts
of assets, within an organization.
"""
type Occupant {
  """Tenant's ID."""
  id: String!
  """ID of the organization to which the tenant belongs."""
  organizationId: String!
  """Tenant's name."""
  name: String!
  """Tenant's properties."""
  properties: Object
  """Tenant's computed properties (indicators)."""
  computedProperties: Object
  """Date and time at which the tenant was created."""
  creationDate: DateTime!
  """Date and time at which the tenant was last updated."""
  lastChangeDate: DateTime
  """Actor who created this tenant."""
  creationActor: Actor!
  """Actor who last updated this tenant."""
  lastChangeActor: Actor
  """Tenant's data date."""
  dataDate: DateTime!
}

"""
An Organization entity represents the organization which is the parent entity to
all other entities and meta-entities.
"""
type Organization {
  """Organization's ID."""
  id: String!
  """Organization's name."""
  name: String!
  """Organization's type."""
  organizationType: OrganizationType!
  """Currency used by this organization."""
  currency: Currency!
  """Locale used by this organization."""
  locale: String!
  """Storage space allocated for this organization's files."""
  storageSpace: Int!
  """Organization's properties."""
  properties: Object
  """Organization's computed properties (indicators)."""
  computedProperties: Object
  """Date and time at which the organization was created."""
  creationDate: DateTime!
  """Date and time at which the organization was last updated."""
  lastChangeDate: DateTime
  """Actor who created this organization."""
  creationActor: Actor!
  """Actor who last updated this organization."""
  lastChangeActor: Actor
}

"""
An OrganizationCrv entity represents a purpose for an asset or part of an asset
in regards to its current replacement value. This purpose has an associated unit
CRV, i.e. the monetary value per unit this purpose spans over the related asset.
The unit may be anything but is usually a surface area. It is used in an asset's
CRV breakdown by purpose for calculating the suggested unit replacement value.
See UnitCrvDetail for more on an asset's CRV breakdown into purposes.
The purpose configuration also has a technical category distribution related to
the classification in use by the organization. It is used in an asset's CRV
breakdown by technical category for calculating the suggested weight per
category. See TechnicalCategoryCrv for more on an asset's CRV breakdown into
technical categories.
"""
type OrganizationCrv {
  """CRV purpose configuration's ID."""
  id: String!
  """ID of the organization this purpose configuration belongs to."""
  organizationId: String!
  """
  Name of the purpose of an asset or part of an asset for this configuration.
  """
  purpose: String!
  """Replacement value per unit for this purpose."""
  unitCrv: Float!
  """Unit used for this purpose. E.g. 'sq.ft.'"""
  unit: String!
  """
  Distribution among the organization's classification's categories for this
  purpose.
  """
  percentTechnicalCategoriesList: [PercentTechnicalCategory!]!
  """CRV purpose configuration's properties."""
  properties: Object
  """Date and time at which the CRV purpose configuration was created."""
  creationDate: DateTime!
  """Date and time at which the CRV purpose configuration was last updated."""
  lastChangeDate: DateTime
  """Actor who created this CRV purpose configuration."""
  createdBy: String!
  """Actor who last updated this CRV purpose configuration."""
  updatedBy: String
}

"""
Possible types of organization, i.e. the technical classification used by an
organization.
"""
enum OrganizationType {
  UNIFORMAT_AIRPORT
  UNIFORMAT_CITY
  UNIFORMAT_STANDARD
}

"""
Represents how much a technical category weighs in a CRV purpose configuration.
"""
type PercentTechnicalCategory {
  """Related technical category's code."""
  technicalCategoryCode: String!
  """Applied weight for this technical category."""
  percent: Float!
}

"""
Data for setting a technical category's weigh in a CRV purpose configuration.
"""
input PercentTechnicalCategoryInput {
  """
  Related technical category's code. Must belong to the organization's
  classification.
  """
  technicalCategoryCode: String!
  """Applied weight for this technical category."""
  percent: Float!
}

"""
This type contains a presigned URL to which a file can be uploaded. Make a PUT
HTTP request to this URL to upload a file.
"""
type PresignedUrl {
  """File's name."""
  fileName: String!
  """Name of the document linked to this file."""
  documentName: String!
  """URL to the file's content."""
  url: String!
}

"""
Describes the consequence for a combination of impact, intensity and
probability, and the associated levels of severity and risk.
"""
type ProfileDataItem {
  """Value of the impact field."""
  impact: String!
  """Value of the intensity field."""
  intensity: String!
  """Value of the probability field."""
  probability: String!
  """
  Description of the consequence of the impact at this intensity and
  probability.
  """
  consequence: String!
  """Level of severity of the consequence."""
  severityLevel: Int!
  """Risk level for this impact at this intensity and probability."""
  riskLevel: Int!
}

"""
A Project entity is used for planning and managing projects regarding assets
and interventions. Projects may be linked to one another to form subprojects.
"""
type Project {
  """Project's ID."""
  id: String!
  """ID of the organization to which the project belongs."""
  organizationId: String!
  """IDs of the project's related assets."""
  assetIdsList: [String!]!
  """IDs of other projects this project is related to, i.e. subprojects."""
  projectIdsList: [String!]
  """Project's unique identifier."""
  identifier: Int!
  """Project's name."""
  name: String!
  """Project's properties."""
  properties: Object
  """Project's computed properties (indicators)."""
  computedProperties: Object
  """Date and time at which the project was created."""
  creationDate: DateTime!
  """Date and time at which the project was last updated."""
  lastChangeDate: DateTime
  """Actor who created this project."""
  creationActor: Actor!
  """Actor who last updated this project."""
  lastChangeActor: Actor
  """Project's data date."""
  dataDate: DateTime!
}

type Query {
  """Returns an asset based on its ID."""
  asset(
    """Asset's ID."""
    id: String!
  ): Asset!
  """Returns an asset's audit."""
  assetAudit(
    """ID of the asset to which the audit is related."""
    assetId: String!
  ): AssetAudit!
  """Returns audits of an organization."""
  assetAudits(
    """Organization's ID."""
    organizationId: String!
    """Params for filtering, sorting and grouping audits."""
    selectParams: SelectParams!
  ): [AssetAudit!]!
  """Returns an asset's CRV."""
  assetCrv(
    """Asset's ID."""
    assetId: String!
  ): AssetCrv!
  """Returns whether an asset has a related CRV."""
  assetCrvExists(
    """Asset's ID."""
    assetId: String!
  ): Boolean!
  """Returns all asset types of an organization."""
  assetTypes(
    """Organization's ID."""
    organizationId: String!
  ): [AssetType!]!
  """Returns assets of an organization."""
  assets(
    """Organization's ID."""
    organizationId: String!
    """Params for filtering, sorting and grouping assets."""
    selectParams: SelectParams!
  ): [Asset!]!
  """
  Returns whether changing an intervention's asset to one unrelated to
  that intervention's project assets would cause an error.
  An empty string means the change is allowed.
  This is used only for validation before calling updateWorks.
  This query does not update the work.
  """
  canChangeWorkAsset(
    """Work's ID."""
    workId: String!
    """New asset's ID"""
    assetId: String!
  ): String!
  """
  Returns whether updating a space's hierarchy by moving it under a new parent
  would cause an error. An empty string means the move is allowed.
  This is used only for validation before calling updateSpace. No space is
  changed by this query.
  """
  canMoveSpace(
    """Space's ID."""
    id: String!
    """New parent path under which the space would be moved."""
    parentPath: [String]!
    """
    Whether the space's children would move along with their parent. If
    true, the updated space's children would move along under the new
    hierarchy. If false, children spaces would be detached from the updated
    space and reattached to its previous parent.
    """
    moveSpaceChildren: Boolean!
  ): String!
  """Returns an inspection type of an organization based on its code."""
  checkType(
    """Organization's ID."""
    organizationId: String!
    """Inspection type's code."""
    code: String!
  ): CheckType!
  """Returns all inspection types of an organization."""
  checkTypes(
    """Organization's ID."""
    organizationId: String!
  ): [CheckType!]!
  """Returns inspections of an organization."""
  checks(
    """Organization's ID."""
    organizationId: String!
    """Params for filtering, sorting and grouping inspections."""
    selectParams: SelectParams!
  ): [Check!]!
  """Returns contracts of an organization."""
  contracts(
    """Organization's ID."""
    organizationId: String!
    """Params for filtering, sorting and grouping contracts."""
    selectParams: SelectParams!
  ): [Contract!]!
  """Returns the total storage space an organization's files occupy."""
  currentlyUsedStorageSpace(
    """Organization's ID."""
    organizationId: String!
  ): Int!
  """Returns a document based on its ID."""
  document(
    """Document entity's ID."""
    id: String!
  ): Document!
  """Returns documents of an organization."""
  documents(
    """Organization's ID."""
    organizationId: String!
    """Params for filtering, sorting and grouping documents."""
    selectParams: SelectParams!
  ): [Document!]!
  """
  Generates and returns a presigned URL for each of the files associated with
  a list of documents.
  """
  documentsUrls(
    """IDs of the documents for which to get a presigned URL."""
    ids: [String!]!
  ): [DocumentPresignedUrl!]!
  """Returns an equipment item based on its ID."""
  equipment(
    """Equipment item's ID."""
    id: String!
  ): Equipment!
  """
  Returns whether an equipment item is linked to at least one intervention.
  See Work for more information on interventions.
  """
  equipmentHasRelatedWork(
    """Equipment item's ID."""
    id: String!
  ): Boolean!
  """Returns equipment items of an organization."""
  equipments(
    """Organization's ID."""
    organizationId: String!
    """Params for filtering, sorting and grouping equipment."""
    selectParams: SelectParams!
  ): [Equipment!]!
  """Returns a field based on its code and the entity it belongs to."""
  field(
    """ID of the organization to which the field belongs."""
    organizationId: String!
    """Field's code."""
    code: String!
    """Type of entity the field is for."""
    entityType: EntityType!
  ): Field!
  """Returns a list of fields given filters."""
  fields(
    """ID of the organization to which the field belongs."""
    organizationId: String!
    """
    Optional argument. Use this to only return fields for a certain type
    of entity.
    """
    entityType: EntityType
    """Optional argument. Use this to only return fields of a certain type."""
    fieldType: FieldTypeEnum
    """
    Optional argument. Use this to only return fields strictly related to at least one of the asset types.
    """
    assetTypes: [String!]
    """
    Optional argument. Use this to only return fields strictly not related to any asset types.
    """
    noAssetTypes: Boolean
    """
    Optional argument. Use this to return only computed fields or only
    non-computed fields. By default, all fields are returned.
    """
    computed: FieldComputation = ALL
  ): [Field!]!
  """Returns all files of an organization."""
  files(
    """Organization's ID."""
    organizationId: String!
  ): [FileResult!]!
  """
  Returns presigned URLs for uploading files as part of a document creation
  process.
  """
  getPutPresignedUrl(
    """ID of the organization for which the files are uploaded."""
    organizationId: String!
    """ID of the entity to which the files relate."""
    entityId: String!
    """Type of entity to which the files relate."""
    entityType: EntityType!
    """Names of all files to be uploaded."""
    fileNames: [String!]!
  ): [PresignedUrl!]!
  """
  Returns presigned URLs for uploading spreadsheet files as part of an entity
  import process.
  """
  getPutPresignedUrlToImport(
    """Type of entity to import."""
    entityType: EntityType!
    """Name of all files to be uploaded."""
    fileNames: [String!]!
    """
    ID of the organization for which the files are uploaded and in which
    entities will be imported.
    """
    organizationId: String!
  ): [PresignedUrl!]!
  """
  Returns whether an organization's risk assessment profile has been
  configured and imported.
  """
  hasRiskProfile(
    """Organization's ID."""
    organizationId: String!
  ): Boolean!
  """Returns an investment based on its ID."""
  investment(
    """Investment's ID."""
    id: String!
  ): Investment!
  """Returns investments of an organization."""
  investments(
    """Organization's ID."""
    organizationId: String!
    """Params for filtering, sorting and grouping investments."""
    selectParams: SelectParams!
  ): [Investment!]!
  """Returns leases of an organization."""
  leases(
    """Organization's ID."""
    organizationId: String!
    """Params for filtering, sorting and grouping leases."""
    selectParams: SelectParams!
  ): [Lease!]!
  """Returns a meeting based on its ID."""
  meeting(
    """Meeting's ID."""
    id: String!
  ): Meeting!
  """Returns meetings of an organization."""
  meetings(
    """Organization's ID."""
    organizationId: String!
    """Params for filtering, sorting and grouping meetings."""
    selectParams: SelectParams!
  ): [Meeting!]!
  """
  Returns the scheduled date of the next yearly snapshot for an organization.
  """
  nextSnapshotDate(
    """Organization's ID."""
    organizationId: String!
  ): DateTime
  """Returns tenants of an organization."""
  occupants(
    """Organization's ID."""
    organizationId: String!
    """Params for filtering, sorting and grouping tenants."""
    selectParams: SelectParams!
  ): [Occupant!]!
  """Returns an organization based on its ID."""
  organization(
    """Organization's ID."""
    id: String!
  ): Organization!
  """
  Returns whether a CRV purpose configuration is used in at least one purpose
  detail of an asset's CRV.
  """
  organizationCrvIsUsed(
    """CRV purpose configuration's ID."""
    id: String!
  ): Boolean!
  """Returns all the CRV purpose configuration entities of an organization."""
  organizationCrvs(
    """Organization's ID."""
    organizationId: String!
  ): [OrganizationCrv!]!
  """Returns whether an organization possesses at least one asset."""
  organizationHasAssets(
    """Organization's ID."""
    organizationId: String!
  ): Boolean!
  """Returns accessible organizations."""
  organizations(
    """Params for filtering, sorting and grouping organizations."""
    selectParams: SelectParams!
  ): [Organization!]!
  """Returns a project based on its ID."""
  project(
    """Project's ID."""
    id: String!
  ): Project!
  """Returns projects of an organization."""
  projects(
    """Organization's ID."""
    organizationId: String!
    """Params for filtering, sorting and grouping projects."""
    selectParams: SelectParams!
  ): [Project!]!
  """Returns the risk assessment profile for an organization."""
  riskProfile(
    """Organization's ID."""
    organizationId: String!
  ): Risk!
  """Returns an asset's root space."""
  rootSpace(
    """Asset's ID."""
    assetId: String!
  ): Space!
  """Returns all snapshots of an organization."""
  snapshots(
    """Organization's ID."""
    organizationId: String!
  ): [Snapshot!]!
  """Returns a space based on its ID."""
  space(
    """Space's ID."""
    id: String!
  ): Space!
  """Returns spaces of an organization."""
  spaces(
    """Organization's ID."""
    organizationId: String!
    """Params for filtering, sorting and grouping spaces."""
    selectParams: SelectParams!
  ): [Space!]!
  """Returns the current version of the API. E.g., '6.8.0'."""
  version: String!
  """Returns an intervention based on its ID."""
  work(
    """Work entity's ID."""
    id: String!
  ): Work!
  """Returns workflows of an organization."""
  workflows(
    """Organization's ID."""
    organizationId: String!
    """Optionally filter workflows by entity type."""
    entityType: EntityType
    """Optionally filter workflows by trigger type."""
    trigger: WorkflowTrigger
  ): [Workflow!]!
  """Returns interventions of an organization."""
  works(
    """Organization's ID."""
    organizationId: String!
    """Params for filtering, sorting and grouping interventions."""
    selectParams: SelectParams!
  ): [Work!]!
  """
  Generates and returns a presigned URL for a ZIP file containing all the
  files associated with a list of documents.
  """
  zippedDocumentsUrl(
    """IDs of the documents to ZIP and for which to return a URL."""
    ids: [String!]!
  ): DocumentPresignedUrl!
}

"""Represents a technical category within a classification."""
type RelatedTechnicalCategory {
  """Technical category's code."""
  technicalCategoryCode: String!
  """Technical category's label."""
  technicalCategoryLabel: String!
}

"""
A Risk is a configuration entity representing a risk assessment profile
including risk aversion matrix and impacts/consequences configuration. Risk is
evaluated on interventions based on this configuration.
"""
type Risk {
  """Risk profile's ID."""
  id: String!
  """ID of the organization the risk profile belongs to."""
  organizationId: String!
  """
  Configuration of the impact, intensity and probability level values on which
  risk computation is based. For each parameter, level values are matched
  with those of an existing field for the Work entity.
  """
  configuration: RiskConfigurations!
  """
  Configuration of consequences, risk levels and severity levels associated
  with each combination of impact, intensity and probability.
  """
  profileDataList: [ProfileDataItem!]!
  """
  Threshold to consider a risk as major when evaluating risk in the
  organization's interventions.
  """
  majorRiskMax: Int!
  """
  Upper limit for risk level when evaluated for the organization's
  interventions.
  """
  riskLevelCount: Int!
  """Date and time at which the risk profile was created."""
  creationDate: DateTime!
  """Date and time at which the risk profile was last updated."""
  lastChangeDate: DateTime
  """Actor who created this risk profile."""
  createdBy: String!
  """Actor who last updated this risk profile."""
  updatedBy: String
  """Risk profile's data date."""
  dataDate: DateTime!
}

"""
Configuration for a single parameter used in a risk profile. This maps the
risk parameter's levels with the values of a field for the Work entity.
"""
type RiskConfiguration {
  """Intervention field's code."""
  fieldCode: String!
  """
  Map of each of the field's value to its corresponding level for the
  parameter in question.
  """
  valuesOrder: Object!
}

"""
Data for configuring a single parameter used in risk calculation. This maps the
risk parameter's levels with the values of a field for the Work entity.
Note that the referenced field and values must exist in the
organization's fields configuration.
"""
input RiskConfigurationInput {
  """Intervention field's code."""
  fieldCode: String!
  """
  Map of each of the field's value to its corresponding level for the
  parameter in question.
  """
  valuesOrder: Object!
}

"""Configuration of impact, intensity and probability for a risk profile."""
type RiskConfigurations {
  """Impact configuration."""
  impact: RiskConfiguration!
  """Intensity configuration."""
  intensity: RiskConfiguration!
  """Probability configuration."""
  probability: RiskConfiguration!
}

"""Data for setting up a risk profile import configuration."""
input RiskConfigurationsInput {
  """Impact configuration."""
  impact: RiskConfigurationInput!
  """Intensity configuration."""
  intensity: RiskConfigurationInput!
  """Probability configuration."""
  probability: RiskConfigurationInput!
  """
  Threshold to consider a risk as major when evaluating risk in the
  organization's interventions.
  """
  majorRiskMax: Int!
  """
  Upper limit for risk level when evaluated for the organization's
  interventions.
  """
  riskLevelCount: Int!
}

"""
Input data for selecting, sorting and grouping entities that are returned by a query.
"""
input SelectParams {
  """
  The zero-based index of the first entity to be returned. Use in combination with count for pagination.
  """
  start: Int! = 0
  """
  The number of entities to return. Note that a maximum of 500 entities may be requested.
  """
  count: Int! = 100
  """
  List of sorting criteria to be applied.
  Notes on sorting and grouping:
  - For a sort to take effect, the field must be present in the output entities. When using groups, make sure all
  sorting fields are either the grouping field or one of the aggregated fields.
  - Default sort is deterministic. Even when no sorts are provided, entities will always be returned in the same
  order, for pagination purposes.
  - Due to internal limitations, it is not possible to sort on more than one field that is a list of values (CHIPS,
  ASSETS, EQUIPMENTS, PROJECTS, BUDGET). Doing so will result in an INVALID_ARGUMENT error. Note that it is possible
  to sort on one list field along with any number of non-list fields.
  """
  sorts: [SortInput!]! = []
  """Locale to be used for sorting and other locale-specific operations."""
  locale: String
  """
  Field paths on which to group entities. Each group will be returned as an empty entity with only the grouping field
  set. If other fields are selected as part of the query, they will be set as follow:
    - 'id' will be set to a unique and deterministic value for pagination to work.
    - String, Int/Float, Boolean, Object and List fields will be respectively set to '', 0, false, {} and [].
    - Array fields will be set to [].
    - Any and DateTime fields will be set to ''.
    - Enum fields will be set with a dedicated unknown value.
  If the query defines aggregations, aggregated fields will be set with the operation's result instead.
  The client is responsible for ensuring groups are coherent with the query, i.e. the query's subselection of fields
  should include the grouping fields for them be present in the returned data. Consequently, the grouping fields must
  match fields in the GraphQL type for the relevant entity.
  Using '' as a grouping field will always return a single group containing all the organization's entity. This is
  particularly useful when used in combination with aggregations.
  To unwind a group and retrieve the entities or subgroups it contains, set the element of groupKeys at the same index
  to a value chosen among the group's unique keys.
  
  Example:
  1. One unopen group
  groupBy = ['properties.category']
  groupKeys = []
  result = [
    { id: '1000', properties: { category: 'A' } },
    { id: '1001', properties: { category: 'B' } },
    { id: '1002', properties: { category: 'C' } }
  ]
  Only empty entities are returned.
  
  2. One open group
  groupBy = ['properties.category']
  groupKeys = ['A']
  result = [
    { id: '73ac8a6b', properties: { category: 'A' } },
    { id: '73ac8a6c', properties: { category: 'A' } },
    { id: '73ac8a6d', properties: { category: 'A' } },
    { id: '73ac8a6e', properties: { category: 'A' } }
  ]
  Actual entities matching group key are returned.
  
  3. Multi-level grouping
  groupBy = ['year', 'month']
  groupKeys = ['2025']
  result = [
    { id: '1001', month: '1' },
    { id: '1002', month: '2' },
    { id: '1003', month: '3' }
  ]
  Empty entities are returned unless the size of groupBy matches that of groupKeys
  
  4. Single group
  groupBy = ['']
  groupKeys = []
  result = [
    { id: 'null' }
  ]
  A single group containing all entities. Use for running aggregation operations on all an organization's dataset.
  
  Known limitations:
  - At this time, it is not possible to return a group whose key is null, even when the grouping field may be null.
    Instead, a group whose key is either '', 0, false, {} or [] will be returned, depending on the grouping field's
    type. For fields that may be null or one of these values, two groups will be returned with the same group key:
    one for null and one for the actual value. To know which one refers to the null value, look for the group whose
    'id' field is the string 'null'. The other group refers to the actual value.
  """
  groups: [String!]! = []
  """
  Unique keys for the groups defined in groupBy to be unwinded. The size of groupKeys must always be a most that of
  groupBy. Note that groupKeys are irrelevant when grouping by ''.
  """
  groupKeys: List
  """
  Filtering criteria to be applied on entities. Top-level items are combined with an implicit AND.
  
  Examples:
  1. Simple equality
  {
    kind: EQUALS,
    field: 'meetingId',
    value: '73ac8a6a'
  }
  
  2. Membership in a set of values
  {
    kind: IN,
    field: 'assetId',
    values: ['73ac8a6a', '73ac8a6b']
  }
  
  3. Field existence
  {
    kind: EXISTS,
    field: 'assetId',
    value: false // true = must exist, false = must not exist
  }
  
  4. Logical OR group
  {
    kind: OR,
    conditions: [
      { kind: EXISTS, field: 'assetId', value: false },
      { kind: IN, field: 'assetId', values: ['73ac8a6a'] }
    ]
  }
  
  5. Nested conditions on array elements ($elemMatch)
  {
    kind: ELEM_MATCH,
    field: 'relatedAssets',
    conditions: [
      { kind: EQUALS, field: 'typeId', value: '73ac8a6a'}
    ]
  }
  
  6. Text filter with operators (contains, equals, notEqual...)
  {
    kind: TEXT,
    field: 'name',
    textFilter: { type: CONTAINS, filter: 'school' }
  }
  
  7. Number filter with range
  {
    kind: NUMBER,
    field: 'capacity',
    numberFilter: { type: BETWEEN, filter: 100, filterTo: 500 }
  }
  
  8. Date filter with interval
  {
    kind: DATE,
    field: 'creationDate',
    dateFilter: { type: IN_RANGE, dateFrom: '2024-01-01T00:00:00Z', dateTo: '2024-12-31T00:00:00Z' }
  }
  
  9. List must contain all elements
  {
    kind: ALL,
    field: 'spaceIds',
    values: ['73ac8a6a', '73ac8a6b']
  }
  """
  filters: [FilterInput!]! = []
  """
  Generic text pattern search on entire entities. Only entities matching this pattern will be returned. The following
  wildcards may be used:
  - '?' for matching any single character.
  - '*' for matching zero or more characters.
  Use '\' for escaping a wildcard character (beware of implementation-dependant rules for escaping characters).
  """
  search: String
  """
  A list of aggregation operations to apply on certain fields when grouping entities. This parameter has no effect if
  no groups are defined or if all groups are open.
  The client is responsible for ensuring aggregations are coherent with the query, i.e. the query's subselection of
  fields should include all aggregation fields for them to be present in the returned data.
  Some aggregation operations apply to specific data types and others apply to all data types. An aggregation field
  must always be the appropriate type in regards to the operation, unless it is inside an Object field.
  """
  aggregations: [AggregationInput!]! = []
}

"""
A Snapshot entity is a meta-entity representing a organization's snapshot. A
snapshot is a capture of all an organization's entities at a given instant in
time. Note that this entity does not hold any data itself but only information
about an existing snapshot.
"""
type Snapshot {
  """Snapshot's ID."""
  id: String!
  """ID of the organization to which the snapshot belongs."""
  organizationId: String!
  """Date on which the snapshot was taken."""
  date: String!
  """Current status of the snapshot job."""
  status: SnapshotStatus!
  """Description of the snapshot."""
  description: String
  """Date and time at which this snapshot was created."""
  creationDate: DateTime!
  """Date and time at which this snapshot was last updated."""
  lastChangeDate: DateTime
  """Actor who created this snapshot."""
  createdBy: String!
  """Actor who last updated this snapshot."""
  updatedBy: String
}

"""Possible snapshot statuses."""
enum SnapshotStatus {
  SNAPSHOT_AVAILABLE
  SNAPSHOT_ERROR
  SNAPSHOT_IN_CONSTRUCTION
}

"""Sorting direction for Sort elements."""
enum SortDirection {
  ASC
  DESC
}

"""Criteria for sorting entities."""
input SortInput {
  """
  Field to sort entities by. For nested fields, use the dot-notation. E.g., 'properties.value'.
  """
  field: String!
  """Direction of sorting."""
  direction: SortDirection! = ASC
}

"""
A Space entity represents a subdivision of an asset. Spaces form a hierarchy
inside an asset and can have space children up to a limit of 5 levels. All
assets have a root space with the same name as the asset, and which cannot be
deleted.
"""
type Space {
  """Space's ID."""
  id: String!
  """ID of the organization to which the space belongs."""
  organizationId: String!
  """ID of the asset to which the space belongs."""
  assetId: String!
  """
  Hierarchical list of parent spaces' IDs. This list is empty for an asset's
  root space.
  """
  parentPathList: [String!]!
  """Space's name."""
  name: String!
  """Space's unique identifier."""
  identifier: String!
  """Space's properties."""
  properties: Object
  """Space's computed properties (indicators)."""
  computedProperties: Object
  """Date and time at which the space was created."""
  creationDate: DateTime!
  """Date and time at which the space was last updated."""
  lastChangeDate: DateTime
  """Actor who created this space."""
  creationActor: Actor!
  """Actor who last updated this space."""
  lastChangeActor: Actor
  """Space's data date."""
  dataDate: DateTime!
}

type Subscription {
  """Imports asset CRVs to an organization from an Excel spreadsheet."""
  importAssetCrvs(
    """Organization's ID"""
    organizationId: String!
    """
    Name of the previously uploaded spreadsheet file.
    (see "getPutPresignedUrlToImport" mutation).
    """
    importFileName: String!
    """
    RFC 5646 locale to use for formatting data such as dates. E.g.: "fr-CA".
    """
    locale: String!
    """Timezone to use for dates. E.g.: "America/Toronto"."""
    timezoneId: String!
  ): ImportResults!
  """Imports assets to an organization from an Excel spreadsheet."""
  importAssets(
    """Organization's ID."""
    organizationId: String!
    """
    Name of the previously uploaded spreadsheet file.
    (see "getPutPresignedUrlToImport" mutation).
    """
    importFileName: String!
    """
    RFC 5646 locale to use for formatting data such as dates. E.g.: "fr-CA".
    """
    locale: String!
    """Timezone to use for dates. E.g.: "America/Toronto"."""
    timezoneId: String!
  ): ImportResults!
  """Imports inspections to an organization from an Excel spreadsheet."""
  importChecks(
    """Organization's ID."""
    organizationId: String!
    """
    Name of the previously uploaded spreadsheet file.
    (see "getPutPresignedUrlToImport" mutation).
    """
    importFileName: String!
    """
    RFC 5646 locale to use for formatting data such as dates. E.g.: "fr-CA".
    """
    locale: String!
    """Timezone to use for dates. E.g.: "America/Toronto"."""
    timezoneId: String!
  ): ImportResults!
  """Imports equipment to an organization from an Excel spreadsheet."""
  importEquipments(
    """Organization's ID."""
    organizationId: String!
    """
    Name of the previously uploaded spreadsheet file.
    (see "getPutPresignedUrlToImport" mutation).
    """
    importFileName: String!
    """
    RFC 5646 locale to use for formatting data such as dates. E.g.: "fr-CA".
    """
    locale: String!
    """Timezone to use for dates. E.g.: "America/Toronto"."""
    timezoneId: String!
  ): ImportResults!
  """Imports investments to an organization from an Excel spreadsheet."""
  importInvestments(
    """Organization's ID."""
    organizationId: String!
    """
    Name of the previously uploaded spreadsheet file.
    (see "getPutPresignedUrlToImport" mutation).
    """
    importFileName: String!
    """
    RFC 5646 locale to use for formatting data such as dates. E.g.: "fr-CA".
    """
    locale: String!
    """Timezone to use for dates. E.g.: "America/Toronto"."""
    timezoneId: String!
  ): ImportResults!
  """Imports meetings to an organization from an Excel spreadsheet."""
  importMeetings(
    """Organization's ID."""
    organizationId: String!
    """
    Name of the previously uploaded spreadsheet file.
    (see "getPutPresignedUrlToImport" mutation).
    """
    importFileName: String!
    """
    RFC 5646 locale to use for formatting data such as dates. E.g.: "fr-CA".
    """
    locale: String!
    """Timezone to use for dates. E.g.: "America/Toronto"."""
    timezoneId: String!
  ): ImportResults
  """
  Imports CRV purpose configurations to an organization from an Excel
  spreadsheet.
  """
  importOrganizationCrvs(
    """Organization's ID."""
    organizationId: String!
    """
    Name of the previously uploaded spreadsheet file.
    (see "getPutPresignedUrlToImport" mutation).
    """
    importFileName: String!
    """
    Whether the asset CRVs with purpose details using purpose configurations
    updated by this import should be updated as well.
    Note that if this option is set to false, assets that are currently on
    suggested CRV mode will be switched to manual mode, and their CRV left
    unchanged but no longer matching the updated purpose configuration.
    """
    updateAssetCrvs: Boolean!
    """
    RFC 5646 locale to use for formatting data such as dates. E.g.: "fr-CA".
    """
    locale: String!
    """Timezone to use for dates. E.g.: "America/Toronto"."""
    timezoneId: String!
  ): ImportResults!
  """Imports projects to an organization from an Excel spreadsheet."""
  importProjects(
    """Organization's ID."""
    organizationId: String!
    """
    Name of the previously uploaded spreadsheet file.
    (see "getPutPresignedUrlToImport" mutation).
    """
    importFileName: String!
    """
    RFC 5646 locale to use for formatting data such as dates. E.g.: "fr-CA".
    """
    locale: String!
    """Timezone to use for dates. E.g.: "America/Toronto"."""
    timezoneId: String!
  ): ImportResults!
  """
  Imports a risk assessment profile to an organization from an Excel
  spreadsheet. Before this subscription is called, it is necessary to have
  configured the risk assessment profile by calling saveImportConfiguration.
  A key was provided that must be passed in the importConfigurationKey
  parameter.
  """
  importRiskProfile(
    """Organization's ID."""
    organizationId: String!
    """
    Name of the previously uploaded spreadsheet file.
    (see "getPutPresignedUrlToImport" mutation).
    """
    importFileName: String!
    """Key returned by the saveImportConfiguration mutation."""
    importConfigurationKey: String!
    """
    RFC 5646 locale to use for formatting data such as dates. E.g.: "fr-CA".
    """
    locale: String!
    """Timezone to use for dates. E.g.: "America/Toronto"."""
    timezoneId: String!
  ): ImportResults!
  """Imports spaces to an organization from an Excel spreadsheet."""
  importSpaces(
    """Organization's ID."""
    organizationId: String!
    """
    Name of the previously uploaded spreadsheet file.
    (see "getPutPresignedUrlToImport" mutation).
    """
    importFileName: String!
    """
    RFC 5646 locale to use for formatting data such as dates. E.g.: "fr-CA".
    """
    locale: String!
    """Timezone to use for dates. E.g.: "America/Toronto"."""
    timezoneId: String!
  ): ImportResults!
}

"""
A TechnicalCategoryCrv entity represents how much a technical category weighs in
the breakdown by technical category of an asset's CRV configuration. If the
related asset's CRV is configured to use suggested percentages, the weight of
the technical category will be automatically deduced from the CRV purpose
details as per configuration (see OrganizationCrv for more information on how to
configure weight by technical category for CRV purposes). Otherwise, set a
percentage manually in the entity's properties.
"""
type TechnicalCategoryCrv {
  """CRV technical category weight entity's ID."""
  id: String!
  """ID of the related asset CRV entity."""
  assetCrvId: String!
  """
  Related technical category. Must exists within the related organization's
  classification.
  """
  technicalCategory: RelatedTechnicalCategory!
  """CRV technical category's properties."""
  properties: Object
  """CRV technical category's computed properties (indicators)."""
  computedProperties: Object
  """Date and time at which the CRV technical category was created."""
  creationDate: DateTime!
  """Date and time at which the CRV technical category was last updated."""
  lastChangeDate: DateTime
  """Actor who created this CRV technical category."""
  creationActor: Actor!
  """Actor who last updated this CRV technical category."""
  lastChangeActor: Actor
}

"""Filter to apply on a text field."""
input TextFilterInput {
  """Type of text filter."""
  type: TextFilterType!
  """Comparison value for filter types which require one."""
  filter: String
}

"""Available types of filter conditions for TEXT filters."""
enum TextFilterType {
  """
  Match a text field whose value is exactly equal to a filter value (case-sensitive).
  """
  TEXT_EQUALS
  """
  Match a text field whose value is exactly different from a filter value (case-sensitive).
  """
  TEXT_NOT_EQUALS
  """
  Match a text field whose value contains a filter value (not case-sensitive).
  """
  TEXT_CONTAINS
  """
  Match a text field whose value does not contain a filter value (not case-sensitive).
  """
  TEXT_NOT_CONTAINS
  """
  Match a text field whose value starts with a filter value (not case-sensitive).
  """
  TEXT_STARTS_WITH
  """
  Match a text field whose value ends with a filter value (not case-sensitive).
  """
  TEXT_ENDS_WITH
  """
  Match a text field whose value is null, empty or contains only whitespace characters.
  """
  TEXT_BLANK
  """
  Match a text field whose value is not null, empty and does not only contain whitespace characters.
  """
  TEXT_NOT_BLANK
}

"""
A UnitCrvDetail entity represents a single purpose detail in the breakdown of an
asset's CRV. It is the combination of a purpose configured in the organization
with a quantity. For instance, purpose 'Arena' with a unit price of 2,000 and
a quantity of 1,000 means 1,000 m2 of the asset is occupied by an arena and
has a unit CRV of 2,000,000. See OrganizationCrv for more information on how to
configure purposes.
"""
type UnitCrvDetail {
  """ID of the unit CRV purpose detail."""
  id: String!
  """ID of the related asset's CRV entity."""
  assetCrvId: String!
  """ID of the related organization CRV purpose configuration entity."""
  organizationCrvId: String!
  """
  Quantity of the associated purpose to apply. Usually a surface area, but may
  differ depending on the purpose configuration.
  """
  quantity: Float!
  """CRV purpose detail's properties."""
  properties: Object
  """CRV purpose detail's computed properties (indicators)."""
  computedProperties: Object
  """Date and time at which the CRV purpose detail was created."""
  creationDate: DateTime!
  """Date and time at which the CRV purpose detail was last updated."""
  lastChangeDate: DateTime
  """Actor who created this CRV purpose detail."""
  creationActor: Actor!
  """Actor who last updated this CRV purpose detail."""
  lastChangeActor: Actor
}

"""Input data for updating an audit."""
input UpdateAssetAuditInput {
  """ID of the audit to update."""
  id: String!
  """Audit's properties."""
  properties: Object
}

"""Input data for updating an asset's CRV."""
input UpdateAssetCrvInput {
  """ID of the asset CRV to update."""
  id: String!
  """
  Manual unit replacement value. May be ignored when using suggested unit
  replacement value.
  """
  unitReplacementValue: Float
  """Whether to switch to suggested mode for the unit replacement value."""
  useSuggestedUnitReplacementValue: Boolean!
  """
  Whether to switch to suggested mode for technical category percentages.
  """
  useSuggestedPercentReplacementValue: Boolean!
}

"""Input data for updating an asset."""
input UpdateAssetInput {
  """ID of the asset to update."""
  id: String!
  """Asset's name."""
  name: String!
  """Asset's current state."""
  assetState: String!
  """Asset's properties."""
  properties: Object
}

"""Data for updating an asset type."""
input UpdateAssetTypeInput {
  """ID of the asset type entity to update."""
  id: String!
  """Asset type's name."""
  name: String!
  """List of the codes of enabled modules for assets of this type."""
  modules: [String!]!
}

"""Input data for updating an inspection."""
input UpdateCheckInput {
  """ID of the inspection to update."""
  id: String!
  """IDs of the inspected spaces."""
  spaceIds: [String!]!
  """
  Inspection's state. If this field is empty, an attempt will be made to set it based on the inspection's dates in
  properties. Note: the state must be consistent with the dates even when set manually.
  """
  state: CheckStateEnum
  """Inspection's properties."""
  properties: Object
}

"""Data for updating a contract."""
input UpdateContractInput {
  """ID of the contract to update."""
  id: String!
  """IDs of spaces covered by the contract."""
  spaceIds: [String!]!
  """Name of the contractor or supplier."""
  provider: String!
  """Contract's status."""
  status: ContractStatusEnum
  """Contract's properties."""
  properties: Object
}

"""Data for updating a document."""
input UpdateDocumentInput {
  """ID of the document entity to update."""
  id: String!
  """
  ID of the entity to which to link the document with. When set, entityType
  must also be set.
  Note: only documents currently linked to an organization or asset may have
  their linked entity changed, and it may only be another asset.
  """
  entityId: String
  """
  Type of the entity to which to link the document with. When set, entityId
  must also be set.
  """
  entityType: EntityType
  """Document's name."""
  name: String!
  """
  Document's type.
  Note: only documents linked to an asset, intervention or equipment item may
  have their type changed. Only documents related to an image file may have
  their type set to PICTURE.
  """
  type: DocumentType!
  """Document's state."""
  state: DocumentState!
  """Document's properties."""
  properties: Object
}

"""Data for updating equipment."""
input UpdateEquipmentInput {
  """ID of the equipment item to update."""
  id: String!
  """ID of the asset in which the equipment item is located."""
  assetId: String!
  """IDs of spaces in which the equipment item is located."""
  spaceIds: [String!]!
  """Equipment item's name."""
  name: String!
  """Equipment item's properties."""
  properties: Object
}

"""Data for updating an investment."""
input UpdateInvestmentInput {
  """ID of the investment to update."""
  id: String!
  """ID of the entity the investment relates to."""
  entityId: String!
  """Type of the entity the investment relates to."""
  type: EntityType!
  """Investment's name."""
  name: String!
  """Investment's properties."""
  properties: Object
}

"""Data for updating a lease."""
input UpdateLeaseInput {
  """ID of the lease to update."""
  id: String!
  """IDs of spaces under lease."""
  spaceIds: [String!]!
  """Lease's status."""
  status: LeaseStatusEnum
  """Lease's properties."""
  properties: Object
}

"""Data for updating a meeting."""
input UpdateMeetingInput {
  """ID of the meeting to update."""
  id: String!
  """Meeting's name."""
  name: String!
  """Meeting's properties."""
  properties: Object
}

"""Data for updating a tenant."""
input UpdateOccupantInput {
  """ID of the tenant to update."""
  id: String!
  """Tenant's name."""
  name: String!
  """Tenant's properties."""
  properties: Object
}

"""Input data for updating a CRV purpose configuration."""
input UpdateOrganizationCrvInput {
  """ID of the CRV purpose configuration to update."""
  id: String!
  """
  Whether the asset CRVs with purpose details using this purpose configuration
  should be updated as well.
  Note that if this option is set to false, assets that are currently on
  suggested CRV mode will be switched to manual mode, and their CRV left
  unchanged but no longer matching this purpose configuration.
  """
  updateAssetCrvs: Boolean!
  """
  Name of the purpose of an asset or part of an asset for this configuration.
  """
  purpose: String!
  """Replacement value per unit for this purpose."""
  unitCrv: Float!
  """Unit used for this purpose. E.g. 'sq.ft.'"""
  unit: String!
  """
  Distribution among the organization's classification's categories for this
  purpose.
  """
  percentTechnicalCategories: [PercentTechnicalCategoryInput!]!
  """CRV purpose configuration's properties."""
  properties: Object
}

"""Data for updating a project."""
input UpdateProjectInput {
  """ID of the project entity to update."""
  id: String!
  """IDs of the assets the project relates to."""
  assetIds: [String!]!
  """IDs of other projects the project relates to, i.e. subprojects."""
  projectIds: [String!]
  """Project's name."""
  name: String!
  """Project's properties."""
  properties: Object
}

"""Data for updating a snapshot."""
input UpdateSnapshotInput {
  """ID of the snapshot to update."""
  id: String!
  """Description of the snapshot, e.g. \"2023 financial year\"."""
  description: String
}

"""Data for updating a space."""
input UpdateSpaceInput {
  """ID of the space to update."""
  id: String!
  """Space's name."""
  name: String!
  """Hierarchical list of parent spaces' IDs."""
  parentPath: [String!]!
  """Space's properties."""
  properties: Object
  """
  Use this parameter when updating a space's parent. If true, the updated
  space's children are moved along under the new hierarchy. If false, children
  spaces are detached from the updated space and reattached to its previous
  parent. Default is false.
  """
  moveSpaceChildren: Boolean
}

"""Data for updating a CRV technical category detail."""
input UpdateTechnicalCategoryCrvInput {
  """ID of the CRV technical category detail entity to update."""
  id: String!
  """Weight allocated to the category in the asset's CRV breakdown."""
  percentCrv: Float!
}

"""Input data for updating a CRV purpose detail."""
input UpdateUnitCrvDetailInput {
  """ID of the unit CRV detail to update."""
  id: String!
  """ID of the associated organization CRV purpose configuration."""
  organizationCrvId: String!
  """Quantity of the related CRV purpose to apply."""
  quantity: Float!
}

"""Data for updating an intervention."""
input UpdateWorkInput {
  """ID of the intervention to update."""
  id: String!
  """Optional ID of an asset to which this intervention is related."""
  assetId: String
  """Optional IDs of spaces to which this intervention is related."""
  spaceIds: [String!]
  """Optional IDs of equipment items to which this intervention is related."""
  equipmentIds: [String!]
  """Optional IDs of projects to which this intervention is related."""
  projectIds: [String!]
  """Optional ID of a meeting about this intervention."""
  meetingId: String
  """Short description of the intervention."""
  action: String!
  """Intervention's state."""
  state: String!
  """Intervention's properties."""
  properties: Object
}

"""
Validator for a property field that is checked every time the field's value is
set or edited while an entity is created or updated.
"""
type Validator {
  """Type of validator."""
  type: ValidatorType!
  """Validator's definition."""
  definition: String
  """Validator's conditions for execution."""
  conditionsList: [Condition!]
}

"""Possible types of field validators."""
enum ValidatorType {
  AFTER_OTHER_DATE
  AFTER_DATE
  ASSET_VALUE_GTE_SPACE_CHILDREN_PROPERTY
  BEFORE_OTHER_DATE
  BEFORE_DATE
  DISTINCT
  DOCUMENT_EXISTS
  END_DATE_IS_AFTER_TODAY
  END_DATE_IS_BEFORE_TODAY
  END_DATE_IS_UNDEFINED
  EQUIPMENT_HAS_RELATED_WORK
  FOR_ASSET_TYPE_MODULES
  FOR_ASSET_TYPES
  GTE_SPACE_CHILDREN_PROPERTY
  GTE_TOTAL_EXPENSES
  INCOHERENT_SPACES
  INTEGER
  IS_CLASSIFICATION
  IS_SPACE_MOVE_ALLOWED
  IS_ASSET_CHANGE_ALLOWED
  LTE_SPACE_PARENT_PROPERTY
  LTE_TOTAL_COSTS
  MAX_LENGTH
  MAX_LENGTH_FILE_NAME
  MAX_NOW
  MAX_VALUE
  MIN_VALUE
  ORGANIZATION_CRV_EXISTS
  READ_ONLY
  REALISATION_DATE_IS_AFTER_TODAY
  REALISATION_DATE_IS_BEFORE_TODAY
  REGEX
  RENEW_DATE_IS_AFTER_TODAY
  RENEW_DATE_IS_BEFORE_TODAY
  RENEW_DATE_IS_UNDEFINED
  REQUIRED
  REQUIRED_FALSE
  REQUIRED_TRUE
  SPACE_HAS_INACCESSIBLE_ASSETS
  UNIQUE
}

"""
A Work entity represents an intervention such as repairs or preventive
maintenance on an organization, asset or part of an asset, possibly related to
equipment and part of one or many projects. If a risk assessment profile has
been configured for the organization, interventions may have an associated risk
level. It indicates the risk associated with why the intervention is needed. See
Risk for more information on risk assessment.
"""
type Work {
  """Intervention's ID."""
  id: String!
  """ID of the organization to which this intervention belongs."""
  organizationId: String!
  """Optional ID of an asset entity to which this intervention is related."""
  assetId: String
  """Optional IDs of spaces to which this intervention is related."""
  spaceIdsList: [String!]
  """Optional IDs of equipment items to which this intervention is related."""
  equipmentIdsList: [String!]
  """Optional IDs of projects to which this intervention is related."""
  projectIdsList: [String!]
  """Optional ID of a meeting about this intervention."""
  meetingId: String
  """Intervention's unique identifier."""
  identifier: Int!
  """Short description of the intervention."""
  action: String!
  """Intervention's current state."""
  state: String!
  """Intervention's properties."""
  properties: Object
  """Intervention's computed properties (indicators)."""
  computedProperties: Object
  """Date and time at which the intervention was created."""
  creationDate: DateTime!
  """Date and time at which the intervention was last updated."""
  lastChangeDate: DateTime
  """Actor who created this intervention."""
  creationActor: Actor!
  """Actor who last updated this intervention."""
  lastChangeActor: Actor
  """Intervention's data date."""
  dataDate: DateTime!
}

"""
A Workflow entity represents an external process that can be triggered either automatically after an action (create/update/delete)
or manually by calling "runWorkflow". Workflows are configured per organization and executed outside myA by a service.
"""
type Workflow {
  """Workflow's ID."""
  id: Int!
  """Workflow's name."""
  name: String!
  """ID of the organization to which this workflow belongs."""
  organizationId: String!
  """Workflow's service (e.g. Retool, n8n...)."""
  service: WorkflowServiceType!
  """Workflow's target entity type."""
  entityType: EntityType!
  """Workflow's trigger type."""
  trigger: WorkflowTrigger!
  """Workflow's target URL."""
  url: String!
  """URL parameters."""
  queryParams: Object
  """Workflow's config mapping."""
  config: Object
  """Date and time at which the workflow was created."""
  creationDate: DateTime!
  """Actor who created this workflow."""
  creationActor: Actor!
  """Date and time at which the workflow was last updated."""
  lastChangeDate: DateTime
  """Actor who updated this workflow."""
  lastChangeActor: Actor
}

"""Supported workflow services."""
enum WorkflowServiceType {
  """Retool workflows hosted in TB Retool environment."""
  RETOOL
}

"""Supported workflow trigger types."""
enum WorkflowTrigger {
  """Triggered manually from the calling the 'runWorkflow' mutation."""
  MANUAL
  """Triggered after creating an entity."""
  CREATE
  """Triggered after updating an entity."""
  UPDATE
  """Triggered after deleting an entity."""
  DELETE
}