### This file was generated by Nexus Schema ### Do not make changes to this file directly type Building { """Name of the city where the building is located (e.g. `Zurich`)""" addressCity: String """ The code in the format `iso3166_alpha2` of the country where where the building is located (e.g. `CH`) """ addressCountry: String """Number of the street where the building is located (e.g. `109`)""" addressNumber: String """Postcode of the city where the building is located (e.g. `8004`)""" addressState: String """ Name of the street where the building is located (e.g. `Mattenstrasse`) """ addressStreet: String """Postal code of the city where the building is located (e.g. `8004`)""" addressZipCode: String client: Client! """UUID of the client""" clientId: String! id: String! name: String! """Returns a list of rooms in this building""" rooms( """ Returns the elements in the list that come after the specified cursor. Can only be used together with 'first'. """ after: String """ Returns the elements in the list that come before the specified cursor. Can only be used together with 'last'. """ before: String """Returns the first n elements from the list.""" first: Int """Returns the last n elements from the list.""" last: Int ): RoomsConnection """number of rooms in this building""" roomsCount: Int } """Please refer to the building object for field explanations""" input BuildingCreateInput { addressCity: String addressCountry: String addressNumber: String addressState: String addressStreet: String addressZipCode: String clientId: String! name: String! } type BuildingDeletionResult { success: Boolean } type BuildingEdge { cursor: String! node: Building } """Please refer to the building object for field explanations""" input BuildingUpdateInput { addressCity: String addressCountry: String addressNumber: String addressState: String addressStreet: String addressZipCode: String name: String } type BuildingUpdateResult { building: Building } type BuildingsConnection { edges: [BuildingEdge]! pageInfo: PageInfo! } type Client { """Returns a list of buildings owned by the client""" buildings( """ Returns the elements in the list that come after the specified cursor. Can only be used together with 'first'. """ after: String """ Returns the elements in the list that come before the specified cursor. Can only be used together with 'last'. """ before: String """Returns the first n elements from the list.""" first: Int """Returns the last n elements from the list.""" last: Int ): BuildingsConnection! """Returns a list of devices owned by the client""" devices( """ Returns the elements in the list that come after the specified cursor. Can only be used together with 'first'. """ after: String """ Returns the elements in the list that come before the specified cursor. Can only be used together with 'last'. """ before: String capability: [DeviceCapability] """Returns the first n elements from the list.""" first: Int """Returns the last n elements from the list.""" last: Int ): DevicesConnection! """UUID of the client""" id: String! """ A base64 encoded image string in the format of `data:image/jpeg;base64,/9j/4AAQ...` """ logo: String name: String! """Timezone in the tz format (e.g. `EUROPE/ZURICH`)""" timezone: String! } """Please refer to the client object for field explanations""" input ClientUpdateInput { lightControlConfiguration: LightControlConfigurationInput logo: String name: String } type ClientUpdateResult { client: Client } input ClientWhereUniqueInput { id: String nameInternal: String } """ A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar. """ scalar DateTime type DeletionResult { success: Boolean } """Devices measure Air Quality.""" type Device { client: Client """UUID of the client""" clientId: String """ The type of the device can be used to distinguish between different producs, e.g. sensors and lights """ deviceTypeId: String! """ The DevEUI is a 64-bit globally-unique Extended Unique Identifier (EUI-64) of the end-device. """ eui: String! """The number that can be found on the device (e.g. `1753`)""" humanReadableId: Int! id: String! """Indicates whether the device is an indoor air quality sensor or not""" isIaqSensor: Boolean! """Indicates whether the device is a light device or not""" isLight: Boolean! """Indicates whether the device is a passive infrared (PIR) sensor or not""" isPirSensor: Boolean! """Indicates whether the device is a particulate matter sensor or not""" isPmSensor: Boolean! room: Room """UUID of the room this device is linked to""" roomId: String """ Timeseries contain data from device measurements for this device. Multiple measurements (e.g. `CO2` and `TEMPERATURE`) can be queried simultaneously. """ timeseries(endDate: DateTime!, ids: [TimeSeriesId]!, startDate: DateTime!): [TimeSeries] } input DeviceAssignRoomInput { roomId: String } """Device capability""" enum DeviceCapability { IAQ_SENSOR LIGHT PIR_SENSOR PM_SENSOR } """LoRaWAN Device Class""" enum DeviceClass { A C } type DeviceEdge { cursor: String! node: Device } type DeviceType { deviceClass: DeviceClass! id: String! name: String! } type DeviceUpdateResult { device: Device } type DevicesAssignResult { success: Boolean } type DevicesConnection { edges: [DeviceEdge]! pageInfo: PageInfo! } """ The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). """ scalar JSON @specifiedBy(url: "http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf") input LightControlConfigurationInput { name: String thresholds: [ThresholdInput] } enum LightState { GREEN_500 OFF ORANGE_500 RED_500 RED_500_PULSATING WHITE_300 YELLOW_500 } """Scalar representing local time in ISO-8601 format: 2022-02-22T10:00:00""" scalar LocalDateTime type LocalMeasurement { time: LocalDateTime value: Float } """ AIRICA automatically asigns measurement levels to measurement values. More details about the measurement levels can be found in the support desk at https://support.airica.com """ enum MeasurementLevel { LEVEL_0 LEVEL_1 LEVEL_2 LEVEL_3 LEVEL_4 LEVEL_5 } type Mutation { """ Assign a device to a room. A room must be linked to a device to log air quality measurements """ assignRoomToDevice(data: DeviceAssignRoomInput, id: String!): DeviceUpdateResult """Create a new building""" createBuilding(data: BuildingCreateInput): BuildingUpdateResult """Create a new room that will be added to the provided building.""" createRoom(data: RoomCreateInput): RoomUpdateResult """ Delete a building. The building will be permanently deleted and this action can not be reverted. Mutation fails if rooms are assigned to the building. """ deleteBuilding(id: String!): BuildingDeletionResult """ Delete a room. This will also unassign all linked devices in that room. The room will be permanently deleted and this action can not be reverted. """ deleteRoom(id: String!): RoomDeletionResult """Disable the room sharing functionality for this room.""" disableRoomSharing(where: SharedRoomCodeWhereUniqueInput): SharedRoomCode """ Enable the room sharing functionality for this room. Once enabled, the air quality data of this room can be access through a publicly available URL """ enableRoomSharing(id: String!): SharedRoomCode """ Creates a new code for the room sharing functionality. Old codes/URLs will no longer be valid after this action. """ recreateSharedRoomCode(where: SharedRoomCodeWhereUniqueInput): SharedRoomCode """ Reset the state a light device so that it matches the CO2 level last measured """ resetLightState(id: String!): Boolean """Set the state of the light device""" setLightState(id: String!, state: LightState!): Boolean """Update an existing building""" updateBuilding(data: BuildingUpdateInput, id: String!): BuildingUpdateResult updateClient(data: ClientUpdateInput, id: String!): ClientUpdateResult updateRoom(data: RoomUpdateInput, id: String!): RoomUpdateResult } type PageInfo { endCursor: String hasNextPage: Boolean! hasPreviousPage: Boolean! startCursor: String } type Query { building(id: String!): Building client(where: ClientWhereUniqueInput): Client """Query a single device by its id.""" device(id: String!): Device room(id: String!): Room } """ Airica reports Air Quality on a per room basis. To retrieve Air Quality data, devices must be linked to a room. """ type Room { """UUID of the building this room is linked to""" buildingId: String! devices(capability: [DeviceCapability]): [Device] """The number of doors in a room""" doors: Int """ Indicates whether the room has air conditioning or not. Air conditioning means that indoor air is recycled. """ hasAc: Boolean! """ Indicates whether the room has ventilation. Ventilation means that indoor air is removed and replaced with new, fresh air """ hasVentilation: Boolean! """The height of the room in meters""" height: Float """UUID of the room""" id: String! """The length of the room in meters""" length: Float mainIaqSensor: Device """The maximum number of people that can be present in a room""" maxOccupancy: Int name: String! roomType: RoomType! """Data of a shared room can be accessed through a publicly available URL""" sharedRoomCode: SharedRoomCode """ Timeseries contain data from device measurements for this room. Multiple measurements (e.g. `CO2` and `TEMPERATURE`) can be queried simultaneously. """ timeseries(endDate: DateTime!, ids: [TimeSeriesId]!, startDate: DateTime!): [TimeSeries] @deprecated(reason: "This field is deprecated. Use timeseries on 'mainSensor' or 'devices' instead.") """Hourly room usage in minutes (based on PIR sensor data).""" usage(endDate: LocalDateTime!, startDate: LocalDateTime!): [LocalMeasurement] """The volume of the room in cubic meters""" volume: Float """The width of the room in meters""" width: Float """The number of windows in a room""" windows: Int } """Please refer to the room object for field explanations""" input RoomCreateInput { buildingId: String! displayedFeatures: String doors: Int hasAc: Boolean hasVentilation: Boolean height: Float length: Float mainIaqSensorId: String maxOccupancy: Int name: String! roomType: RoomType! volume: Float width: Float windows: Int } type RoomDeletionResult { success: Boolean } type RoomEdge { cursor: String! node: Room } """ A proper room type is important for some functionality such as Particulate Matter or Presence detection. E.g. the type `outdoor` can be used """ enum RoomType { closed_room open_space outdoor } """Please refer to the room object for field explanations""" input RoomUpdateInput { buildingId: String displayedFeatures: String doors: Int hasAc: Boolean hasVentilation: Boolean height: Float length: Float mainIaqSensorId: String maxOccupancy: Int name: String roomType: RoomType volume: Float width: Float windows: Int } type RoomUpdateResult { room: Room } type RoomsConnection { edges: [RoomEdge]! pageInfo: PageInfo! } type SharedRoomCode { """UUID of the shared room code object""" id: String! """ if set to `true`, the air quality data of the room can be retrieved with the `shareCode` """ isShared: Boolean! """UUID of the room""" roomId: String! """Share code that can be used as part of the publicly available URL""" shareCode: String! } input SharedRoomCodeWhereUniqueInput { id: String roomId: String shareCode: String } input ThresholdInput { state: LightState value: Float } type TimeSeries { data: [TimeSeriesDataPoint]! id: TimeSeriesId! } type TimeSeriesDataPoint { level: MeasurementLevel time: DateTime! value: Float! } """ The following measurements can be fetched as a timeseries:
TimeSeriesId Description
BATTERY_VOLTAGE The voltage of the sensor battery in V
CO2 CO2 concentration in ppm
HEALTHSCORE The healthscore between 1-10. More details can be found at https://support.airica.com/en/what-is-the-airica-health-score
HUMIDITY Air humidity in %
PIR_TRIGGERED Motion detection of a passive infrared (PIR) sensor. Value of a data point is 0 or 1 and does not have a unit. The time series is irregular, i.e.: the measurements do not happen at a regular time interval. Interpolating a value of this time series for any given point in time is achieved by looking up the data point that was recorder immediately before the point in time of interest.
PM_1_0_MASS PM1 (Particulate Matter) in µg/m3
PM_2_5_MASS PM2.5 (Particulate Matter) in µg/m3
PM_10_MASS PM10 (Particulate Matter) in µg/m3
PRESENCE Indicates whether a room was occupied or not
TEMPERATURE Temperature in °C
VOC Volatile organic compound (VOC) in ppb
""" enum TimeSeriesId { BATTERY_VOLTAGE CO2 HEALTHSCORE HUMIDITY PIR_TRIGGERED PM_1_0_MASS PM_2_5_MASS PM_10_MASS PRESENCE TEMPERATURE VOC } """Represents NULL values""" scalar Void