diff --git a/src/apiDocs/definitions.tsx b/src/apiDocs/definitions.tsx
new file mode 100644
index 0000000..e60e73b
--- /dev/null
+++ b/src/apiDocs/definitions.tsx
@@ -0,0 +1,64 @@
+import { Tab, Tabs } from "@mui/material";
+// import { TabContext, TabPanel } from "@material-ui/lab";
+import React, { useState } from "react";
+import AgricultureDefinitions from "./definitions/agricultureDefinitions";
+import AviationDefinitions from "./definitions/aviationDefinitions";
+import ConstructionDefinitions from "./definitions/constructionDefinitions";
+import GeneralDefinitions from "./definitions/generalDefinitions";
+import MiningDefinitions from "./definitions/miningDefinitions";
+
+interface TabPanelProps {
+ children?: React.ReactNode;
+ index: any;
+ value: any;
+}
+
+function TabPanelMine(props: TabPanelProps) {
+ const { children, value, index, ...other } = props;
+
+ return (
+
+ {value === index && {children}}
+
+ );
+}
+
+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}
+
+
+
+
+
+ Field Names
+
+
+ Description
+
+
+
+
+ {data.fields.map((field, i) => (
+
+
+
+
+ {field.fieldName}
+
+
+ {field.fieldType}
+
+
+
+
+ {field.fieldDescription}
+
+
+ ))}
+
+
+
+
+ );
+}
diff --git a/src/apiDocs/endpoints.tsx b/src/apiDocs/endpoints.tsx
new file mode 100644
index 0000000..344b63d
--- /dev/null
+++ b/src/apiDocs/endpoints.tsx
@@ -0,0 +1,65 @@
+import { Tab, Tabs } from "@mui/material";
+import { useEffect, useState } from "react";
+//import { TabContext, TabPanel } from "@material-ui/lab";
+import GeneralEndpoints from "apiDocs/endpoints/generalEndpoints";
+import AviationEndpoints from "apiDocs/endpoints/aviationEndpoints";
+import AgricultureEndpoints from "apiDocs/endpoints/agricultureEndpoints";
+import MiningEndpoints from "apiDocs/endpoints/miningEndpoints";
+import ConstructionEndpoints from "apiDocs/endpoints/constructionEndpoints";
+import React from "react";
+
+interface TabPanelProps {
+ children?: React.ReactNode;
+ index: any;
+ value: any;
+}
+
+function TabPanelMine(props: TabPanelProps) {
+ const { children, value, index, ...other } = props;
+
+ return (
+
+ {value === index && {children}}
+
+ );
+}
+
+export default function Endpoints() {
+ const [currentTab, setCurrentTab] = useState("general");
+
+ return (
+ <>
+ setCurrentTab(value)}
+ indicatorColor="primary"
+ textColor="primary"
+ variant="fullWidth">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
+ );
+}
diff --git a/src/apiDocs/endpoints/agricultureEndpoints.tsx b/src/apiDocs/endpoints/agricultureEndpoints.tsx
new file mode 100644
index 0000000..cde2be0
--- /dev/null
+++ b/src/apiDocs/endpoints/agricultureEndpoints.tsx
@@ -0,0 +1,500 @@
+import { Box, List, ListItem, Typography } from "@mui/material";
+import EndpointDisplay, { EndPointData } from "apiDocs/endpoints/endpointDisplay";
+import React from "react";
+
+/**
+ * endpoint template
+ {
+ requestType: "",
+ url: "https://api.brandxtech.ca/v1/",
+ description: "",
+ urlOptions: [],
+ urlParams: [],
+ requestBody: "",
+ responseParams: []
+ },
+ */
+
+export default function AgricultureEndpoints() {
+ //note any requests that are not a get are commented out as our backend only allows get requests through the API for the moment
+ //if you are here to put the other requests types into the api docs make sure to finish the documentation for each endpoint
+
+ const fieldEndpoints: EndPointData[] = [
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/fields",
+ description: "get a list of fields",
+ urlOptions: [
+ "limit - the number to load",
+ "offset - how many to skip over before starting to load",
+ "order - the sort order",
+ "by - what to sort by in the data",
+ "search - a string to search for a match in the data"
+ ],
+ responseParams: ["repeated Field fields", "uint32 next_offset", "uint32 total"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/field/:field",
+ description: "get a specified field",
+ urlParams: [":field - the key of the field"],
+ responseParams: [
+ "FieldSettings settings",
+ "FieldStatus status",
+ "repeated Permission field_permissions"
+ ]
+ }
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/fields/:field",
+ // description: "add a new field",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "PUT",
+ // url: "https://api.brandxtech.ca/v1/fields/:field",
+ // description: "update an existing field",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "DEL",
+ // url: "https://api.brandxtech.ca/v1/fields/:field",
+ // description: "remove an existing field",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ ];
+ const binEndpoints: EndPointData[] = [
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/bins",
+ description: "get a list of bins",
+ urlOptions: [
+ "limit - the number to load",
+ "offset - how many to skip over before starting to load",
+ "order - the sort order",
+ "by - what to sort by in the data",
+ "search - a string to search for a match in the data"
+ ],
+ responseParams: ["repeated Bin bins", "uint32 next_offset", "uint32 total"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/binsAndData",
+ description: "list bins and their metrics",
+ urlOptions: [
+ "limit - the number to load",
+ "offset - how many to skip over before starting to load",
+ "order - the sort order",
+ "by - what to sort by in the data",
+ "search - a string to search for a match in the data"
+ ],
+ responseParams: [
+ "repeated Bin bins",
+ "repeated BinYard bin_yards",
+ "BinMetrics metrics",
+ "uint32 next_offset",
+ "uint32 total",
+ "repeated GrainBag bags"
+ ]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/bins/:bin",
+ description: "gets a specified bin",
+ urlParams: [":bin - the key of the bin"],
+ responseParams: [
+ "BinSettings settings",
+ "BinStatus status",
+ "repeated Permission bin_permissions"
+ ]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/bins/:bin/components",
+ description: "list the components linked to a bin",
+ urlParams: [":bin - the key of the bin"],
+ responseParams: ["repeated Component components", "map component_devices"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/bins/:bin/components/measurements",
+ description: "get the measurements for components attached to a bin over a set interval",
+ urlOptions: ["start - RFC3339 formatted timestamp", "end - RFC3339 formatted timestamp"],
+ urlParams: [":bin - the key of the bin"],
+ responseParams: ["repeated UnitMeasurementsForComponent measurements"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/bins/:bin/history",
+ description: "get the history of changes to a bin",
+ urlOptions: [
+ "limit - the number of records to retrieve",
+ "offset - the number of records to skip over before startgin retrieval"
+ ],
+ urlParams: [":bin - the key of the bin"],
+ responseParams: ["repeated BinHistory history", "uint32 next_offset", "uint32 total"]
+ }
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/bins",
+ // description: "add a new bin",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/bins/:bin/addComponent/:device/:component",
+ // description: "attach an existing component on a device to a bin",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/bins/:bin/removeComponent/:device/:component",
+ // description: "",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/bins/:bin/removeAllComponents",
+ // description: "removes all attached components from a bin",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/bins/:bin/updateTopNodes",
+ // description: "updates the top nodes of cable components ttached to a bin",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "PUT",
+ // url: "https://api.brandxtech.ca/v1/bins/:bin",
+ // description: "update a bin",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "DEL",
+ // url: "https://api.brandxtech.ca/v1/bins/:bin",
+ // description: "removes an existing bin",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ ];
+ const binYardEndpoints: EndPointData[] = [
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/binYards",
+ description: "get a list of bin yards",
+ urlOptions: [
+ "limit - the number to load",
+ "offset - how many to skip over before starting to load",
+ "order - the sort order",
+ "by - what to sort by in the data",
+ "search - a string to search for a match in the data"
+ ],
+ responseParams: ["repeated BinYard yard", "uint32 next_offset", "uint32 total"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/binYards/:binYard",
+ description: "get a specific bin yard",
+ urlParams: [":binYard - the key for the yard"],
+ responseParams: ["BinYard yard"]
+ }
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/binYards",
+ // description: "add a new bin yard",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "PUT",
+ // url: "https://api.brandxtech.ca/v1/binyards/:binyard",
+ // description: "update an existing binyard",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "DEL",
+ // url: "https://api.brandxtech.ca/v1/binyards/:binyard",
+ // description: "delete an existing bin yard",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ ];
+ const harvestPlanEndpoints: EndPointData[] = [
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/harvestplans",
+ description: "get a list of harvest plans",
+ urlOptions: [
+ "limit - the number to load",
+ "offset - how many to skip over before starting to load",
+ "order - the sort order",
+ "by - what to sort by in the data",
+ "search - a string to search for a match in the data"
+ ],
+ responseParams: ["repeated HarvestPlan harvest_plan", "uint32 next_offset", "uint32 total"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/harvestplans/:harvestplan",
+ description: "get a specified harvest plan",
+ urlParams: [":harvestplan - the key of the harvest plan"],
+ responseParams: [
+ "HarvestPlanSettings settings",
+ "HarvestPlanStatus status",
+ "repeated Permission plan_permissions"
+ ]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/harvestplans/:harvestplan/history",
+ description: "get a history of changes to the harvest plan",
+ urlOptions: [
+ "limit - the number to load",
+ "offset - the number to pass over before starting to load"
+ ],
+ urlParams: [":harvestplan - the key of the harvest plan"],
+ responseParams: ["repeated HarvestPlanHistory history", "uint32 next_offset", "uint32 total"]
+ }
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/harvestplans",
+ // description: "create a new harvest plan",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ ];
+ const contractEndpoints: EndPointData[] = [
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/contracts",
+ description: "get a list of contracts",
+ urlOptions: [
+ "limit - the number to load",
+ "offset - how many to skip over before starting to load",
+ "order - the sort order",
+ "by - what to sort by in the data",
+ "search - a string to search for a match in the data"
+ ],
+ responseParams: ["repeated Contract contracts", "uint32 next_offset", "uint32 total"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/contracts/:contract",
+ description: "get a specified contract",
+ urlParams: [":contract - the key of the contract"],
+ responseParams: ["Contract contract"]
+ },
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/contracts",
+ // description: "add a new contract",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "PUT",
+ // url: "https://api.brandxtech.ca/v1/contracts/:contract",
+ // description: "update an existing contract",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "DEL",
+ // url: "https://api.brandxtech.ca/v1/contracts/:contract",
+ // description: "remove an existing contract",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/contractsbyyear",
+ description: "get a list of contracts for a specified year",
+ urlOptions: [
+ "limit - the number to load",
+ "offset - how many to skip over before starting to load",
+ "order - the sort order",
+ "by - what to sort by in the data",
+ "search - a string to search for a match in the data",
+ "year - the year for the contracts"
+ ],
+ responseParams: [
+ "repeated Contract contracts",
+ "uint32 next_offset",
+ "uint32 total",
+ "map contract_permissions"
+ ]
+ }
+ ];
+ const grainBagEndpoints: EndPointData[] = [
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/grainbags",
+ description: "get a list of grainbags",
+ urlOptions: [
+ "limit - the number to load",
+ "offset - how many to skip over before starting to load",
+ "order - the sort order",
+ "by - what to sort by in the data",
+ "search - a string to search for a match in the data"
+ ],
+ responseParams: ["repeated GrainBag grain_bags", "uint32 next_offset", "uint32 total"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/grainbags/:grainbag",
+ description: "get a specified grainbag",
+ urlParams: [":grainbag - the key of the grain bag"],
+ responseParams: ["GrainBag grain_bag"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/grainbags/:grainbag/history",
+ description: "get the history of changes to a grain bag",
+ urlOptions: [
+ "limit - the number of records to load",
+ "offset - the number of records to skip over before starting to load",
+ "start - RFC3339 formatted timestamp",
+ "end - RFC3339 formatted timestamp"
+ ],
+ urlParams: [":grainbag - the key of the grainbag"],
+ responseParams: ["repeated ObjectHistory history", "uint32 next_offset", "uint32 total"]
+ }
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/grainbags",
+ // description: "add a new grain bag",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "PUT",
+ // url: "https://api.brandxtech.ca/v1/grainbags/:grainbag",
+ // description: "update an existing grain bag",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "DEL",
+ // url: "https://api.brandxtech.ca/v1/grainbags/:grainbag",
+ // description: "delete an existing grain bag",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ ];
+
+ return (
+
+
+ Endpoints for retrieving field data
+
+
+ {fieldEndpoints.map((e, i) => (
+
+
+
+ ))}
+
+
+ Endpoints for retrieving bin data
+
+
+ {binEndpoints.map((e, i) => (
+
+
+
+ ))}
+
+
+ Endpoints for retrieving bin yard data
+
+
+ {binYardEndpoints.map((e, i) => (
+
+
+
+ ))}
+
+
+ Endpoints for retrieving harvest plan data
+
+
+ {harvestPlanEndpoints.map((e, i) => (
+
+
+
+ ))}
+
+
+ Endpoints for retrieving contract data
+
+
+ {contractEndpoints.map((e, i) => (
+
+
+
+ ))}
+
+
+ Endpoints for retrieving grain bag data
+
+
+ {grainBagEndpoints.map((e, i) => (
+
+
+
+ ))}
+
+
+ );
+}
diff --git a/src/apiDocs/endpoints/aviationEndpoints.tsx b/src/apiDocs/endpoints/aviationEndpoints.tsx
new file mode 100644
index 0000000..5678ad3
--- /dev/null
+++ b/src/apiDocs/endpoints/aviationEndpoints.tsx
@@ -0,0 +1,179 @@
+import { Box, List, ListItem, Typography } from "@mui/material";
+import EndpointDisplay, { EndPointData } from "apiDocs/endpoints/endpointDisplay";
+import React from "react";
+
+/**
+ {
+ requestType: "",
+ url: "https://api.brandxtech.ca/v1/",
+ description: "",
+ urlOptions: [],
+ urlParams: [],
+ requestBody: "",
+ responseParams: []
+ },
+ */
+
+export default function AviationEndpoints() {
+ //note any requests that are not a get are commented out as our backend only allows get requests through the API for the moment
+ //if you are here to put the other requests types into the api docs make sure to finish the documentation for each endpoint
+
+ const terminalEndpoints: EndPointData[] = [
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/terminals",
+ description: "gets a list of terminals",
+ urlOptions: [
+ "limit - the number of terminals to load",
+ "offset - the number of terminals to skip over before loading",
+ "order - the sort order",
+ "by - what to sort by in the terminals settings",
+ "search - a string to search the terminals settings and return matches"
+ ],
+ requestBody: "",
+ responseParams: ["repeated Terminal terminals", "uint32 next_offset", "uint32 total"]
+ }
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/terminals",
+ // description: "add a new terminal",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "PUT",
+ // url: "https://api.brandxtech.ca/v1/terminals/:terminal",
+ // description: "update an existing terminal",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "DEL",
+ // url: "https://api.brandxtech.ca/v1/terminals/:terminal",
+ // description: "remove an existing terminal",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ ];
+ const gateEndpoints: EndPointData[] = [
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/gates",
+ description: "gets list of gates",
+ urlOptions: [
+ "limit - the number of gates to load",
+ "offset - the number of gates to skip before starting to load",
+ "order - the sort order",
+ "by - what to sort by in the gate settings",
+ "search - a string to search the gate settings for and "
+ ],
+ responseParams: ["repeated Gate gates", "uint32 next_offset", "uint32 total"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/gates/:gate/measurements",
+ description: "get the measurements for the components linked to the gate",
+ urlOptions: ["start - RFC3339 formatted timestamp", "end - RFC3339 formatted timestamp"],
+ urlParams: [":gate - the key of the gate"],
+ responseParams: ["repeated UnitMeasurementsForComponent measurements"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/gates/:gate",
+ description: "get a specified gate",
+ urlParams: [":gate - the key of the gate"],
+ responseParams: ["Gate gate"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/gates/:gate/airflow",
+ description: "get the estimated mass airflow of the gate",
+ urlOptions: [
+ "device - the id of the device",
+ "ambient - the key of the component assigned to ambient temp",
+ "pressure - the key of the component assigned to pressure",
+ "start - RFC3339 formatted timestamp for the start of the measurement window",
+ "start - RFC3339 formatted timestamp for the end of the measurement window"
+ ],
+ urlParams: [":gate - the key of the gate"],
+ responseParams: ["repeated FlowAt values"]
+ }
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/gates",
+ // description: "add a new gate",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // may restrict this one as it effectively changes permissions a gate has to a device
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/gates/:gate/link",
+ // description: "update the devices linked to the gate",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "PUT",
+ // url: "https://api.brandxtech.ca/v1/gates/:gate",
+ // description: "update an existing gates settings",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "PUT",
+ // url: "https://api.brandxtech.ca/v1/gatePrefs/:gate",
+ // description: "update the preferences of an existing gate",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "DEL",
+ // url: "https://api.brandxtech.ca/v1/gates/:gate",
+ // description: "delete an existing gate",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ ];
+
+ return (
+
+
+ Endpoints for retrieving terminal data
+
+
+ {terminalEndpoints.map((e, i) => (
+
+
+
+ ))}
+
+
+ Endpoints for retrieving gate data
+
+
+ {gateEndpoints.map((e, i) => (
+
+
+
+ ))}
+
+
+ );
+}
diff --git a/src/apiDocs/endpoints/constructionEndpoints.tsx b/src/apiDocs/endpoints/constructionEndpoints.tsx
new file mode 100644
index 0000000..f758a1a
--- /dev/null
+++ b/src/apiDocs/endpoints/constructionEndpoints.tsx
@@ -0,0 +1,161 @@
+import { Box, List, ListItem, Typography } from "@mui/material";
+import EndpointDisplay, { EndPointData } from "apiDocs/endpoints/endpointDisplay";
+import React from "react";
+
+/**
+ * endpoint template
+ {
+ requestType: "",
+ url: "https://api.brandxtech.ca/v1/",
+ description: "",
+ urlOptions: [],
+ urlParams: [],
+ requestBody: "",
+ responseParams: []
+ },
+ */
+
+export default function ConstructionEndpoints() {
+ const jobsiteEndpoints: EndPointData[] = [
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/sites",
+ description: "get a list of jobsites",
+ urlOptions: [
+ "limit - the number to load",
+ "offset - how many to skip over before starting to load",
+ "order - the sort order",
+ "by - what to sort by in the data",
+ "search - a string to search for a match in the data"
+ ],
+ responseParams: ["repeated Site sites", "uint32 next_offset", "uint32 total"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/sites/:site",
+ description: "get a specific site",
+ urlParams: [":site - the key of the site"],
+ responseParams: ["SiteSettings settings", "SiteStatus status"]
+ }
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/sites",
+ // description: "add a new jobsite",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/sites/:site/link",
+ // description: "update the devices linked to a site",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "PUT",
+ // url: "https://api.brandxtech.ca/v1/sites/:site",
+ // description: "update an existing jobsite",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "DEL",
+ // url: "https://api.brandxtech.ca/v1/sites/:site",
+ // description: "",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ ];
+ const heaterEndpoints: EndPointData[] = [
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/objectHeaters",
+ description:
+ "get a list of heater objects, note these are different than the heater components on a device",
+ urlOptions: [
+ "limit - the number to load",
+ "offset - how many to skip over before starting to load",
+ "order - the sort order",
+ "by - what to sort by in the data",
+ "search - a string to search for a match in the data"
+ ],
+ responseParams: ["repeated ObjectHeater heaters", "uint32 next_offset", "uint32 total"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/objectHeaters/:objectHeater",
+ description:
+ "get a specific object heater, not this is different than a heater component on a device",
+ urlParams: [":objectHeater - the key of the heater object"],
+ responseParams: ["ObjectHeater heater"]
+ }
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/objectHeaters",
+ // description: "add a new heater object",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/objectHeaters/:objectHeater/link",
+ // description: "update the device connected to the heater",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "PUT",
+ // url: "https://api.brandxtech.ca/v1/objectHeaters/:objectHeater",
+ // description: "update an existing heater",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "DEL",
+ // url: "https://api.brandxtech.ca/v1/objectHeaters/:objectHeater",
+ // description: "delete an existing heater",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ ];
+ return (
+
+
+ Endpoints for retrieving jobsite data
+
+
+ {jobsiteEndpoints.map((e, i) => (
+
+
+
+ ))}
+
+
+ Endpoints for retrieving heater data
+
+
+ {heaterEndpoints.map((e, i) => (
+
+
+
+ ))}
+
+
+ );
+}
diff --git a/src/apiDocs/endpoints/endpointDisplay.tsx b/src/apiDocs/endpoints/endpointDisplay.tsx
new file mode 100644
index 0000000..0671993
--- /dev/null
+++ b/src/apiDocs/endpoints/endpointDisplay.tsx
@@ -0,0 +1,83 @@
+import { Box, Grid2 as Grid, List, ListItem, Typography } from "@mui/material";
+import React from "react";
+
+export interface EndPointData {
+ requestType: "GET" | "POST" | "PUT" | "DEL";
+ url: string;
+ description: string;
+ urlParams?: string[];
+ urlOptions?: string[];
+ requestBody?: string;
+ responseParams?: string[];
+}
+
+interface Props {
+ endpoint: EndPointData;
+}
+
+export default function EndpointDisplay(props: Props) {
+ const { endpoint } = props;
+ return (
+
+
+
+
+ {endpoint.requestType} {endpoint.url}
+
+ {endpoint.description}
+
+
+
+ Request
+
+
+
+
+ Response
+
+
+
+ {endpoint.urlParams && (
+
+ URL Parameters
+
+ {endpoint.urlParams.map((param, i) => (
+ {param}
+ ))}
+
+
+ )}
+ {endpoint.urlOptions && (
+
+ URL Options
+
+ {endpoint.urlOptions.map((op, i) => (
+ {op}
+ ))}
+
+
+ )}
+ {endpoint.requestBody && (
+
+ Request Body
+
+ {endpoint.requestBody}
+
+
+ )}
+
+
+ {"{"}
+ {endpoint.responseParams && (
+
+ {endpoint.responseParams.map((op, i) => (
+ {op}
+ ))}
+
+ )}
+ {"}"}
+
+
+
+ );
+}
diff --git a/src/apiDocs/endpoints/generalEndpoints.tsx b/src/apiDocs/endpoints/generalEndpoints.tsx
new file mode 100644
index 0000000..693c27f
--- /dev/null
+++ b/src/apiDocs/endpoints/generalEndpoints.tsx
@@ -0,0 +1,839 @@
+import { Box, List, ListItem, Typography } from "@mui/material";
+import EndpointDisplay, { EndPointData } from "apiDocs/endpoints/endpointDisplay";
+
+const genericListOptions = [
+ "limit - the number to load",
+ "offset - how many to skip over before starting to load",
+ "order - the sort order",
+ "by - what to sort by in the data",
+ "search - a string to search the data for a match"
+];
+
+export default function GeneralEndpoints() {
+ //all of the endpoint that are not a get are commented out for now as users with the api keys can only hit get endpoints
+ const apiKeys: EndPointData[] = [
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/teams/:team/apiKeys",
+ description: "gets all of the api keys associated with a team",
+ urlParams: [":team - the unique id for a team"],
+ responseParams: ["repeated string keys"]
+ }
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/teams/:team/apiKeys",
+ // description: "add a new api key for the team",
+ // urlParams: [":team - the unique id for a team"],
+ // responseParams: ["string key"]
+ // },
+ // {
+ // requestType: "DEL",
+ // url: "https://api.brandxtech.ca/v1/teams/:team/apiKeys",
+ // description: "add a new api key for the team",
+ // urlParams: [":team - the unique id for a team"],
+ // urlOptions: ["key - the api key to remove"]
+ // }
+ ];
+ const notifications: EndPointData[] = [
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/notifications",
+ description: "gets a list of notifications",
+ urlOptions: [
+ "limit - the number to load",
+ "offset - how many to skip over before starting to load",
+ "order - the sort order",
+ "by - what to sort by in the data",
+ "search - a string to search the data for a match"
+ ],
+ responseParams: ["repeated Notification notifications", "uint32 nextOffset", "uint32 total"]
+ }
+ ];
+ const notes: EndPointData[] = [
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/notes",
+ description: "gets a list of notes",
+ urlOptions: [
+ "limit - the number to load",
+ "offset - how many to skip over before starting to load",
+ "order - the sort order",
+ "by - what to sort by in the data",
+ "search - a string to search the data for a match"
+ ],
+ responseParams: ["repeated Note notes", "uint32 nextOffset", "uint32 total"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/note/:note",
+ description: "gets a list of notes",
+ urlParams: [":note - the key of the note"],
+ responseParams: ["NoteSettings settings", "NoteStatus status"]
+ }
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/notes",
+ // description: "adds a new note",
+ // requestBody: "NoteSettings",
+ // responseParams: ["string note"]
+ // },
+ // {
+ // requestType: "PUT",
+ // url: "https://api.brandxtech.ca/v1/notes",
+ // description: "updates an existing note",
+ // requestBody: "NoteSettings"
+ // },
+ // {
+ // requestType: "DEL",
+ // url: "https://api.brandxtech.ca/v1/notes/:note",
+ // description: "deletes a note",
+ // urlParams: [":note - the key of the note"]
+ // }
+ ];
+ const mapMarkers: EndPointData[] = [
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/homeMarkers",
+ description: "get the home markers set for a team",
+ urlOptions: genericListOptions,
+ urlParams: [],
+ requestBody: "",
+ responseParams: ["repeated HomeMarker homeMarker", "uint32 nextOffset", "uint32 total"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/homeMarkers/:homeMarker",
+ description: "Get a specific Home Marker based on the key",
+ urlParams: [":homeMarker - the key of the home marker"],
+ responseParams: ["HomeMarkerSettings settings", "HomeMarkerStatus status"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/fieldMarkers",
+ description: "list all field markers",
+ urlOptions: genericListOptions,
+ responseParams: ["repeated FieldMarker fieldMarker", "uint32 nextOffset", "uint32 total"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/fieldMarkers/:fieldMarker",
+ description: "get a specified field marker",
+ urlParams: [":fieldMarker - the key of the field marker"],
+ responseParams: ["FieldMarkerSettings settings", "FieldMarkerStatus status"]
+ }
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/homeMarkers",
+ // description: "add a new home marker",
+ // requestBody: "HomeMarkerSettings",
+ // responseParams: ["string homeMarker"]
+ // },
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/fieldMarkers",
+ // description: "add a new field marker",
+ // requestBody: "FieldMarkerSettings",
+ // responseParams: ["string fieldMarker"]
+ // },
+ // {
+ // requestType: "PUT",
+ // url: "https://api.brandxtech.ca/v1/homeMarkers/:homeMarker",
+ // description: "update an existing home marker",
+ // urlOptions: [":homeMarker - the key for the marker"],
+ // urlParams: ["HomeMarkerSettings"]
+ // },
+ // {
+ // requestType: "DEL",
+ // url: "https://api.brandxtech.ca/v1/homeMarkers/:homeMarker",
+ // description: "Delete an existing home marker",
+ // urlParams: [":homeMarker - the key of the home marker"]
+ // },
+ // {
+ // requestType: "PUT",
+ // url: "https://api.brandxtech.ca/v1/fieldMarkers/:fieldMarker",
+ // description: "update an existing field marker",
+ // urlParams: [":fieldMarker - the key for the field marker"],
+ // requestBody: "FieldMarkerSettings"
+ // },
+ // {
+ // requestType: "DEL",
+ // url: "https://api.brandxtech.ca/v1/fieldMarkers/:fieldMarker",
+ // description: "delete an existing field marker",
+ // urlParams: [":fieldMarker - the key for the marker"]
+ // }
+ ];
+ const tasks: EndPointData[] = [
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/tasks",
+ description: "get a list of tasks",
+ urlOptions: [
+ "limit - the number to load",
+ "offset - how many to skip over before starting to load",
+ "order - the sort order",
+ "by - what to sort by in the data",
+ "search - a string to search the data for a match",
+ "from - RFC3339 formatted timestamp to get all tasks with start after (to be used in conjunction with to)",
+ "to - RFC3339 formatted timestamp to get all tasks with start before (to be used in conjunction with from)"
+ ],
+ responseParams: ["repeated Task tasks", "uint32 nextOffset", "uint32 total"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/tasks/:task",
+ description: "get an existing task",
+ urlParams: [":task - the key for the task"],
+ responseParams: ["TaskSettings settigns", "string key"]
+ }
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/tasks",
+ // description: "add a new task",
+ // requestBody: "TaskSettings",
+ // responseParams: ["string task"]
+ // },
+ // {
+ // requestType: "DEL",
+ // url: "https://api.brandxtech.ca/v1/tasks/:task",
+ // description: "delete an existing task",
+ // urlParams: [":task - the key of the task"]
+ // },
+ // {
+ // requestType: "PUT",
+ // url: "https://api.brandxtech.ca/v1/tasks/:task",
+ // description: "update an existing task",
+ // urlParams: [":task - the key of the task"],
+ // requestBody: "TaskSettings"
+ // }
+ ];
+ const devices: EndPointData[] = [
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/devices",
+ description: "get a list of devices",
+ urlOptions: [
+ "limit - the number of devices to load",
+ "offset - the number of devices to skip over before starting to load",
+ "order - what to sort the devices by",
+ "by - how to order them (ASC/DESC)",
+ "search - what to search in the devices for",
+ "ids - comma seperated string of device ids to get",
+ "comprehensive - boolean value of whether to get the components for the loaded devices",
+ "measurements - boolean value of wether to get the measurements when loading comprehensive devices",
+ "hologram - boolean value of whehter to get the hologram data for cellular devices"
+ ],
+ responseParams: [
+ "repeated Device devices",
+ "uint32 next_offset",
+ "uint32 total",
+ "repeated ComprehensiveDevice comprehensive_devices",
+ "repeated HologramDevice hologram_devices"
+ ]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/multidevices",
+ description: "get a list of devices based on given ids",
+ urlOptions: ["devices - comma seperated string of device ids"],
+ responseParams: ["repeated Device devices", "uint32 nextOffset", "uint32 total"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/devices/:device",
+ description: "get a specified device",
+ urlParams: [":device - the id of the device"],
+ responseParams: ["DeviceSettings settings", "DeviceStatus status"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/devices/:device/geojson",
+ description: "get the geojson data of a device such as longitude and latitude",
+ urlParams: [":device - the id of the device"],
+ responseParams: ["DeviceGeoJson"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/geojson/devices",
+ description: "list the geojson data for devices",
+ urlOptions: ["devices - comma seperated string of device ids"],
+ responseParams: ["repeated DeviceGeoJSON geojsonDevices"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/devices/:device/history",
+ description: "get the history of changes to the device",
+ urlParams: [":device - the device id"],
+ responseParams: ["repeated DeviceHistory history", "uint32 nextOffset", "uint32 total"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/devices/:device/completeHistory",
+ description: "get the history of a device and all its attached components and interactions",
+ urlParams: [":device - the device id"],
+ responseParams: ["repeated ObjectHistory history", "uint32 nextOffset", "uint32 total"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/devices/:device/usage",
+ description: "get data the usage of a device from a starting point to now",
+ urlOptions: ["start - the date to start from"],
+ urlParams: [":device - the id of the device"],
+ responseParams: [
+ "string status",
+ "repeated Session sessions",
+ "float latitude",
+ "float longitude"
+ ]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/devices/:device/paused",
+ description: "get the pause state of the device",
+ urlParams: [":device - the id of the device"],
+ responseParams: ["bool paused"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/devices/:device/datacap",
+ description: "get the monthly data cap for a device",
+ urlParams: [":device - the id of the device"],
+ responseParams: ["int64 overlimit"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/devices/:device/overlimit",
+ description: "Get whether the datacap has been hit for a device",
+ urlParams: [":device - the id of the device"],
+ responseParams: ["bool isover"]
+ }
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/devices/:device/clearPending",
+ // description: "clears pending device requests",
+ // urlParams: [":device - the id of the device"]
+ // },
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/devices/:device/pause",
+ // description: "Pause a cellular device",
+ // urlParams: [":device - the id of the device"]
+ // },
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/bulkPauseDevices",
+ // description: "pause or resume a list of devices",
+ // urlOptions: [
+ // "ids - comma seperated list of device ids",
+ // "paused - boolean to pause or unpause"
+ // ],
+ // responseParams: ["repeated DeviceSuccess devicesPaused"]
+ // },
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/bulkChangeDataCap",
+ // description: "change the data cap for multiple devices",
+ // urlOptions: [
+ // "ids - comma seperated list of device ids",
+ // "datacap - the value for the new datacap"
+ // ],
+ // responseParams: ["repeated uint64", "uint64 bytes"]
+ // },
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/devices/:device/resume",
+ // description: "resume a cellular device",
+ // urlParams: [":device - the id of the device"]
+ // },
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/devices/:device/sync",
+ // description:
+ // "syncronizes the configuration on the device with the configuration saved in the database",
+ // urlParams: [":device - the id of the device"]
+ // },
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/devices/:device/upgrade",
+ // description: "tell a device to upgrade to the latest firmware on its channel",
+ // urlParams: [":device - the id of the device"],
+ // responseParams: ["string key"]
+ // },
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/devices/:device/datacap",
+ // description: "set the monthly datacap for a device",
+ // urlOptions: ["limit - the new datacap for the device"],
+ // urlParams: [":device - the id of the device"]
+ // },
+ // {
+ // requestType: "PUT",
+ // url: "https://api.brandxtech.ca/v1/devices/:device/tags/:tag",
+ // description: "sets a tag on the device",
+ // urlParams: [":device - the id if the device", ":tag - the tag to set on the device"]
+ // },
+ // {
+ // requestType: "PUT",
+ // url: "https://api.brandxtech.ca/v1/devices/:device/update",
+ // description: "update a device",
+ // urlParams: [":device - the id of the device"],
+ // requestBody: "DeviceSettings"
+ // },
+ //I think users should be able to use this one but im not sure
+ // {
+ // requestType: "PUT",
+ // url: "https://api.brandxtech.ca/v1/devices/:device/wifi",
+ // description: "update the wifi connection of a device",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ //thi one i dont think users should be able to do
+ // {
+ // requestType: "DEL",
+ // url: "https://api.brandxtech.ca/v1/devices/:device",
+ // description: "remove an existing device",
+ // urlParams: [
+ // ":device - the id of the device"
+ // ],
+ // },
+ // {
+ // requestType: "DEL",
+ // url: "https://api.brandxtech.ca/v1/devices/:device/tags/:tag",
+ // description: "remove a tag from a device",
+ // urlParams: [":device - the id of the device", ":tag - the tag to remove from the device"]
+ // }
+ ];
+ const components: EndPointData[] = [
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/components/forObject",
+ description: "gets all the components linked to an object such as a bin",
+ urlOptions: [
+ "keys - comma seperated list of keys, the final key in the list is the object that will be used to load the components, all keys before are for the permissions chain",
+ "types - the corresponding object type for the key in the same position in the keys option"
+ ],
+ responseParams: ["repeated Component components", "map component_devices"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/devices/:device/components",
+ description: "Gets all components for a device",
+ urlOptions: [
+ "comprehensive - boolean whether to get the other related information for a component such as measurements"
+ ],
+ urlParams: [":device - the device id"],
+ responseParams: ["repeated Component components", "map component_devices"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/devices/:device/components/:component",
+ description: "get a specified component on a device",
+ urlParams: [":device - the device id", ":component - the key of the component"],
+ responseParams: [
+ "ComponentSettings settings",
+ "ComponentStatus status",
+ "repeated UnitMeasurementsForComponent last_measurement",
+ "repeated Permission permissions"
+ ]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/devices/:device/components/:component/history",
+ description: "get the history of changes to a devices component",
+ urlOptions: [
+ "limit - the number of records to retrieve",
+ "offset - the number of records to pass over before starting retrieval"
+ ],
+ urlParams: [":device - the device id", ":components - the key of the component"],
+ responseParams: ["repeated ComponentHistory history", "uint32 nextOffset", "uint32 total"]
+ }
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/devices/:device/components",
+ // description: "add a new component to a device",
+ // urlParams: [
+ // ":device - the device id"
+ // ],
+ // requestBody: "ComponentSettings"
+ // },
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/devices/:device/multiComponents",
+ // description: "add multiple components to a device",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "PUT",
+ // url: "https://api.brandxtech.ca/v1/devices/:device/components/:component/preferences",
+ // description: "update a components preferences",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "PUT",
+ // url: "https://api.brandxtech.ca/v1/devices/:device/components/:component/update",
+ // description: "update the settings of a component",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "DEL",
+ // url: "https://api.brandxtech.ca/v1/devices/:device/components/:component",
+ // description: "removes an existing component",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ ];
+ const interactions: EndPointData[] = [
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/devices/:device/interactions",
+ description: "list the interactions for a device",
+ urlParams: [":device - the device id"],
+ responseParams: ["repeated Interaction interactions"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/devices/:device/components/:component/interactions",
+ description: "list the interactions for a specified component on a device",
+ urlParams: [":device - the id of the device", ":component - the key of the component"],
+ responseParams: ["repeated Interaction interactions"]
+ }
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/devices/:device/interactions",
+ // description: "add a new interaction to a device",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/devices/:device/interactions/multi",
+ // description: "add multiple interactions to a device",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "PUT",
+ // url: "https://api.brandxtech.ca/v1/devices/:device/interactions",
+ // description: "update an existing interaction on a device",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "PUT",
+ // url: "https://api.brandxtech.ca/v1/devices/:device/interactions/:interaction/interactionPondSettings",
+ // description: `update the settings of an interaction in the pond without touching the interaction on the device,
+ // use this only for pond specific settings that the device does not need`,
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "DEL",
+ // url: "https://api.brandxtech.ca/v1/devices/:device/interactions/:interaction",
+ // description: "remove an existing interaction from a device",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ ];
+ const measurements: EndPointData[] = [
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/devices/:device/components/:component/unitMeasurements",
+ description: "list the unit measurements for a component",
+ urlOptions: [
+ "limit - the maximum number of measurements to get",
+ "offset - the number of records to skip over before starting retrieval",
+ "order - what to order the measurements by",
+ "type - enum value of measurement type to include if you only want a specific type ie. only get temperature and not humidity for a grain cable you would include type=1",
+ "start - RFC3339 formatted timestamp for the start of the window",
+ "end - RFC3339 formatted timestamp for the end of the window"
+ ],
+ urlParams: [":device - the id of the device", ":component - the key of the component"],
+ responseParams: [
+ "repeated UnitMeasurementsForComponent measurements",
+ "uint32 next_offset",
+ "uint32 total"
+ ]
+ },
+ {
+ requestType: "GET",
+ url:
+ "https://api.brandxtech.ca/v1/devices/:device/components/:component/measurements/sampleUnit",
+ description: "get a list of sample unit measurements",
+ urlOptions: [
+ "start - RFC3339 formatted timestamp for the start of the window",
+ "end - RFC3339 formatted timestamp for the end of the window",
+ "size - the number of records to get for the sample"
+ ],
+ urlParams: [":device - the id of the device", ":component - the key of the component"],
+ responseParams: ["repeated UnitMeasurementsForComponent measurements"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/objects/:object/:type/unitMeasurements",
+ description:
+ "gets the measurements on object can estimate of itself using components that are attached to it",
+ urlOptions: [
+ "limit - the maximum number of measurements to get",
+ "offset - the number of records to skip over before starting retrieval",
+ "order - what to order the measurements by",
+ "start - RFC3339 formatted timestamp for the start of the window",
+ "end - RFC3339 formatted timestamp for the end of the window"
+ ],
+ urlParams: [":object - the key of the object", ":type - enum value of the type of the object"]
+ }
+ ];
+ const groups: EndPointData[] = [
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/groups",
+ description: "lis device groups",
+ urlOptions: genericListOptions,
+ responseParams: ["repeated Group groups", "uint32 next_offset", "uint32 total"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/groups/:group",
+ description: "get a specific device group",
+ urlParams: [":group - the id of the group"],
+ responseParams: ["GroupSettings settings", "GroupStatus status"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/groups/:group/devices",
+ description: "list the devices from a specific group",
+ urlOptions: [
+ "limit - the number of records to load from the group",
+ "offset - the number of records to pass before starting retrieval",
+ "order - a key in the device settings to order them by",
+ "search - a string to search the data for and only return matching devices",
+ "comprehensive - boolean value on whether to load the device with their components as well"
+ ],
+ urlParams: [":group - the id of the group"],
+ responseParams: [
+ "repeated Device devices",
+ "uint32 next_offset",
+ "uint32 total",
+ "repeated ComprehensiveDevice comprehensive_devices",
+ "repeated HologramDevice hologram_devices"
+ ]
+ }
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/groups",
+ // description: "add a new group",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/groups/:group/devices/:device/add",
+ // description: "add a device to an existing group",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/groups/:group/devices/:device/remove",
+ // description: "remove a device from an existing group",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "PUT",
+ // url: "https://api.brandxtech.ca/v1/groups/:group",
+ // description: "update an existing group",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "DEL",
+ // url: "https://api.brandxtech.ca/v1/groups/:group",
+ // description: "removes an exisitng group",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ ];
+ const transactions: EndPointData[] = [
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/transactions",
+ description: "list all transactions between two dates",
+ urlOptions: ["start - RFC3339 formatted timestamp", "end - RFC3339 formatted timestamp"],
+ responseParams: ["repeated Transaction transactions", "uint32 next_offset", "uint32 total"]
+ }
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/transactions",
+ // description: "create a new transaction",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "PUT",
+ // url: "https://api.brandxtech.ca/v1/transactions/:transaction/revoke",
+ // description: "revoke an existing transaction",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/transactions/:transaction/update",
+ // description: "update an existing transaction",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ ];
+
+ return (
+
+
+ Endpoints for managing API keys
+
+
+ {apiKeys.map((e, i) => (
+
+
+
+ ))}
+
+
+ Endpoints for managing notifications
+
+
+ {notifications.map((e, i) => (
+
+
+
+ ))}
+
+
+ Endpoints for managing notes
+
+
+ {notes.map((e, i) => (
+
+
+
+ ))}
+
+
+ Endpoints for managing map markers
+
+
+ {mapMarkers.map((e, i) => (
+
+
+
+ ))}
+
+
+ Endpoints for managing tasks
+
+
+ {tasks.map((e, i) => (
+
+
+
+ ))}
+
+
+ Endpoints for managing devices
+
+
+ {devices.map((e, i) => (
+
+
+
+ ))}
+
+
+ Endpoints for managing components
+
+
+ {components.map((e, i) => (
+
+
+
+ ))}
+
+
+ Endpoints for managing interactions
+
+
+ {interactions.map((e, i) => (
+
+
+
+ ))}
+
+
+ Endpoints for managing measurements
+
+
+ {measurements.map((e, i) => (
+
+
+
+ ))}
+
+
+ Endpoints for managing groups
+
+
+ {groups.map((e, i) => (
+
+
+
+ ))}
+
+
+ Endpoints for managing transactions
+
+
+ {transactions.map((e, i) => (
+
+
+
+ ))}
+
+
+ );
+}
diff --git a/src/apiDocs/endpoints/miningEndpoints.tsx b/src/apiDocs/endpoints/miningEndpoints.tsx
new file mode 100644
index 0000000..22fa568
--- /dev/null
+++ b/src/apiDocs/endpoints/miningEndpoints.tsx
@@ -0,0 +1,121 @@
+import { Box, List, ListItem, Typography } from "@mui/material";
+import EndpointDisplay, { EndPointData } from "apiDocs/endpoints/endpointDisplay";
+import React from "react";
+
+/**
+ * endpoint template
+ {
+ requestType: "",
+ url: "https://api.brandxtech.ca/v1/",
+ description: "",
+ urlOptions: [],
+ urlParams: [],
+ requestBody: "",
+ responseParams: []
+ },
+ */
+
+export default function MiningEndpoints() {
+ const mineEndpoints: EndPointData[] = [
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/mines",
+ description: "get a list of mines",
+ urlOptions: [
+ "limit - the number to load",
+ "offset - how many to skip over before starting to load",
+ "order - the sort order",
+ "by - what to sort by in the data",
+ "search - a string to search for a match in the data"
+ ],
+ responseParams: ["repeated Mine mines", "uint32 next_offset", "uint32 total"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/mineSimple",
+ description: "get a list of just the key and name of your mines",
+ urlOptions: [
+ "limit - the number to load",
+ "offset - how many to skip over before starting to load",
+ "order - the sort order",
+ "by - what to sort by in the data",
+ "search - a string to search for a match in the data"
+ ],
+ responseParams: ["repeated MineSimple mines", "uint32 next_offset", "uint32 total"]
+ },
+ {
+ requestType: "GET",
+ url: "https://api.brandxtech.ca/v1/mines/:mine",
+ description: "get a specified mine",
+ urlParams: [":mine - the key of the mine"],
+ responseParams: [
+ "Mine mine",
+ "repeated Device devices",
+ "repeated Component components",
+ "repeated Permission permissions",
+ "map component_preferences",
+ "map component_devices"
+ ]
+ }
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/mines",
+ // description: "add a new mine",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/mines/:mine/addDevice/:device",
+ // description: "attach a device to a mine",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "POST",
+ // url: "https://api.brandxtech.ca/v1/mines/:mine/addComponent/:device/:component",
+ // description: "attach a component to a mine",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "PUT",
+ // url: "https://api.brandxtech.ca/v1/mines",
+ // description: "update a mine",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ // {
+ // requestType: "DEL",
+ // url: "https://api.brandxtech.ca/v1/mines/:mine",
+ // description: "remove an existing mine",
+ // urlOptions: [],
+ // urlParams: [],
+ // requestBody: "",
+ // responseParams: []
+ // },
+ ];
+
+ return (
+
+
+ Endpoints for retrieving mine data
+
+
+ {mineEndpoints.map((e, i) => (
+
+
+
+ ))}
+
+
+ );
+}
diff --git a/src/apiDocs/enumerators.tsx b/src/apiDocs/enumerators.tsx
new file mode 100644
index 0000000..d2ad156
--- /dev/null
+++ b/src/apiDocs/enumerators.tsx
@@ -0,0 +1,46 @@
+import { Box } from "@mui/material";
+import GeneralEnums from "./enumerators/generalEnums";
+
+export default function Enumerators() {
+ //const [currentTab, setCurrentTab] = useState("general");
+
+ /*
+ for now all of the enums are in general since the most of the industry specific groupings dont have very many,
+ consider spliting them up when they have more
+ */
+ return (
+
+ {/*
+ setCurrentTab(value)}
+ indicatorColor="primary"
+ textColor="primary"
+ variant="fullWidth">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ */}
+
+
+ );
+}
diff --git a/src/apiDocs/enumerators/enumeratorDisplay.tsx b/src/apiDocs/enumerators/enumeratorDisplay.tsx
new file mode 100644
index 0000000..3954e65
--- /dev/null
+++ b/src/apiDocs/enumerators/enumeratorDisplay.tsx
@@ -0,0 +1,115 @@
+import {
+ Accordion,
+ AccordionDetails,
+ AccordionSummary,
+ Box,
+ darken,
+ Table,
+ TableBody,
+ TableCell,
+ TableHead,
+ TableRow,
+ Theme,
+ Typography
+} from "@mui/material";
+import { ExpandMore } from "@mui/icons-material";
+import { makeStyles } from "@mui/styles";
+import { getThemeType } from "theme";
+
+export interface EnumPairs {
+ key: string;
+ val: number;
+}
+
+export interface data {
+ name: string;
+ pairs: EnumPairs[];
+}
+
+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 EnumeratorDisplay(props: Props) {
+ const { data } = props;
+ const classes = useStyles();
+ return (
+
+ }>
+ {data.name}
+
+
+
+
+
+
+
+ Enumerator Value
+
+
+ Enumerator Key
+
+
+
+
+ {data.pairs.map((pair, i) => (
+
+
+ {pair.val}
+
+
+ {pair.key}
+
+
+ ))}
+
+
+
+
+
+ );
+}
diff --git a/src/apiDocs/enumerators/generalEnums.tsx b/src/apiDocs/enumerators/generalEnums.tsx
new file mode 100644
index 0000000..873cd95
--- /dev/null
+++ b/src/apiDocs/enumerators/generalEnums.tsx
@@ -0,0 +1,1593 @@
+import { Box, List, ListItem, Typography } from "@mui/material";
+import EnumeratorDisplay, { data } from "./enumeratorDisplay";
+
+//general enums start here
+const addressType: data = {
+ name: "AddressType",
+ pairs: [
+ {
+ key: "ADDRESS_TYPE_INVALID",
+ val: 0
+ },
+ {
+ key: "ADDRESS_TYPE_CONFIGURABLE_PIN_ARRAY",
+ val: 1
+ },
+ {
+ key: "ADDRESS_TYPE_I2C",
+ val: 2
+ },
+ {
+ key: "ADDRESS_TYPE_DAC",
+ val: 3
+ },
+ {
+ key: "ADDRESS_TYPE_POWER",
+ val: 4
+ },
+ {
+ key: "ADDRESS_TYPE_GPS",
+ val: 5
+ },
+ {
+ key: "ADDRESS_TYPE_MODEM",
+ val: 6
+ },
+ {
+ key: "ADDRESS_TYPE_I2C_WITH_CHANNELS",
+ val: 7
+ },
+ {
+ key: "ADDRESS_TYPE_INCREMENTAL",
+ val: 8
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET1",
+ val: 9
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET2",
+ val: 10
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET3",
+ val: 11
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET4",
+ val: 12
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET5",
+ val: 13
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET6",
+ val: 14
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET7",
+ val: 15
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET8",
+ val: 16
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET9",
+ val: 17
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET10",
+ val: 18
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET11",
+ val: 19
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET12",
+ val: 20
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET13",
+ val: 21
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET14",
+ val: 22
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET15",
+ val: 23
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET16",
+ val: 24
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET17",
+ val: 25
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET18",
+ val: 26
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET19",
+ val: 27
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET20",
+ val: 28
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET21",
+ val: 29
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET22",
+ val: 30
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET23",
+ val: 31
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET24",
+ val: 32
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET25",
+ val: 33
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET26",
+ val: 34
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET27",
+ val: 35
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET28",
+ val: 36
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET29",
+ val: 37
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET30",
+ val: 38
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET31",
+ val: 39
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET32",
+ val: 40
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET33",
+ val: 41
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET34",
+ val: 42
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET35",
+ val: 43
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET36",
+ val: 44
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET37",
+ val: 45
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET38",
+ val: 46
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET39",
+ val: 47
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET40",
+ val: 48
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET41",
+ val: 49
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET42",
+ val: 50
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET43",
+ val: 51
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET44",
+ val: 52
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET45",
+ val: 53
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET46",
+ val: 54
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET47",
+ val: 55
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET48",
+ val: 56
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET49",
+ val: 57
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET50",
+ val: 58
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET51",
+ val: 59
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET52",
+ val: 60
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET53",
+ val: 61
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET54",
+ val: 62
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET55",
+ val: 63
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET56",
+ val: 64
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET57",
+ val: 65
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET58",
+ val: 66
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET59",
+ val: 67
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET60",
+ val: 68
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET61",
+ val: 69
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET62",
+ val: 70
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET63",
+ val: 71
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET64",
+ val: 72
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET65",
+ val: 73
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET66",
+ val: 74
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET67",
+ val: 75
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET68",
+ val: 76
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET69",
+ val: 77
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET70",
+ val: 78
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET71",
+ val: 79
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET72",
+ val: 80
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET73",
+ val: 81
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET74",
+ val: 82
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET75",
+ val: 83
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET76",
+ val: 84
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET77",
+ val: 85
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET78",
+ val: 86
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET79",
+ val: 87
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET80",
+ val: 88
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET81",
+ val: 89
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET82",
+ val: 90
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET83",
+ val: 91
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET84",
+ val: 92
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET85",
+ val: 93
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET86",
+ val: 94
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET87",
+ val: 95
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET88",
+ val: 96
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET89",
+ val: 97
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET90",
+ val: 98
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET91",
+ val: 99
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET92",
+ val: 100
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET93",
+ val: 101
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET94",
+ val: 102
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET95",
+ val: 103
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET96",
+ val: 104
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET97",
+ val: 105
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET98",
+ val: 106
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET99",
+ val: 107
+ },
+ {
+ key: "ADDRESS_TYPE_PIN_OFFSET100",
+ val: 108
+ },
+ {
+ key: "ADDRESS_TYPE_INTERNAL_SLEEP",
+ val: 109
+ },
+ {
+ key: "ADDRESS_TYPE_SPI",
+ val: 110
+ }
+ ]
+};
+
+const componentType: data = {
+ name: "ComponentType",
+ pairs: [
+ {
+ key: "COMPONENT_TYPE_INVALID",
+ val: 0
+ },
+ {
+ key: "COMPONENT_TYPE_POWER",
+ val: 1
+ },
+ {
+ key: "COMPONENT_TYPE_TEMPERATURE",
+ val: 2
+ },
+ {
+ key: "COMPONENT_TYPE_BOOLEAN_OUTPUT",
+ val: 3
+ },
+ {
+ key: "COMPONENT_TYPE_EDGE_TRIGGERED",
+ val: 4
+ },
+ {
+ key: "COMPONENT_TYPE_GRAIN_CABLE",
+ val: 5
+ },
+ {
+ key: "COMPONENT_TYPE_PRESSURE",
+ val: 6
+ },
+ {
+ key: "COMPONENT_TYPE_GPS",
+ val: 7
+ },
+ {
+ key: "COMPONENT_TYPE_BOOLEAN_INPUT",
+ val: 8
+ },
+ {
+ key: "COMPONENT_TYPE_DHT",
+ val: 9
+ },
+ {
+ key: "COMPONENT_TYPE_MODEM",
+ val: 10
+ },
+ {
+ key: "COMPONENT_TYPE_LIGHT",
+ val: 11
+ },
+ {
+ key: "COMPONENT_TYPE_CO2",
+ val: 12
+ },
+ {
+ key: "COMPONENT_TYPE_STEPPER_MOTOR",
+ val: 13
+ },
+ {
+ key: "COMPONENT_TYPE_ANALOG_INPUT",
+ val: 14
+ },
+ {
+ key: "COMPONENT_TYPE_O2",
+ val: 15
+ },
+ {
+ key: "COMPONENT_TYPE_ETHYLENE",
+ val: 16
+ },
+ {
+ key: "COMPONENT_TYPE_ORP",
+ val: 17
+ },
+ {
+ key: "COMPONENT_TYPE_PH",
+ val: 18
+ },
+ {
+ key: "COMPONENT_TYPE_VOLTAGE",
+ val: 19
+ },
+ {
+ key: "COMPONENT_TYPE_CALCIUM",
+ val: 20
+ },
+ {
+ key: "COMPONENT_TYPE_NITRATE",
+ val: 21
+ },
+ {
+ key: "COMPONENT_TYPE_POTASSIUM",
+ val: 22
+ },
+ {
+ key: "COMPONENT_TYPE_CONDUCTIVITY",
+ val: 23
+ },
+ {
+ key: "COMPONENT_TYPE_CAPACITANCE",
+ val: 24
+ },
+ {
+ key: "COMPONENT_TYPE_VAPOUR_PRESSURE_DEFICIT",
+ val: 25
+ },
+ {
+ key: "COMPONENT_TYPE_WEIGHT",
+ val: 26
+ },
+ {
+ key: "COMPONENT_TYPE_AIR_QUALITY",
+ val: 27
+ },
+ {
+ key: "COMPONENT_TYPE_LIDAR",
+ val: 28
+ },
+ {
+ key: "COMPONENT_TYPE_PRESSURE_CABLE",
+ val: 29
+ },
+ {
+ key: "COMPONENT_TYPE_INTERNAL_FUNCTION",
+ val: 30
+ },
+ {
+ key: "COMPONENT_TYPE_CAPACITOR_CABLE",
+ val: 31
+ },
+ {
+ key: "COMPONENT_TYPE_SEN5X",
+ val: 32
+ },
+ {
+ key: "COMPONENT_TYPE_VIBRATION_CHAIN",
+ val: 33
+ },
+ {
+ key: "COMPONENT_TYPE_DRAGER_GAS_DONGLE",
+ val: 34
+ }
+ ]
+};
+
+const deviceActivity: data = {
+ name: "DeviceActivity",
+ pairs: [
+ {
+ key: "DEVICE_ACTIVITY_NONE",
+ val: 0
+ },
+ {
+ key: "DEVICE_ACTIVITY_PAUSED",
+ val: 0
+ },
+ {
+ key: "DEVICE_ACTIVITY_RUNNING",
+ val: 0
+ }
+ ]
+};
+
+const devicePlatform: data = {
+ name: "DevicePlatform",
+ pairs: [
+ {
+ key: "DEVICE_PLATFORM_INVALID",
+ val: 0
+ },
+ {
+ key: "DEVICE_PLATFORM_PHOTON",
+ val: 1
+ },
+ {
+ key: "DEVICE_PLATFORM_ELECTRON",
+ val: 2
+ },
+ {
+ key: "DEVICE_PLATFORM_V2_CELLULAR",
+ val: 3
+ },
+ {
+ key: "DEVICE_PLATFORM_V2_WIFI",
+ val: 4
+ },
+ {
+ key: "DEVICE_PLATFORM_V2_WIFI_S3",
+ val: 5
+ },
+ {
+ key: "DEVICE_PLATFORM_V2_CELLULAR_S3",
+ val: 6
+ },
+ {
+ key: "DEVICE_PLATFORM_CELLULAR_BLACK",
+ val: 7
+ },
+ {
+ key: "DEVICE_PLATFORM_CELLULAR_GREEN",
+ val: 8
+ }
+ ]
+};
+
+const deviceProduct: data = {
+ name: "DeviceProduct",
+ pairs: [
+ {
+ key: "DEVICE_PRODUCT_NONE",
+ val: 0
+ },
+ {
+ key: "DEVICE_PRODUCT_BINDAPT_PLUS",
+ val: 1
+ },
+ {
+ key: "DEVICE_PRODUCT_BINDAPT_PLUS_PRO",
+ val: 2
+ },
+ {
+ key: "DEVICE_PRODUCT_BINDAPT_PLUS_LITE",
+ val: 3
+ },
+ {
+ key: "DEVICE_PRODUCT_BINDAPT_MINI",
+ val: 4
+ },
+ {
+ key: "DEVICE_PRODUCT_WEATHER_STATION",
+ val: 5
+ },
+ {
+ key: "DEVICE_PRODUCT_NEXUS_ST",
+ val: 6
+ },
+ {
+ key: "DEVICE_PRODUCT_OMNIAIR",
+ val: 7
+ },
+ {
+ key: "DEVICE_PRODUCT_BIN_MONITOR",
+ val: 8
+ },
+ {
+ key: "DEVICE_PRODUCT_BIN_HALO",
+ val: 9
+ },
+ {
+ key: "DEVICE_PRODUCT_BIN_ULTIMATE",
+ val: 10
+ },
+ {
+ key: "DEVICE_PRODUCT_MIPCA_V2",
+ val: 11
+ },
+ {
+ key: "DEVICE_PRODUCT_BINDAPT_PLUS_MOD",
+ val: 12
+ },
+ {
+ key: "DEVICE_PRODUCT_BINDAPT_PLUS_PRO_MOD",
+ val: 13
+ },
+ {
+ key: "DEVICE_PRODUCT_BINDAPT_V2_MONITOR",
+ val: 14
+ },
+ {
+ key: "DEVICE_PRODUCT_BINDAPT_V2_AUTOMATE",
+ val: 15
+ }
+ ]
+};
+
+const deviceState: data = {
+ name: "DeviceState",
+ pairs: [
+ {
+ key: "DEVICE_STATE_UNKNOWN",
+ val: 0
+ },
+ {
+ key: "DEVICE_STATE_OK",
+ val: 1
+ },
+ {
+ key: "DEVICE_STATE_LOW_POWER",
+ val: 2
+ },
+ {
+ key: "DEVICE_STATE_MISSING",
+ val: 3
+ }
+ ]
+};
+
+const fieldMarkerType: data = {
+ name: "FieldMarkerType",
+ pairs: [
+ {
+ key: "FIELD_MARKER_TYPE_PESTS",
+ val: 0
+ },
+ {
+ key: "FIELD_MARKER_TYPE_WEEDS",
+ val: 1
+ },
+ {
+ key: "FIELD_MARKER_TYPE_DISEASE",
+ val: 2
+ },
+ {
+ key: "FIELD_MARKER_TYPE_OTHER",
+ val: 3
+ },
+ {
+ key: "FIELD_MARKER_TYPE_ROCKS",
+ val: 4
+ }
+ ]
+};
+
+const interactionsResultType: data = {
+ name: "InteractionResultType",
+ pairs: [
+ {
+ key: "INTERACTION_RESULT_TYPE_INVALID",
+ val: 0
+ },
+ {
+ key: "INTERACTION_RESULT_TYPE_REPORT",
+ val: 1
+ },
+ {
+ key: "INTERACTION_RESULT_TYPE_TOGGLE",
+ val: 2
+ },
+ {
+ key: "INTERACTION_RESULT_TYPE_RUN",
+ val: 3
+ },
+ {
+ key: "INTERACTION_RESULT_TYPE_SET",
+ val: 4
+ }
+ ]
+};
+
+const limitStatus: data = {
+ name: "LimitStatus",
+ pairs: [
+ {
+ key: "LIMIT_STATUS_NONE",
+ val: 0
+ },
+ {
+ key: "LIMIT_STATUS_UNDER",
+ val: 1
+ },
+ {
+ key: "LIMIT_STATUS_OVER",
+ val: 2
+ }
+ ]
+};
+
+const measurementType: data = {
+ name: "MeasurementType",
+ pairs: [
+ {
+ key: "MEASUREMENT_TYPE_INVALID",
+ val: 0
+ },
+ {
+ key: "MEASUREMENT_TYPE_TEMPERATURE",
+ val: 1
+ },
+ {
+ key: "MEASUREMENT_TYPE_BOOLEAN",
+ val: 2
+ },
+ {
+ key: "MEASUREMENT_TYPE_VOLTAGE",
+ val: 3
+ },
+ {
+ key: "MEASUREMENT_TYPE_PERCENT",
+ val: 4
+ },
+ {
+ key: "MEASUREMENT_TYPE_PRESSURE",
+ val: 5
+ },
+ {
+ key: "MEASUREMENT_TYPE_RSSI",
+ val: 6
+ },
+ {
+ key: "MEASUREMENT_TYPE_LIGHT",
+ val: 7
+ },
+ {
+ key: "MEASUREMENT_TYPE_PPM",
+ val: 8
+ },
+ {
+ key: "MEASUREMENT_TYPE_ANALOG",
+ val: 9
+ },
+ {
+ key: "MEASUREMENT_TYPE_ORP",
+ val: 10
+ },
+ {
+ key: "MEASUREMENT_TYPE_PH",
+ val: 11
+ },
+ {
+ key: "MEASUREMENT_TYPE_PPB",
+ val: 12
+ },
+ {
+ key: "MEASUREMENT_TYPE_CONDUCTIVITY",
+ val: 13
+ },
+ {
+ key: "MEASUREMENT_TYPE_CAPACITANCE",
+ val: 14
+ },
+ {
+ key: "MEASUREMENT_TYPE_WEIGHT",
+ val: 15
+ },
+ {
+ key: "MEASUREMENT_TYPE_DISTANCE_CM",
+ val: 16
+ },
+ {
+ key: "MEASUREMENT_TYPE_SPEED",
+ val: 17
+ },
+ {
+ key: "MEASUREMENT_TYPE_RAIN",
+ val: 18
+ },
+ {
+ key: "MEASUREMENT_TYPE_GRAIN_EMC",
+ val: 19
+ },
+ {
+ key: "MEASUREMENT_TYPE_EDGE_RISES",
+ val: 20
+ },
+ {
+ key: "MEASUREMENT_TYPE_EDGE_FALLS",
+ val: 21
+ },
+ {
+ key: "MEASUREMENT_TYPE_STATE_CHANGES",
+ val: 22
+ },
+ {
+ key: "MEASUREMENT_TYPE_FULL_SPECTRUM",
+ val: 23
+ },
+ {
+ key: "MEASUREMENT_TYPE_INFRARED",
+ val: 24
+ },
+ {
+ key: "MEASUREMENT_TYPE_LUX",
+ val: 25
+ },
+ {
+ key: "MEASUREMENT_TYPE_VISIBLE_LIGHT",
+ val: 26
+ },
+ {
+ key: "MEASUREMENT_TYPE_CAPACITANCE_GND_FF",
+ val: 27
+ },
+ {
+ key: "MEASUREMENT_TYPE_CAPACITANCE_SELF_FF",
+ val: 28
+ },
+ {
+ key: "MEASUREMENT_TYPE_CFM",
+ val: 29
+ },
+ {
+ key: "MEASUREMENT_TYPE_DUST_1UG",
+ val: 30
+ },
+ {
+ key: "MEASUREMENT_TYPE_DUST_2UG",
+ val: 31
+ },
+ {
+ key: "MEASUREMENT_TYPE_DUST_4UG",
+ val: 32
+ },
+ {
+ key: "MEASUREMENT_TYPE_DUST_10UG",
+ val: 33
+ },
+ {
+ key: "MEASUREMENT_TYPE_VOC_INDEX",
+ val: 34
+ },
+ {
+ key: "MEASUREMENT_TYPE_NOX_INDEX",
+ val: 35
+ },
+ {
+ key: "MEASUREMENT_TYPE_FREQUENCY",
+ val: 36
+ },
+ {
+ key: "MEASUREMENT_TYPE_SINGLE_ACCELERATION_RMS",
+ val: 37
+ },
+ {
+ key: "MEASUREMENT_TYPE_TOTAL_ACCELERATION_RMS",
+ val: 38
+ },
+ {
+ key: "MEASUREMENT_TYPE_BUSHEL_CABLE",
+ val: 39
+ }
+ ]
+};
+
+const mutator: data = {
+ name: "Mutator",
+ pairs: [
+ {
+ key: "MUTATOR_NONE",
+ val: 0
+ },
+ {
+ key: "MUTATOR_EMC",
+ val: 1
+ },
+ {
+ key: "MUTATOR_CFM",
+ val: 2
+ },
+ {
+ key: "MUTATOR_FUEL_LEVEL",
+ val: 3
+ }
+ ]
+};
+
+const objectType: data = {
+ name: "ObjectType",
+ pairs: [
+ {
+ key: "OBJECT_TYPE_UNKNOWN",
+ val: 0
+ },
+ {
+ key: "OBJECT_TYPE_BIN",
+ val: 1
+ },
+ {
+ key: "OBJECT_TYPE_SITE",
+ val: 2
+ },
+ {
+ key: "OBJECT_TYPE_DEVICE",
+ val: 3
+ },
+ {
+ key: "OBJECT_TYPE_COMPONENT",
+ val: 4
+ },
+ {
+ key: "OBJECT_TYPE_INTERACTION",
+ val: 5
+ },
+ {
+ key: "OBJECT_TYPE_NOTE",
+ val: 6
+ },
+ {
+ key: "OBJECT_TYPE_FIELD",
+ val: 7
+ },
+ {
+ key: "OBJECT_TYPE_FIELDMARKER",
+ val: 8
+ },
+ {
+ key: "OBJECT_TYPE_HOMEMARKER",
+ val: 9
+ },
+ {
+ key: "OBJECT_TYPE_HARVESTPLAN",
+ val: 10
+ },
+ {
+ key: "OBJECT_TYPE_TASK",
+ val: 11
+ },
+ {
+ key: "OBJECT_TYPE_MINE",
+ val: 12
+ },
+ {
+ key: "OBJECT_TYPE_BINYARD",
+ val: 13
+ },
+ {
+ key: "OBJECT_TYPE_TERMINAL",
+ val: 14
+ },
+ {
+ key: "OBJECT_TYPE_GATE",
+ val: 15
+ },
+ {
+ key: "OBJECT_TYPE_FIRMWARE",
+ val: 16
+ },
+ {
+ key: "OBJECT_TYPE_GROUP",
+ val: 17
+ },
+ {
+ key: "OBJECT_TYPE_UPGRADE",
+ val: 18
+ },
+ {
+ key: "OBJECT_TYPE_USER",
+ val: 19
+ },
+ {
+ key: "OBJECT_TYPE_BACKPACK",
+ val: 20
+ },
+ {
+ key: "OBJECT_TYPE_HARVESTYEAR",
+ val: 21
+ },
+ {
+ key: "OBJECT_TYPE_TAG",
+ val: 22
+ },
+ {
+ key: "OBJECT_TYPE_TEAM",
+ val: 23
+ },
+ {
+ key: "OBJECT_TYPE_LINK",
+ val: 24
+ },
+ {
+ key: "OBJECT_TYPE_HEATER",
+ val: 25
+ },
+ {
+ key: "OBJECT_TYPE_GRAIN_BAG",
+ val: 26
+ },
+ {
+ key: "OBJECT_TYPE_CONTRACT",
+ val: 27
+ },
+ {
+ key: "OBJECT_TYPE_TRANSACTION",
+ val: 28
+ },
+ {
+ key: "OBJECT_TYPE_FILE",
+ val: 29
+ },
+ {
+ key: "OBJECT_TYPE_NOTIFICATION_BANNER",
+ val: 30
+ },
+ {
+ key: "OBJECT_TYPE_DEVICE_PRESET",
+ val: 31
+ }
+ ]
+};
+
+const permission: data = {
+ name: "Permission",
+ pairs: [
+ {
+ key: "PERMISSION_INVALID",
+ val: 0
+ },
+ {
+ key: "PERMISSION_USERS",
+ val: 1
+ },
+ {
+ key: "PERMISSION_READ",
+ val: 2
+ },
+ {
+ key: "PERMISSION_WRITE",
+ val: 3
+ },
+ {
+ key: "PERMISSION_SHARE",
+ val: 4
+ },
+ {
+ key: "PERMISSION_BILLING",
+ val: 5
+ },
+ {
+ key: "PERMISSION_FILE_MANAGEMENT",
+ val: 6
+ }
+ ]
+};
+
+const powerSubtype: data = {
+ name: "PowerSubtype",
+ pairs: [
+ {
+ key: "POWER_SUBTYPE_NONE",
+ val: 0
+ },
+ {
+ key: "POWER_SUBTYPE_NO_BATTERY",
+ val: 1
+ }
+ ]
+};
+
+const relationalOperator: data = {
+ name: "RelationalOperator",
+ pairs: [
+ {
+ key: "RELATIONAL_OPERATOR_INVALID",
+ val: 0
+ },
+ {
+ key: "RELATIONAL_OPERATOR_EQUAL_TO",
+ val: 1
+ },
+ {
+ key: "RELATIONAL_OPERATOR_LESS_THAN",
+ val: 2
+ },
+ {
+ key: "RELATIONAL_OPERATOR_GREATER_THAN",
+ val: 3
+ }
+ ]
+};
+
+const sleepType: data = {
+ name: "SleepType",
+ pairs: [
+ {
+ key: "SLEEP_TYPE_NONE",
+ val: 0
+ },
+ {
+ key: "SLEEP_TYPE_NAP",
+ val: 1
+ },
+ {
+ key: "SLEEP_TYPE_DEEP",
+ val: 2
+ },
+ {
+ key: "SLEEP_TYPE_HIBERNATE",
+ val: 3
+ }
+ ]
+};
+
+const transactionState: data = {
+ name: "TransactionState",
+ pairs: [
+ {
+ key: "TRANSACTION_STATE_UNKNOWN",
+ val: 0
+ },
+ {
+ key: "TRANSACTION_STATE_VALID",
+ val: 1
+ },
+ {
+ key: "TRANSACTION_STATE_CORRECTION",
+ val: 2
+ },
+ {
+ key: "TRANSACTION_STATE_REVOKED",
+ val: 3
+ },
+ {
+ key: "TRANSACTION_STATE_REVOKED_CORRECTION",
+ val: 4
+ },
+ {
+ key: "TRANSACTION_STATE_PENDING",
+ val: 5
+ },
+ {
+ key: "TRANSACTION_STATE_REJECTED",
+ val: 6
+ }
+ ]
+};
+
+//Ag enums start here
+const binMode: data = {
+ name: "BinMode",
+ pairs: [
+ {
+ key: "BIN_MODE_NONE",
+ val: 0
+ },
+ {
+ key: "BIN_MODE_DRYING",
+ val: 1
+ },
+ {
+ key: "BIN_MODE_COOLDOWN",
+ val: 2
+ },
+ {
+ key: "BIN_MODE_STORAGE",
+ val: 3
+ },
+ {
+ key: "BIN_MODE_HYDRATING",
+ val: 4
+ }
+ ]
+};
+
+const binStorage: data = {
+ name: "BinStorage",
+ pairs: [
+ {
+ key: "BINS_STORAGE_UNKNOWN",
+ val: 0
+ },
+ {
+ key: "BINS_STORAGE_SUPPORTED_GRAIN",
+ val: 1
+ },
+ {
+ key: "BINS_STORAGE_FERTILIZER",
+ val: 2
+ },
+ {
+ key: "BINS_STORAGE_UNSUPPORTED_GRAIN",
+ val: 3
+ }
+ ]
+};
+
+const binShape: data = {
+ name: "BinShape",
+ pairs: [
+ {
+ key: "BIN_SHAPE_UNKNOWN",
+ val: 0
+ },
+ {
+ key: "BIN_SHAPE_FLAT_BOTTOM",
+ val: 1
+ },
+ {
+ key: "BIN_SHAPE_HOPPER_BOTTOM",
+ val: 2
+ }
+ ]
+};
+
+const contractType: data = {
+ name: "ContractType",
+ pairs: [
+ {
+ key: "CONTRACT_TYPE_UNKNOWN",
+ val: 0
+ },
+ {
+ key: "CONTRACT_TYPE_GRAIN",
+ val: 1
+ }
+ ]
+};
+
+const grain: data = {
+ name: "Grain",
+ pairs: [
+ {
+ key: "GRAIN_INVALID",
+ val: 0
+ },
+ {
+ key: "GRAIN_NONE",
+ val: 1
+ },
+ {
+ key: "GRAIN_BARLEY",
+ val: 2
+ },
+ {
+ key: "GRAIN_BUCKWHEAT",
+ val: 3
+ },
+ {
+ key: "GRAIN_CANOLA",
+ val: 4
+ },
+ {
+ key: "GRAIN_CORN",
+ val: 5
+ },
+ {
+ key: "GRAIN_OATS",
+ val: 6
+ },
+ {
+ key: "GRAIN_PEANUTS",
+ val: 7
+ },
+ {
+ key: "GRAIN_RAPESEED",
+ val: 8
+ },
+ {
+ key: "GRAIN_RICE_LONG",
+ val: 9
+ },
+ {
+ key: "GRAIN_RICE_MEDIUM",
+ val: 10
+ },
+ {
+ key: "GRAIN_RICE_SHORT",
+ val: 11
+ },
+ {
+ key: "GRAIN_SORGHUM",
+ val: 12
+ },
+ {
+ key: "GRAIN_SOYBEANS",
+ val: 13
+ },
+ {
+ key: "GRAIN_SUNFLOWER",
+ val: 14
+ },
+ {
+ key: "GRAIN_WHEAT_DURUM",
+ val: 15
+ },
+ {
+ key: "GRAIN_WHEAT_HARD_RED",
+ val: 16
+ },
+ {
+ key: "GRAIN_FLAX_UNRETTED",
+ val: 17
+ },
+ {
+ key: "GRAIN_FLAX_DEW_RETTED",
+ val: 18
+ },
+ {
+ key: "GRAIN_YELLOW_PEAS",
+ val: 19
+ },
+ {
+ key: "GRAIN_LENTILS_ROBIN",
+ val: 20
+ },
+ {
+ key: "GRAIN_LENTILS_REDBERRY",
+ val: 21
+ },
+ {
+ key: "GRAIN_LENTILS_BLAZE",
+ val: 22
+ },
+ {
+ key: "GRAIN_CUSTOM",
+ val: 23
+ }
+ ]
+};
+
+//aviation enums start here
+const gateComponentType: data = {
+ name: "gateComponentType",
+ pairs: [
+ {
+ key: "GATE_COMPONENT_TYPE_UNKNOWN",
+ val: 0
+ },
+ {
+ key: "GATE_COMPONENT_TYPE_TEMP",
+ val: 1
+ },
+ {
+ key: "GATE_COMPONENT_TYPE_PRESSURE",
+ val: 2
+ },
+ {
+ key: "GATE_COMPONENT_TYPE_AMBIENT",
+ val: 3
+ }
+ ]
+};
+
+const pcaState: data = {
+ name: "PCAState",
+ pairs: [
+ {
+ key: "PCA_STATE_UNKNOWN",
+ val: 0
+ },
+ {
+ key: "PCA_STATE_OFF",
+ val: 1
+ },
+ {
+ key: "PCA_STATE_IN_BOUNDS",
+ val: 2
+ },
+ {
+ key: "PCA_STATE_OUT_BOUNDS",
+ val: 3
+ }
+ ]
+};
+
+//mining enums start here
+const placeableType: data = {
+ name: "placeableType",
+ pairs: [
+ {
+ key: "PLACEABLE_TYPE_INVALID",
+ val: 0
+ },
+ {
+ key: "PLACEABLE_TYPE_DEFAULT",
+ val: 1
+ },
+ {
+ key: "PLACEABLE_TYPE_FAN",
+ val: 2
+ },
+ {
+ key: "PLACEABLE_TYPE_SHAFT",
+ val: 3
+ },
+ {
+ key: "PLACEABLE_TYPE_SENSOR",
+ val: 4
+ }
+ ]
+};
+
+//construction enums start here
+const fuelType: data = {
+ name: "FuelType",
+ pairs: [
+ {
+ key: "FUEL_TYPE_UNKNOWN",
+ val: 0
+ },
+ {
+ key: "FUEL_TYPE_GASOLINE",
+ val: 1
+ },
+ {
+ key: "FUEL_TYPE_DIESEL",
+ val: 2
+ },
+ {
+ key: "FUEL_TYPE_PROPANE",
+ val: 3
+ }
+ ]
+};
+
+export default function GeneralEnums() {
+ const enumList = [
+ addressType,
+ componentType,
+ contractType,
+ binMode,
+ binShape,
+ binStorage,
+ deviceActivity,
+ devicePlatform,
+ deviceProduct,
+ deviceState,
+ fieldMarkerType,
+ fuelType,
+ gateComponentType,
+ grain,
+ interactionsResultType,
+ limitStatus,
+ measurementType,
+ mutator,
+ objectType,
+ pcaState,
+ permission,
+ placeableType,
+ powerSubtype,
+ relationalOperator,
+ sleepType,
+ transactionState
+ ];
+
+ return (
+
+
+ Enumerators
+
+
+ {enumList.map((e, i) => (
+
+
+
+ ))}
+
+
+ );
+}
diff --git a/src/apiDocs/information.tsx b/src/apiDocs/information.tsx
new file mode 100644
index 0000000..bd3e036
--- /dev/null
+++ b/src/apiDocs/information.tsx
@@ -0,0 +1,76 @@
+import { Box, List, ListItem, Typography } from "@mui/material";
+
+export default function Information() {
+ return (
+
+
+ General Information
+
+ In order to use the API you will need to make sure to have a team key set and included in
+ the header in the format key: Authorization, value: Apikey aaabbb for example
+ "Authorization: Apikey fekssxi1n5gh1"
+
+
+
+ Global Variables
+
+ There are two global url parameters that exist for all API calls, keys and types, they are
+ both comma seperated strings that are used to add to the context chain for permissions.
+ For regular calls the team that the api key you place in the header belongs to is the only
+ option in the context and therefore when listing objects such as bins it will consider all
+ of the bins accessible to the team. If you add to the keys and types options it will add
+ the array into the context of the api call so for example if you want to load only the
+ bins in a specified binyard you add the key of the the binyard to the keys and 'binyard'
+ to the type like so
+
+
+ 'https://api.brandxtech.ca/v1/bins?keys=ST0MQc7_y4aHNA&types=binyard'
+
+
+ Adding this into the context will then cause it to go down the chain checking to make sure
+ the team has access to the yard and then loading the bins that yard has access to. Note
+ that in the above example adding more than one yard would come back with nothing as it
+ would check the team to the yard and then that yard to the next yard which is not
+ possible. Also Note that the types defined in the parameter must be a type as defined by
+ us and are case sensitive, see below for a list of acceptable types.
+
+
+ Acceptable Types
+
+
+ backpack
+ bin
+ binyard
+ component
+ contract
+ device
+ device_preset
+ field
+ field_marker
+ file
+ firmware
+ gate
+ grainbag
+ group
+ harvest_plan
+ harvest_year
+ home_marker
+ interaction
+ link
+ note
+ objectHeater
+ mine
+ notificationBanner
+ site
+ tag
+ terminal
+ transaction
+ task
+ team
+ upgrade
+ user
+
+
+
+ );
+}
diff --git a/src/navigation/Router.tsx b/src/navigation/Router.tsx
index fcccc58..377fd7c 100644
--- a/src/navigation/Router.tsx
+++ b/src/navigation/Router.tsx
@@ -48,6 +48,7 @@ const Heater = lazy(() => import("pages/Heater"));
const Tasks = lazy(() => import("pages/Tasks"));
const Transactions = lazy(() => import("pages/Transactions"));
const BinCableEstimator = lazy(() => import("pages/BinCableEstimator"));
+const APIDocs = lazy(() => import("pages/APIDocs"));
interface Props {
toggleTheme: () => void;
@@ -322,6 +323,9 @@ export default function Router(props: Props) {
{user.hasFeature("installer") &&
} />
}
+ {user.hasFeature("developer") &&
+ } />
+ }
{/* Map pages */}
} />
diff --git a/src/navigation/SideNavigator.tsx b/src/navigation/SideNavigator.tsx
index 9d038ac..36c5be5 100644
--- a/src/navigation/SideNavigator.tsx
+++ b/src/navigation/SideNavigator.tsx
@@ -1,4 +1,4 @@
-import { ChevronRight, People, Person, SyncAlt } from "@mui/icons-material";
+import { ChevronRight, Code, People, Person, SyncAlt } from "@mui/icons-material";
import ChevronLeft from "@mui/icons-material/ChevronLeft";
import {
darken,
@@ -337,6 +337,20 @@ export default function SideNavigator(props: Props) {
}
+ {user.hasFeature("developer") &&
+
+ goTo("/api")}
+ classes={getClasses("/api")}
+ >
+
+
+
+ {open && }
+
+
+ }
)
}
diff --git a/src/pages/APIDocs.tsx b/src/pages/APIDocs.tsx
new file mode 100644
index 0000000..bbc37df
--- /dev/null
+++ b/src/pages/APIDocs.tsx
@@ -0,0 +1,119 @@
+import {
+ Box,
+ darken,
+ Drawer,
+ List,
+ ListItem,
+ Theme,
+ Toolbar,
+ Typography
+} from "@mui/material";
+import { useState } from "react";
+import PageContainer from "./PageContainer";
+import Endpoints from "apiDocs/endpoints";
+import Definitions from "apiDocs/definitions";
+import Information from "apiDocs/information";
+import Enumerators from "apiDocs/enumerators";
+import { makeStyles } from "@mui/styles";
+
+const drawerWidth = 240;
+
+const useStyles = makeStyles((theme: Theme) => ({
+ root: {
+ display: "flex"
+ },
+ drawer: {
+ width: drawerWidth,
+ flexShrink: 0,
+ zIndex: 10
+ },
+ drawerPaper: {
+ width: drawerWidth
+ },
+ drawerContainer: {
+ overflow: "auto"
+ },
+ content: {
+ flexGrow: 1,
+ padding: theme.spacing(3)
+ },
+ selected: {
+ background: darken(theme.palette.background.paper, 0.25),
+ cursor: "pointer"
+ },
+ menuItem: {
+ cursor: "pointer",
+ "&:hover": {
+ background: darken(theme.palette.background.paper, 0.10)
+ }
+ }
+ })
+);
+
+export default function APIDocs() {
+ const [currentView, setCurrentView] = useState("info");
+ const classes = useStyles();
+
+ return (
+
+
+
+
+
+ API Documentation
+
+
+
+ {currentView === "info" && }
+ {currentView === "endpoints" && }
+ {currentView === "definitions" && }
+ {currentView === "enums" && }
+
+
+
+
+
+
+ {
+ setCurrentView("info");
+ }}>
+ Information
+
+ {
+ setCurrentView("endpoints");
+ }}>
+ Endpoints
+
+ {
+ setCurrentView("definitions");
+ }}>
+ Definitions
+
+ {
+ setCurrentView("enums");
+ }}>
+ Enumerators
+
+
+
+
+
+
+ );
+}