From 5df58e115bbe205285b627c02d968ba87a6c0753 Mon Sep 17 00:00:00 2001 From: Stephen Price Date: Wed, 8 Jul 2020 20:08:18 -0500 Subject: [PATCH] added models --- models/account.v1.json | 22 ++++++++++++++++++++++ models/location.v1.json | 21 +++++++++++++++++++++ models/user.v1.json | 21 +++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 models/account.v1.json create mode 100644 models/location.v1.json create mode 100644 models/user.v1.json diff --git a/models/account.v1.json b/models/account.v1.json new file mode 100644 index 0000000..d766b23 --- /dev/null +++ b/models/account.v1.json @@ -0,0 +1,22 @@ +{ + "title": "Account", + "type": "object", + "description": "Users can belong to multiple accounts on CloudHome's federated services. In other words users have a unique id that can interact or manage devices on more than one account or location", + "properties": { + "accountID": { + "type": "string" + }, + "accountName": { + "type": "string" + }, + "userCount": { + "type": "integer" + }, + "deviceCount": { + "type": "integer" + } + }, + "required": [ + "accountID" + ] +} \ No newline at end of file diff --git a/models/location.v1.json b/models/location.v1.json new file mode 100644 index 0000000..e4c3ee5 --- /dev/null +++ b/models/location.v1.json @@ -0,0 +1,21 @@ +{ + "title": "Location", + "type": "object", + "description": "Device geolocation at most recent update. Users can optionally choose to turn off geolocation, however key features such as mapping will not be available.", + "properties": { + "lat": { + "type": "number", + "description": "decimal degrees" + }, + "long": { + "type": "number", + "description": "decimal degrees" + }, + "geoTracking": { + "type": "boolean" + } + }, + "required": [ + "geoTracking" + ] +} \ No newline at end of file diff --git a/models/user.v1.json b/models/user.v1.json new file mode 100644 index 0000000..637478e --- /dev/null +++ b/models/user.v1.json @@ -0,0 +1,21 @@ +{ + "title": "User", + "type": "object", + "description": "Users associated with a CloudHome account. Administrative priviledges are indicated to show which users can configure device management and which users can only interact with configured devices", + "properties": { + "userID": { + "type": "string" + }, + "username": { + "type": "string" + }, + "email": { + "type": "string" + } + }, + "required": [ + "userID", + "username", + "email" + ] +} \ No newline at end of file