+ );
+}
+
+export default function Definitions() {
+ const [currentTab, setCurrentTab] = useState("general");
+
+ return (
+ <>
+ setCurrentTab(value)}
+ indicatorColor="primary"
+ textColor="primary"
+ variant="fullWidth">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
+ );
+}
diff --git a/src/apiDocs/definitions/agricultureDefinitions.tsx b/src/apiDocs/definitions/agricultureDefinitions.tsx
new file mode 100644
index 0000000..e1c15fa
--- /dev/null
+++ b/src/apiDocs/definitions/agricultureDefinitions.tsx
@@ -0,0 +1,1135 @@
+import { Box, List, ListItem, Typography } from "@mui/material";
+import ObjectDefinitionDisplay, { data } from "./objectDefinitionDisplay";
+
+// template
+/**
+ *
+ {
+ name: "",
+ fields: [
+ {
+ fieldName: "",
+ fieldType: "",
+ fieldDescription: ""
+ },
+ ]
+ },
+ */
+
+const fieldData: data[] = [
+ {
+ name: "Field",
+ fields: [
+ {
+ fieldName: "settings",
+ fieldType: "FieldSettings",
+ fieldDescription: "The settings of a field"
+ },
+ {
+ fieldName: "status",
+ fieldType: "FieldStatus",
+ fieldDescription: "The status of a field"
+ },
+ {
+ fieldName: "fieldPermissions",
+ fieldType: "Permission (ARRAY)",
+ fieldDescription:
+ "Your permissions to the field in relation to the context of how it was loaded"
+ }
+ ]
+ },
+ {
+ name: "FieldSettings",
+ fields: [
+ {
+ fieldName: "key",
+ fieldType: "string",
+ fieldDescription: "The unique key for the field"
+ },
+ {
+ fieldName: "fieldName",
+ fieldType: "string",
+ fieldDescription: "The name of the field"
+ },
+ {
+ fieldName: "crop",
+ fieldType: "Grain (ENUM)",
+ fieldDescription: "The grain type assigned to the field"
+ },
+ {
+ fieldName: "landLocation",
+ fieldType: "string",
+ fieldDescription: "The land location of the field"
+ },
+ {
+ fieldName: "fieldMapping (deprecated)",
+ fieldType: "FieldMapping",
+ fieldDescription: "Geo data for the location of the field"
+ },
+ {
+ fieldName: "grainSubtype",
+ fieldType: "string",
+ fieldDescription: "Variant of the grain type"
+ },
+ {
+ fieldName: "customGrain",
+ fieldType: "string",
+ fieldDescription:
+ "Custom grain type the user can set if the desired grain type is not supported"
+ },
+ {
+ fieldName: "fieldGeoData",
+ fieldType: "GeoData",
+ fieldDescription: "The geometric data of the field in GeoJson format"
+ },
+ {
+ fieldName: "bushelsPerTonne",
+ fieldType: "float",
+ fieldDescription:
+ "The number of bushels in a metric tonne. For supported grain this is determined when the type is selected, for custom grain this value must be entered by the user."
+ },
+ {
+ fieldName: "acres",
+ fieldType: "float",
+ fieldDescription: "The acres of the field as entered by the user."
+ }
+ ]
+ },
+ {
+ name: "FieldStatus",
+ fields: [
+ {
+ fieldName: "timestamp",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 format for when the field was created"
+ }
+ ]
+ }
+];
+
+const binData: data[] = [
+ {
+ name: "Bin",
+ fields: [
+ {
+ fieldName: "settings",
+ fieldType: "BinSettings",
+ fieldDescription: "The settings of the bin"
+ },
+ {
+ fieldName: "status",
+ fieldType: "BinStatus",
+ fieldDescription: "The status of the bin"
+ },
+ {
+ fieldName: "binPermissions",
+ fieldType: "Permission (ENUM, ARRAY)",
+ fieldDescription: "Permission to the bin based on the context it was loaded"
+ }
+ ]
+ },
+ {
+ name: "BinSettings",
+ fields: [
+ {
+ fieldName: "key",
+ fieldType: "string",
+ fieldDescription: "The unique key of the bin"
+ },
+ {
+ fieldName: "name",
+ fieldType: "string",
+ fieldDescription: "The name of the bin"
+ },
+ {
+ fieldName: "yardKey",
+ fieldType: "string",
+ fieldDescription: "The key of the yard assigned to the bin"
+ },
+ {
+ fieldName: "specs",
+ fieldType: "BinSpecs",
+ fieldDescription: "Information about the physical structure of the bin"
+ },
+ {
+ fieldName: "mode",
+ fieldType: "BinMode (ENUM)",
+ fieldDescription: "The current mode the bin is in"
+ },
+ {
+ fieldName: "outdoorTemp",
+ fieldType: "float",
+ fieldDescription: "The set tempurature outside the bin"
+ },
+ {
+ fieldName: "outdoorHumidity",
+ fieldType: "float",
+ fieldDescription: "The set realitive humidity outside the bin"
+ },
+ {
+ fieldName: "fan (deprecated)",
+ fieldType: "Fan",
+ fieldDescription: "The fan set on the bin"
+ },
+ {
+ fieldName: "location",
+ fieldType: "Location",
+ fieldDescription: "Geographical data about the bin"
+ },
+ {
+ fieldName: "inventory",
+ fieldType: "BinInventory",
+ fieldDescription: "Inventory data about the bins contents"
+ },
+ {
+ fieldName: "deviceComponents (deprecated)",
+ fieldType: "DeviceComponent (ARRAY)",
+ fieldDescription: "Components attached to the bin"
+ },
+ // {
+ // fieldName: "useLidar",
+ // fieldType: "",
+ // fieldDescription: ""
+ // },
+ {
+ fieldName: "theme",
+ fieldType: "ObjectTheme",
+ fieldDescription: "Theme data for the bin"
+ },
+ {
+ fieldName: "storage",
+ fieldType: "BinStorage (ENUM)",
+ fieldDescription: "What type of contents currently in the bin"
+ },
+ {
+ fieldName: "highTemp",
+ fieldType: "float",
+ fieldDescription: "The upper temperature threshold for nodes on bin cables"
+ },
+ {
+ fieldName: "lowTemp",
+ fieldType: "float",
+ fieldDescription: "The lower temperature threshold for nodes on bin cables"
+ },
+ {
+ fieldName: "fanId",
+ fieldType: "int",
+ fieldDescription:
+ "The id of the fan set on the bin. Used with our fan charts to calculate the CFM"
+ },
+ {
+ fieldName: "autpGrainNode",
+ fieldType: "bool",
+ fieldDescription:
+ "Whether the bin is set to automatically calculate the top nodes of its cables and by extension estimate its inventory at midnight every day."
+ }
+ ]
+ },
+ {
+ name: "BinStatus",
+ fields: [
+ {
+ fieldName: "timestamp",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 format when the bin was created"
+ },
+ {
+ fieldName: "lastModeChange",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 format when the last time the bins mode was changed"
+ },
+ {
+ fieldName: "targetMoistureEstimation",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 format for when the target moisture will be reached"
+ },
+ {
+ fieldName: "fanCfm",
+ fieldType: "float",
+ fieldDescription:
+ "The calculated cfm based on the pressure plenums most recent pressure and the fan id"
+ },
+ {
+ fieldName: "grainMoisture",
+ fieldType: "float",
+ fieldDescription: "The grain current moisture content"
+ },
+ // {
+ // fieldName: "grainHeight",
+ // fieldType: "",
+ // fieldDescription: ""
+ // },
+ {
+ fieldName: "grainBushels",
+ fieldType: "float",
+ fieldDescription: "Current amount of confirmed (manual) inventory in the bin"
+ },
+ {
+ fieldName: "cfmPerBushel",
+ fieldType: "float",
+ fieldDescription:
+ "The derived CFM based on the total CFM and the number of bushels in the bin"
+ },
+ {
+ fieldName: "waterLiters",
+ fieldType: "float",
+ fieldDescription:
+ "Liters of water in the bin based on the grains moisture content and amount of bushels"
+ },
+ {
+ fieldName: "litersPerHourDrying",
+ fieldType: "float",
+ fieldDescription: "The change per hour in the bins water content"
+ },
+ // {
+ // fieldName: "lastGrainCable",
+ // fieldType: "",
+ // fieldDescription: ""
+ // },
+ // {
+ // fieldName: "lastPlenum",
+ // fieldType: "",
+ // fieldDescription: ""
+ // },
+ // {
+ // fieldName: "lastPressure",
+ // fieldType: "",
+ // fieldDescription: ""
+ // },
+ {
+ fieldName: "grainCables",
+ fieldType: "GrainCable (ARRAY)",
+ fieldDescription: "The grain cables set in the bin components"
+ },
+ {
+ fieldName: "plenums",
+ fieldType: "Plenum (ARRAY)",
+ fieldDescription: "The Plenum (temp/humidity) sensors set in the bin components"
+ },
+ {
+ fieldName: "pressures",
+ fieldType: "Pressure (ARRAY)",
+ fieldDescription: "The pressure sensors set in the bin component"
+ },
+ {
+ fieldName: "fans",
+ fieldType: "BinFan",
+ fieldDescription: "The fan controllers set in the bin components"
+ },
+ {
+ fieldName: "distance",
+ fieldType: "float",
+ fieldDescription: "The distance in cm that a connected lidar read"
+ },
+ {
+ fieldName: "grainComposition",
+ fieldType: "map",
+ fieldDescription:
+ "The keys of the original sources of the grain currently in the bin and how much from each source"
+ },
+ {
+ fieldName: "objectSourceMap",
+ fieldType: "map",
+ fieldDescription:
+ "The keys of the last location the grain was and how much from each location"
+ }
+ ]
+ },
+ {
+ name: "BinSpecs",
+ fields: [
+ {
+ fieldName: "bushelCapacity",
+ fieldType: "float",
+ fieldDescription: "The capacity of the bin for bushels"
+ },
+ {
+ fieldName: "shape",
+ fieldType: "BinShape (ENUM)",
+ fieldDescription: "The shape of the bin"
+ },
+ {
+ fieldName: "heightCm",
+ fieldType: "float",
+ fieldDescription: "The bin height in centimeters"
+ },
+ {
+ fieldName: "diameterCm",
+ fieldType: "float",
+ fieldDescription: "The bin diameter in centimeters"
+ },
+ {
+ fieldName: "advancedDimensions",
+ fieldType: "BinAdvancedDimensions",
+ fieldDescription:
+ "The advanced dimensions of the bin for more than just height and diameter"
+ },
+ {
+ fieldName: "modelId",
+ fieldType: "float",
+ fieldDescription: "The model id of the bin that matches to our chart"
+ },
+ {
+ fieldName: "useAdvanced",
+ fieldType: "bool",
+ fieldDescription:
+ "Whether to use the advanced dimensions for mor accuracy or to simply use height and diameter for simplicity"
+ }
+ ]
+ },
+ {
+ name: "BinInventory",
+ fields: [
+ {
+ fieldName: "empty",
+ fieldType: "bool",
+ fieldDescription: "Whether the bin is empty or not"
+ },
+ {
+ fieldName: "grainType",
+ fieldType: "Grain (ENUM)",
+ fieldDescription: "The type of grain for the bin"
+ },
+ {
+ fieldName: "grainUse",
+ fieldType: "GrainUse (ENUM)",
+ fieldDescription: "What the grains planned use is for"
+ },
+ {
+ fieldName: "grainBushels",
+ fieldType: "float",
+ fieldDescription: "The manual bushel amount"
+ },
+ {
+ fieldName: "initialMoisture",
+ fieldType: "float",
+ fieldDescription: "The inital moisture of the bin when starting drying or hydrating"
+ },
+ {
+ fieldName: "targetMoisture",
+ fieldType: "float",
+ fieldDescription: "The target moisture to reach when drying or hydrating"
+ },
+ {
+ fieldName: "initialTimestamp",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 format of when the initial moisture was set"
+ },
+ {
+ fieldName: "grainSubtype",
+ fieldType: "string",
+ fieldDescription: "Variant of the grain type"
+ },
+ {
+ fieldName: "customTypeName",
+ fieldType: "string",
+ fieldDescription: "Name of the grain type when the grainType is custom"
+ },
+ {
+ fieldName: "bushelPerTonne",
+ fieldType: "float",
+ fieldDescription:
+ "Number of bushels per tonne. For supported Grain types this is determined, for custom types must be entered by the user"
+ }
+ ]
+ },
+ {
+ name: "BinHistory",
+ fields: [
+ {
+ fieldName: "settings",
+ fieldType: "BinSettings",
+ fieldDescription: "Snapshot of the previous settings of the bin"
+ },
+ {
+ fieldName: "user",
+ fieldType: "string",
+ fieldDescription: "The id if the user who made the change"
+ },
+ {
+ fieldName: "timestamp",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 format of the change"
+ },
+ {
+ fieldName: "progress",
+ fieldType: "string",
+ fieldDescription: "Current progress of the change"
+ }
+ ]
+ },
+ {
+ name: "GrainCable",
+ fields: [
+ {
+ fieldName: "name",
+ fieldType: "string",
+ fieldDescription: "The name of the component"
+ },
+ {
+ fieldName: "celcius",
+ fieldType: "float (ARRAY)",
+ fieldDescription: "The last temperature measurement in celcius for each node"
+ },
+ {
+ fieldName: "relativeHumidity",
+ fieldType: "float (ARRAY)",
+ fieldDescription: "The last relative humidity measurement for each node"
+ },
+ {
+ fieldName: "moisture",
+ fieldType: "float (ARRAY)",
+ fieldDescription: "The calculated EMC for the last measurements for each node"
+ },
+ {
+ fieldName: "key",
+ fieldType: "string",
+ fieldDescription: "The key of the component"
+ },
+ {
+ fieldName: "device",
+ fieldType: "int",
+ fieldDescription: "The id of the device the component belongs to"
+ },
+ {
+ fieldName: "topNode",
+ fieldType: "int",
+ fieldDescription:
+ "The highest node that is still in the grain. Can be set by the user manually or when in storage mode the user can subscribe to automatically have it checked and set midnight each day"
+ }
+ ]
+ },
+ {
+ name: "Plenum",
+ fields: [
+ {
+ fieldName: "name",
+ fieldType: "string",
+ fieldDescription: "The name of the component"
+ },
+ {
+ fieldName: "celcius",
+ fieldType: "float",
+ fieldDescription: "The last temperature measurement for the component"
+ },
+ {
+ fieldName: "relativeHumidity",
+ fieldType: "float",
+ fieldDescription: "The last reltive humidity measurement for the component"
+ },
+ {
+ fieldName: "key",
+ fieldType: "string",
+ fieldDescription: "The key of the component"
+ },
+ {
+ fieldName: "device",
+ fieldType: "int",
+ fieldDescription: "The id of the device the component belongs to"
+ }
+ ]
+ },
+ {
+ name: "Pressure",
+ fields: [
+ {
+ fieldName: "name",
+ fieldType: "string",
+ fieldDescription: "The name of the component"
+ },
+ {
+ fieldName: "key",
+ fieldType: "string",
+ fieldDescription: "The key of the component"
+ },
+ {
+ fieldName: "pascals",
+ fieldType: "int",
+ fieldDescription: "The last pressure measurement the component had"
+ },
+ {
+ fieldName: "fanId",
+ fieldType: "int",
+ fieldDescription: "The id of the fan set on the component"
+ },
+ {
+ fieldName: "device",
+ fieldType: "int",
+ fieldDescription: "The id of the device the component belongs to"
+ }
+ ]
+ },
+ {
+ name: "BinFan",
+ fields: [
+ {
+ fieldName: "name",
+ fieldType: "string",
+ fieldDescription: "The name of the component"
+ },
+ {
+ fieldName: "key",
+ fieldType: "string",
+ fieldDescription: "The key of the component"
+ },
+ {
+ fieldName: "state",
+ fieldType: "bool",
+ fieldDescription: "The current on/off state of the fan"
+ },
+ {
+ fieldName: "device",
+ fieldType: "int",
+ fieldDescription: "The id of the device the component belongs to"
+ }
+ ]
+ },
+ {
+ name: "BinAdvancedDimensions",
+ fields: [
+ {
+ fieldName: "topConeHeight",
+ fieldType: "float",
+ fieldDescription: "The height of the cone from the top of the sidewall"
+ },
+ {
+ fieldName: "sidewallHeight",
+ fieldType: "float",
+ fieldDescription: "The height of the sidwall of the bin"
+ },
+ {
+ fieldName: "hopperHeight",
+ fieldType: "float",
+ fieldDescription: "The height of the hopper from the bottom point to the sidewall"
+ },
+ {
+ fieldName: "roofangle",
+ fieldType: "float",
+ fieldDescription: "The angle of the roof"
+ },
+ {
+ fieldName: "hooperAngle",
+ fieldType: "float",
+ fieldDescription: "The angle of the hopper"
+ }
+ ]
+ }
+];
+
+const binYardData: data[] = [
+ {
+ name: "BinYard",
+ fields: [
+ {
+ fieldName: "key",
+ fieldType: "string",
+ fieldDescription: "The key of the bin yard"
+ },
+ {
+ fieldName: "settings",
+ fieldType: "BinYardSettings",
+ fieldDescription: "The settings of the bin yard"
+ },
+ {
+ fieldName: "yardPermissions",
+ fieldType: "Permission (ARRAY)",
+ fieldDescription:
+ "The permissions you have to the yard based on the context it was loaded with"
+ }
+ ]
+ },
+ {
+ name: "BinYardSettings",
+ fields: [
+ {
+ fieldName: "name",
+ fieldType: "string",
+ fieldDescription: "The name of the bin yard"
+ },
+ {
+ fieldName: "owner",
+ fieldType: "string",
+ fieldDescription: "The owner of the bin, generally the user or team who created it."
+ },
+ {
+ fieldName: "key",
+ fieldType: "string",
+ fieldDescription: "The key of the bin yard"
+ },
+ {
+ fieldName: "description",
+ fieldType: "string",
+ fieldDescription: "The description of the bin yard"
+ },
+ {
+ fieldName: "sortPriority",
+ fieldType: "int",
+ fieldDescription: "The priority to determine the sorting of the yards"
+ },
+ {
+ fieldName: "userSort",
+ fieldType: "map",
+ fieldDescription: "Custom sort of yards based on the user that loaded them"
+ },
+ {
+ fieldName: "longitude",
+ fieldType: "float",
+ fieldDescription: "The longitude coordinate"
+ },
+ {
+ fieldName: "latitude",
+ fieldType: "float",
+ fieldDescription: "The latitude coordinate"
+ },
+ {
+ fieldName: "theme",
+ fieldType: "ObjectTheme",
+ fieldDescription: "Theme information for display"
+ }
+ ]
+ }
+];
+
+const grainBagData: data[] = [
+ {
+ name: "GrainBag",
+ fields: [
+ {
+ fieldName: "key",
+ fieldType: "string",
+ fieldDescription: "The key of the grain bag"
+ },
+ {
+ fieldName: "name",
+ fieldType: "string",
+ fieldDescription: "The name of the grain bag"
+ },
+ {
+ fieldName: "settings",
+ fieldType: "GrainBagSettings",
+ fieldDescription: "The settings of the grain bag"
+ }
+ ]
+ },
+ {
+ name: "GrainBagSettings",
+ fields: [
+ {
+ fieldName: "length",
+ fieldType: "float",
+ fieldDescription: "The length in meters of the grain bag"
+ },
+ {
+ fieldName: "diameter",
+ fieldType: "float",
+ fieldDescription: "The diameter in meters of the grain bag"
+ },
+ {
+ fieldName: "supportedGrain",
+ fieldType: "Grain (ENUM)",
+ fieldDescription: "The grain type of the grain bag"
+ },
+ {
+ fieldName: "customGrain",
+ fieldType: "string",
+ fieldDescription: "Name of the grain type when using a custom type"
+ },
+ {
+ fieldName: "grainSubtype",
+ fieldType: "string",
+ fieldDescription: "Variant of the grain type"
+ },
+ {
+ fieldName: "bushelCapacity",
+ fieldType: "float",
+ fieldDescription: "The bushel capacity of the grain bag"
+ },
+ {
+ fieldName: "currentBushels",
+ fieldType: "float",
+ fieldDescription: "The current bushels in the bag"
+ },
+ {
+ fieldName: "startLocation",
+ fieldType: "Location",
+ fieldDescription: "The coordinates of the start of the grain bag"
+ },
+ {
+ fieldName: "endLocation",
+ fieldType: "Location",
+ fieldDescription: "The coordinates of the end of the grain bag"
+ },
+ {
+ fieldName: "storageType",
+ fieldType: "BinStorage (ENUM)",
+ fieldDescription: "The storage type of the grain bag"
+ },
+ {
+ fieldName: "fillDate",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 format that the bag was filled"
+ },
+ {
+ fieldName: "initialMoisture",
+ fieldType: "float",
+ fieldDescription: "The initial moisture of the grain when the bag was filled"
+ },
+ {
+ fieldName: "bushelsPerTonne",
+ fieldType: "float",
+ fieldDescription: "The amount of bushels in a metric tonne"
+ },
+ {
+ fieldName: "theme",
+ fieldType: "ObjectTheme",
+ fieldDescription: "The theme for display purposes"
+ }
+ ]
+ }
+];
+
+const harvestPlanData: data[] = [
+ {
+ name: "HarvestPlan",
+ fields: [
+ {
+ fieldName: "settings",
+ fieldType: "HarvestPlanSettings",
+ fieldDescription: "The settings of the harvest plan"
+ },
+ {
+ fieldName: "status",
+ fieldType: "HarvestPlanStatus",
+ fieldDescription: "The status of the harvest plan"
+ },
+ {
+ fieldName: "planPermissions",
+ fieldType: "Permission (ENUM, ARRAY)",
+ fieldDescription: "The permissions tou have to the plan based on the context it was loaded"
+ }
+ ]
+ },
+ {
+ name: "HarvestPlanSettings",
+ fields: [
+ {
+ fieldName: "key",
+ fieldType: "string",
+ fieldDescription: "The key of the harvest plan"
+ },
+ {
+ fieldName: "field",
+ fieldType: "string",
+ fieldDescription: "The key of the field the harvest plan belongs to"
+ },
+ {
+ fieldName: "harvestYear",
+ fieldType: "int",
+ fieldDescription: "The year for the harvest plan"
+ },
+ {
+ fieldName: "cropType",
+ fieldType: "Grain (ENUM)",
+ fieldDescription: "The type of grain being grown"
+ },
+ {
+ fieldName: "grainType",
+ fieldType: "string",
+ fieldDescription: "The variant of the grain type"
+ },
+ {
+ fieldName: "customGrain",
+ fieldType: "string",
+ fieldDescription: "The name of the grain type for custom grain"
+ },
+ {
+ fieldName: "yieldTarget",
+ fieldType: "int",
+ fieldDescription: "The desired yield in bushels for the plan"
+ },
+ {
+ fieldName: "actualYield",
+ fieldType: "int",
+ fieldDescription: "The actual bushels grown for the plan"
+ },
+ {
+ fieldName: "seedMaterials",
+ fieldType: "float",
+ fieldDescription: "The cost of materials for seeding"
+ },
+ {
+ fieldName: "seedEquipment",
+ fieldType: "float",
+ fieldDescription: "The cost for equipment for seeding"
+ },
+ {
+ fieldName: "preSeedMaterials",
+ fieldType: "float",
+ fieldDescription: "The cost of materials for pre-seeding"
+ },
+ {
+ fieldName: "preSeedEquipment",
+ fieldType: "float",
+ fieldDescription: "The cost of equipment for pre-seeding"
+ },
+ {
+ fieldName: "postSeedMaterials",
+ fieldType: "float",
+ fieldDescription: "The cost of materials post seeding"
+ },
+ {
+ fieldName: "postSeedEquipment",
+ fieldType: "float",
+ fieldDescription: "The cost of equipment post seeding"
+ },
+ {
+ fieldName: "harvestMaterials",
+ fieldType: "float",
+ fieldDescription: "The cost of materials for harvest"
+ },
+ {
+ fieldName: "harvestEquipment",
+ fieldType: "float",
+ fieldDescription: "The cost of equipment for harvest"
+ },
+ {
+ fieldName: "fallMaterials",
+ fieldType: "float",
+ fieldDescription: "The cost of materials used in the fall"
+ },
+ {
+ fieldName: "fallEquipment",
+ fieldType: "float",
+ fieldDescription: "The cost of equipment used in the fall"
+ },
+ // {
+ // fieldName: "taskIds (deprecated)",
+ // fieldType: "string (ARRAY)",
+ // fieldDescription: "List of task id's associated with the harvest plan"
+ // },
+ {
+ fieldName: "createDate",
+ fieldType: "int",
+ fieldDescription: "Unix tim in milliseconds"
+ },
+ {
+ fieldName: "title",
+ fieldType: "string",
+ fieldDescription: "Title of the harvest plan"
+ },
+ {
+ fieldName: "bushelPrice",
+ fieldType: "float",
+ fieldDescription: "The desired price to sell each bushel for"
+ }
+ ]
+ },
+ {
+ name: "HarvestPlanStatus",
+ fields: [
+ {
+ fieldName: "timestamp",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 format of when harvest plan was created"
+ }
+ ]
+ },
+ {
+ name: "HarvestPlanHistory",
+ fields: [
+ {
+ fieldName: "settings",
+ fieldType: "HarvestPlanSettings",
+ fieldDescription: "Snapshot of the previous settings"
+ },
+ {
+ fieldName: "user",
+ fieldType: "string",
+ fieldDescription: "The id of the user who created the change"
+ },
+ {
+ fieldName: "timestamp",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 format of the change"
+ },
+ {
+ fieldName: "progress",
+ fieldType: "string",
+ fieldDescription: "State of the change"
+ }
+ ]
+ }
+];
+
+const contractData: data[] = [
+ {
+ name: "Contract",
+ fields: [
+ {
+ fieldName: "key",
+ fieldType: "string",
+ fieldDescription: "The key of the contract"
+ },
+ {
+ fieldName: "name",
+ fieldType: "string",
+ fieldDescription: "The name of the contract"
+ },
+ {
+ fieldName: "settings",
+ fieldType: "ContractSettings",
+ fieldDescription: "The settings of the contract"
+ }
+ ]
+ },
+ {
+ name: "ContractSettings",
+ fields: [
+ {
+ fieldName: "contractId",
+ fieldType: "string",
+ fieldDescription: "The id of the contract"
+ },
+ {
+ fieldName: "contractHolder",
+ fieldType: "string",
+ fieldDescription: "The party in possession of the contract"
+ },
+ {
+ fieldName: "deliveryWindow",
+ fieldType: "ContractDelivery",
+ fieldDescription: "The start and end dates of the window for delivery on the contract"
+ },
+ {
+ fieldName: "type",
+ fieldType: "ContractType",
+ fieldDescription: "The type of contract"
+ },
+ {
+ fieldName: "customCommodity",
+ fieldType: "string",
+ fieldDescription:
+ "The name of the commodity for custom if the name is not in the list of commodities to choose from"
+ },
+ {
+ fieldName: "size",
+ fieldType: "float",
+ fieldDescription: "The promised amount to deliver on the contract"
+ },
+ {
+ fieldName: "delivered",
+ fieldType: "float",
+ fieldDescription: "The amount that has currently been delivered"
+ },
+ {
+ fieldName: "totalValue",
+ fieldType: "float",
+ fieldDescription: "The total monetary value of the contract"
+ },
+ {
+ fieldName: "commodity",
+ fieldType: "int",
+ fieldDescription:
+ "Value to be used in conjunction with the contract type to know what Enumerator to use to determine the commodity"
+ },
+ {
+ fieldName: "contractDate",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 format of the date of the contract signing"
+ },
+ {
+ fieldName: "commoditySubtype",
+ fieldType: "string",
+ fieldDescription: "Subtype of the contracts commodity. For example, a variant of grain"
+ },
+ {
+ fieldName: "conversionValue",
+ fieldType: "float",
+ fieldDescription:
+ "A number that can be used to convert the value to another unit. For example, a coeffecient to convert bushels to tonnes"
+ }
+ ]
+ },
+ {
+ name: "ContractDelivery",
+ fields: [
+ {
+ fieldName: "startDate",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 format for the opening of the delivery window"
+ },
+ {
+ fieldName: "endDate",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 format for the closing of the delivery window"
+ }
+ ]
+ }
+];
+
+export default function AgricultureDefinitions() {
+ return (
+
+
+ Field Definitions
+
+
+ {fieldData.map((e, i) => (
+
+
+
+ ))}
+
+
+ Bin Definitions
+
+
+ {binData.map((e, i) => (
+
+
+
+ ))}
+
+
+ Bin Yard Definitions
+
+
+ {binYardData.map((e, i) => (
+
+
+
+ ))}
+
+
+ Grain Bag Definitions
+
+
+ {grainBagData.map((e, i) => (
+
+
+
+ ))}
+
+
+ Harvest Plan Definitions
+
+
+ {harvestPlanData.map((e, i) => (
+
+
+
+ ))}
+
+
+ Contract Definitions
+
+
+ {contractData.map((e, i) => (
+
+
+
+ ))}
+
+
+ );
+}
diff --git a/src/apiDocs/definitions/aviationDefinitions.tsx b/src/apiDocs/definitions/aviationDefinitions.tsx
new file mode 100644
index 0000000..67c45db
--- /dev/null
+++ b/src/apiDocs/definitions/aviationDefinitions.tsx
@@ -0,0 +1,253 @@
+import { Box, List, ListItem, Typography } from "@mui/material";
+import ObjectDefinitionDisplay, { data } from "./objectDefinitionDisplay";
+
+// template
+/**
+ *
+ {
+ name: "",
+ fields: [
+ {
+ fieldName: "",
+ fieldType: "",
+ fieldDescription: ""
+ },
+ ]
+ },
+ */
+
+// aviation definitions
+const terminalData: data[] = [
+ {
+ name: "Terminal",
+ fields: [
+ {
+ fieldName: "key",
+ fieldType: "string",
+ fieldDescription: "The key of the terminal"
+ },
+ {
+ fieldName: "name",
+ fieldType: "string",
+ fieldDescription: "The name of the terminal"
+ },
+ {
+ fieldName: "settings",
+ fieldType: "TerminalSettings",
+ fieldDescription: "The settings of the terminal"
+ }
+ ]
+ },
+ {
+ name: "TerminalSettings",
+ fields: [
+ {
+ fieldName: "longitude",
+ fieldType: "float",
+ fieldDescription: "The longitude coordinate"
+ },
+ {
+ fieldName: "latitude",
+ fieldType: "float",
+ fieldDescription: "The latitude coordinate"
+ },
+ {
+ fieldName: "theme",
+ fieldType: "ObjectTheme",
+ fieldDescription: "Theme for display purposes"
+ }
+ ]
+ }
+];
+
+const gateData: data[] = [
+ {
+ name: "Gate",
+ fields: [
+ {
+ fieldName: "key",
+ fieldType: "string",
+ fieldDescription: "The key of the gate"
+ },
+ {
+ fieldName: "name",
+ fieldType: "string",
+ fieldDescription: "The name of the gate"
+ },
+ {
+ fieldName: "settings",
+ fieldType: "GateSettings",
+ fieldDescription: "The settings of the gate"
+ },
+ {
+ fieldName: "componentPreferences",
+ fieldType: "map",
+ fieldDescription:
+ "A map using the component keys of linked components to the component type for the gate"
+ },
+ {
+ fieldName: "gateMutations",
+ fieldType: "map",
+ fieldDescription:
+ "A map using device ids to store the mutated measurement estimates based on the sensors actual readings from that device"
+ },
+ {
+ fieldName: "pcaState",
+ fieldType: "PCAState (ENUM)",
+ fieldDescription: "The state of the connected pca unit"
+ }
+ ]
+ },
+ {
+ name: "GateSettings",
+ fields: [
+ {
+ fieldName: "longitude",
+ fieldType: "float",
+ fieldDescription: "The longitude coordinate"
+ },
+ {
+ fieldName: "latitude",
+ fieldType: "float",
+ fieldDescription: "The latitude coordinate"
+ },
+ {
+ fieldName: "terminal",
+ fieldType: "string",
+ fieldDescription: "The key of the terminal this gate belongs to"
+ },
+ {
+ fieldName: "ductDiameter",
+ fieldType: "float",
+ fieldDescription: "The diameter of the ducting for the gate in millimeters"
+ },
+ {
+ fieldName: "ductLength",
+ fieldType: "float",
+ fieldDescription: "The length of the ducting in meters"
+ },
+ {
+ fieldName: "frictionFactor",
+ fieldType: "float",
+ fieldDescription: "The friction coefficient of the ducting"
+ },
+ {
+ fieldName: "thermalConductivity",
+ fieldType: "float",
+ fieldDescription: "The thermal conductivity of the ducting"
+ },
+ {
+ fieldName: "thermalResistance",
+ fieldType: "float",
+ fieldDescription: "The thermal resistance of the ducting"
+ },
+ {
+ fieldName: "upperFlow",
+ fieldType: "float",
+ fieldDescription: "The upper limit of acceptable mass air flow"
+ },
+ {
+ fieldName: "lowerFlow",
+ fieldType: "float",
+ fieldDescription: "The lower limit of acceptable mass air flow"
+ },
+ {
+ fieldName: "pcaType",
+ fieldType: "string",
+ fieldDescription: "The type of pca on the gate"
+ },
+ {
+ fieldName: "ductName",
+ fieldType: "string",
+ fieldDescription: "The name of the ducting"
+ },
+ // {
+ // fieldName: "airport",
+ // fieldType: "",
+ // fieldDescription: ""
+ // },
+ {
+ fieldName: "letterIdentifier",
+ fieldType: "string",
+ fieldDescription: "The letter assigned to the gate"
+ },
+ {
+ fieldName: "numberIdentifier",
+ fieldType: "string",
+ fieldDescription: "The number assigned to the gate"
+ },
+ {
+ fieldName: "hourlyApuCost",
+ fieldType: "float",
+ fieldDescription: "The cost to run the apu of an aircraft for an hour at the gate"
+ },
+ {
+ fieldName: "hourlyPcaCost",
+ fieldType: "float",
+ fieldDescription: "The cost to run the pca unit for an hour at the gate"
+ },
+ {
+ fieldName: "theme",
+ fieldType: "ObjectTheme",
+ fieldDescription: "Them for display purposes"
+ }
+ ]
+ },
+ {
+ name: "GateMutations",
+ fields: [
+ {
+ fieldName: "cfm",
+ fieldType: "float",
+ fieldDescription: "The cfm value in the ducting calculated from the pressure sensors"
+ },
+ {
+ fieldName: "temp",
+ fieldType: "float",
+ fieldDescription: "The estimated final temp in the aircraft cab"
+ }
+ ]
+ },
+ {
+ name: "FlowAt",
+ fields: [
+ {
+ fieldName: "airFlow",
+ fieldType: "float",
+ fieldDescription: "The Mass air flow value"
+ },
+ {
+ fieldName: "time",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 format for the mass airflow measurement"
+ }
+ ]
+ }
+];
+
+export default function AviationDefinition() {
+ return (
+
+
+ Terminal Definitions
+
+
+ {terminalData.map((e, i) => (
+
+
+
+ ))}
+
+
+ Gate Definitions
+
+
+ {gateData.map((e, i) => (
+
+
+
+ ))}
+
+
+ );
+}
diff --git a/src/apiDocs/definitions/constructionDefinitions.tsx b/src/apiDocs/definitions/constructionDefinitions.tsx
new file mode 100644
index 0000000..73c6b6a
--- /dev/null
+++ b/src/apiDocs/definitions/constructionDefinitions.tsx
@@ -0,0 +1,224 @@
+import { Box, List, ListItem, Typography } from "@mui/material";
+import ObjectDefinitionDisplay, { data } from "./objectDefinitionDisplay";
+
+// template
+/**
+ *
+ {
+ name: "",
+ fields: [
+ {
+ fieldName: "",
+ fieldType: "",
+ fieldDescription: ""
+ },
+ ]
+ },
+ */
+
+// construction definitions
+const siteData: data[] = [
+ {
+ name: "Site",
+ fields: [
+ {
+ fieldName: "settings",
+ fieldType: "SiteSettings",
+ fieldDescription: "The settings of a jobsite"
+ },
+ {
+ fieldName: "status",
+ fieldType: "SiteStatus",
+ fieldDescription: "The status of a jobsite"
+ }
+ ]
+ },
+ {
+ name: "SiteSettings",
+ fields: [
+ {
+ fieldName: "key",
+ fieldType: "string",
+ fieldDescription: "The key of the site"
+ },
+ {
+ fieldName: "objectKey (deprecated)",
+ fieldType: "string",
+ fieldDescription:
+ "was originally going to be used as the obect the site was linked to before relative objects was implemented, currently will only contain the id of the user who created the site"
+ },
+ {
+ fieldName: "userId",
+ fieldType: "string",
+ fieldDescription: "The id of the user who created the site"
+ },
+ {
+ fieldName: "siteName",
+ fieldType: "string",
+ fieldDescription: "The name of the site"
+ },
+ {
+ fieldName: "longitude",
+ fieldType: "float",
+ fieldDescription: "The longitude of the site"
+ },
+ {
+ fieldName: "latitude",
+ fieldType: "float",
+ fieldDescription: "The latitude of the site"
+ },
+ {
+ fieldName: "theme",
+ fieldType: "ObjectTheme",
+ fieldDescription: "Theme for display purposes"
+ },
+ {
+ fieldName: "active",
+ fieldType: "bool",
+ fieldDescription: "Whether the site is currently active"
+ }
+ // these were taken out as users felt they were not necessary
+ // {
+ // fieldName: "siteId",
+ // fieldType: "string",
+ // fieldDescription: ""
+ // },
+ // {
+ // fieldName: "siteAddress",
+ // fieldType: "string",
+ // fieldDescription: ""
+ // },
+ // {
+ // fieldName: "siteDescription",
+ // fieldType: "string",
+ // fieldDescription: ""
+ // },
+ // {
+ // fieldName: "clientName",
+ // fieldType: "string",
+ // fieldDescription: ""
+ // },
+ // {
+ // fieldName: "clientPhone",
+ // fieldType: "string",
+ // fieldDescription: ""
+ // },
+ // {
+ // fieldName: "jobType",
+ // fieldType: "string",
+ // fieldDescription: ""
+ // },
+ // {
+ // fieldName: "jobDetails",
+ // fieldType: "string",
+ // fieldDescription: ""
+ // },
+ ]
+ },
+ {
+ name: "SiteStatus",
+ fields: [
+ {
+ fieldName: "timestamp",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 format for the creation of the site"
+ }
+ ]
+ }
+];
+
+const objectHeaterData: data[] = [
+ {
+ name: "ObjectHeater",
+ fields: [
+ {
+ fieldName: "key",
+ fieldType: "string",
+ fieldDescription: "The key of the heater"
+ },
+ {
+ fieldName: "name",
+ fieldType: "string",
+ fieldDescription: "The name of the heater"
+ },
+ {
+ fieldName: "settings",
+ fieldType: "ObjectHeaterSettings",
+ fieldDescription: "The settigns of the heater"
+ }
+ ]
+ },
+ {
+ name: "ObjectHeaterSettings",
+ fields: [
+ {
+ fieldName: "siteKey",
+ fieldType: "string",
+ fieldDescription: "The key for the site"
+ },
+ {
+ fieldName: "make",
+ fieldType: "string",
+ fieldDescription: "The make of the heater"
+ },
+ {
+ fieldName: "model",
+ fieldType: "string",
+ fieldDescription: "The model of the heater"
+ },
+ {
+ fieldName: "fuelType",
+ fieldType: "FuelType",
+ fieldDescription: "The type of fuel the heater runs on"
+ },
+ {
+ fieldName: "tankSize",
+ fieldType: "float",
+ fieldDescription: "The size of the tank in gallons"
+ },
+ {
+ fieldName: "fuelConsumption",
+ fieldType: "float",
+ fieldDescription: "The rate fuel is used in gallons per hour (G/hr)"
+ },
+ {
+ fieldName: "airCirculation",
+ fieldType: "float",
+ fieldDescription: "The rate that the heater circulates air in CFM"
+ },
+ {
+ fieldName: "mutations",
+ fieldType: "LinearMutation (ARRAY)",
+ fieldDescription:
+ "Any mutations to perform using multiple components attached to the heater and combining them to convert into other measurements using a linear regression formula"
+ }
+ ]
+ }
+];
+
+export default function ConstructionDefinitions() {
+ return (
+
+
+ Site Definitions
+
+
+ {siteData.map((e, i) => (
+
+
+
+ ))}
+
+
+ Heater Definitions
+
+
+ {objectHeaterData.map((e, i) => (
+
+
+
+ ))}
+
+
+ );
+}
diff --git a/src/apiDocs/definitions/generalDefinitions.tsx b/src/apiDocs/definitions/generalDefinitions.tsx
new file mode 100644
index 0000000..af7f542
--- /dev/null
+++ b/src/apiDocs/definitions/generalDefinitions.tsx
@@ -0,0 +1,1649 @@
+import { Box, List, ListItem, Typography } from "@mui/material";
+import ObjectDefinitionDisplay, { data } from "./objectDefinitionDisplay";
+
+// template
+/**
+ *
+ {
+ name: "",
+ fields: [
+ {
+ fieldName: "",
+ fieldType: "",
+ fieldDescription: ""
+ },
+ ]
+ },
+ */
+const notificationData: data[] = [
+ {
+ name: "Notification",
+ fields: [
+ {
+ fieldName: "settings",
+ fieldType: "NotificationSettings",
+ fieldDescription: "The settings of the notification"
+ },
+ {
+ fieldName: "status",
+ fieldType: "NotificationStatus",
+ fieldDescription: "The status of the notification"
+ }
+ ]
+ },
+ {
+ name: "Notification Settings",
+ fields: [
+ {
+ fieldName: "key",
+ fieldType: "string",
+ fieldDescription: "The unique identifier for the notification"
+ },
+ {
+ fieldName: "title",
+ fieldType: "string",
+ fieldDescription: "The title of the notification"
+ },
+ {
+ fieldName: "subtitle",
+ fieldType: "string",
+ fieldDescription: "The subtitle of the notification"
+ },
+ {
+ fieldName: "message",
+ fieldType: "string",
+ fieldDescription: "The message the notification conveys to the user"
+ },
+ {
+ fieldName: "sourceType",
+ fieldType: "string",
+ fieldDescription: "The type of object that triggered the notification"
+ },
+ {
+ fieldName: "sourceKey",
+ fieldType: "string",
+ fieldDescription: "The key of the object that triggered the notification"
+ },
+ {
+ fieldName: "componentSource",
+ fieldType: "ComponentID",
+ fieldDescription: "For device notifications the id of the component is included"
+ },
+ {
+ fieldName: "logo",
+ fieldType: "string",
+ fieldDescription: "For team notifications the url to the logo image is included"
+ }
+ ]
+ },
+ {
+ name: "NotificationStatus",
+ fields: [
+ {
+ fieldName: "timestamp",
+ fieldType: "string",
+ fieldDescription: "The timstamp the notification was created in RFC3339 format"
+ }
+ ]
+ }
+];
+
+const noteData: data[] = [
+ {
+ name: "Note",
+ fields: [
+ {
+ fieldName: "settings",
+ fieldType: "NoteSettings",
+ fieldDescription: "The settings for a note object"
+ },
+ {
+ fieldName: "status",
+ fieldType: "NoteStatus",
+ fieldDescription: "The Status for a note object"
+ }
+ ]
+ },
+ {
+ name: "NoteSettings",
+ fields: [
+ {
+ fieldName: "key",
+ fieldType: "string",
+ fieldDescription: "The unique identifier for a note"
+ },
+ {
+ fieldName: "userId",
+ fieldType: "string",
+ fieldDescription: "The id of the user that created the note"
+ },
+ {
+ fieldName: "content",
+ fieldType: "string",
+ fieldDescription: "The content/message of the note"
+ },
+ {
+ fieldName: "objectType",
+ fieldType: "int",
+ fieldDescription: "The type of object the note is linked to"
+ },
+ {
+ fieldName: "objectKey",
+ fieldType: "string",
+ fieldDescription: "The key of the object the note is linked to"
+ },
+ {
+ fieldName: "timestamp",
+ fieldType: "int",
+ fieldDescription: "The time in milliseconds since the epoch"
+ }
+ ]
+ },
+ {
+ name: "NoteStatus",
+ fields: [
+ {
+ fieldName: "timestamp",
+ fieldType: "string",
+ fieldDescription: "The timestamp in RFC3339 format of when the note was created"
+ }
+ ]
+ }
+];
+
+const homeMarkerData: data[] = [
+ {
+ name: "HomeMarker",
+ fields: [
+ {
+ fieldName: "settings",
+ fieldType: "HomeMarkerSettings",
+ fieldDescription: "The settings of a Home Marker"
+ },
+ {
+ fieldName: "status",
+ fieldType: "HomeMarkerStatus",
+ fieldDescription: "The status of a Home Marker"
+ }
+ ]
+ },
+ {
+ name: "HomeMarkerSettings",
+ fields: [
+ {
+ fieldName: "key",
+ fieldType: "string",
+ fieldDescription: "The unique id of the home marker"
+ },
+ {
+ fieldName: "userId",
+ fieldType: "string",
+ fieldDescription: "The id of the user or team the home marker belongs too"
+ },
+ {
+ fieldName: "longitude",
+ fieldType: "float",
+ fieldDescription: "The longitude coordinate of the home marker"
+ },
+ {
+ fieldName: "latitude",
+ fieldType: "float",
+ fieldDescription: "The latitude coordinate of the home marker"
+ }
+ ]
+ },
+ {
+ name: "HomeMarkerStatus",
+ fields: [
+ {
+ fieldName: "timestamp",
+ fieldType: "string",
+ fieldDescription: "The timestamp in RFC3339 format of when the note was created"
+ }
+ ]
+ }
+];
+
+const fieldMarkerData: data[] = [
+ {
+ name: "FieldMarker",
+ fields: [
+ {
+ fieldName: "settings",
+ fieldType: "FieldMarkerSettings",
+ fieldDescription: "The settings of a field marker"
+ },
+ {
+ fieldName: "status",
+ fieldType: "FieldMarkerStatus",
+ fieldDescription: "The status of a field marker"
+ }
+ ]
+ },
+ {
+ name: "FieldMarkerSettings",
+ fields: [
+ {
+ fieldName: "key",
+ fieldType: "string",
+ fieldDescription: "The unique id of the field marker"
+ },
+ {
+ fieldName: "longitude",
+ fieldType: "float",
+ fieldDescription: "The longitude coordinate of the field marker"
+ },
+ {
+ fieldName: "latitude",
+ fieldType: "float",
+ fieldDescription: "the latitude coordinate of the field marker"
+ },
+ {
+ fieldName: "name",
+ fieldType: "string",
+ fieldDescription: "The name given to the field marker"
+ },
+ {
+ fieldName: "description",
+ fieldType: "string",
+ fieldDescription: "The user entered description of the field marker"
+ },
+ {
+ fieldName: "theme",
+ fieldType: "ObjectTheme",
+ fieldDescription: "The visual theme of the field marker"
+ },
+ {
+ fieldName: "type",
+ fieldType: "FieldMarkerType (ENUM)",
+ fieldDescription: "The type of the field marker"
+ },
+ {
+ fieldName: "severity",
+ fieldType: "int",
+ fieldDescription: "The numerical value of severity of the subject the marker represents"
+ },
+ {
+ fieldName: "affectedArea",
+ fieldType: "int",
+ fieldDescription: "Numerical value to represent the area affected"
+ }
+ ]
+ },
+ {
+ name: "FieldMarkerStatus",
+ fields: [
+ {
+ fieldName: "timestamp",
+ fieldType: "string",
+ fieldDescription: "The timestamp in RFC3339 format of when the note was created"
+ }
+ ]
+ }
+];
+
+const taskData: data[] = [
+ {
+ name: "Task",
+ fields: [
+ {
+ fieldName: "settings",
+ fieldType: "TaskSettings",
+ fieldDescription: "The settings of the task"
+ },
+ {
+ fieldName: "key",
+ fieldType: "string",
+ fieldDescription: "the unique id of the task"
+ }
+ ]
+ },
+ {
+ name: "TaskSettings",
+ fields: [
+ {
+ fieldName: "title",
+ fieldType: "string",
+ fieldDescription: "The title given to the task"
+ },
+ {
+ fieldName: "description",
+ fieldType: "string",
+ fieldDescription: "Description given to the task"
+ },
+ {
+ fieldName: "type",
+ fieldType: "string",
+ fieldDescription: "the type of task it is"
+ },
+ {
+ fieldName: "worker",
+ fieldType: "string",
+ fieldDescription: "The id of the user assigned to complete the task"
+ },
+ {
+ fieldName: "start",
+ fieldType: "string",
+ fieldDescription: "Date in RFC3339 format"
+ },
+ {
+ fieldName: "startTime",
+ fieldType: "string",
+ fieldDescription: "Time (hour-minute-second) in RFC3339 format"
+ },
+ {
+ fieldName: "end",
+ fieldType: "string",
+ fieldDescription: "Date in RFC3339 format"
+ },
+ {
+ fieldName: "endTime",
+ fieldType: "string",
+ fieldDescription: "Time (hour-minute-second) in RFC3339 format"
+ },
+ {
+ fieldName: "cost",
+ fieldType: "float",
+ fieldDescription: "Monetary value associated with the task"
+ },
+ {
+ fieldName: "secondaryCost",
+ fieldType: "float",
+ fieldDescription: "Monetary value associated with the task"
+ },
+ {
+ fieldName: "colour",
+ fieldType: "string",
+ fieldDescription: "Hex value for the colour to display with the task"
+ },
+ {
+ fieldName: "userId",
+ fieldType: "string",
+ fieldDescription: "The id of the user who created the task"
+ },
+ {
+ fieldName: "objectKey",
+ fieldType: "string",
+ fieldDescription: "The key of the object the task is linked to"
+ }
+ ]
+ }
+];
+
+const deviceData: data[] = [
+ {
+ name: "Device",
+ fields: [
+ {
+ fieldName: "settings",
+ fieldType: "DeviceSettings",
+ fieldDescription: "The settings of the device"
+ },
+ {
+ fieldName: "status",
+ fieldType: "DeviceStatus",
+ fieldDescription: "The status of the device"
+ }
+ ]
+ },
+ {
+ name: "ComprehensiveDevice",
+ fields: [
+ {
+ fieldName: "device",
+ fieldType: "Device",
+ fieldDescription: "The device object"
+ },
+ {
+ fieldName: "components",
+ fieldType: "Component (ARRAY)",
+ fieldDescription: "A list of components on the device"
+ },
+ {
+ fieldName: "interactions",
+ fieldType: "Interaction (ARRAY)",
+ fieldDescription: "A list of interactions on the device"
+ }
+ ]
+ },
+ {
+ name: "HologramDevice",
+ fields: [
+ {
+ fieldName: "device",
+ fieldType: "Device",
+ fieldDescription: "The device object"
+ },
+ {
+ fieldName: "paused",
+ fieldType: "DeviceActivity (ENUM)",
+ fieldDescription: "The state of the device"
+ },
+ {
+ fieldName: "dataLimit",
+ fieldType: "int",
+ fieldDescription: "The monthly limit for data usage in bytes"
+ },
+ {
+ fieldName: "periodUsage",
+ fieldType: "int",
+ fieldDescription: "The used amount of data for this period in bytes"
+ },
+ {
+ fieldName: "overLimit",
+ fieldType: "LimitStatus (ENUM)",
+ fieldDescription: "Whether the device is over or under its data limit"
+ }
+ ]
+ },
+ {
+ name: "DeviceSettings",
+ fields: [
+ {
+ fieldName: "deviceId",
+ fieldType: "int",
+ fieldDescription: "the id of the device"
+ },
+ {
+ fieldName: "name",
+ fieldType: "string",
+ fieldDescription: "The assigned name of the device"
+ },
+ {
+ fieldName: "description",
+ fieldType: "string",
+ fieldDescription: "The description of the device"
+ },
+ {
+ fieldName: "sleepType",
+ fieldType: "SleepType",
+ fieldDescription: "The type of sleep mode for the device"
+ },
+ {
+ fieldName: "sleepDurationS",
+ fieldType: "int",
+ fieldDescription: "The seconds to sleep for when triggered"
+ },
+ {
+ fieldName: "sleepDelayMs",
+ fieldType: "int",
+ fieldDescription: "How long to stay awake for in milliseconds before returning to sleep"
+ },
+ {
+ fieldName: "pondCheckPeriodS",
+ fieldType: "int",
+ fieldDescription: "The time in seconds to elapse before the device to checks in"
+ },
+ {
+ fieldName: "platform",
+ fieldType: "DevicePlatform (ENUM)",
+ fieldDescription: "The platform of the device that determines its firmware"
+ },
+ {
+ fieldName: "automaticallyUpgrade",
+ fieldType: "bool",
+ fieldDescription:
+ "Whether the device is set to automatically update its firmware when a new version is released"
+ },
+ {
+ fieldName: "product",
+ fieldType: "DeviceProduct (ENUM)",
+ fieldDescription: "The product type of the device"
+ },
+ {
+ fieldName: "upgradeChannel",
+ fieldType: "UpgradeChannel (ENUM)",
+ fieldDescription: "The channel used by the device to perform upgrades"
+ },
+ {
+ fieldName: "latitude",
+ fieldType: "float",
+ fieldDescription: "The latitude coordinate of the device"
+ },
+ {
+ fieldName: "longitude",
+ fieldType: "float",
+ fieldDescription: "The longitude coordinate of the device"
+ },
+ {
+ fieldName: "theme",
+ fieldType: "ObjectTheme",
+ fieldDescription: "The the visuals used to display"
+ },
+ {
+ fieldName: "extensionComponent",
+ fieldType: "string (ARRAY)",
+ fieldDescription: "May contain a list of component keys"
+ },
+ {
+ fieldName: "mutations",
+ fieldType: "LinearMutation (ARRAY)",
+ fieldDescription:
+ "Any mutations to perform using components attached to the device with their measurements and combining them to convert into other measurements using a linear regression formula"
+ }
+ ]
+ },
+ {
+ name: "DeviceStatus",
+ fields: [
+ {
+ fieldName: "power",
+ fieldType: "DevicePower",
+ fieldDescription: "The power state of the device"
+ },
+ {
+ fieldName: "state",
+ fieldType: "DeviceState (ENUM)",
+ fieldDescription: "The general state of the device"
+ },
+ {
+ fieldName: "synced",
+ fieldType: "bool",
+ fieldDescription: "Has the device synced"
+ },
+ {
+ fieldName: "lastSynced",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 format of when the device last synced"
+ },
+ {
+ fieldName: "sim",
+ fieldType: "string",
+ fieldDescription: "The id of the sim card for cellular devices"
+ },
+ {
+ fieldName: "cellularId",
+ fieldType: "string",
+ fieldDescription: "The unique identifier for cellular devices"
+ },
+ {
+ fieldName: "lastActive",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 format for when the device last checked in"
+ },
+ {
+ fieldName: "firwareVersion",
+ fieldType: "string",
+ fieldDescription: "Current version of firmware running on the device"
+ },
+ {
+ fieldName: "quackCount (deprecated as of v16)",
+ fieldType: "int",
+ fieldDescription:
+ "The count of number of times the device has sent a message, if this gets out of sync with the devices internal quack count there may be delays in measurements being reported."
+ },
+ {
+ fieldName: "address",
+ fieldType: "string",
+ fieldDescription: "The address of the device"
+ },
+ {
+ fieldName: "tagKeys",
+ fieldType: "string (ARRAY)",
+ fieldDescription: "List of tag keys"
+ },
+ {
+ fieldName: "tagNames",
+ fieldType: "sring (ARRAY)",
+ fieldDescription: "List of tag names"
+ },
+ {
+ fieldName: "paused",
+ fieldType: "bool",
+ fieldDescription: "Whether the device is paused or not"
+ },
+ {
+ fieldName: "lastChanged",
+ fieldType: "string",
+ fieldDescription:
+ "Timestamp in RFC3339 format for the last time changes were made to the device"
+ },
+ {
+ fieldName: "imei",
+ fieldType: "string",
+ fieldDescription: "The International Mobile Equipment Identity for cellular devices"
+ },
+ //dont have a full understanding of what this is
+ // {
+ // fieldName: "arkles",
+ // fieldType: "",
+ // fieldDescription: ""
+ // },
+ {
+ fieldName: "quackCountTx (v16+)",
+ fieldType: "int",
+ fieldDescription:
+ "The count of number of times the device has sent a message, if this gets out of sync with the devices internal count there may be delays in measurements being reported"
+ },
+ {
+ fieldName: "quackCountRx (v16+)",
+ fieldType: "int",
+ fieldDescription:
+ "The count of the number of times the device recieved a message, if this gets out of sync with the devices internal count there may be issues with device functionality"
+ },
+ {
+ fieldName: "userCost",
+ fieldType: "float",
+ fieldDescription:
+ "The estimated cost to the user of running the device based on data transfer rates from Hologram"
+ },
+ {
+ fieldName: "bytes",
+ fieldType: "int",
+ fieldDescription: "The amount od data in bytes the device has used for a period"
+ },
+ {
+ fieldName: "bytesTimestamp",
+ fieldType: "string",
+ fieldDescription:
+ "The Timestamp in RFC3339 format for when the used bytes for the device was last checked"
+ }
+ ]
+ },
+ {
+ name: "DevicePower",
+ fields: [
+ {
+ fieldName: "type",
+ fieldType: "PowerSubtype (ENUM)",
+ fieldDescription: "The type of power the device runs off of"
+ },
+ {
+ fieldName: "inputVoltage",
+ fieldType: "float",
+ fieldDescription: "the voltage the device is receiving"
+ },
+ {
+ fieldName: "chargePercent",
+ fieldType: "float",
+ fieldDescription: "The charge value of the device if it runs on a battery"
+ }
+ ]
+ },
+ {
+ name: "DeviceGeoJson",
+ fields: [
+ {
+ fieldName: "type",
+ fieldType: "string",
+ fieldDescription: "The type of GeoJson object, will most likely say 'Feature'"
+ },
+ {
+ fieldName: "geometry",
+ fieldType: "DeviceGeometry",
+ fieldDescription: "The geometry data of the device in GeoJson format"
+ },
+ {
+ fieldName: "properties",
+ fieldType: "DeviceProperties",
+ fieldDescription: "The properties of the device in GeoJson format"
+ }
+ ]
+ },
+ {
+ name: "DeviceGeometry",
+ fields: [
+ {
+ fieldName: "type",
+ fieldType: "string",
+ fieldDescription: "The GeoJson shape type"
+ },
+ {
+ fieldName: "coordinates",
+ fieldType: "float (ARRAY)",
+ fieldDescription: "The coordinates of the GeoJson object"
+ }
+ ]
+ },
+ {
+ name: "DeviceProperties",
+ fields: [
+ {
+ fieldName: "deviceId",
+ fieldType: "int",
+ fieldDescription: "The id of the device"
+ },
+ {
+ fieldName: "deviceName",
+ fieldType: "string",
+ fieldDescription: "The name of the device"
+ },
+ {
+ fieldName: "lastSynced",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 format of the last time the device synced"
+ },
+ {
+ fieldName: "lastActive",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 fomrat of the last time the device checked in"
+ },
+ {
+ fieldName: "firmwareVersion",
+ fieldType: "string",
+ fieldDescription: "The current firmware version of the device"
+ },
+ {
+ fieldName: "lastChanged",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 fomrat of the last time the device was modified"
+ }
+ ]
+ },
+ {
+ name: "DeviceHistory",
+ fields: [
+ {
+ fieldName: "device",
+ fieldType: "DeviceSettings",
+ fieldDescription: "Snapshot of the device settings before the current change"
+ },
+ {
+ fieldName: "user",
+ fieldType: "string",
+ fieldDescription: "The id of the user who made the change"
+ },
+ {
+ fieldName: "timestamp",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 format of when the change was made"
+ },
+ {
+ fieldName: "progress",
+ fieldType: "string",
+ fieldDescription: "Current progress of the change"
+ }
+ ]
+ }
+];
+
+const componentData: data[] = [
+ {
+ name: "ComponentID",
+ fields: [
+ {
+ fieldName: "type",
+ fieldType: "ComponentType (ENUM)",
+ fieldDescription: "The type of component"
+ },
+ {
+ fieldName: "addressType",
+ fieldType: "AddressType (ENUM)",
+ fieldDescription: "The type of address used by the component"
+ },
+ {
+ fieldName: "address",
+ fieldType: "int",
+ fieldDescription: "The byte address the component has on a device"
+ }
+ ]
+ },
+ {
+ name: "Component",
+ fields: [
+ {
+ fieldName: "settings",
+ fieldType: "ComponentSettings",
+ fieldDescription: "The settings of the component"
+ },
+ {
+ fieldName: "status",
+ fieldType: "ComponentStatus",
+ fieldDescription: "The status of the component"
+ },
+ {
+ fieldName: "lastMeasurement",
+ fieldType: "UnitMeasurementForComponent (ARRAY)",
+ fieldDescription: "The last measurement the component took"
+ },
+ {
+ fieldName: "permissions",
+ fieldType: "Permission (ARRAY)",
+ fieldDescription:
+ "The permission to the component based on the context of how it was loaded"
+ }
+ ]
+ },
+ {
+ name: "ComponentSettings",
+ fields: [
+ {
+ fieldName: "key",
+ fieldType: "string",
+ fieldDescription: "The unique key for the component"
+ },
+ {
+ fieldName: "type",
+ fieldType: "ComponentType (ENUM)",
+ fieldDescription: "The type of component"
+ },
+ {
+ fieldName: "subtype",
+ fieldType: "int",
+ fieldDescription: "the component subtype"
+ },
+ {
+ fieldName: "name",
+ fieldType: "string",
+ fieldDescription: "The name of the component"
+ },
+ {
+ fieldName: "reportPeriodMs",
+ fieldType: "int",
+ fieldDescription:
+ "The time in milliseconds before a components measurements are reported to the server"
+ },
+ {
+ fieldName: "measurementPeriodMs",
+ fieldType: "int",
+ fieldDescription:
+ "The time in milliseconds before a component takes a measurement that get stored internally on the device"
+ },
+ {
+ fieldName: "defaultOutputState",
+ fieldType: "int",
+ fieldDescription: "The default state for controller components (0 = auto, 1 = on, 2 = off)"
+ },
+ {
+ fieldName: "minCycleTimeMs",
+ fieldType: "int",
+ fieldDescription:
+ "The minimum time in milliseconds a controller must remain in its current state before changing again"
+ },
+ {
+ fieldName: "addressType",
+ fieldType: "AddressType",
+ fieldDescription: "The type of address the component uses"
+ },
+ {
+ fieldName: "address",
+ fieldType: "int",
+ fieldDescription: "The actual byte address of the component"
+ },
+ {
+ fieldName: "calibrate",
+ fieldType: "bool",
+ fieldDescription: "Whether to use values to calibrate measurements"
+ },
+ {
+ fieldName: "calibrationCoefficient",
+ fieldType: "float",
+ fieldDescription: "Coefficient used to calibrate measurements"
+ },
+ {
+ fieldName: "calibrationOffset",
+ fieldType: "float",
+ fieldDescription: "Offset used to calibrate measurements"
+ },
+ {
+ fieldName: "grainType",
+ fieldType: "Grain (ENUM)",
+ fieldDescription: "The grain type that is set for grain cable component types"
+ },
+ {
+ fieldName: "grainFilledTo",
+ fieldType: "int",
+ fieldDescription: "The node the grain is filled to on grain cables"
+ },
+ {
+ fieldName: "hasOverlays",
+ fieldType: "bool",
+ fieldDescription:
+ "Whether the overlays are turned on for displaying on the measurement graph"
+ },
+ {
+ fieldName: "overlays",
+ fieldType: "ComponentOverlays (ARRAY)",
+ fieldDescription: "The overlays that are displayed on the components measurement graphs"
+ },
+ {
+ fieldName: "defaultMutation",
+ fieldType: "Mutator (ENUM, ARRAY)",
+ fieldDescription:
+ "List of mutators set on the component to create more measurements, an example would be using the temp and humidity on grain cables to calculate EMC(Equalized Moisture Content) for the set grain type"
+ },
+ {
+ fieldName: "fanId",
+ fieldType: "int",
+ fieldDescription:
+ "The id that corresponds to our internal list of fans for pressure components to be able to calculate their cfm"
+ },
+ // {
+ // fieldName: "customCurve",
+ // fieldType: "",
+ // fieldDescription: ""
+ // },
+ {
+ fieldName: "smoothingAverages",
+ fieldType: "int",
+ fieldDescription:
+ "Number that can be used to average the stated number of measurements into a single measurement for display"
+ }
+ ]
+ },
+ {
+ name: "ComponentStatus",
+ fields: [
+ {
+ fieldName: "",
+ fieldType: "",
+ fieldDescription: ""
+ }
+ ]
+ },
+ {
+ name: "ComponentOverlays",
+ fields: [
+ {
+ fieldName: "lastUpdate",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 format for when the component was last updated"
+ },
+ {
+ fieldName: "synced",
+ fieldType: "bool",
+ fieldDescription: "Whether the component has successfully synced"
+ },
+ {
+ fieldName: "lastSynced",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 format for the last time the component synced"
+ },
+ {
+ fieldName: "lastMeasurement (Deprecated)",
+ fieldType: "Measurement (Deprecated)",
+ fieldDescription:
+ "Is the last measurement that the component took using the old structure we had for measurements"
+ },
+ {
+ fieldName: "measurement",
+ fieldType: "UnitMeasurementForComponent (ARRAY)",
+ fieldDescription:
+ "The the last measurement that the component took using the current structure for measurements"
+ },
+ {
+ fieldName: "lastGoodMeasurement",
+ fieldType: "UnitMeasurementForComponent (ARRAY)",
+ fieldDescription:
+ "The most recent measurement for a component that does not contain any errors"
+ }
+ ]
+ },
+ {
+ name: "ComponentHistory",
+ fields: [
+ {
+ fieldName: "Component",
+ fieldType: "ComponentSettings",
+ fieldDescription: "Snapshot of the settings before the change"
+ },
+ {
+ fieldName: "user",
+ fieldType: "string",
+ fieldDescription: "The id of the user who made the change"
+ },
+ {
+ fieldName: "timestamp",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 format for when the change occurred"
+ },
+ {
+ fieldName: "parentDevice",
+ fieldType: "string",
+ fieldDescription: "The device that the component belongs to"
+ },
+ {
+ fieldName: "progress",
+ fieldType: "string",
+ fieldDescription: "The current state of the change"
+ }
+ ]
+ }
+];
+
+const interactionData: data[] = [
+ {
+ name: "Interaction",
+ fields: [
+ {
+ fieldName: "settings",
+ fieldType: "InteractionSettings",
+ fieldDescription: "The setting for an interaction"
+ },
+ {
+ fieldName: "status",
+ fieldType: "InteractionStatus",
+ fieldDescription: "The status for an interaction"
+ }
+ ]
+ },
+ {
+ name: "InteractionSettings",
+ fields: [
+ {
+ fieldName: "key",
+ fieldType: "string",
+ fieldDescription: "The unique key for an interaction"
+ },
+ {
+ fieldName: "source",
+ fieldType: "ComponentID",
+ fieldDescription: "The id of the component that interaction uses for its conditions"
+ },
+ {
+ fieldName: "sink",
+ fieldType: "ComponentID",
+ fieldDescription:
+ "The id of the component that the interaction changes based on its conditions"
+ },
+ {
+ fieldName: "instance",
+ fieldType: "int",
+ fieldDescription: "The instance of the interaction"
+ },
+ {
+ fieldName: "conditions",
+ fieldType: "InteractionCondition (ARRAY)",
+ fieldDescription:
+ "Maximum of two conditions that BOTH must be met in order for an interaction to trigger"
+ },
+ {
+ fieldName: "result",
+ fieldType: "InteractionResult",
+ fieldDescription: "The result of triggering an interaction"
+ },
+ {
+ fieldName: "notifications",
+ fieldType: "InteractionNotifications",
+ fieldDescription: "The notifications to send when an interaction triggers"
+ },
+ {
+ fieldName: "schedule",
+ fieldType: "InteractionSchedule",
+ fieldDescription: "The schedule that the interaction will only trigger on specified times"
+ },
+ {
+ fieldName: "priority",
+ fieldType: "int",
+ fieldDescription: "The priority in relation to other interactions on the device"
+ },
+ {
+ fieldName: "subtype",
+ fieldType: "int",
+ fieldDescription: "The subtype of the interaction"
+ },
+ {
+ fieldName: "nodeOne",
+ fieldType: "int",
+ fieldDescription:
+ "For use when comparing nodes or using specific nodes this is the primary node"
+ },
+ {
+ fieldName: "nodeTwo",
+ fieldType: "int",
+ fieldDescription:
+ "For use when comparing two nodes this is only used to compare to node one"
+ },
+ {
+ fieldName: "sortPriority",
+ fieldType: "int",
+ fieldDescription: "The sorting priority in relation to other interaction"
+ }
+ ]
+ },
+ {
+ name: "InteractionStatus",
+ fields: [
+ {
+ fieldName: "lastUpdate",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 format for when it was last updated"
+ },
+ {
+ fieldName: "synced",
+ fieldType: "bool",
+ fieldDescription: "Whether it has synced yet"
+ },
+ {
+ fieldName: "lastSynced",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 format for when it was last synced"
+ }
+ ]
+ },
+ {
+ name: "InteractionCondition",
+ fields: [
+ {
+ fieldName: "measurementType",
+ fieldType: "MeasurementType (ENUM)",
+ fieldDescription: "The type of measurement for the condition"
+ },
+ {
+ fieldName: "comparison",
+ fieldType: "RelationalOperator (ENUM)",
+ fieldDescription: "The operator for the condition"
+ },
+ {
+ fieldName: "value",
+ fieldType: "int",
+ fieldDescription:
+ "The value for the condition. Note the value is stored using a coefficient to maintain the decimal value, see the value storage chart for each measurement types coefficient"
+ }
+ ]
+ },
+ {
+ name: "InteractionResult",
+ fields: [
+ {
+ fieldName: "type",
+ fieldType: "InteractionResultType (ENUM)",
+ fieldDescription: "The type of the interaction result"
+ },
+ {
+ fieldName: "value",
+ fieldType: "int",
+ fieldDescription:
+ "For Set or Toggle types a value of 1 is for on and 0 or nil is for off. For Report types the value will always be 1. For Run types the value represents how many seconds to run for"
+ },
+ {
+ fieldName: "mode",
+ fieldType: "int",
+ fieldDescription:
+ "When the interaction is for a motor control, the determines the direction 0 for clockwise and 1 for counter clockwise"
+ },
+ {
+ fieldName: "dutyCycle",
+ fieldType: "int",
+ fieldDescription:
+ "Only used for Run type interactions this is the cycle time between results"
+ }
+ ]
+ },
+ {
+ name: "InteractionNotifications",
+ fields: [
+ {
+ fieldName: "reports",
+ fieldType: "bool",
+ fieldDescription:
+ "When true the component will force the device to report whenever the sensor is within the interaction conditions"
+ },
+ {
+ fieldName: "notify",
+ fieldType: "bool",
+ fieldDescription: "When true will send notifications when the interaction triggers"
+ }
+ ]
+ },
+ {
+ name: "InteractionSchedule",
+ fields: [
+ {
+ fieldName: "weekdays",
+ fieldType: "string (ARRAY)",
+ fieldDescription: "The days of the week for the interaction to be able to trigger"
+ },
+ {
+ fieldName: "timeOfDayStart",
+ fieldType: "string",
+ fieldDescription:
+ "Time in RFC3339 format for the opening of the window for interactions for each day"
+ },
+ {
+ fieldName: "timeOfDayEnd",
+ fieldType: "string",
+ fieldDescription:
+ "Time in RFC3339 format for the closing of the window for interactions for each day"
+ },
+ {
+ fieldName: "timezone",
+ fieldType: "string",
+ fieldDescription: "Timezone to use for the schedule"
+ }
+ ]
+ }
+];
+
+const groupData: data[] = [
+ {
+ name: "Group",
+ fields: [
+ {
+ fieldName: "settings",
+ fieldType: "GroupSettings",
+ fieldDescription: "The settings for a group"
+ },
+ {
+ fieldName: "status",
+ fieldType: "GroupStatus",
+ fieldDescription: "The status for a group"
+ }
+ ]
+ },
+ {
+ name: "GroupSettings",
+ fields: [
+ {
+ fieldName: "groupId",
+ fieldType: "int",
+ fieldDescription: "The id of the group"
+ },
+ {
+ fieldName: "name",
+ fieldType: "string",
+ fieldDescription: "The name of the group"
+ },
+ {
+ fieldName: "description",
+ fieldType: "string",
+ fieldDescription: "Description of the group"
+ },
+ {
+ fieldName: "devices",
+ fieldType: "int (ARRAY)",
+ fieldDescription: "The ids of the devices that belong to the group"
+ },
+ {
+ fieldName: "longitude",
+ fieldType: "float",
+ fieldDescription: "The longitude coordinate of the group"
+ },
+ {
+ fieldName: "latitude",
+ fieldType: "float",
+ fieldDescription: "The latitude coordinate of the group"
+ },
+ {
+ fieldName: "theme",
+ fieldType: "ObjectTheme",
+ fieldDescription: "Theme information for display"
+ }
+ ]
+ },
+ {
+ name: "GroupStatus",
+ fields: [
+ {
+ fieldName: "lastActive",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 format of when the group was last active"
+ },
+ {
+ fieldName: "tagKeys",
+ fieldType: "sring (ARRAY)",
+ fieldDescription: "A list of keys for the tags attached to the group"
+ },
+ {
+ fieldName: "tagName",
+ fieldType: "string (ARRAY)",
+ fieldDescription: "A list of the names of tags attached to the group"
+ }
+ ]
+ }
+];
+
+const transactionData: data[] = [
+ {
+ name: "Transaction",
+ fields: [
+ {
+ fieldName: "fromObject",
+ fieldType: "ObjectType",
+ fieldDescription: `The type of object the inventory came from. For corrections (state = 2) that increased inventory and revoked correction (state = 4) this value will be nil or 0`
+ },
+ {
+ fieldName: "fromKey",
+ fieldType: "string",
+ fieldDescription:
+ "The key for the object the inventory came from. For corrections (state = 2) that increased inventory this value will be nil, for revoked correction (state = 4) this will be the key for the transaction that was revoked"
+ },
+ {
+ fieldName: "toObject",
+ fieldType: "ObjectType",
+ fieldDescription:
+ "The type of object the inventory moved to. For corrections (state = 2) that decreased the inventory this will be nil or 0"
+ },
+ {
+ fieldName: "toKey",
+ fieldType: "string",
+ fieldDescription:
+ "The key for the object the inventory moved to. For corrections (state = 2) that decreased the inventory this will be nil"
+ },
+ {
+ fieldName: "timestamp",
+ fieldType: "string",
+ fieldDescription: "Timestamp in RFC3339 format for when the transaction was created"
+ },
+ {
+ fieldName: "transaction",
+ fieldType: "TransactionData",
+ fieldDescription: "The data of the transaction"
+ },
+ {
+ fieldName: "state",
+ fieldType: "TransactionState",
+ fieldDescription: "The state of the transaction"
+ },
+ {
+ fieldName: "userId",
+ fieldType: "string",
+ fieldDescription: "The user who created the transaction"
+ },
+ {
+ fieldName: "key",
+ fieldType: "string",
+ fieldDescription: "The key of the transaction"
+ }
+ ]
+ },
+ {
+ name: "TransactionData", //once other transaction types are implemented explain that only one field will be populated at a time in the data
+ fields: [
+ {
+ fieldName: "grainTransaction",
+ fieldType: "GrainTransaction",
+ fieldDescription: "The information for a grain transaction"
+ }
+ // {
+ // fieldName: "fuelTransaction",
+ // fieldType: "FuelTransaction",
+ // fieldDescription: "The information for a fuel transaction"
+ // },
+ ]
+ },
+ {
+ name: "GrainTransaction",
+ fields: [
+ {
+ fieldName: "grainType",
+ fieldType: "Grain (ENUM)",
+ fieldDescription: "The type of grain"
+ },
+ {
+ fieldName: "customGrain",
+ fieldType: "string",
+ fieldDescription:
+ "If the object use a custom entered grain and not a supported grain type this will contain the name they entered"
+ },
+ {
+ fieldName: "subType",
+ fieldType: "string",
+ fieldDescription: "A variant of the grain retrieved from the objects"
+ },
+ {
+ fieldName: "bushels",
+ fieldType: "float",
+ fieldDescription: "The total amount of bushels adjusted"
+ },
+ {
+ fieldName: "message",
+ fieldType: "string",
+ fieldDescription: "A message entered by the user at the time of creating the transaction"
+ },
+ {
+ fieldName: "bushelsPerTonne",
+ fieldType: "float",
+ fieldDescription:
+ "The amount of bushels that make up a metric Tonne based on the grain type or for custom types is entered by the user"
+ },
+ {
+ fieldName: "sourceCompositionAdjustment",
+ fieldType: "map",
+ fieldDescription: "Record of how much grain came from each original source"
+ },
+ {
+ fieldName: "objectAdjustment",
+ fieldType: "map",
+ fieldDescription: "Record of how much grain came from each previous location"
+ }
+ ]
+ }
+];
+
+const generalData: data[] = [
+ {
+ name: "ObjectTheme",
+ fields: [
+ {
+ fieldName: "color",
+ fieldType: "string",
+ fieldDescription: "The color for different display purposes such as a marker on a map"
+ },
+ {
+ fieldName: "height",
+ fieldType: "int",
+ fieldDescription: "Number for the height of different display components"
+ },
+ {
+ fieldName: "width",
+ fieldType: "int",
+ fieldDescription: "Number for the width of different display components"
+ }
+ ]
+ },
+ // I dont know what a lot of the stuff in the session message in protobuf is
+ // {
+ // name: "Session",
+ // fields: [
+ // {
+ // fieldName: "",
+ // fieldType: "",
+ // fieldDescription: ""
+ // },
+ // ]
+ // },
+ // UnitMeasurementsForComponent
+ {
+ name: "UnitMeasurementsForComponent",
+ fields: [
+ {
+ fieldName: "componentId",
+ fieldType: "string",
+ fieldDescription: "the id of the component (type-addressType-address)"
+ },
+ {
+ fieldName: "values",
+ fieldType: "ValueArray (ARRAY)",
+ fieldDescription:
+ "List of measurements, each entry in the array corresponds to a measurement taken by the component that the position matches to the position in the timestamps array for when it was taken"
+ },
+ {
+ fieldName: "timestamps",
+ fieldType: "string (ARRAY)",
+ fieldDescription:
+ "List if Timestamps in RFC3339 format that correspond to a measurement being taken. The position in this array matches with the position in the values array for when that measurement was taken"
+ },
+ {
+ fieldName: "type",
+ fieldType: "MeasurementType (ENUM)",
+ fieldDescription: "The type of measurement"
+ },
+ {
+ fieldName: "componentType",
+ fieldType: "ComponentType (ENUM)",
+ fieldDescription: "The type of component"
+ }
+ ]
+ },
+ {
+ name: "UnitMeasurementsForObject",
+ fields: [
+ {
+ fieldName: "key",
+ fieldType: "string",
+ fieldDescription: "The key of the object the measurement is for"
+ },
+ {
+ fieldName: "objectType",
+ fieldType: "ObjectType",
+ fieldDescription: "The type of object the measurement is for"
+ },
+ {
+ fieldName: "values",
+ fieldType: "ValueArray (ARRAY)",
+ fieldDescription:
+ "List of measurements, each entry in the array corresponds to a measurement taken by the object. The position matches with the position in the timestamps array for when that measurement was taken"
+ },
+ {
+ fieldName: "timestamps",
+ fieldType: "string (ARRAY)",
+ fieldDescription:
+ "List if Timestamps in RFC3339 format that correspond to a measurement being taken. The position matches with the position in the values array for what that measurement was"
+ },
+ {
+ fieldName: "measurementType",
+ fieldType: "MeasurementType (ENUM)",
+ fieldDescription: "The type of the measurement"
+ }
+ ]
+ },
+ {
+ name: "ValueArray",
+ fields: [
+ {
+ fieldName: "values",
+ fieldType: "float (ARRAY)",
+ fieldDescription:
+ "The values for each node when a measurement was taken, sensors without nodes will still be an array but only have the one value"
+ },
+ {
+ fieldName: "error",
+ fieldType: "bool",
+ fieldDescription: "Whether there was an error in the measurement that was taken"
+ }
+ ]
+ },
+ {
+ name: "Location",
+ fields: [
+ {
+ fieldName: "longitude",
+ fieldType: "float",
+ fieldDescription: "The longitude coordinate point"
+ },
+ {
+ fieldName: "latitude",
+ fieldType: "float",
+ fieldDescription: "The latitude coordinate point"
+ }
+ ]
+ }
+];
+
+export default function GeneralDefinitions() {
+ return (
+
+
+ Component Definitions
+
+
+ {componentData.map((e, i) => (
+
+
+
+ ))}
+
+
+ Device Definitions
+
+
+ {deviceData.map((e, i) => (
+
+
+
+ ))}
+
+
+ Field Marker Definitions
+
+
+ {fieldMarkerData.map((e, i) => (
+
+
+
+ ))}
+
+
+ General Definitions
+
+
+ {generalData.map((e, i) => (
+
+
+
+ ))}
+
+
+ Group Definitions
+
+
+ {groupData.map((e, i) => (
+
+
+
+ ))}
+
+
+ Home Marker Definitions
+
+
+ {homeMarkerData.map((e, i) => (
+
+
+
+ ))}
+
+
+ Interaction Definitions
+
+
+ {interactionData.map((e, i) => (
+
+
+
+ ))}
+
+
+ Note Definitions
+
+
+ {noteData.map((e, i) => (
+
+
+
+ ))}
+
+
+ Notification Definitions
+
+
+ {notificationData.map((e, i) => (
+
+
+
+ ))}
+
+
+ Task Definitions
+
+
+ {taskData.map((e, i) => (
+
+
+
+ ))}
+
+
+ Transaction Definitions
+
+
+ {transactionData.map((e, i) => (
+
+
+
+ ))}
+
+
+ );
+}
diff --git a/src/apiDocs/definitions/miningDefinitions.tsx b/src/apiDocs/definitions/miningDefinitions.tsx
new file mode 100644
index 0000000..89f7431
--- /dev/null
+++ b/src/apiDocs/definitions/miningDefinitions.tsx
@@ -0,0 +1,205 @@
+import { Box, List, ListItem, Typography } from "@mui/material";
+import ObjectDefinitionDisplay, { data } from "./objectDefinitionDisplay";
+
+// mining definitions
+const mineData: data[] = [
+ {
+ name: "Mine",
+ fields: [
+ {
+ fieldName: "settings",
+ fieldType: "MineSettings",
+ fieldDescription: "The settings of the mine"
+ },
+ {
+ fieldName: "status",
+ fieldType: "MineStatus",
+ fieldDescription: "The status of the mine (contains no properties at this time)"
+ }
+ ]
+ },
+ {
+ name: "MineSettings",
+ fields: [
+ {
+ fieldName: "key",
+ fieldType: "string",
+ fieldDescription: "The key of the mine"
+ },
+ {
+ fieldName: "placeables",
+ fieldType: "Placeable (ARRAY)",
+ fieldDescription: "Placeable components of the mine"
+ },
+ {
+ fieldName: "devices",
+ fieldType: "int (ARRAY)",
+ fieldDescription: "The ids of devices that are part of the mine"
+ },
+ {
+ fieldName: "sensors",
+ fieldType: "MinSensor (ARRAY)",
+ fieldDescription: "Sensors within the mine"
+ },
+ {
+ fieldName: "name",
+ fieldType: "string",
+ fieldDescription: "The name of the mine"
+ }
+ ]
+ },
+ // there are no properties in the MineStatus definition of the protobuf
+ // {
+ // name: "MineStatus",
+ // fields: [
+ // {
+ // fieldName: "",
+ // fieldType: "",
+ // fieldDescription: ""
+ // },
+ // ]
+ // },
+ {
+ name: "MineSimple",
+ fields: [
+ {
+ fieldName: "key",
+ fieldType: "string",
+ fieldDescription: ""
+ },
+ {
+ fieldName: "name",
+ fieldType: "string",
+ fieldDescription: ""
+ }
+ ]
+ },
+ {
+ name: "Placeable",
+ fields: [
+ {
+ fieldName: "x",
+ fieldType: "float",
+ fieldDescription: "The x value on the canvas"
+ },
+ {
+ fieldName: "y",
+ fieldType: "float",
+ fieldDescription: "The y value on the canvas"
+ },
+ {
+ fieldName: "angle",
+ fieldType: "float",
+ fieldDescription:
+ "The angle to rotate the image, or for corner vents the angle of the curve"
+ },
+ {
+ fieldName: "width",
+ fieldType: "float",
+ fieldDescription: "The width of the image"
+ },
+ {
+ fieldName: "radius",
+ fieldType: "float",
+ fieldDescription: "The radius of the image"
+ },
+ {
+ fieldName: "magnitude",
+ fieldType: "float",
+ fieldDescription: "General measurement for different placeables. Length of vent for example"
+ },
+ {
+ fieldName: "direction",
+ fieldType: "int",
+ fieldDescription: "The direction the placeable is facing"
+ },
+ {
+ fieldName: "type",
+ fieldType: "PlaceableType",
+ fieldDescription: "The type of placeable"
+ },
+ {
+ fieldName: "subtype",
+ fieldType: "int",
+ fieldDescription: "The subtype of the placeable"
+ }
+ ]
+ },
+ {
+ name: "MineComponentPreferences",
+ fields: [
+ {
+ fieldName: "sensors",
+ fieldType: "MineSensorPreferences (ARRAY)",
+ fieldDescription: "Assigned preferences for the sensors in relation to the mine"
+ }
+ ]
+ },
+ {
+ name: "MineSensorPreferences",
+ fields: [
+ {
+ fieldName: "enabled",
+ fieldType: "bool",
+ fieldDescription: "If the sensor is currently enabled"
+ },
+ {
+ fieldName: "x",
+ fieldType: "float",
+ fieldDescription: "The x position on the canvas"
+ },
+ {
+ fieldName: "y",
+ fieldType: "float",
+ fieldDescription: "The y position on the canvas"
+ },
+ {
+ fieldName: "nickname",
+ fieldType: "string",
+ fieldDescription: "Nickname given to the sensor"
+ }
+ ]
+ },
+ {
+ name: "MineSensor",
+ fields: [
+ {
+ fieldName: "x",
+ fieldType: "float",
+ fieldDescription: "The x position on the canvas"
+ },
+ {
+ fieldName: "y",
+ fieldType: "float",
+ fieldDescription: "The y position on the canvas"
+ },
+ {
+ fieldName: "componentKey",
+ fieldType: "string",
+ fieldDescription: "The key of the component"
+ },
+ {
+ fieldName: "index",
+ fieldType: "int",
+ fieldDescription: "The index of the component"
+ }
+ ]
+ }
+];
+
+export default function MiningDefinitions() {
+ return (
+
+
+ Mine Definitions
+
+
+ {mineData.map((e, i) => (
+
+
+
+ ))}
+
+
+ );
+}
diff --git a/src/apiDocs/definitions/objectDefinitionDisplay.tsx b/src/apiDocs/definitions/objectDefinitionDisplay.tsx
new file mode 100644
index 0000000..185a9e3
--- /dev/null
+++ b/src/apiDocs/definitions/objectDefinitionDisplay.tsx
@@ -0,0 +1,116 @@
+import {
+ Box,
+ darken,
+ Grid2 as Grid,
+ Table,
+ TableBody,
+ TableCell,
+ TableHead,
+ TableRow,
+ Theme,
+ Typography
+} from "@mui/material";
+import { makeStyles } from "@mui/styles";
+import { getThemeType } from "theme";
+
+export interface FieldInformation {
+ fieldName: string;
+ fieldType: string;
+ fieldDescription: string;
+}
+
+export interface data {
+ name: string;
+ fields: FieldInformation[];
+}
+
+interface Props {
+ data: data;
+}
+
+const useStyles = makeStyles((theme: Theme) => ({
+ cellNarrow: {
+ width: "20%",
+ padding: 5
+ },
+ cellWide: {
+ width: "80%",
+ padding: 5
+ },
+ dark: {
+ backgroundColor: getThemeType() === "light" ? "rgb(245, 245, 245)" : "rgb(50, 50, 50)",
+ padding: 0
+ },
+ light: {
+ backgroundColor: getThemeType() === "light" ? "rgb(235, 235, 235)" : "rgb(60, 60, 60)",
+ padding: 0
+ },
+ container: {
+ width: "100%",
+ border: "2px solid white",
+ padding: 5,
+ borderRadius: 10
+ },
+ table: {
+ width: "100%"
+ },
+ header: {
+ fontWeight: 650,
+ fontSize: 20
+ },
+ tableHeader: {
+ fontSize: 17,
+ fontWeight: 650
+ },
+ tableData: {
+ fontSize: 17
+ },
+ subHeader: {
+ fontSize: 14,
+ color: darken(theme.palette.text.primary, 0.3)
+ }
+ })
+);
+
+export default function ObjectDefinitionDisplay(props: Props) {
+ const { data } = props;
+ const classes = useStyles();
+ return (
+
+ {data.name}
+
+