diff --git a/android/app/build.gradle b/android/app/build.gradle index 3778534..c54655d 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -43,6 +43,7 @@ android { targetSdkVersion 31 versionCode flutterVersionCode.toInteger() versionName flutterVersionName + multiDexEnabled true } buildTypes { @@ -50,6 +51,9 @@ android { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. signingConfig signingConfigs.debug + minifyEnabled true + shrinkResources true + debuggable false } } } diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 3255622..15019a0 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -2,7 +2,7 @@ package="be.myhomie.myhomie_app"> (context); + final notchInset = MediaQuery.of(context).padding; + return Container( + alignment: Alignment.bottomCenter, + child: Stack( + //mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + /*Positioned( + top: -20, + left: -1, + child: SvgPicture.asset( + 'assets/images/hungry/top_bar.svg', + width: size.width * 1.01, + ) + ),*/ + Positioned( + bottom: 0, + child: ClipPath( + //clipper: WaveClipper(), + clipBehavior: Clip.hardEdge, + child: Container( + height: size.height * 0.4, + width: MediaQuery.of(context).size.width, + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.centerRight, + end: Alignment.centerLeft, + colors: [ + /*Color(0xFFDD79C2), + Color(0xFFB65FBE), + Color(0xFF9146BA), + Color(0xFF7633B8), + Color(0xFF6528B6), + Color(0xFF6025B6)*/ + Color(0xFF306bac), + Color(0xFF308aae), + Color(0xFF309cb0), + ], + ), + ), + ), + ), + ), + Positioned.fill( + child: Padding( + padding: EdgeInsets.only(top: notchInset.top + 10), + child: Align( + alignment: Alignment.topCenter, + child: Text( + index.getTitle(), + style: kHeadingTextStyle, + ), + ), + ), + ), + /*IconButton(icon: Icon(Icons.menu), onPressed: () {}), + Text( + getPageTitle(), + style: TextStyle(fontSize: 18, fontWeight: FontWeight.w500), + ), + IconButton(icon: Icon(Icons.favorite), onPressed: () {}),*/ + ], + ), + ); + } + + @override + Size get preferredSize => Size.fromHeight(_preferredHeight); + + getPageTitle() { + return currentIndex == 0 ? 'MyHomie' : 'other'; + } +} \ No newline at end of file diff --git a/lib/Components/Custom_Navigation_Bar/custom_bottom_navigation_bar.dart b/lib/Components/Custom_Navigation_Bar/custom_bottom_navigation_bar.dart new file mode 100644 index 0000000..8e4419a --- /dev/null +++ b/lib/Components/Custom_Navigation_Bar/custom_bottom_navigation_bar.dart @@ -0,0 +1,131 @@ +import 'package:flutter/material.dart'; +import 'package:myhomie_app/Screens/Main/MainPage.dart'; +import 'package:myhomie_app/constants.dart'; + +import 'custom_nav_item.dart'; + +class CustomBottomNavigationBar extends StatefulWidget { + @override + _CustomBottomNavigationBarState createState() => + _CustomBottomNavigationBarState(); +} + +class _CustomBottomNavigationBarState extends State { + setPage() { + setState(() { + pageController.jumpToPage(currentIndex); + }); + } + + @override + Widget build(BuildContext context) { + Size size = MediaQuery.of(context).size; + return BottomAppBar( //bottom navigation bar on scaffold + color: kMainColor, + shape: CircularNotchedRectangle(), //shape of notch + notchMargin: 5, //notche margin between floating button and bottom appbar + child: Container( + /*decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.centerLeft, + end: Alignment.centerRight, + colors: [ + /*Color(0xFFDD79C2), + Color(0xFFB65FBE), + Color(0xFF9146BA), + Color(0xFF7633B8), + Color(0xFF6528B6), + Color(0xFF6025B6)*/ + Color(0xFF306bac), + Color(0xFF308aae), + Color(0xFF309cb0), + ], + ), + ),*/ + child: Row( //children inside bottom appbar + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Container( + width: size.width *0.4, + //color: Colors.greenAccent, + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + CustomNavItem(setPage: setPage, icon: NavItemIcon.security, id: 1), + CustomNavItem(setPage: setPage, icon: NavItemIcon.automations, id: 2), + ], + ), + ), + SizedBox(width: size.width *0.2, /*child: Container(color: Colors.green,)*/), + Container( + width: size.width *0.4, + //color: Colors.greenAccent, + child: Row( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + CustomNavItem(setPage: setPage, icon: NavItemIcon.energy, id: 3), + CustomNavItem(setPage: setPage, icon: NavItemIcon.profile, id: 4), + ], + ), + ), + ], + ), + ), + );/*;*/ + } +} + +/* +SizedBox( + height: 75, + child: Material( + color: Colors.green, + child: Stack( + children: [ + Positioned( + bottom: 0, + child: Container( + height: size.height * 0.4, + width: MediaQuery.of(context).size.width, + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.centerLeft, + end: Alignment.centerRight, + colors: [ + /*Color(0xFFDD79C2), + Color(0xFFB65FBE), + Color(0xFF9146BA), + Color(0xFF7633B8), + Color(0xFF6528B6), + Color(0xFF6025B6)*/ + Color(0xFF306bac), + Color(0xFF308aae), + Color(0xFF309cb0), + ], + ), + ), + ), + ), + Positioned( + bottom: 10, + width: MediaQuery.of(context).size.width, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + CustomNavItem(setPage: setPage, icon: NavItemIcon.home, id: 0), + CustomNavItem(setPage: setPage, icon: NavItemIcon.security, id: 1), + CustomNavItem(setPage: setPage, icon: NavItemIcon.energy, id: 2), + CustomNavItem(setPage: setPage, icon: NavItemIcon.health, id: 3), + //CustomNavItem(setPage: setPage, icon: NavItemIcon.profile, id: 4), + ], + ), + ), + ], + ), + ), + ) +* */ \ No newline at end of file diff --git a/lib/Components/Custom_Navigation_Bar/custom_clipper.dart b/lib/Components/Custom_Navigation_Bar/custom_clipper.dart new file mode 100644 index 0000000..81b6015 --- /dev/null +++ b/lib/Components/Custom_Navigation_Bar/custom_clipper.dart @@ -0,0 +1,29 @@ +import 'package:flutter/material.dart'; + +class WaveClipper extends CustomClipper { + @override + Path getClip(Size size) { + + var controlPoint1 = Offset(size.width *0.2, size.height*0.75); + var controlPoint2 = Offset(size.width *0.55, size.height*0.76); + var endPoint = Offset(size.width *0.62, size.height*0.79); + + var controlPoint12 = Offset(size.width *0.82, size.height*0.85); + var controlPoint21 = Offset(size.width *0.93, size.height*1.09); + var endPoint1 = Offset(size.width, size.height*0.78); + + Path path = Path() + ..lineTo(0, size.height) + ..cubicTo(controlPoint1.dx, controlPoint1.dy, controlPoint2.dx, + controlPoint2.dy, endPoint.dx, endPoint.dy) + ..cubicTo(controlPoint12.dx, controlPoint12.dy, controlPoint21.dx, + controlPoint21.dy, endPoint1.dx, endPoint1.dy) + //..lineTo(size.width, size.height) + ..lineTo(size.width, 0) + ..close(); + return path; + } + + @override + bool shouldReclip(CustomClipper oldClipper) => false; +} \ No newline at end of file diff --git a/lib/Components/Custom_Navigation_Bar/custom_nav_item.dart b/lib/Components/Custom_Navigation_Bar/custom_nav_item.dart new file mode 100644 index 0000000..0919a5d --- /dev/null +++ b/lib/Components/Custom_Navigation_Bar/custom_nav_item.dart @@ -0,0 +1,70 @@ +import 'package:flutter/material.dart'; +import 'package:flare_flutter/flare_actor.dart'; +import 'package:myhomie_app/Screens/Main/MainPage.dart'; +import 'package:myhomie_app/Screens/Main/index.dart'; +import 'package:provider/provider.dart'; + +class CustomNavItem extends StatelessWidget { + final NavItemIcon icon; + final int id; + final Function setPage; + + const CustomNavItem({this.setPage, this.icon, this.id}); + + @override + Widget build(BuildContext context) { + final index = Provider.of(context); + Size size = MediaQuery.of(context).size; + return GestureDetector( + onTap: () { + currentIndex = id; + index.setIndex(currentIndex); + setPage(); + }, + child: Container( + width: 50, + height: 50, + child: getIconSvg(icon, size.width * 0.1, index.getIndex()), + ), + ); + } + + getIconSvg(NavItemIcon icon, double size, int index) { + switch(icon.name) { + case 'home': + return Icon( + Icons.home, + size: 25, + color: Colors.white, + ); + case 'security': + return Icon( + Icons.security, + size: 25, + color: Colors.white, + ); + case 'automations': + return Icon( + Icons.cable_rounded, + size: 25, + color: Colors.white, + ); + case 'energy': + return Icon( + Icons.power, + size: 25, + color: Colors.white, + ); + case 'profile': //Todo show user image ? + return Icon( + Icons.person, + size: 25, + color: Colors.white, + ); + } + //return new FlareActor("assets/animations/bottom_navigation/"+ icon.toString().split(".").last +".flr", alignment:Alignment.center, fit:BoxFit.contain, animation: index == icon.index ? "Selected" : "Unselected"); //icon.index + } + +} + +enum NavItemIcon { home, security, automations, energy, profile } \ No newline at end of file diff --git a/lib/Components/loading.dart b/lib/Components/loading.dart new file mode 100644 index 0000000..8853516 --- /dev/null +++ b/lib/Components/loading.dart @@ -0,0 +1,22 @@ +import 'package:flare_flutter/flare_actor.dart'; +import 'package:flutter/material.dart'; + +class Loading extends StatelessWidget { + Loading({Key key}) : super(key: key); + + @override + Widget build(BuildContext context) { + Size size = MediaQuery.of(context).size; + return Container( + width: size.width, + height: size.height, + color: Colors.transparent, + child: FlareActor( + 'assets/animations/MDLF_animation.flr', + alignment: Alignment.center, + fit: BoxFit.scaleDown, + animation: 'Rotate', + ), + ); + } +} \ No newline at end of file diff --git a/lib/Helpers/DatabaseHelper.dart b/lib/Helpers/DatabaseHelper.dart index 57f0981..488d3bd 100644 --- a/lib/Helpers/DatabaseHelper.dart +++ b/lib/Helpers/DatabaseHelper.dart @@ -10,8 +10,7 @@ class DatabaseHelper { static final table = 'homieAppContext'; - static final columnId = 'id'; - static final columnUserId = 'deviceId'; + static final columnUserId = 'userId'; static final columnHomeId = 'homeId'; static final columnToken = 'token'; static final columnHost = 'host'; @@ -37,44 +36,43 @@ class DatabaseHelper { Future _onCreate(Database db, int version) async { await db.execute(''' CREATE TABLE $table ( - $columnId TEXT NOT NULL PRIMARY KEY, - $columnUserId TEXT NOT NULL, - $columnToken TEXT NOT NULL, - $columnHomeId TEXT NOT NULL, + $columnUserId TEXT NOT NULL PRIMARY KEY, + $columnHomeId TEXT, $columnHost TEXT NOT NULL, - $columnLanguage TEXT NOT NULL + $columnLanguage TEXT NOT NULL, + $columnToken TEXT NOT NULL ) '''); } - Future insert(HomieAppContext tabletAppContext) async { + Future insert(HomieAppContext homieAppContext) async { Database db = await instance.database; - var res = await db.insert(table, tabletAppContext.toMap()); + var res = await db.insert(table, homieAppContext.toMap()); return res; } - Future update(HomieAppContext tabletAppContext) async { + Future update(HomieAppContext homieAppContext) async { // Get a reference to the database. final db = await instance.database; await db.update( - 'tabletAppContext', - tabletAppContext.toMap(), - where: "id = ?", - whereArgs: [tabletAppContext.id], + 'homieAppContext', + homieAppContext.toMap(), + where: "$columnHomeId = ?", + whereArgs: [homieAppContext.userId], ); } Future>> queryAllRows() async { Database db = await instance.database; - var res = await db.query(table, orderBy: "$columnId DESC"); + var res = await db.query(table, orderBy: "$columnUserId DESC"); return res; } - Future delete(String email) async { + Future delete(String userId) async { Database db = await instance.database; - return await db.delete(table, where: '$columnId = ?', whereArgs: [email]); + return await db.delete(table, where: '$columnUserId = ?', whereArgs: [userId]); } Future clearTable() async { @@ -90,11 +88,10 @@ class DatabaseHelper { print("DB - CONTEXT --- "); homieAppContext = HomieAppContext( - id: element["id"], userId: element["userId"], + homeId: element["homeId"], token: element["token"], host: element["host"], - homeId: element["homeId"], language: element["language"] ); }); diff --git a/lib/Helpers/MQTTHelper.dart b/lib/Helpers/MQTTHelper.dart index 9c9a39b..9c42773 100644 --- a/lib/Helpers/MQTTHelper.dart +++ b/lib/Helpers/MQTTHelper.dart @@ -5,6 +5,7 @@ import 'package:mqtt_client/mqtt_client.dart'; import 'package:mqtt_client/mqtt_server_client.dart'; import 'package:myhomie_app/Models/homieContext.dart'; import 'package:myhomie_app/app_context.dart'; +import 'package:uuid/uuid.dart'; class MQTTHelper { @@ -74,8 +75,10 @@ class MQTTHelper { homieAppContext = new HomieAppContext(host: '192.168.31.140', userId: 'TODO'); } // TO DEBUG + print(homieAppContext.host); + if(homieAppContext.host != null) { - homieAppContext.clientMQTT = MqttServerClient.withPort(homieAppContext.host.replaceAll('http://', ''), 'homie_app_'+homieAppContext.userId, 1883); + homieAppContext.clientMQTT = MqttServerClient.withPort(homieAppContext.host.replaceAll('http://', ''), 'homie_app_'+ Uuid().v1(), 1883); isInstantiated = true; homieAppContext.clientMQTT.logging(on: false); @@ -89,6 +92,8 @@ class MQTTHelper { "connected": false }; + print("Try connect mqtt"); + final connMessage = MqttConnectMessage().authenticateAs('user', 'user') // TODO ONLINE .keepAliveFor(60) .withWillTopic('player/status') @@ -101,7 +106,6 @@ class MQTTHelper { homieAppContext.clientMQTT.autoReconnect = true; try { await homieAppContext.clientMQTT.connect(); - } catch (e) { print('Exception: $e'); homieAppContext.clientMQTT.disconnect(); diff --git a/lib/Models/homieContext.dart b/lib/Models/homieContext.dart index d978acd..4bf7e95 100644 --- a/lib/Models/homieContext.dart +++ b/lib/Models/homieContext.dart @@ -8,19 +8,16 @@ import 'package:myhomie_app/client.dart'; class HomieAppContext with ChangeNotifier{ Client clientAPI; MqttServerClient clientMQTT; - String id; - String host; - String language; String userId; String homeId; String token; + String host; + String language; - - HomieAppContext({this.id, this.userId, this.homeId, this.host, this.language, this.token}); + HomieAppContext({this.userId, this.homeId, this.host, this.language, this.token}); Map toMap() { return { - 'id': id, 'userId': userId, 'homeId': homeId, 'host': host, @@ -31,7 +28,6 @@ class HomieAppContext with ChangeNotifier{ factory HomieAppContext.fromJson(Map json) { return new HomieAppContext( - id: json['id'] as String, userId: json['userId'] as String, host: json['host'] as String, homeId: json['homeId'] as String, @@ -43,6 +39,6 @@ class HomieAppContext with ChangeNotifier{ // Implement toString to make it easier to see information about @override String toString() { - return 'TabletAppContext{id: $id, userId: $userId, homeId: $homeId, language: $language, host: $host}'; + return 'TabletAppContext{userId: $userId, homeId: $homeId, language: $language, host: $host}'; } } \ No newline at end of file diff --git a/lib/Screens/Login/components/body.dart b/lib/Screens/Login/components/body.dart index 659da0e..0d304a8 100644 --- a/lib/Screens/Login/components/body.dart +++ b/lib/Screens/Login/components/body.dart @@ -1,15 +1,19 @@ import 'package:flutter/material.dart'; +import 'package:fluttertoast/fluttertoast.dart'; import 'package:mqtt_client/mqtt_server_client.dart'; import 'package:mycoreapi/api.dart'; import 'package:myhomie_app/Components/Buttons/rounded_button.dart'; import 'package:myhomie_app/Components/rounded_input_field.dart'; import 'package:myhomie_app/Components/rounded_password_field.dart'; import 'package:myhomie_app/Models/homieContext.dart'; -import 'package:myhomie_app/Screens/Home/HomePage.dart'; +import 'package:myhomie_app/Screens/Main/MainPage.dart'; import 'package:myhomie_app/Screens/Login/components/background.dart'; import 'package:myhomie_app/app_context.dart'; import 'package:myhomie_app/client.dart'; import 'package:provider/provider.dart'; +import 'package:uuid/uuid.dart'; + +import '../../../Helpers/DatabaseHelper.dart'; class Body extends StatefulWidget { @@ -23,7 +27,7 @@ class Body extends StatefulWidget { class _BodyState extends State { final clientAPI = Client('http://192.168.31.140'); // TODO field - + TokenDTO token; @override Widget build(BuildContext context) { final appContext = Provider.of(context); @@ -57,19 +61,50 @@ class _BodyState extends State { var connected = await authenticateTRY(); if (connected) { HomieAppContext homieAppContext = new HomieAppContext(); + + UserInfoDetailDTO user = await clientAPI.userApi.userGet("6182c472e20a6dbcfe8fe82c"); // TO replace user get by email + homieAppContext.host = "http://192.168.31.140";// TODO - homieAppContext.clientMQTT = new MqttServerClient(homieAppContext.host.replaceAll('http://', ''),'tablet_app_'+'TODODODO'); - // homieAppContext.clientAPI = client; // TODO - homieAppContext.userId = "TODO"; // TODO + homieAppContext.clientMQTT = new MqttServerClient(homieAppContext.host.replaceAll('http://', ''),'my_homie_app_'+ Uuid().v1()); + homieAppContext.clientAPI = clientAPI; + homieAppContext.userId = user.id; + homieAppContext.language = user.language; + homieAppContext.token = token.accessToken; + + // TODO check if we select by default or ask user to select + if(user.homeIds.length > 0) { + homieAppContext.homeId = user.homeIds.first; + } else { + // TODO invite home creation + } + setState(() { appContext.setContext(homieAppContext); }); + // STORE IT LOCALLY (SQLite) + HomieAppContext localContext = await DatabaseHelper.instance.getData(); + if (localContext != null) { // Check if sql DB exist + await DatabaseHelper.instance.update(homieAppContext); + } else { + await DatabaseHelper.instance.insert(homieAppContext); + } + + Fluttertoast.showToast( + msg: "Connexion réussie", + toastLength: Toast.LENGTH_SHORT, + gravity: ToastGravity.BOTTOM, + timeInSecForIosWeb: 1, + backgroundColor: Colors.lightGreen, + textColor: Colors.white, + fontSize: 16.0 + ); + Navigator.pushAndRemoveUntil( context, MaterialPageRoute( builder: (context) { - return HomePage(); + return MainPage(); }, ), (Route route) => false @@ -106,7 +141,7 @@ class _BodyState extends State { try { //LoginDTO loginDTO = new LoginDTO(email: "test@email.be", password: "kljqsdkljqsd"); LoginDTO loginDTO = new LoginDTO(email: "", password: ""); - TokenDTO token = await clientAPI.authenticationApi.authenticationAuthenticateWithJson(loginDTO); + token = await clientAPI.authenticationApi.authenticationAuthenticateWithJson(loginDTO); print("Token ??"); print(token); print(token.accessToken); diff --git a/lib/Screens/Main/Automations/automations.dart b/lib/Screens/Main/Automations/automations.dart new file mode 100644 index 0000000..1049c2c --- /dev/null +++ b/lib/Screens/Main/Automations/automations.dart @@ -0,0 +1,70 @@ +import 'package:flutter/material.dart'; +import 'package:myhomie_app/app_context.dart'; +import 'package:provider/provider.dart'; + +class AutomationsScreen extends StatefulWidget { + AutomationsScreen({Key key}) : super(key: key); + + @override + _AutomationsScreenState createState() => _AutomationsScreenState(); +} + +class _AutomationsScreenState extends State { + bool isLoading = true; + //List messages; + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + Size size = MediaQuery.of(context).size; + final appContext = Provider.of(context); + + return interfaceElements(); + + /*if(appContext.getContext().feed != null) { + return interfaceElements(); + } else { + return FutureBuilder( + future: Message.getMessages(this.messages, appContext, false, true), + builder: (context, AsyncSnapshot> snapshot) { + if (snapshot.connectionState == ConnectionState.done) { + return interfaceElements(); + } else if (snapshot.connectionState == ConnectionState.none) { + print('ConnectionState.none'); + return Text("No data"); + } else { + return Container(height: size.height * 0.2, child: Loading()); + } + } + ); + }*/ + } + + interfaceElements() { + Size size = MediaQuery.of(context).size; + final appContext = Provider.of(context); + return RefreshIndicator( + color: Theme.of(context).primaryColor, + displacement: 20, + onRefresh: () async { + print("TODO refresh"); + //await Message.getMessages(this.messages, appContext, true, true); + }, + child: Container( + height: size.height * 0.8, + child: SingleChildScrollView( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text("TODO Automations") + ], + ), + ), + ), + ); + } +} \ No newline at end of file diff --git a/lib/Screens/Main/Energy/energy.dart b/lib/Screens/Main/Energy/energy.dart new file mode 100644 index 0000000..32eeafe --- /dev/null +++ b/lib/Screens/Main/Energy/energy.dart @@ -0,0 +1,70 @@ +import 'package:flutter/material.dart'; +import 'package:myhomie_app/app_context.dart'; +import 'package:provider/provider.dart'; + +class EnergyScreen extends StatefulWidget { + EnergyScreen({Key key}) : super(key: key); + + @override + _EnergyScreenState createState() => _EnergyScreenState(); +} + +class _EnergyScreenState extends State { + bool isLoading = true; + //List messages; + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + Size size = MediaQuery.of(context).size; + final appContext = Provider.of(context); + + return interfaceElements(); + + /*if(appContext.getContext().feed != null) { + return interfaceElements(); + } else { + return FutureBuilder( + future: Message.getMessages(this.messages, appContext, false, true), + builder: (context, AsyncSnapshot> snapshot) { + if (snapshot.connectionState == ConnectionState.done) { + return interfaceElements(); + } else if (snapshot.connectionState == ConnectionState.none) { + print('ConnectionState.none'); + return Text("No data"); + } else { + return Container(height: size.height * 0.2, child: Loading()); + } + } + ); + }*/ + } + + interfaceElements() { + Size size = MediaQuery.of(context).size; + final appContext = Provider.of(context); + return RefreshIndicator( + color: Theme.of(context).primaryColor, + displacement: 20, + onRefresh: () async { + print("TODO refresh"); + //await Message.getMessages(this.messages, appContext, true, true); + }, + child: Container( + height: size.height * 0.8, + child: SingleChildScrollView( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text("TODO Energy") + ], + ), + ), + ), + ); + } +} \ No newline at end of file diff --git a/lib/Screens/Main/Home/home.dart b/lib/Screens/Main/Home/home.dart new file mode 100644 index 0000000..b167a50 --- /dev/null +++ b/lib/Screens/Main/Home/home.dart @@ -0,0 +1,70 @@ +import 'package:flutter/material.dart'; +import 'package:myhomie_app/app_context.dart'; +import 'package:provider/provider.dart'; + +class HomeScreen extends StatefulWidget { + HomeScreen({Key key}) : super(key: key); + + @override + _HomeScreenState createState() => _HomeScreenState(); +} + +class _HomeScreenState extends State { + bool isLoading = true; + //List messages; + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + Size size = MediaQuery.of(context).size; + final appContext = Provider.of(context); + + return interfaceElements(); + + /*if(appContext.getContext().feed != null) { + return interfaceElements(); + } else { + return FutureBuilder( + future: Message.getMessages(this.messages, appContext, false, true), + builder: (context, AsyncSnapshot> snapshot) { + if (snapshot.connectionState == ConnectionState.done) { + return interfaceElements(); + } else if (snapshot.connectionState == ConnectionState.none) { + print('ConnectionState.none'); + return Text("No data"); + } else { + return Container(height: size.height * 0.2, child: Loading()); + } + } + ); + }*/ + } + + interfaceElements() { + Size size = MediaQuery.of(context).size; + final appContext = Provider.of(context); + return RefreshIndicator( + color: Theme.of(context).primaryColor, + displacement: 20, + onRefresh: () async { + print("TODO refresh"); + //await Message.getMessages(this.messages, appContext, true, true); + }, + child: Container( + height: size.height * 0.8, + child: SingleChildScrollView( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text("TODO Home - coucou test") + ], + ), + ), + ), + ); + } +} \ No newline at end of file diff --git a/lib/Screens/Home/HomePage.dart b/lib/Screens/Main/MainPage.dart similarity index 51% rename from lib/Screens/Home/HomePage.dart rename to lib/Screens/Main/MainPage.dart index 094faa0..2d6c79e 100644 --- a/lib/Screens/Home/HomePage.dart +++ b/lib/Screens/Main/MainPage.dart @@ -2,31 +2,48 @@ import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; -import 'package:flutter/services.dart'; import 'package:mqtt_client/mqtt_client.dart'; import 'package:mqtt_client/mqtt_server_client.dart'; -import 'package:mycoreapi/api.dart'; +import 'package:myhomie_app/Components/Custom_Navigation_Bar/custom_app_bar.dart'; +import 'package:myhomie_app/Components/Custom_Navigation_Bar/custom_bottom_navigation_bar.dart'; +import 'package:myhomie_app/Components/Custom_Navigation_Bar/custom_nav_item.dart'; import 'package:myhomie_app/Helpers/MQTTHelper.dart'; import 'package:myhomie_app/Screens/Debug/DebugPage.dart'; +import 'package:myhomie_app/Screens/Main/Automations/automations.dart'; import 'package:myhomie_app/app_context.dart'; -import 'package:myhomie_app/client.dart'; +import 'package:myhomie_app/constants.dart'; import 'package:provider/provider.dart'; import '../../Models/homieContext.dart'; +import 'Energy/energy.dart'; +import 'Home/home.dart'; +import 'Profile/profile.dart'; +import 'Security/security.dart'; +import 'index.dart'; -class HomePage extends StatefulWidget { - HomePage({Key key}) : super(key: key); +PageController pageController = PageController(initialPage: 0); +int currentIndex = 0; + +class MainPage extends StatefulWidget { + MainPage({Key key}) : super(key: key); @override - _HomePageState createState() => _HomePageState(); + _MainPageState createState() => _MainPageState(); } -class _HomePageState extends State { +class _MainPageState extends State { int _counter = 0; final MqttServerClient client = MqttServerClient.withPort('192.168.31.140', 'flutter_client', 1883); // TODO Add switch button or check online connexion if local broker available + + setPage() { + setState(() { + pageController.jumpToPage(currentIndex); + }); + } + //final MqttServerClient client = MqttServerClient.withPort('myhomie.be', 'flutter_client00', 1883); // TODO ONLINE - void _incrementCounter() { + /*void _incrementCounter() { setState(() { _counter++; @@ -38,10 +55,10 @@ class _HomePageState extends State { client.publishMessage(pubTopic, MqttQos.atLeastOnce, builder.payload); } }); - } + }*/ // connection succeeded - void onConnected() { +/* void onConnected() { print('Connected !!!!!!!!!!!! ----------------------------------'); client.updates.listen((List> c) { @@ -109,7 +126,7 @@ class _HomePageState extends State { return client; return null; - } + }*/ @override Widget build(BuildContext context) { @@ -124,90 +141,90 @@ class _HomePageState extends State { HomieAppContext homieAppContext = appContext.getContext(); - return Scaffold( - appBar: AppBar( - title: Text("HomePage TODO"), - ), - body: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, + return ChangeNotifierProvider( + create: (_) => Index(0, appContext.getContext()), + child: Scaffold( + extendBody: true, + appBar: CustomAppBar(), + body: PageView( + physics: NeverScrollableScrollPhysics(), + controller: pageController, children: [ - Text( - 'You have pushed the button this many times:', - ), - Text( - '$_counter', - style: Theme.of(context).textTheme.headline4, - ), + HomeScreen(), + SecurityScreen(), + AutomationsScreen(), + EnergyScreen(), + ProfileScreen(), ], ), - ), - drawer: Drawer( - child: ListView( - // Important: Remove any padding from the ListView. - padding: EdgeInsets.zero, - children: [ - const DrawerHeader( - decoration: BoxDecoration( - color: Colors.blue, + drawer: Drawer( + child: ListView( + // Important: Remove any padding from the ListView. + padding: EdgeInsets.zero, + children: [ + const DrawerHeader( + decoration: BoxDecoration( + color: Colors.blue, + ), + child: Text('Drawer Header'), ), - child: Text('Drawer Header'), - ), - ListTile( - title: const Text('Debug screen'), - onTap: () { - Navigator.pop(context); - Navigator.push( - context, - MaterialPageRoute( - builder: (context) { - return DebugPage(); - }, - ) - ); - - }, - ), - ], - ), - ), - floatingActionButton: FloatingActionButton( - onPressed: () { - var message = { - "userId": homieAppContext.userId, - "width": size.width, - "height": size.height, - "action": "button0" - }; - - const pubTopic = 'rpiZero/test'; - final builder = MqttClientPayloadBuilder(); - - builder.addString(jsonEncode(message)); - - homieAppContext.clientMQTT.publishMessage(pubTopic, MqttQos.atLeastOnce, builder.payload); - - var message2 = { - "state": "toggle" - }; - - const pubTopic2 = 'zigbee2mqtt/GU10Bureau/set'; - final builder2 = MqttClientPayloadBuilder(); - - builder2.addString(jsonEncode(message2)); - - homieAppContext.clientMQTT.publishMessage(pubTopic2, MqttQos.atLeastOnce, builder2.payload); - /*Navigator.push( - context, - MaterialPageRoute( - builder: (context) { - return DebugPage(); + ListTile( + title: const Text('Debug screen'), + onTap: () { + Navigator.pop(context); + Navigator.push( + context, + MaterialPageRoute( + builder: (context) { + return DebugPage(); + }, + ) + ); }, - ) - )*/ - }, - tooltip: 'Increment', - child: Icon(Icons.add), + ), + ], + ), + ), + floatingActionButton: FloatingActionButton( + backgroundColor: kMainColor, + onPressed: () { + var message = { + "userId": homieAppContext.userId, + "width": size.width, + "height": size.height, + "action": "button0" + }; + + const pubTopic = 'rpiZero/test'; + final builder = MqttClientPayloadBuilder(); + + builder.addString(jsonEncode(message)); + + homieAppContext.clientMQTT.publishMessage(pubTopic, MqttQos.atLeastOnce, builder.payload); + + var message2 = { + "state": "toggle" + }; + + const pubTopic2 = 'zigbee2mqtt/GU10Bureau/set'; + final builder2 = MqttClientPayloadBuilder(); + + builder2.addString(jsonEncode(message2)); + + homieAppContext.clientMQTT.publishMessage(pubTopic2, MqttQos.atLeastOnce, builder2.payload); + /*Navigator.push( + context, + MaterialPageRoute( + builder: (context) { + return DebugPage(); + }, + ) + )*/ + }, + child: CustomNavItem(setPage: setPage, icon: NavItemIcon.home, id: 0), + ), + floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, + bottomNavigationBar: CustomBottomNavigationBar(), ), ); } diff --git a/lib/Screens/Main/Profile/profile.dart b/lib/Screens/Main/Profile/profile.dart new file mode 100644 index 0000000..b75b33d --- /dev/null +++ b/lib/Screens/Main/Profile/profile.dart @@ -0,0 +1,70 @@ +import 'package:flutter/material.dart'; +import 'package:myhomie_app/app_context.dart'; +import 'package:provider/provider.dart'; + +class ProfileScreen extends StatefulWidget { + ProfileScreen({Key key}) : super(key: key); + + @override + _ProfileScreenState createState() => _ProfileScreenState(); +} + +class _ProfileScreenState extends State { + bool isLoading = true; + //List messages; + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + Size size = MediaQuery.of(context).size; + final appContext = Provider.of(context); + + return interfaceElements(); + + /*if(appContext.getContext().feed != null) { + return interfaceElements(); + } else { + return FutureBuilder( + future: Message.getMessages(this.messages, appContext, false, true), + builder: (context, AsyncSnapshot> snapshot) { + if (snapshot.connectionState == ConnectionState.done) { + return interfaceElements(); + } else if (snapshot.connectionState == ConnectionState.none) { + print('ConnectionState.none'); + return Text("No data"); + } else { + return Container(height: size.height * 0.2, child: Loading()); + } + } + ); + }*/ + } + + interfaceElements() { + Size size = MediaQuery.of(context).size; + final appContext = Provider.of(context); + return RefreshIndicator( + color: Theme.of(context).primaryColor, + displacement: 20, + onRefresh: () async { + print("TODO refresh"); + //await Message.getMessages(this.messages, appContext, true, true); + }, + child: Container( + height: size.height * 0.8, + child: SingleChildScrollView( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text("TODO Profile") + ], + ), + ), + ), + ); + } +} \ No newline at end of file diff --git a/lib/Screens/Main/Security/security.dart b/lib/Screens/Main/Security/security.dart new file mode 100644 index 0000000..3513cdf --- /dev/null +++ b/lib/Screens/Main/Security/security.dart @@ -0,0 +1,70 @@ +import 'package:flutter/material.dart'; +import 'package:myhomie_app/app_context.dart'; +import 'package:provider/provider.dart'; + +class SecurityScreen extends StatefulWidget { + SecurityScreen({Key key}) : super(key: key); + + @override + _SecurityScreenState createState() => _SecurityScreenState(); +} + +class _SecurityScreenState extends State { + bool isLoading = true; + //List messages; + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + Size size = MediaQuery.of(context).size; + final appContext = Provider.of(context); + + return interfaceElements(); + + /*if(appContext.getContext().feed != null) { + return interfaceElements(); + } else { + return FutureBuilder( + future: Message.getMessages(this.messages, appContext, false, true), + builder: (context, AsyncSnapshot> snapshot) { + if (snapshot.connectionState == ConnectionState.done) { + return interfaceElements(); + } else if (snapshot.connectionState == ConnectionState.none) { + print('ConnectionState.none'); + return Text("No data"); + } else { + return Container(height: size.height * 0.2, child: Loading()); + } + } + ); + }*/ + } + + interfaceElements() { + Size size = MediaQuery.of(context).size; + final appContext = Provider.of(context); + return RefreshIndicator( + color: Theme.of(context).primaryColor, + displacement: 20, + onRefresh: () async { + print("TODO refresh"); + //await Message.getMessages(this.messages, appContext, true, true); + }, + child: Container( + height: size.height * 0.8, + child: SingleChildScrollView( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text("TODO Security") + ], + ), + ), + ), + ); + } +} \ No newline at end of file diff --git a/lib/Screens/Main/index.dart b/lib/Screens/Main/index.dart new file mode 100644 index 0000000..7153ba2 --- /dev/null +++ b/lib/Screens/Main/index.dart @@ -0,0 +1,41 @@ +import 'package:flutter/material.dart'; +import 'package:myhomie_app/Components/Custom_Navigation_Bar/custom_nav_item.dart'; +import 'package:myhomie_app/Models/homieContext.dart'; + +class Index with ChangeNotifier { + int _index = 0; + HomieAppContext _homieAppContext = new HomieAppContext(); + + Index(this._index, this._homieAppContext); + + getIndex() => _index; + setIndex(int index) { + _index = index; + notifyListeners(); + } + + getTitle() { + switch(NavItemIcon.values[_index]) { + case NavItemIcon.home: + return "Home"; + case NavItemIcon.security: + return "Security"; + case NavItemIcon.automations: + return "Automations"; + case NavItemIcon.energy: + return "Energy"; + case NavItemIcon.profile: + return "Profile"; + /*case NavItemIcon.profile: + if (_homieAppContext == null) { + return ''; + } + if (_homieAppContext.userId == null) { + return 'null'; + } + return _homieAppContext.userId; + break;*/ + } + } + +} \ No newline at end of file diff --git a/lib/constants.dart b/lib/constants.dart index ff0b8e4..4661745 100644 --- a/lib/constants.dart +++ b/lib/constants.dart @@ -6,9 +6,17 @@ const kTitleTextColor = Color(0xFF303030); const kBodyTextColor = Color(0xFF4B4B4B); // TODO const kTextLightColor = Color(0xFFCED5DF); // #ced5df +const kMainColor = Color(0xFF308aae); /* const kTextStyle = TextStyle( fontSize: 23, color: kPrimaryColor, fontWeight: FontWeight.w600, -);*/ \ No newline at end of file +);*/ + +// Text Style +const kHeadingTextStyle = TextStyle( + fontSize: 20, + fontWeight: FontWeight.w600, + color: Color(0xFFFFFFFF) +); \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart index 3e35a5c..63997db 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -4,7 +4,7 @@ import 'package:provider/provider.dart'; import 'Helpers/DatabaseHelper.dart'; import 'Models/homieContext.dart'; -import 'Screens/Home/HomePage.dart'; +import 'Screens/Main/MainPage.dart'; import 'Screens/Login/login_screen.dart'; import 'app_context.dart'; import 'constants.dart'; @@ -68,7 +68,7 @@ class _MyAppState extends State { visualDensity: VisualDensity.adaptivePlatformDensity, ), routes: { - '/home': (context) => HomePage(), + '/home': (context) => MainPage(), '/login': (context) => LoginScreen() } ), diff --git a/mycore_api/.openapi-generator/FILES b/mycore_api/.openapi-generator/FILES index b7cb814..597c08c 100644 --- a/mycore_api/.openapi-generator/FILES +++ b/mycore_api/.openapi-generator/FILES @@ -41,6 +41,9 @@ doc/EventApi.md doc/EventDTO.md doc/EventDetailDTO.md doc/EventDetailDTOAllOf.md +doc/EventFilter.md +doc/EventHomeFilter.md +doc/EventHomeFilterAllOf.md doc/EventType.md doc/FacebookApi.md doc/FacebookAuthModel.md @@ -59,6 +62,7 @@ doc/HomeDetailDTO.md doc/HomeDetailDTOAllOf.md doc/IOTApi.md doc/LayoutApi.md +doc/ListResponseOfEventDetailDTOAndEventHomeFilter.md doc/LoginDTO.md doc/MQTTApi.md doc/MeansOfCommunication.md @@ -75,6 +79,8 @@ doc/ProviderType.md doc/RoomApi.md doc/RoomCreateOrUpdateDetailDTO.md doc/RoomDetailDTO.md +doc/RoomMainDetailDTO.md +doc/RoomMainDetailDTOAllOf.md doc/RoomSummaryDTO.md doc/ScreenDevice.md doc/ScreenDeviceApi.md @@ -158,6 +164,9 @@ lib/model/electricity_production.dart lib/model/event_detail_dto.dart lib/model/event_detail_dto_all_of.dart lib/model/event_dto.dart +lib/model/event_filter.dart +lib/model/event_home_filter.dart +lib/model/event_home_filter_all_of.dart lib/model/event_type.dart lib/model/facebook_auth_model.dart lib/model/geolocalized_mode.dart @@ -170,6 +179,7 @@ lib/model/group_summary_dto.dart lib/model/home_detail_dto.dart lib/model/home_detail_dto_all_of.dart lib/model/home_dto.dart +lib/model/list_response_of_event_detail_dto_and_event_home_filter.dart lib/model/login_dto.dart lib/model/means_of_communication.dart lib/model/mqtt_message_dto.dart @@ -182,6 +192,8 @@ lib/model/provider_dto.dart lib/model/provider_type.dart lib/model/room_create_or_update_detail_dto.dart lib/model/room_detail_dto.dart +lib/model/room_main_detail_dto.dart +lib/model/room_main_detail_dto_all_of.dart lib/model/room_summary_dto.dart lib/model/screen_device.dart lib/model/smart_garden_message.dart @@ -196,29 +208,9 @@ lib/model/user_info.dart lib/model/user_info_detail_dto.dart lib/model/view_by.dart pubspec.yaml -test/alarm_api_test.dart -test/alarm_mode_create_or_update_detail_dto_all_of_test.dart -test/alarm_mode_create_or_update_detail_dto_test.dart -test/alarm_mode_detail_dto_all_of_test.dart -test/alarm_mode_detail_dto_test.dart -test/alarm_mode_dto_test.dart -test/alarm_mode_test.dart -test/alarm_triggered_test.dart -test/alarm_type_test.dart -test/automation_triggered_test.dart -test/create_or_update_home_dto_all_of_test.dart -test/create_or_update_home_dto_test.dart -test/device_state_test.dart -test/event_api_test.dart -test/event_detail_dto_all_of_test.dart -test/event_detail_dto_test.dart -test/event_dto_test.dart -test/event_type_test.dart -test/geolocalized_mode_test.dart -test/home_api_test.dart -test/home_detail_dto_all_of_test.dart -test/home_detail_dto_test.dart -test/home_dto_test.dart -test/programmed_mode_test.dart -test/provider_type_test.dart -test/time_period_alarm_test.dart +test/event_filter_test.dart +test/event_home_filter_all_of_test.dart +test/event_home_filter_test.dart +test/list_response_of_event_detail_dto_and_event_home_filter_test.dart +test/room_main_detail_dto_all_of_test.dart +test/room_main_detail_dto_test.dart diff --git a/mycore_api/README.md b/mycore_api/README.md index d29695f..c87ce65 100644 --- a/mycore_api/README.md +++ b/mycore_api/README.md @@ -56,17 +56,17 @@ try { ## Documentation for API Endpoints -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *https://localhost:5001* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AlarmApi* | [**alarmActivate**](doc\/AlarmApi.md#alarmactivate) | **POST** /api/alarm/activate/{alarmModeId} | Activate current alarm mode +*AlarmApi* | [**alarmActivate**](doc\/AlarmApi.md#alarmactivate) | **POST** /api/alarm/activate/{alarmModeId} | Activate specified alarm mode *AlarmApi* | [**alarmCreate**](doc\/AlarmApi.md#alarmcreate) | **POST** /api/alarm | Create an alarm mode *AlarmApi* | [**alarmCreateDefaultAlarms**](doc\/AlarmApi.md#alarmcreatedefaultalarms) | **POST** /api/alarm/defaults/{homeId} | Create default alarm modes *AlarmApi* | [**alarmDelete**](doc\/AlarmApi.md#alarmdelete) | **DELETE** /api/alarm/{alarmModeId} | Delete an alarm mode *AlarmApi* | [**alarmDeleteAllForHome**](doc\/AlarmApi.md#alarmdeleteallforhome) | **DELETE** /api/alarm/home/{homeId} | Delete all alarm mode for a specified home *AlarmApi* | [**alarmGetAll**](doc\/AlarmApi.md#alarmgetall) | **GET** /api/alarm/{homeId} | Get all alarm modes for the specified home -*AlarmApi* | [**alarmGetDetail**](doc\/AlarmApi.md#alarmgetdetail) | **GET** /api/alarm/detail/{alarmId} | Get detail info of a specified alarm mode +*AlarmApi* | [**alarmGetDetail**](doc\/AlarmApi.md#alarmgetdetail) | **GET** /api/alarm/detail/{alarmModeId} | Get detail info of a specified alarm mode *AlarmApi* | [**alarmUpdate**](doc\/AlarmApi.md#alarmupdate) | **PUT** /api/alarm | Update an alarm mode *AuthenticationApi* | [**authenticationAuthenticateWithForm**](doc\/AuthenticationApi.md#authenticationauthenticatewithform) | **POST** /api/Authentication/Token | Authenticate with form parameters (used by Swagger test client) *AuthenticationApi* | [**authenticationAuthenticateWithJson**](doc\/AuthenticationApi.md#authenticationauthenticatewithjson) | **POST** /api/Authentication/Authenticate | Authenticate with Json parameters (used by most clients) @@ -92,6 +92,7 @@ Class | Method | HTTP request | Description *DeviceApi* | [**deviceGetDevicesByType**](doc\/DeviceApi.md#devicegetdevicesbytype) | **GET** /api/device/{homeId}/type/{type} | Get list of devices from a type *DeviceApi* | [**deviceGetDevicesFromProvider**](doc\/DeviceApi.md#devicegetdevicesfromprovider) | **GET** /api/device/{homeId}/fromProvider/{providerId} | Get devices from provider *DeviceApi* | [**deviceGetDevicesFromZigbee2Mqtt**](doc\/DeviceApi.md#devicegetdevicesfromzigbee2mqtt) | **GET** /api/device/zigbee2Mqtt/{homeId} | Get all zigbee2Mqtt devices +*DeviceApi* | [**deviceSendAction**](doc\/DeviceApi.md#devicesendaction) | **POST** /api/device/action | Send action to device *DeviceApi* | [**deviceUpdate**](doc\/DeviceApi.md#deviceupdate) | **PUT** /api/device/{deviceId} | Update a device *EnergyApi* | [**energyGetElectricityProduction**](doc\/EnergyApi.md#energygetelectricityproduction) | **GET** /api/energy/electricity | Get summary production of Kwh/Year *EventApi* | [**eventDelete**](doc\/EventApi.md#eventdelete) | **DELETE** /api/event/{eventId} | Delete an event @@ -131,6 +132,7 @@ Class | Method | HTTP request | Description *RoomApi* | [**roomDelete2**](doc\/RoomApi.md#roomdelete2) | **DELETE** /api/room/{roomId} | Delete a room *RoomApi* | [**roomDeleteAllForHome**](doc\/RoomApi.md#roomdeleteallforhome) | **DELETE** /api/room/home/{homeId} | Delete all rooms for a specified home *RoomApi* | [**roomGetAll**](doc\/RoomApi.md#roomgetall) | **GET** /api/room/{homeId} | Get all rooms for the specified home +*RoomApi* | [**roomGetAllWithMainDetails**](doc\/RoomApi.md#roomgetallwithmaindetails) | **GET** /api/room/{homeId}/details | Get all rooms main details for the specified home *RoomApi* | [**roomGetDetail**](doc\/RoomApi.md#roomgetdetail) | **GET** /api/room/detail/{roomId} | Get detail info of a specified room *RoomApi* | [**roomUpdate**](doc\/RoomApi.md#roomupdate) | **PUT** /api/room | Update a room *ScreenDeviceApi* | [**screenDeviceCreateDevice**](doc\/ScreenDeviceApi.md#screendevicecreatedevice) | **POST** /api/device/screen | Create screen device @@ -145,6 +147,7 @@ Class | Method | HTTP request | Description *UserApi* | [**userDeleteUser**](doc\/UserApi.md#userdeleteuser) | **DELETE** /api/user/{id} | Delete an user *UserApi* | [**userGet**](doc\/UserApi.md#userget) | **GET** /api/user/{id} | Get a specific user *UserApi* | [**userGetAll**](doc\/UserApi.md#usergetall) | **GET** /api/user | Get a list of user +*UserApi* | [**userGetByEmail**](doc\/UserApi.md#usergetbyemail) | **GET** /api/user/email/{email} | Get a specific user by email *UserApi* | [**userUpdateUser**](doc\/UserApi.md#userupdateuser) | **PUT** /api/user | Update an user *ValuesApi* | [**valuesDelete**](doc\/ValuesApi.md#valuesdelete) | **DELETE** /api/test/{id} | *ValuesApi* | [**valuesGet**](doc\/ValuesApi.md#valuesget) | **GET** /api/test/{id} | @@ -187,6 +190,9 @@ Class | Method | HTTP request | Description - [EventDTO](doc\/EventDTO.md) - [EventDetailDTO](doc\/EventDetailDTO.md) - [EventDetailDTOAllOf](doc\/EventDetailDTOAllOf.md) + - [EventFilter](doc\/EventFilter.md) + - [EventHomeFilter](doc\/EventHomeFilter.md) + - [EventHomeFilterAllOf](doc\/EventHomeFilterAllOf.md) - [EventType](doc\/EventType.md) - [FacebookAuthModel](doc\/FacebookAuthModel.md) - [GeolocalizedMode](doc\/GeolocalizedMode.md) @@ -199,6 +205,7 @@ Class | Method | HTTP request | Description - [HomeDTO](doc\/HomeDTO.md) - [HomeDetailDTO](doc\/HomeDetailDTO.md) - [HomeDetailDTOAllOf](doc\/HomeDetailDTOAllOf.md) + - [ListResponseOfEventDetailDTOAndEventHomeFilter](doc\/ListResponseOfEventDetailDTOAndEventHomeFilter.md) - [LoginDTO](doc\/LoginDTO.md) - [MeansOfCommunication](doc\/MeansOfCommunication.md) - [MqttMessageDTO](doc\/MqttMessageDTO.md) @@ -211,6 +218,8 @@ Class | Method | HTTP request | Description - [ProviderType](doc\/ProviderType.md) - [RoomCreateOrUpdateDetailDTO](doc\/RoomCreateOrUpdateDetailDTO.md) - [RoomDetailDTO](doc\/RoomDetailDTO.md) + - [RoomMainDetailDTO](doc\/RoomMainDetailDTO.md) + - [RoomMainDetailDTOAllOf](doc\/RoomMainDetailDTOAllOf.md) - [RoomSummaryDTO](doc\/RoomSummaryDTO.md) - [ScreenDevice](doc\/ScreenDevice.md) - [SmartGardenMessage](doc\/SmartGardenMessage.md) diff --git a/mycore_api/doc/AlarmApi.md b/mycore_api/doc/AlarmApi.md index 79054b5..9e210a0 100644 --- a/mycore_api/doc/AlarmApi.md +++ b/mycore_api/doc/AlarmApi.md @@ -5,24 +5,24 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- -[**alarmActivate**](AlarmApi.md#alarmactivate) | **POST** /api/alarm/activate/{alarmModeId} | Activate current alarm mode +[**alarmActivate**](AlarmApi.md#alarmactivate) | **POST** /api/alarm/activate/{alarmModeId} | Activate specified alarm mode [**alarmCreate**](AlarmApi.md#alarmcreate) | **POST** /api/alarm | Create an alarm mode [**alarmCreateDefaultAlarms**](AlarmApi.md#alarmcreatedefaultalarms) | **POST** /api/alarm/defaults/{homeId} | Create default alarm modes [**alarmDelete**](AlarmApi.md#alarmdelete) | **DELETE** /api/alarm/{alarmModeId} | Delete an alarm mode [**alarmDeleteAllForHome**](AlarmApi.md#alarmdeleteallforhome) | **DELETE** /api/alarm/home/{homeId} | Delete all alarm mode for a specified home [**alarmGetAll**](AlarmApi.md#alarmgetall) | **GET** /api/alarm/{homeId} | Get all alarm modes for the specified home -[**alarmGetDetail**](AlarmApi.md#alarmgetdetail) | **GET** /api/alarm/detail/{alarmId} | Get detail info of a specified alarm mode +[**alarmGetDetail**](AlarmApi.md#alarmgetdetail) | **GET** /api/alarm/detail/{alarmModeId} | Get detail info of a specified alarm mode [**alarmUpdate**](AlarmApi.md#alarmupdate) | **PUT** /api/alarm | Update an alarm mode # **alarmActivate** > String alarmActivate(alarmModeId) -Activate current alarm mode +Activate specified alarm mode ### Example ```dart @@ -278,7 +278,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **alarmGetDetail** -> AlarmModeDetailDTO alarmGetDetail(alarmId, alarmModeId) +> AlarmModeDetailDTO alarmGetDetail(alarmModeId) Get detail info of a specified alarm mode @@ -289,11 +289,10 @@ import 'package:mycoreapi/api.dart'; //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = AlarmApi(); -final alarmId = alarmId_example; // String | final alarmModeId = alarmModeId_example; // String | alarm id try { - final result = api_instance.alarmGetDetail(alarmId, alarmModeId); + final result = api_instance.alarmGetDetail(alarmModeId); print(result); } catch (e) { print('Exception when calling AlarmApi->alarmGetDetail: $e\n'); @@ -304,8 +303,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **alarmId** | **String**| | - **alarmModeId** | **String**| alarm id | [optional] + **alarmModeId** | **String**| alarm id | ### Return type diff --git a/mycore_api/doc/AuthenticationApi.md b/mycore_api/doc/AuthenticationApi.md index 327c52c..8b1c3ff 100644 --- a/mycore_api/doc/AuthenticationApi.md +++ b/mycore_api/doc/AuthenticationApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/AutomationApi.md b/mycore_api/doc/AutomationApi.md index 0f8f01b..2d1afeb 100644 --- a/mycore_api/doc/AutomationApi.md +++ b/mycore_api/doc/AutomationApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/AzureApi.md b/mycore_api/doc/AzureApi.md index 53812e2..4c13570 100644 --- a/mycore_api/doc/AzureApi.md +++ b/mycore_api/doc/AzureApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/BooksApi.md b/mycore_api/doc/BooksApi.md index f3af77f..601d744 100644 --- a/mycore_api/doc/BooksApi.md +++ b/mycore_api/doc/BooksApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/DeviceApi.md b/mycore_api/doc/DeviceApi.md index f477f52..4058b43 100644 --- a/mycore_api/doc/DeviceApi.md +++ b/mycore_api/doc/DeviceApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -19,6 +19,7 @@ Method | HTTP request | Description [**deviceGetDevicesByType**](DeviceApi.md#devicegetdevicesbytype) | **GET** /api/device/{homeId}/type/{type} | Get list of devices from a type [**deviceGetDevicesFromProvider**](DeviceApi.md#devicegetdevicesfromprovider) | **GET** /api/device/{homeId}/fromProvider/{providerId} | Get devices from provider [**deviceGetDevicesFromZigbee2Mqtt**](DeviceApi.md#devicegetdevicesfromzigbee2mqtt) | **GET** /api/device/zigbee2Mqtt/{homeId} | Get all zigbee2Mqtt devices +[**deviceSendAction**](DeviceApi.md#devicesendaction) | **POST** /api/device/action | Send action to device [**deviceUpdate**](DeviceApi.md#deviceupdate) | **PUT** /api/device/{deviceId} | Update a device @@ -460,6 +461,49 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **deviceSendAction** +> String deviceSendAction(action) + +Send action to device + +### Example +```dart +import 'package:mycoreapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = DeviceApi(); +final action = Action(); // Action | Action to sent + +try { + final result = api_instance.deviceSendAction(action); + print(result); +} catch (e) { + print('Exception when calling DeviceApi->deviceSendAction: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **action** | [**Action**](Action.md)| Action to sent | + +### Return type + +**String** + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **deviceUpdate** > DeviceDetailDTO deviceUpdate(deviceId, deviceDetailDTO) diff --git a/mycore_api/doc/EnergyApi.md b/mycore_api/doc/EnergyApi.md index a96eb19..f11f992 100644 --- a/mycore_api/doc/EnergyApi.md +++ b/mycore_api/doc/EnergyApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/EventApi.md b/mycore_api/doc/EventApi.md index 5944a55..5c0027b 100644 --- a/mycore_api/doc/EventApi.md +++ b/mycore_api/doc/EventApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -102,7 +102,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **eventGet** -> List eventGet(homeId, deviceId, roomId, startIndex, count, dateStart, dateEnd, eventType, deviceType) +> ListResponseOfEventDetailDTOAndEventHomeFilter eventGet(homeId, deviceId, roomId, startIndex, count, dateStart, dateEnd, eventType, deviceType) Get events for the specified home @@ -147,7 +147,7 @@ Name | Type | Description | Notes ### Return type -[**List**](EventDetailDTO.md) +[**ListResponseOfEventDetailDTOAndEventHomeFilter**](ListResponseOfEventDetailDTOAndEventHomeFilter.md) ### Authorization diff --git a/mycore_api/doc/EventFilter.md b/mycore_api/doc/EventFilter.md new file mode 100644 index 0000000..091e7b3 --- /dev/null +++ b/mycore_api/doc/EventFilter.md @@ -0,0 +1,20 @@ +# mycoreapi.model.EventFilter + +## Load the model package +```dart +import 'package:mycoreapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**startIndex** | **int** | | [optional] +**count** | **int** | | [optional] +**dateStart** | [**DateTime**](DateTime.md) | | [optional] +**dateEnd** | [**DateTime**](DateTime.md) | | [optional] +**eventType** | [**OneOfEventType**](OneOfEventType.md) | | [optional] +**deviceType** | [**OneOfDeviceType**](OneOfDeviceType.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/mycore_api/doc/EventHomeFilter.md b/mycore_api/doc/EventHomeFilter.md new file mode 100644 index 0000000..98f9ba6 --- /dev/null +++ b/mycore_api/doc/EventHomeFilter.md @@ -0,0 +1,22 @@ +# mycoreapi.model.EventHomeFilter + +## Load the model package +```dart +import 'package:mycoreapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**startIndex** | **int** | | [optional] +**count** | **int** | | [optional] +**dateStart** | [**DateTime**](DateTime.md) | | [optional] +**dateEnd** | [**DateTime**](DateTime.md) | | [optional] +**eventType** | [**OneOfEventType**](OneOfEventType.md) | | [optional] +**deviceType** | [**OneOfDeviceType**](OneOfDeviceType.md) | | [optional] +**deviceId** | **String** | | [optional] +**roomId** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/mycore_api/doc/EventHomeFilterAllOf.md b/mycore_api/doc/EventHomeFilterAllOf.md new file mode 100644 index 0000000..4af7976 --- /dev/null +++ b/mycore_api/doc/EventHomeFilterAllOf.md @@ -0,0 +1,16 @@ +# mycoreapi.model.EventHomeFilterAllOf + +## Load the model package +```dart +import 'package:mycoreapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**deviceId** | **String** | | [optional] +**roomId** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/mycore_api/doc/FacebookApi.md b/mycore_api/doc/FacebookApi.md index 189a21b..c14398f 100644 --- a/mycore_api/doc/FacebookApi.md +++ b/mycore_api/doc/FacebookApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/GoogleApi.md b/mycore_api/doc/GoogleApi.md index 29e2edb..b94adba 100644 --- a/mycore_api/doc/GoogleApi.md +++ b/mycore_api/doc/GoogleApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/GroupApi.md b/mycore_api/doc/GroupApi.md index 916e373..9d6df3f 100644 --- a/mycore_api/doc/GroupApi.md +++ b/mycore_api/doc/GroupApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/HomeApi.md b/mycore_api/doc/HomeApi.md index 889a713..bbe529b 100644 --- a/mycore_api/doc/HomeApi.md +++ b/mycore_api/doc/HomeApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/IOTApi.md b/mycore_api/doc/IOTApi.md index c999c1f..894c188 100644 --- a/mycore_api/doc/IOTApi.md +++ b/mycore_api/doc/IOTApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/LayoutApi.md b/mycore_api/doc/LayoutApi.md index facfb02..420a66c 100644 --- a/mycore_api/doc/LayoutApi.md +++ b/mycore_api/doc/LayoutApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/ListResponseOfEventDetailDTOAndEventHomeFilter.md b/mycore_api/doc/ListResponseOfEventDetailDTOAndEventHomeFilter.md new file mode 100644 index 0000000..97d1289 --- /dev/null +++ b/mycore_api/doc/ListResponseOfEventDetailDTOAndEventHomeFilter.md @@ -0,0 +1,18 @@ +# mycoreapi.model.ListResponseOfEventDetailDTOAndEventHomeFilter + +## Load the model package +```dart +import 'package:mycoreapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**values** | [**List**](EventDetailDTO.md) | | [optional] [default to const []] +**requestParameters** | [**OneOfEventHomeFilter**](OneOfEventHomeFilter.md) | | [optional] +**totalCount** | **int** | | [optional] +**actualCount** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/mycore_api/doc/MQTTApi.md b/mycore_api/doc/MQTTApi.md index 4d42331..ab16e20 100644 --- a/mycore_api/doc/MQTTApi.md +++ b/mycore_api/doc/MQTTApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/OddApi.md b/mycore_api/doc/OddApi.md index 64f416c..182c6c1 100644 --- a/mycore_api/doc/OddApi.md +++ b/mycore_api/doc/OddApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/ProviderApi.md b/mycore_api/doc/ProviderApi.md index bd1ecb6..bcb4dd6 100644 --- a/mycore_api/doc/ProviderApi.md +++ b/mycore_api/doc/ProviderApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/RoomApi.md b/mycore_api/doc/RoomApi.md index 18d5321..3969394 100644 --- a/mycore_api/doc/RoomApi.md +++ b/mycore_api/doc/RoomApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -14,6 +14,7 @@ Method | HTTP request | Description [**roomDelete2**](RoomApi.md#roomdelete2) | **DELETE** /api/room/{roomId} | Delete a room [**roomDeleteAllForHome**](RoomApi.md#roomdeleteallforhome) | **DELETE** /api/room/home/{homeId} | Delete all rooms for a specified home [**roomGetAll**](RoomApi.md#roomgetall) | **GET** /api/room/{homeId} | Get all rooms for the specified home +[**roomGetAllWithMainDetails**](RoomApi.md#roomgetallwithmaindetails) | **GET** /api/room/{homeId}/details | Get all rooms main details for the specified home [**roomGetDetail**](RoomApi.md#roomgetdetail) | **GET** /api/room/detail/{roomId} | Get detail info of a specified room [**roomUpdate**](RoomApi.md#roomupdate) | **PUT** /api/room | Update a room @@ -235,6 +236,49 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **roomGetAllWithMainDetails** +> List roomGetAllWithMainDetails(homeId) + +Get all rooms main details for the specified home + +### Example +```dart +import 'package:mycoreapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = RoomApi(); +final homeId = homeId_example; // String | Home Id + +try { + final result = api_instance.roomGetAllWithMainDetails(homeId); + print(result); +} catch (e) { + print('Exception when calling RoomApi->roomGetAllWithMainDetails: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **homeId** | **String**| Home Id | + +### Return type + +[**List**](RoomMainDetailDTO.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **roomGetDetail** > RoomDetailDTO roomGetDetail(roomId) diff --git a/mycore_api/doc/RoomMainDetailDTO.md b/mycore_api/doc/RoomMainDetailDTO.md new file mode 100644 index 0000000..7f1ce26 --- /dev/null +++ b/mycore_api/doc/RoomMainDetailDTO.md @@ -0,0 +1,21 @@ +# mycoreapi.model.RoomMainDetailDTO + +## Load the model package +```dart +import 'package:mycoreapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**homeId** | **String** | | [optional] +**name** | **String** | | [optional] +**createdDate** | [**DateTime**](DateTime.md) | | [optional] +**updatedDate** | [**DateTime**](DateTime.md) | | [optional] +**environmentalDevices** | [**List**](DeviceDetailDTO.md) | | [optional] [default to const []] +**securityDevices** | [**List**](DeviceDetailDTO.md) | | [optional] [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/mycore_api/doc/RoomMainDetailDTOAllOf.md b/mycore_api/doc/RoomMainDetailDTOAllOf.md new file mode 100644 index 0000000..c1cb2b9 --- /dev/null +++ b/mycore_api/doc/RoomMainDetailDTOAllOf.md @@ -0,0 +1,18 @@ +# mycoreapi.model.RoomMainDetailDTOAllOf + +## Load the model package +```dart +import 'package:mycoreapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**createdDate** | [**DateTime**](DateTime.md) | | [optional] +**updatedDate** | [**DateTime**](DateTime.md) | | [optional] +**environmentalDevices** | [**List**](DeviceDetailDTO.md) | | [optional] [default to const []] +**securityDevices** | [**List**](DeviceDetailDTO.md) | | [optional] [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/mycore_api/doc/ScreenDeviceApi.md b/mycore_api/doc/ScreenDeviceApi.md index f142d2d..96323a5 100644 --- a/mycore_api/doc/ScreenDeviceApi.md +++ b/mycore_api/doc/ScreenDeviceApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/TokenApi.md b/mycore_api/doc/TokenApi.md index 1ae62e6..ec16fd5 100644 --- a/mycore_api/doc/TokenApi.md +++ b/mycore_api/doc/TokenApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/TwitterApi.md b/mycore_api/doc/TwitterApi.md index 04bf6e5..968e67e 100644 --- a/mycore_api/doc/TwitterApi.md +++ b/mycore_api/doc/TwitterApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/UserApi.md b/mycore_api/doc/UserApi.md index 2a2ea1a..35f23a4 100644 --- a/mycore_api/doc/UserApi.md +++ b/mycore_api/doc/UserApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -13,6 +13,7 @@ Method | HTTP request | Description [**userDeleteUser**](UserApi.md#userdeleteuser) | **DELETE** /api/user/{id} | Delete an user [**userGet**](UserApi.md#userget) | **GET** /api/user/{id} | Get a specific user [**userGetAll**](UserApi.md#usergetall) | **GET** /api/user | Get a list of user +[**userGetByEmail**](UserApi.md#usergetbyemail) | **GET** /api/user/email/{email} | Get a specific user by email [**userUpdateUser**](UserApi.md#userupdateuser) | **PUT** /api/user | Update an user @@ -184,6 +185,49 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **userGetByEmail** +> UserInfoDetailDTO userGetByEmail(email) + +Get a specific user by email + +### Example +```dart +import 'package:mycoreapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = UserApi(); +final email = email_example; // String | user email + +try { + final result = api_instance.userGetByEmail(email); + print(result); +} catch (e) { + print('Exception when calling UserApi->userGetByEmail: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **String**| user email | + +### Return type + +[**UserInfoDetailDTO**](UserInfoDetailDTO.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **userUpdateUser** > UserInfoDetailDTO userUpdateUser(userInfo) diff --git a/mycore_api/doc/UserInfoDetailDTO.md b/mycore_api/doc/UserInfoDetailDTO.md index 0361620..2f49668 100644 --- a/mycore_api/doc/UserInfoDetailDTO.md +++ b/mycore_api/doc/UserInfoDetailDTO.md @@ -12,6 +12,8 @@ Name | Type | Description | Notes **email** | **String** | | [optional] **firstName** | **String** | | [optional] **lastName** | **String** | | [optional] +**language** | **String** | | [optional] +**homeIds** | **List** | | [optional] [default to const []] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mycore_api/doc/ValuesApi.md b/mycore_api/doc/ValuesApi.md index 170a923..8487496 100644 --- a/mycore_api/doc/ValuesApi.md +++ b/mycore_api/doc/ValuesApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/lib/api.dart b/mycore_api/lib/api.dart index eff5be1..1665c6c 100644 --- a/mycore_api/lib/api.dart +++ b/mycore_api/lib/api.dart @@ -83,6 +83,9 @@ part 'model/electricity_production.dart'; part 'model/event_dto.dart'; part 'model/event_detail_dto.dart'; part 'model/event_detail_dto_all_of.dart'; +part 'model/event_filter.dart'; +part 'model/event_home_filter.dart'; +part 'model/event_home_filter_all_of.dart'; part 'model/event_type.dart'; part 'model/facebook_auth_model.dart'; part 'model/geolocalized_mode.dart'; @@ -95,6 +98,7 @@ part 'model/group_summary_dto.dart'; part 'model/home_dto.dart'; part 'model/home_detail_dto.dart'; part 'model/home_detail_dto_all_of.dart'; +part 'model/list_response_of_event_detail_dto_and_event_home_filter.dart'; part 'model/login_dto.dart'; part 'model/means_of_communication.dart'; part 'model/mqtt_message_dto.dart'; @@ -107,9 +111,10 @@ part 'model/provider_dto.dart'; part 'model/provider_type.dart'; part 'model/room_create_or_update_detail_dto.dart'; part 'model/room_detail_dto.dart'; +part 'model/room_main_detail_dto.dart'; +part 'model/room_main_detail_dto_all_of.dart'; part 'model/room_summary_dto.dart'; part 'model/screen_device.dart'; -part 'model/screen_widget.dart'; part 'model/smart_garden_message.dart'; part 'model/smart_printer_message.dart'; part 'model/time_period_alarm.dart'; diff --git a/mycore_api/lib/api/alarm_api.dart b/mycore_api/lib/api/alarm_api.dart index 2f8c384..d0ddfba 100644 --- a/mycore_api/lib/api/alarm_api.dart +++ b/mycore_api/lib/api/alarm_api.dart @@ -15,7 +15,7 @@ class AlarmApi { final ApiClient apiClient; - /// Activate current alarm mode + /// Activate specified alarm mode /// /// Note: This method returns the HTTP [Response]. /// @@ -66,7 +66,7 @@ class AlarmApi { ); } - /// Activate current alarm mode + /// Activate specified alarm mode /// /// Parameters: /// @@ -448,18 +448,16 @@ class AlarmApi { /// /// Parameters: /// - /// * [String] alarmId (required): - /// - /// * [String] alarmModeId: + /// * [String] alarmModeId (required): /// alarm id - Future alarmGetDetailWithHttpInfo(String alarmId, { String alarmModeId }) async { + Future alarmGetDetailWithHttpInfo(String alarmModeId) async { // Verify required params are set. - if (alarmId == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: alarmId'); + if (alarmModeId == null) { + throw ApiException(HttpStatus.badRequest, 'Missing required param: alarmModeId'); } - final path = r'/api/alarm/detail/{alarmId}' - .replaceAll('{' + 'alarmId' + '}', alarmId.toString()); + final path = r'/api/alarm/detail/{alarmModeId}' + .replaceAll('{' + 'alarmModeId' + '}', alarmModeId.toString()); Object postBody; @@ -467,10 +465,6 @@ class AlarmApi { final headerParams = {}; final formParams = {}; - if (alarmModeId != null) { - queryParams.addAll(_convertParametersForCollectionFormat('', 'alarmModeId', alarmModeId)); - } - final contentTypes = []; final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; final authNames = ['bearer']; @@ -503,12 +497,10 @@ class AlarmApi { /// /// Parameters: /// - /// * [String] alarmId (required): - /// - /// * [String] alarmModeId: + /// * [String] alarmModeId (required): /// alarm id - Future alarmGetDetail(String alarmId, { String alarmModeId }) async { - final response = await alarmGetDetailWithHttpInfo(alarmId, alarmModeId: alarmModeId ); + Future alarmGetDetail(String alarmModeId) async { + final response = await alarmGetDetailWithHttpInfo(alarmModeId); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); } diff --git a/mycore_api/lib/api/device_api.dart b/mycore_api/lib/api/device_api.dart index b03389a..553d786 100644 --- a/mycore_api/lib/api/device_api.dart +++ b/mycore_api/lib/api/device_api.dart @@ -774,6 +774,76 @@ class DeviceApi { return Future>.value(null); } + /// Send action to device + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [Action] action (required): + /// Action to sent + Future deviceSendActionWithHttpInfo(Action action) async { + // Verify required params are set. + if (action == null) { + throw ApiException(HttpStatus.badRequest, 'Missing required param: action'); + } + + final path = r'/api/device/action'; + + Object postBody = action; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + final contentTypes = ['application/json']; + final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; + final authNames = ['bearer']; + + if ( + nullableContentType != null && + nullableContentType.toLowerCase().startsWith('multipart/form-data') + ) { + bool hasFields = false; + final mp = MultipartRequest(null, null); + if (hasFields) { + postBody = mp; + } + } else { + } + + return await apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + nullableContentType, + authNames, + ); + } + + /// Send action to device + /// + /// Parameters: + /// + /// * [Action] action (required): + /// Action to sent + Future deviceSendAction(Action action) async { + final response = await deviceSendActionWithHttpInfo(action); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body != null && response.statusCode != HttpStatus.noContent) { + return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; + } + return Future.value(null); + } + /// Update a device /// /// Note: This method returns the HTTP [Response]. diff --git a/mycore_api/lib/api/event_api.dart b/mycore_api/lib/api/event_api.dart index bca06f6..236c4d1 100644 --- a/mycore_api/lib/api/event_api.dart +++ b/mycore_api/lib/api/event_api.dart @@ -271,7 +271,7 @@ class EventApi { /// * [OneOfEventType] eventType: /// /// * [OneOfDeviceType] deviceType: - Future> eventGet(String homeId, { String deviceId, String roomId, int startIndex, int count, DateTime dateStart, DateTime dateEnd, EventType eventType, DeviceType deviceType }) async { + Future eventGet(String homeId, { String deviceId, String roomId, int startIndex, int count, DateTime dateStart, DateTime dateEnd, EventType eventType, DeviceType deviceType }) async { final response = await eventGetWithHttpInfo(homeId, deviceId: deviceId, roomId: roomId, startIndex: startIndex, count: count, dateStart: dateStart, dateEnd: dateEnd, eventType: eventType, deviceType: deviceType ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -280,11 +280,9 @@ class EventApi { // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. if (response.body != null && response.statusCode != HttpStatus.noContent) { - return (apiClient.deserialize(_decodeBodyBytes(response), 'List') as List) - .cast() - .toList(growable: false); - } - return Future>.value(null); + return apiClient.deserialize(_decodeBodyBytes(response), 'ListResponseOfEventDetailDTOAndEventHomeFilter') as ListResponseOfEventDetailDTOAndEventHomeFilter; + } + return Future.value(null); } /// Get detail info of a specified event diff --git a/mycore_api/lib/api/room_api.dart b/mycore_api/lib/api/room_api.dart index 091d0b4..55c6ad8 100644 --- a/mycore_api/lib/api/room_api.dart +++ b/mycore_api/lib/api/room_api.dart @@ -381,6 +381,79 @@ class RoomApi { return Future>.value(null); } + /// Get all rooms main details for the specified home + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] homeId (required): + /// Home Id + Future roomGetAllWithMainDetailsWithHttpInfo(String homeId) async { + // Verify required params are set. + if (homeId == null) { + throw ApiException(HttpStatus.badRequest, 'Missing required param: homeId'); + } + + final path = r'/api/room/{homeId}/details' + .replaceAll('{' + 'homeId' + '}', homeId.toString()); + + Object postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + final contentTypes = []; + final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; + final authNames = ['bearer']; + + if ( + nullableContentType != null && + nullableContentType.toLowerCase().startsWith('multipart/form-data') + ) { + bool hasFields = false; + final mp = MultipartRequest(null, null); + if (hasFields) { + postBody = mp; + } + } else { + } + + return await apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + nullableContentType, + authNames, + ); + } + + /// Get all rooms main details for the specified home + /// + /// Parameters: + /// + /// * [String] homeId (required): + /// Home Id + Future> roomGetAllWithMainDetails(String homeId) async { + final response = await roomGetAllWithMainDetailsWithHttpInfo(homeId); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body != null && response.statusCode != HttpStatus.noContent) { + return (apiClient.deserialize(_decodeBodyBytes(response), 'List') as List) + .cast() + .toList(growable: false); + } + return Future>.value(null); + } + /// Get detail info of a specified room /// /// Note: This method returns the HTTP [Response]. diff --git a/mycore_api/lib/api/user_api.dart b/mycore_api/lib/api/user_api.dart index 7a38f44..e22c4f9 100644 --- a/mycore_api/lib/api/user_api.dart +++ b/mycore_api/lib/api/user_api.dart @@ -284,6 +284,77 @@ class UserApi { return Future>.value(null); } + /// Get a specific user by email + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] email (required): + /// user email + Future userGetByEmailWithHttpInfo(String email) async { + // Verify required params are set. + if (email == null) { + throw ApiException(HttpStatus.badRequest, 'Missing required param: email'); + } + + final path = r'/api/user/email/{email}' + .replaceAll('{' + 'email' + '}', email.toString()); + + Object postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + final contentTypes = []; + final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; + final authNames = ['bearer']; + + if ( + nullableContentType != null && + nullableContentType.toLowerCase().startsWith('multipart/form-data') + ) { + bool hasFields = false; + final mp = MultipartRequest(null, null); + if (hasFields) { + postBody = mp; + } + } else { + } + + return await apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + nullableContentType, + authNames, + ); + } + + /// Get a specific user by email + /// + /// Parameters: + /// + /// * [String] email (required): + /// user email + Future userGetByEmail(String email) async { + final response = await userGetByEmailWithHttpInfo(email); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body != null && response.statusCode != HttpStatus.noContent) { + return apiClient.deserialize(_decodeBodyBytes(response), 'UserInfoDetailDTO') as UserInfoDetailDTO; + } + return Future.value(null); + } + /// Update an user /// /// Note: This method returns the HTTP [Response]. diff --git a/mycore_api/lib/api_client.dart b/mycore_api/lib/api_client.dart index 9f081a4..a20703d 100644 --- a/mycore_api/lib/api_client.dart +++ b/mycore_api/lib/api_client.dart @@ -10,7 +10,7 @@ part of openapi.api; class ApiClient { - ApiClient({this.basePath = 'http://192.168.31.140'}) { + ApiClient({this.basePath = 'https://localhost:5001'}) { // Setup authentications (key: authentication name, value: authentication). _authentications[r'bearer'] = OAuth(); } @@ -226,6 +226,12 @@ class ApiClient { return EventDetailDTO.fromJson(value); case 'EventDetailDTOAllOf': return EventDetailDTOAllOf.fromJson(value); + case 'EventFilter': + return EventFilter.fromJson(value); + case 'EventHomeFilter': + return EventHomeFilter.fromJson(value); + case 'EventHomeFilterAllOf': + return EventHomeFilterAllOf.fromJson(value); case 'EventType': return EventTypeTypeTransformer().decode(value); @@ -251,6 +257,8 @@ class ApiClient { return HomeDetailDTO.fromJson(value); case 'HomeDetailDTOAllOf': return HomeDetailDTOAllOf.fromJson(value); + case 'ListResponseOfEventDetailDTOAndEventHomeFilter': + return ListResponseOfEventDetailDTOAndEventHomeFilter.fromJson(value); case 'LoginDTO': return LoginDTO.fromJson(value); case 'MeansOfCommunication': @@ -277,6 +285,10 @@ class ApiClient { return RoomCreateOrUpdateDetailDTO.fromJson(value); case 'RoomDetailDTO': return RoomDetailDTO.fromJson(value); + case 'RoomMainDetailDTO': + return RoomMainDetailDTO.fromJson(value); + case 'RoomMainDetailDTOAllOf': + return RoomMainDetailDTOAllOf.fromJson(value); case 'RoomSummaryDTO': return RoomSummaryDTO.fromJson(value); case 'ScreenDevice': diff --git a/mycore_api/lib/model/event_filter.dart b/mycore_api/lib/model/event_filter.dart new file mode 100644 index 0000000..5e383ae --- /dev/null +++ b/mycore_api/lib/model/event_filter.dart @@ -0,0 +1,120 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.0 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class EventFilter { + /// Returns a new [EventFilter] instance. + EventFilter({ + this.startIndex, + this.count, + this.dateStart, + this.dateEnd, + this.eventType, + this.deviceType, + }); + + int startIndex; + + int count; + + DateTime dateStart; + + DateTime dateEnd; + + EventType eventType; + + DeviceType deviceType; + + @override + bool operator ==(Object other) => identical(this, other) || other is EventFilter && + other.startIndex == startIndex && + other.count == count && + other.dateStart == dateStart && + other.dateEnd == dateEnd && + other.eventType == eventType && + other.deviceType == deviceType; + + @override + int get hashCode => + (startIndex == null ? 0 : startIndex.hashCode) + + (count == null ? 0 : count.hashCode) + + (dateStart == null ? 0 : dateStart.hashCode) + + (dateEnd == null ? 0 : dateEnd.hashCode) + + (eventType == null ? 0 : eventType.hashCode) + + (deviceType == null ? 0 : deviceType.hashCode); + + @override + String toString() => 'EventFilter[startIndex=$startIndex, count=$count, dateStart=$dateStart, dateEnd=$dateEnd, eventType=$eventType, deviceType=$deviceType]'; + + Map toJson() { + final json = {}; + if (startIndex != null) { + json[r'startIndex'] = startIndex; + } + if (count != null) { + json[r'count'] = count; + } + if (dateStart != null) { + json[r'dateStart'] = dateStart.toUtc().toIso8601String(); + } + if (dateEnd != null) { + json[r'dateEnd'] = dateEnd.toUtc().toIso8601String(); + } + if (eventType != null) { + json[r'eventType'] = eventType; + } + if (deviceType != null) { + json[r'deviceType'] = deviceType; + } + return json; + } + + /// Returns a new [EventFilter] instance and imports its values from + /// [json] if it's non-null, null if [json] is null. + static EventFilter fromJson(Map json) => json == null + ? null + : EventFilter( + startIndex: json[r'startIndex'], + count: json[r'count'], + dateStart: json[r'dateStart'] == null + ? null + : DateTime.parse(json[r'dateStart']), + dateEnd: json[r'dateEnd'] == null + ? null + : DateTime.parse(json[r'dateEnd']), + eventType: EventType.fromJson(json[r'eventType']), + deviceType: DeviceType.fromJson(json[r'deviceType']), + ); + + static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => + json == null || json.isEmpty + ? true == emptyIsNull ? null : [] + : json.map((v) => EventFilter.fromJson(v)).toList(growable: true == growable); + + static Map mapFromJson(Map json) { + final map = {}; + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic v) => map[key] = EventFilter.fromJson(v)); + } + return map; + } + + // maps a json object with a list of EventFilter-objects as value to a dart map + static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { + final map = >{}; + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic v) { + map[key] = EventFilter.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); + }); + } + return map; + } +} + diff --git a/mycore_api/lib/model/event_home_filter.dart b/mycore_api/lib/model/event_home_filter.dart new file mode 100644 index 0000000..6b135dd --- /dev/null +++ b/mycore_api/lib/model/event_home_filter.dart @@ -0,0 +1,138 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.0 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class EventHomeFilter { + /// Returns a new [EventHomeFilter] instance. + EventHomeFilter({ + this.startIndex, + this.count, + this.dateStart, + this.dateEnd, + this.eventType, + this.deviceType, + this.deviceId, + this.roomId, + }); + + int startIndex; + + int count; + + DateTime dateStart; + + DateTime dateEnd; + + EventType eventType; + + DeviceType deviceType; + + String deviceId; + + String roomId; + + @override + bool operator ==(Object other) => identical(this, other) || other is EventHomeFilter && + other.startIndex == startIndex && + other.count == count && + other.dateStart == dateStart && + other.dateEnd == dateEnd && + other.eventType == eventType && + other.deviceType == deviceType && + other.deviceId == deviceId && + other.roomId == roomId; + + @override + int get hashCode => + (startIndex == null ? 0 : startIndex.hashCode) + + (count == null ? 0 : count.hashCode) + + (dateStart == null ? 0 : dateStart.hashCode) + + (dateEnd == null ? 0 : dateEnd.hashCode) + + (eventType == null ? 0 : eventType.hashCode) + + (deviceType == null ? 0 : deviceType.hashCode) + + (deviceId == null ? 0 : deviceId.hashCode) + + (roomId == null ? 0 : roomId.hashCode); + + @override + String toString() => 'EventHomeFilter[startIndex=$startIndex, count=$count, dateStart=$dateStart, dateEnd=$dateEnd, eventType=$eventType, deviceType=$deviceType, deviceId=$deviceId, roomId=$roomId]'; + + Map toJson() { + final json = {}; + if (startIndex != null) { + json[r'startIndex'] = startIndex; + } + if (count != null) { + json[r'count'] = count; + } + if (dateStart != null) { + json[r'dateStart'] = dateStart.toUtc().toIso8601String(); + } + if (dateEnd != null) { + json[r'dateEnd'] = dateEnd.toUtc().toIso8601String(); + } + if (eventType != null) { + json[r'eventType'] = eventType; + } + if (deviceType != null) { + json[r'deviceType'] = deviceType; + } + if (deviceId != null) { + json[r'deviceId'] = deviceId; + } + if (roomId != null) { + json[r'roomId'] = roomId; + } + return json; + } + + /// Returns a new [EventHomeFilter] instance and imports its values from + /// [json] if it's non-null, null if [json] is null. + static EventHomeFilter fromJson(Map json) => json == null + ? null + : EventHomeFilter( + startIndex: json[r'startIndex'], + count: json[r'count'], + dateStart: json[r'dateStart'] == null + ? null + : DateTime.parse(json[r'dateStart']), + dateEnd: json[r'dateEnd'] == null + ? null + : DateTime.parse(json[r'dateEnd']), + eventType: EventType.fromJson(json[r'eventType']), + deviceType: DeviceType.fromJson(json[r'deviceType']), + deviceId: json[r'deviceId'], + roomId: json[r'roomId'], + ); + + static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => + json == null || json.isEmpty + ? true == emptyIsNull ? null : [] + : json.map((v) => EventHomeFilter.fromJson(v)).toList(growable: true == growable); + + static Map mapFromJson(Map json) { + final map = {}; + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic v) => map[key] = EventHomeFilter.fromJson(v)); + } + return map; + } + + // maps a json object with a list of EventHomeFilter-objects as value to a dart map + static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { + final map = >{}; + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic v) { + map[key] = EventHomeFilter.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); + }); + } + return map; + } +} + diff --git a/mycore_api/lib/model/event_home_filter_all_of.dart b/mycore_api/lib/model/event_home_filter_all_of.dart new file mode 100644 index 0000000..d38c19f --- /dev/null +++ b/mycore_api/lib/model/event_home_filter_all_of.dart @@ -0,0 +1,80 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.0 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class EventHomeFilterAllOf { + /// Returns a new [EventHomeFilterAllOf] instance. + EventHomeFilterAllOf({ + this.deviceId, + this.roomId, + }); + + String deviceId; + + String roomId; + + @override + bool operator ==(Object other) => identical(this, other) || other is EventHomeFilterAllOf && + other.deviceId == deviceId && + other.roomId == roomId; + + @override + int get hashCode => + (deviceId == null ? 0 : deviceId.hashCode) + + (roomId == null ? 0 : roomId.hashCode); + + @override + String toString() => 'EventHomeFilterAllOf[deviceId=$deviceId, roomId=$roomId]'; + + Map toJson() { + final json = {}; + if (deviceId != null) { + json[r'deviceId'] = deviceId; + } + if (roomId != null) { + json[r'roomId'] = roomId; + } + return json; + } + + /// Returns a new [EventHomeFilterAllOf] instance and imports its values from + /// [json] if it's non-null, null if [json] is null. + static EventHomeFilterAllOf fromJson(Map json) => json == null + ? null + : EventHomeFilterAllOf( + deviceId: json[r'deviceId'], + roomId: json[r'roomId'], + ); + + static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => + json == null || json.isEmpty + ? true == emptyIsNull ? null : [] + : json.map((v) => EventHomeFilterAllOf.fromJson(v)).toList(growable: true == growable); + + static Map mapFromJson(Map json) { + final map = {}; + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic v) => map[key] = EventHomeFilterAllOf.fromJson(v)); + } + return map; + } + + // maps a json object with a list of EventHomeFilterAllOf-objects as value to a dart map + static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { + final map = >{}; + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic v) { + map[key] = EventHomeFilterAllOf.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); + }); + } + return map; + } +} + diff --git a/mycore_api/lib/model/list_response_of_event_detail_dto_and_event_home_filter.dart b/mycore_api/lib/model/list_response_of_event_detail_dto_and_event_home_filter.dart new file mode 100644 index 0000000..9beee20 --- /dev/null +++ b/mycore_api/lib/model/list_response_of_event_detail_dto_and_event_home_filter.dart @@ -0,0 +1,98 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.0 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ListResponseOfEventDetailDTOAndEventHomeFilter { + /// Returns a new [ListResponseOfEventDetailDTOAndEventHomeFilter] instance. + ListResponseOfEventDetailDTOAndEventHomeFilter({ + this.values, + this.requestParameters, + this.totalCount, + this.actualCount, + }); + + List values; + + EventHomeFilter requestParameters; + + int totalCount; + + int actualCount; + + @override + bool operator ==(Object other) => identical(this, other) || other is ListResponseOfEventDetailDTOAndEventHomeFilter && + other.values == values && + other.requestParameters == requestParameters && + other.totalCount == totalCount && + other.actualCount == actualCount; + + @override + int get hashCode => + (values == null ? 0 : values.hashCode) + + (requestParameters == null ? 0 : requestParameters.hashCode) + + (totalCount == null ? 0 : totalCount.hashCode) + + (actualCount == null ? 0 : actualCount.hashCode); + + @override + String toString() => 'ListResponseOfEventDetailDTOAndEventHomeFilter[values=$values, requestParameters=$requestParameters, totalCount=$totalCount, actualCount=$actualCount]'; + + Map toJson() { + final json = {}; + if (values != null) { + json[r'values'] = values; + } + if (requestParameters != null) { + json[r'requestParameters'] = requestParameters; + } + if (totalCount != null) { + json[r'totalCount'] = totalCount; + } + if (actualCount != null) { + json[r'actualCount'] = actualCount; + } + return json; + } + + /// Returns a new [ListResponseOfEventDetailDTOAndEventHomeFilter] instance and imports its values from + /// [json] if it's non-null, null if [json] is null. + static ListResponseOfEventDetailDTOAndEventHomeFilter fromJson(Map json) => json == null + ? null + : ListResponseOfEventDetailDTOAndEventHomeFilter( + values: EventDetailDTO.listFromJson(json[r'values']), + requestParameters: EventHomeFilter.fromJson(json[r'requestParameters']), + totalCount: json[r'totalCount'], + actualCount: json[r'actualCount'], + ); + + static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => + json == null || json.isEmpty + ? true == emptyIsNull ? null : [] + : json.map((v) => ListResponseOfEventDetailDTOAndEventHomeFilter.fromJson(v)).toList(growable: true == growable); + + static Map mapFromJson(Map json) { + final map = {}; + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic v) => map[key] = ListResponseOfEventDetailDTOAndEventHomeFilter.fromJson(v)); + } + return map; + } + + // maps a json object with a list of ListResponseOfEventDetailDTOAndEventHomeFilter-objects as value to a dart map + static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { + final map = >{}; + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic v) { + map[key] = ListResponseOfEventDetailDTOAndEventHomeFilter.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); + }); + } + return map; + } +} + diff --git a/mycore_api/lib/model/room_main_detail_dto.dart b/mycore_api/lib/model/room_main_detail_dto.dart new file mode 100644 index 0000000..ec85dd9 --- /dev/null +++ b/mycore_api/lib/model/room_main_detail_dto.dart @@ -0,0 +1,129 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.0 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RoomMainDetailDTO { + /// Returns a new [RoomMainDetailDTO] instance. + RoomMainDetailDTO({ + this.id, + this.homeId, + this.name, + this.createdDate, + this.updatedDate, + this.environmentalDevices, + this.securityDevices, + }); + + String id; + + String homeId; + + String name; + + DateTime createdDate; + + DateTime updatedDate; + + List environmentalDevices; + + List securityDevices; + + @override + bool operator ==(Object other) => identical(this, other) || other is RoomMainDetailDTO && + other.id == id && + other.homeId == homeId && + other.name == name && + other.createdDate == createdDate && + other.updatedDate == updatedDate && + other.environmentalDevices == environmentalDevices && + other.securityDevices == securityDevices; + + @override + int get hashCode => + (id == null ? 0 : id.hashCode) + + (homeId == null ? 0 : homeId.hashCode) + + (name == null ? 0 : name.hashCode) + + (createdDate == null ? 0 : createdDate.hashCode) + + (updatedDate == null ? 0 : updatedDate.hashCode) + + (environmentalDevices == null ? 0 : environmentalDevices.hashCode) + + (securityDevices == null ? 0 : securityDevices.hashCode); + + @override + String toString() => 'RoomMainDetailDTO[id=$id, homeId=$homeId, name=$name, createdDate=$createdDate, updatedDate=$updatedDate, environmentalDevices=$environmentalDevices, securityDevices=$securityDevices]'; + + Map toJson() { + final json = {}; + if (id != null) { + json[r'id'] = id; + } + if (homeId != null) { + json[r'homeId'] = homeId; + } + if (name != null) { + json[r'name'] = name; + } + if (createdDate != null) { + json[r'createdDate'] = createdDate.toUtc().toIso8601String(); + } + if (updatedDate != null) { + json[r'updatedDate'] = updatedDate.toUtc().toIso8601String(); + } + if (environmentalDevices != null) { + json[r'environmentalDevices'] = environmentalDevices; + } + if (securityDevices != null) { + json[r'securityDevices'] = securityDevices; + } + return json; + } + + /// Returns a new [RoomMainDetailDTO] instance and imports its values from + /// [json] if it's non-null, null if [json] is null. + static RoomMainDetailDTO fromJson(Map json) => json == null + ? null + : RoomMainDetailDTO( + id: json[r'id'], + homeId: json[r'homeId'], + name: json[r'name'], + createdDate: json[r'createdDate'] == null + ? null + : DateTime.parse(json[r'createdDate']), + updatedDate: json[r'updatedDate'] == null + ? null + : DateTime.parse(json[r'updatedDate']), + environmentalDevices: DeviceDetailDTO.listFromJson(json[r'environmentalDevices']), + securityDevices: DeviceDetailDTO.listFromJson(json[r'securityDevices']), + ); + + static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => + json == null || json.isEmpty + ? true == emptyIsNull ? null : [] + : json.map((v) => RoomMainDetailDTO.fromJson(v)).toList(growable: true == growable); + + static Map mapFromJson(Map json) { + final map = {}; + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic v) => map[key] = RoomMainDetailDTO.fromJson(v)); + } + return map; + } + + // maps a json object with a list of RoomMainDetailDTO-objects as value to a dart map + static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { + final map = >{}; + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic v) { + map[key] = RoomMainDetailDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); + }); + } + return map; + } +} + diff --git a/mycore_api/lib/model/room_main_detail_dto_all_of.dart b/mycore_api/lib/model/room_main_detail_dto_all_of.dart new file mode 100644 index 0000000..bebb534 --- /dev/null +++ b/mycore_api/lib/model/room_main_detail_dto_all_of.dart @@ -0,0 +1,102 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.0 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RoomMainDetailDTOAllOf { + /// Returns a new [RoomMainDetailDTOAllOf] instance. + RoomMainDetailDTOAllOf({ + this.createdDate, + this.updatedDate, + this.environmentalDevices, + this.securityDevices, + }); + + DateTime createdDate; + + DateTime updatedDate; + + List environmentalDevices; + + List securityDevices; + + @override + bool operator ==(Object other) => identical(this, other) || other is RoomMainDetailDTOAllOf && + other.createdDate == createdDate && + other.updatedDate == updatedDate && + other.environmentalDevices == environmentalDevices && + other.securityDevices == securityDevices; + + @override + int get hashCode => + (createdDate == null ? 0 : createdDate.hashCode) + + (updatedDate == null ? 0 : updatedDate.hashCode) + + (environmentalDevices == null ? 0 : environmentalDevices.hashCode) + + (securityDevices == null ? 0 : securityDevices.hashCode); + + @override + String toString() => 'RoomMainDetailDTOAllOf[createdDate=$createdDate, updatedDate=$updatedDate, environmentalDevices=$environmentalDevices, securityDevices=$securityDevices]'; + + Map toJson() { + final json = {}; + if (createdDate != null) { + json[r'createdDate'] = createdDate.toUtc().toIso8601String(); + } + if (updatedDate != null) { + json[r'updatedDate'] = updatedDate.toUtc().toIso8601String(); + } + if (environmentalDevices != null) { + json[r'environmentalDevices'] = environmentalDevices; + } + if (securityDevices != null) { + json[r'securityDevices'] = securityDevices; + } + return json; + } + + /// Returns a new [RoomMainDetailDTOAllOf] instance and imports its values from + /// [json] if it's non-null, null if [json] is null. + static RoomMainDetailDTOAllOf fromJson(Map json) => json == null + ? null + : RoomMainDetailDTOAllOf( + createdDate: json[r'createdDate'] == null + ? null + : DateTime.parse(json[r'createdDate']), + updatedDate: json[r'updatedDate'] == null + ? null + : DateTime.parse(json[r'updatedDate']), + environmentalDevices: DeviceDetailDTO.listFromJson(json[r'environmentalDevices']), + securityDevices: DeviceDetailDTO.listFromJson(json[r'securityDevices']), + ); + + static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => + json == null || json.isEmpty + ? true == emptyIsNull ? null : [] + : json.map((v) => RoomMainDetailDTOAllOf.fromJson(v)).toList(growable: true == growable); + + static Map mapFromJson(Map json) { + final map = {}; + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic v) => map[key] = RoomMainDetailDTOAllOf.fromJson(v)); + } + return map; + } + + // maps a json object with a list of RoomMainDetailDTOAllOf-objects as value to a dart map + static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { + final map = >{}; + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic v) { + map[key] = RoomMainDetailDTOAllOf.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); + }); + } + return map; + } +} + diff --git a/mycore_api/lib/model/user_info_detail_dto.dart b/mycore_api/lib/model/user_info_detail_dto.dart index 2d7640b..d56fe54 100644 --- a/mycore_api/lib/model/user_info_detail_dto.dart +++ b/mycore_api/lib/model/user_info_detail_dto.dart @@ -16,6 +16,8 @@ class UserInfoDetailDTO { this.email, this.firstName, this.lastName, + this.language, + this.homeIds, }); String id; @@ -26,22 +28,30 @@ class UserInfoDetailDTO { String lastName; + String language; + + List homeIds; + @override bool operator ==(Object other) => identical(this, other) || other is UserInfoDetailDTO && other.id == id && other.email == email && other.firstName == firstName && - other.lastName == lastName; + other.lastName == lastName && + other.language == language && + other.homeIds == homeIds; @override int get hashCode => (id == null ? 0 : id.hashCode) + (email == null ? 0 : email.hashCode) + (firstName == null ? 0 : firstName.hashCode) + - (lastName == null ? 0 : lastName.hashCode); + (lastName == null ? 0 : lastName.hashCode) + + (language == null ? 0 : language.hashCode) + + (homeIds == null ? 0 : homeIds.hashCode); @override - String toString() => 'UserInfoDetailDTO[id=$id, email=$email, firstName=$firstName, lastName=$lastName]'; + String toString() => 'UserInfoDetailDTO[id=$id, email=$email, firstName=$firstName, lastName=$lastName, language=$language, homeIds=$homeIds]'; Map toJson() { final json = {}; @@ -57,6 +67,12 @@ class UserInfoDetailDTO { if (lastName != null) { json[r'lastName'] = lastName; } + if (language != null) { + json[r'language'] = language; + } + if (homeIds != null) { + json[r'homeIds'] = homeIds; + } return json; } @@ -69,6 +85,10 @@ class UserInfoDetailDTO { email: json[r'email'], firstName: json[r'firstName'], lastName: json[r'lastName'], + language: json[r'language'], + homeIds: json[r'homeIds'] == null + ? null + : (json[r'homeIds'] as List).cast(), ); static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => diff --git a/mycore_api/swagger.yaml b/mycore_api/swagger.yaml index fb96382..49d6cf4 100644 --- a/mycore_api/swagger.yaml +++ b/mycore_api/swagger.yaml @@ -1,4625 +1,7604 @@ -x-generator: NSwag v13.9.2.0 (NJsonSchema v10.3.1.0 (Newtonsoft.Json v12.0.0.0)) -openapi: 3.0.0 -info: - title: MyCore Service - description: API description - version: Version Pre-Alpha -servers: - - url: http://192.168.31.140 -paths: - /api/books: - get: - tags: - - Books - operationId: Books_GetAll - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Book' - security: - - bearer: [] - post: - tags: - - Books - operationId: Books_Create - requestBody: - x-name: book - content: - application/json: - schema: - $ref: '#/components/schemas/Book' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/Book' - security: - - bearer: [] - /api/books/{id}: - get: - tags: - - Books - operationId: Books_Get - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/Book' - security: - - bearer: [] - put: - tags: - - Books - operationId: Books_Update - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - requestBody: - x-name: bookIn - content: - application/json: - schema: - $ref: '#/components/schemas/Book' - required: true - x-position: 2 - responses: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - security: - - bearer: [] - delete: - tags: - - Books - operationId: Books_Delete - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - security: - - bearer: [] - /api/device/{homeId}: - get: - tags: - - Device - summary: Get all devices summary - operationId: Device_GetAll - parameters: - - name: homeId - in: path - required: true - description: Home Id - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/DeviceSummaryDTO' - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/device/detail/{deviceId}: - get: - tags: - - Device - summary: Get a specific device info - operationId: Device_GetDetail - parameters: - - name: deviceId - in: path - required: true - description: id of device - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/device/{homeId}/type/{type}: - get: - tags: - - Device - summary: Get list of devices from a type - operationId: Device_GetDevicesByType - parameters: - - name: homeId - in: path - required: true - description: Home Id - schema: - type: string - nullable: true - x-position: 1 - - name: type - in: path - required: true - description: device type - schema: - $ref: '#/components/schemas/DeviceType' - x-position: 2 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/DeviceDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/device: - post: - tags: - - Device - summary: Create a device - operationId: Device_Create - requestBody: - x-name: deviceDetailDTO - description: Device to create - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDetailDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/device/{homeId}/fromProvider/{providerId}: - post: - tags: - - Device - summary: Create devices from provider - operationId: Device_CreateDevicesFromProvider - parameters: - - name: homeId - in: path - required: true - description: Home Id - schema: - type: string - nullable: true - x-position: 1 - - name: providerId - in: path - required: true - description: Id of Provider - schema: - type: string - nullable: true - x-position: 2 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/DeviceDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '401': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '421': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - get: - tags: - - Device - summary: Get devices from provider - operationId: Device_GetDevicesFromProvider - parameters: - - name: homeId - in: path - required: true - description: Home Id - schema: - type: string - nullable: true - x-position: 1 - - name: providerId - in: path - required: true - description: Id of Provider - schema: - type: string - nullable: true - x-position: 2 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/DeviceDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - delete: - tags: - - Device - summary: Delete devices from provider - operationId: Device_DeleteDevicesFromProvider - parameters: - - name: homeId - in: path - required: true - description: Home Id - schema: - type: string - nullable: true - x-position: 1 - - name: providerId - in: path - required: true - description: Id of Provider - schema: - type: string - nullable: true - x-position: 2 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/device/zigbee2Mqtt/{homeId}: - get: - tags: - - Device - summary: Get all zigbee2Mqtt devices - operationId: Device_GetDevicesFromZigbee2Mqtt - parameters: - - name: homeId - in: path - required: true - description: Home Id - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/DeviceDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/device/{deviceId}: - put: - tags: - - Device - summary: Update a device - operationId: Device_Update - parameters: - - name: deviceId - in: path - required: true - schema: - type: string - x-position: 2 - requestBody: - x-name: deviceDetailDTO - description: Device to update - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDetailDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDetailDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - delete: - tags: - - Device - summary: Delete a device - operationId: Device_Delete - parameters: - - name: deviceId - in: path - required: true - description: Id of device to delete - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/device/home/{homeId}: - delete: - tags: - - Device - summary: Delete all device for a specified home - operationId: Device_DeleteAllForHome - parameters: - - name: homeId - in: path - required: true - description: Id of home - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/energy/electricity: - get: - tags: - - Energy - summary: Get summary production of Kwh/Year - operationId: Energy_GetElectricityProduction - parameters: - - name: homeId - in: query - schema: - type: string - nullable: true - x-position: 1 - - name: viewBy - in: query - schema: - $ref: '#/components/schemas/ViewBy' - x-position: 2 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ElectricityProduction' - security: - - bearer: [] - /api/iot/smartprinter/{idDevice}: - get: - tags: - - IOT - summary: Retrieve all SmartPrinterMessage - operationId: IOT_GetSmartPrinterMessages - parameters: - - name: id - in: query - description: Id of the smart printer message - schema: - type: integer - format: int32 - x-position: 1 - - name: idDevice - in: path - required: true - schema: - type: string - x-position: 2 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SmartPrinterMessage' - security: - - bearer: [] - post: - tags: - - IOT - summary: It's the method to post data from mqtt broker to Database (Thanks Rpi!) - operationId: IOT_PostToDBPrinter - parameters: - - name: idDevice - in: path - required: true - description: Id of the device to upload to DB - schema: - type: integer - format: int32 - x-position: 1 - requestBody: - x-name: content - description: Content that will be uploaded - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SmartPrinterMessage' - required: true - x-position: 2 - responses: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - security: - - bearer: [] - /api/iot/smartgarden/{idDevice}: - post: - tags: - - IOT - summary: It's the method to post data from mqtt broker to Database (Thanks Rpi!) - operationId: IOT_PostToDBSmartGarden - parameters: - - name: idDevice - in: path - required: true - schema: - type: integer - format: int32 - x-position: 1 - requestBody: - x-name: content - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SmartGardenMessage' - required: true - x-position: 2 - responses: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - security: - - bearer: [] - /api/odd/country/{id}/{oddRequest}: - get: - tags: - - Odd - summary: Get odds for one country and one odd value maximum - operationId: Odd_GetForCountry - parameters: - - name: id - in: path - required: true - description: id of country, e.g = BE for Belgium - schema: - type: string - nullable: true - x-position: 1 - - name: oddRequest - in: path - required: true - description: Odd Maximum value - schema: - type: number - format: double - x-position: 2 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/OddNice' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - /api/odd/{oddRequest}: - get: - tags: - - Odd - summary: Get odds for one country and one odd value maximum - operationId: Odd_GetAll - parameters: - - name: oddRequest - in: path - required: true - description: Odd Maximum value - schema: - type: number - format: double - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/OddNice' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/provider/{homeId}: - get: - tags: - - Provider - summary: 'Get all home providers ' - operationId: Provider_GetAll - parameters: - - name: homeId - in: path - required: true - description: Home Id - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ProviderDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/provider: - post: - tags: - - Provider - summary: Create a provider - operationId: Provider_Create - requestBody: - x-name: providerDTO - description: Provider to create - content: - application/json: - schema: - $ref: '#/components/schemas/ProviderDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ProviderDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - put: - tags: - - Provider - summary: Update a provider - operationId: Provider_Update - requestBody: - x-name: providerDTO - description: Provider to update - content: - application/json: - schema: - $ref: '#/components/schemas/ProviderDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/provider/{providerId}: - delete: - tags: - - Provider - summary: Delete a provider - operationId: Provider_Delete - parameters: - - name: providerId - in: path - required: true - description: Id of provider to delete - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/device/screen: - get: - tags: - - ScreenDevice - summary: Get all screen devices - operationId: ScreenDevice_GetAllScreenDevices - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ScreenDevice' - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - post: - tags: - - ScreenDevice - summary: Create screen device - operationId: ScreenDevice_CreateDevice - requestBody: - x-name: screenDevice - description: Screen device to create - content: - application/json: - schema: - $ref: '#/components/schemas/ScreenDevice' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ScreenDevice' - '400': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - put: - tags: - - ScreenDevice - summary: Update screen device - operationId: ScreenDevice_UpdateDevice - requestBody: - x-name: screenDevice - description: Screen device to update - content: - application/json: - schema: - $ref: '#/components/schemas/ScreenDevice' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ScreenDevice' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/device/screen/{screenDeviceId}: - get: - tags: - - ScreenDevice - summary: Get screen device info - operationId: ScreenDevice_GetDeviceInfo - parameters: - - name: screenDeviceId - in: path - required: true - description: Id of the screen device you want to get information - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ScreenDevice' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/device/screen/{deviceId}: - delete: - tags: - - ScreenDevice - summary: Delete device - operationId: ScreenDevice_DeleteDevice - parameters: - - name: deviceId - in: path - required: true - description: Screen device id to update - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/mqtt: - post: - tags: - - MQTT - summary: Publish mqtt test - operationId: MQTT_PublishMessage - requestBody: - x-name: mqttMessageDTO - description: Message to send - content: - application/json: - schema: - $ref: '#/components/schemas/MqttMessageDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: boolean - '400': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/layout/panelSection: - get: - tags: - - Layout - summary: 'It''s a test ! :) ' - operationId: Layout_Get - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/PanelSection' - /api/token: - post: - tags: - - Token - summary: Connect user - operationId: Token_ConnectUser - requestBody: - x-name: loginDTO - description: login info - content: - application/json: - schema: - $ref: '#/components/schemas/LoginDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/UserInfo' - '401': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - /api/user: - get: - tags: - - User - summary: 'Get a list of user ' - operationId: User_GetAll - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/UserInfo' - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - post: - tags: - - User - summary: Create an user - operationId: User_CreateUser - requestBody: - x-name: newUser - description: New user info - content: - application/json: - schema: - $ref: '#/components/schemas/UserInfo' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/UserInfoDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - put: - tags: - - User - summary: Update an user - operationId: User_UpdateUser - requestBody: - x-name: updatedUser - description: User to update - content: - application/json: - schema: - $ref: '#/components/schemas/UserInfo' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/UserInfoDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/user/{id}: - get: - tags: - - User - summary: 'Get a specific user ' - operationId: User_Get - parameters: - - name: id - in: path - required: true - description: id user - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/UserInfoDetailDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - delete: - tags: - - User - summary: Delete an user - operationId: User_DeleteUser - parameters: - - name: id - in: path - required: true - description: Id of user to delete - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/test: - get: - tags: - - Values - summary: 'It''s a test ! :) ' - operationId: Values_GetAll - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - type: string - post: - tags: - - Values - operationId: Values_Post - requestBody: - x-name: value - content: - application/json: - schema: - type: string - required: true - x-position: 1 - responses: - '200': - description: '' - security: - - bearer: [] - /api/test/{id}: - get: - tags: - - Values - operationId: Values_Get - parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int32 - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - put: - tags: - - Values - operationId: Values_Put - parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int32 - x-position: 1 - requestBody: - x-name: value - content: - application/json: - schema: - type: string - required: true - x-position: 2 - responses: - '200': - description: '' - security: - - bearer: [] - delete: - tags: - - Values - operationId: Values_Delete - parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int32 - x-position: 1 - responses: - '200': - description: '' - security: - - bearer: [] - /api/alarm/{homeId}: - get: - tags: - - Alarm - summary: Get all alarm modes for the specified home - operationId: Alarm_GetAll - parameters: - - name: homeId - in: path - required: true - description: Home Id - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/AlarmModeDTO' - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/alarm/detail/{alarmId}: - get: - tags: - - Alarm - summary: Get detail info of a specified alarm mode - operationId: Alarm_GetDetail - parameters: - - name: alarmModeId - in: query - description: alarm id - schema: - type: string - nullable: true - x-position: 1 - - name: alarmId - in: path - required: true - schema: - type: string - x-position: 2 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/AlarmModeDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/alarm: - post: - tags: - - Alarm - summary: Create an alarm mode - operationId: Alarm_Create - requestBody: - x-name: alarmModeCreateOrUpdateDetailDTO - description: Alarm mode to create - content: - application/json: - schema: - $ref: '#/components/schemas/AlarmModeCreateOrUpdateDetailDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/AlarmModeDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - put: - tags: - - Alarm - summary: Update an alarm mode - operationId: Alarm_Update - requestBody: - x-name: alarmModeCreateOrUpdateDetailDTO - description: alarm mode to update - content: - application/json: - schema: - $ref: '#/components/schemas/AlarmModeCreateOrUpdateDetailDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/AlarmModeDetailDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/alarm/defaults/{homeId}: - post: - tags: - - Alarm - summary: Create default alarm modes - operationId: Alarm_CreateDefaultAlarms - parameters: - - name: homeId - in: path - required: true - description: Home Id - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: boolean - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/alarm/activate/{alarmModeId}: - post: - tags: - - Alarm - summary: Activate current alarm mode - operationId: Alarm_Activate - parameters: - - name: alarmModeId - in: path - required: true - description: Alarm mode to activate - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/alarm/{alarmModeId}: - delete: - tags: - - Alarm - summary: Delete an alarm mode - operationId: Alarm_Delete - parameters: - - name: alarmModeId - in: path - required: true - description: Id of alarm mode to delete - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '405': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/alarm/home/{homeId}: - delete: - tags: - - Alarm - summary: Delete all alarm mode for a specified home - operationId: Alarm_DeleteAllForHome - parameters: - - name: homeId - in: path - required: true - description: Home Id - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Authentication/Token: - post: - tags: - - Authentication - summary: Authenticate with form parameters (used by Swagger test client) - operationId: Authentication_AuthenticateWithForm - requestBody: - content: - multipart/form-data: - schema: - properties: - grant_type: - type: string - nullable: true - username: - type: string - nullable: true - password: - type: string - nullable: true - client_id: - type: string - nullable: true - client_secret: - type: string - nullable: true - responses: - '200': - description: Token descriptor - content: - application/json: - schema: - $ref: '#/components/schemas/TokenDTO' - '401': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - /api/Authentication/Authenticate: - post: - tags: - - Authentication - summary: Authenticate with Json parameters (used by most clients) - operationId: Authentication_AuthenticateWithJson - requestBody: - x-name: login - description: Login DTO - content: - application/json: - schema: - $ref: '#/components/schemas/LoginDTO' - required: true - x-position: 1 - responses: - '200': - description: Token descriptor - content: - application/json: - schema: - $ref: '#/components/schemas/TokenDTO' - '401': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - /api/automation/{homeId}: - get: - tags: - - Automation - summary: Get all automations for the specified home - operationId: Automation_GetAll - parameters: - - name: homeId - in: path - required: true - description: Home Id - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/AutomationDTO' - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/automation/detail/{automationId}: - get: - tags: - - Automation - summary: Get detail info of a specified automation - operationId: Automation_GetDetail - parameters: - - name: automationId - in: path - required: true - description: automation id - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/AutomationDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/automation: - post: - tags: - - Automation - summary: Create an automation - operationId: Automation_Create - requestBody: - x-name: automationDetailDTO - description: Automation to create - content: - application/json: - schema: - $ref: '#/components/schemas/AutomationDetailDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/AutomationDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - put: - tags: - - Automation - summary: Update an automation - operationId: Automation_Update - requestBody: - x-name: automationDetailDTO - description: automation to update - content: - application/json: - schema: - $ref: '#/components/schemas/AutomationDetailDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/AutomationDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/automation/{automationId}: - delete: - tags: - - Automation - summary: Delete an automation - operationId: Automation_Delete - parameters: - - name: automationId - in: path - required: true - description: Id of automation to delete - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/automation/home/{homeId}: - delete: - tags: - - Automation - summary: Delete all automation for a specified home - operationId: Automation_DeleteAllForHome - parameters: - - name: homeId - in: path - required: true - description: Home Id - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/event/{homeId}: - get: - tags: - - Event - summary: 'Get events for the specified home ' - operationId: Event_Get - parameters: - - name: homeId - in: path - required: true - description: Home Id - schema: - type: string - nullable: true - x-position: 1 - - name: DeviceId - in: query - schema: - type: string - nullable: true - x-position: 2 - - name: RoomId - in: query - schema: - type: string - nullable: true - x-position: 3 - - name: StartIndex - in: query - schema: - type: integer - format: int32 - x-position: 4 - - name: Count - in: query - schema: - type: integer - format: int32 - x-position: 5 - - name: DateStart - in: query - schema: - type: string - format: date-time - nullable: true - x-position: 6 - - name: DateEnd - in: query - schema: - type: string - format: date-time - nullable: true - x-position: 7 - - name: EventType - in: query - schema: - nullable: true - oneOf: - - $ref: '#/components/schemas/EventType' - x-position: 8 - - name: DeviceType - in: query - schema: - nullable: true - oneOf: - - $ref: '#/components/schemas/DeviceType' - x-position: 9 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/EventDetailDTO' - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/event/detail/{eventId}: - get: - tags: - - Event - summary: Get detail info of a specified event - operationId: Event_GetDetail - parameters: - - name: eventId - in: path - required: true - description: event id - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/EventDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/event/{eventId}: - delete: - tags: - - Event - summary: Delete an event - operationId: Event_Delete - parameters: - - name: eventId - in: path - required: true - description: Id of event to delete - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/event/home/{homeId}: - delete: - tags: - - Event - summary: Delete all events for a specified home - operationId: Event_DeleteAllForHome - parameters: - - name: homeId - in: path - required: true - description: Home Id - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/group/{homeId}: - get: - tags: - - Group - summary: Get all groups for the specified home - operationId: Group_GetAll - parameters: - - name: homeId - in: path - required: true - description: Home Id - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/GroupSummaryDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/group/detail/{groupId}: - get: - tags: - - Group - summary: Get detail info of a specified group - operationId: Group_GetDetail - parameters: - - name: groupId - in: path - required: true - description: groupid - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/GroupDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/group/{homeId}/type/{type}: - get: - tags: - - Group - summary: Get list of group from a type - operationId: Group_GetGroupsByType - parameters: - - name: homeId - in: path - required: true - description: home Id - schema: - type: string - nullable: true - x-position: 1 - - name: type - in: path - required: true - description: group type - schema: - type: string - nullable: true - x-position: 2 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/GroupSummaryDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/group/zigbee2Mqtt/{homeId}: - get: - tags: - - Group - summary: Get all zigbee2Mqtt groups - operationId: Group_GetGroupsFromZigbee2Mqtt - parameters: - - name: homeId - in: path - required: true - description: Home Id - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/GroupDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/group: - post: - tags: - - Group - summary: Create a group - operationId: Group_Create - requestBody: - x-name: groupCreateOrUpdateDetail - description: Group to create - content: - application/json: - schema: - $ref: '#/components/schemas/GroupCreateOrUpdateDetailDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/GroupDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - put: - tags: - - Group - summary: Update a group - operationId: Group_Update - requestBody: - x-name: groupCreateOrUpdateDetail - description: group to update - content: - application/json: - schema: - $ref: '#/components/schemas/GroupCreateOrUpdateDetailDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/GroupCreateOrUpdateDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/group/{homeId}/fromZigbee: - post: - tags: - - Group - summary: Create groups from provider - operationId: Group_CreateDevicesFromZigbee2Mqtt - parameters: - - name: homeId - in: path - required: true - description: Home Id - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/GroupDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/group/{groupId}/device/{deviceId}: - delete: - tags: - - Group - summary: Delete device from a group - operationId: Group_Delete - parameters: - - name: deviceId - in: path - required: true - description: Id of device to delete from the group - schema: - type: string - nullable: true - x-position: 1 - - name: groupId - in: path - required: true - description: 'Id of group ' - schema: - type: string - nullable: true - x-position: 2 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/group/{groupId}: - delete: - tags: - - Group - summary: Delete a group - operationId: Group_Delete2 - parameters: - - name: groupId - in: path - required: true - description: 'Id of group ' - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/group/home/{homeId}: - delete: - tags: - - Group - summary: Delete all group for a specified home - operationId: Group_DeleteAllForHome - parameters: - - name: homeId - in: path - required: true - description: Home Id - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/home/{userId}: - get: - tags: - - Home - summary: Get all home for specified user - operationId: Home_GetAll - parameters: - - name: userId - in: path - required: true - description: User Id - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/HomeDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/home/detail/{homeId}: - get: - tags: - - Home - summary: Get detail info of a specified home - operationId: Home_GetDetail - parameters: - - name: homeId - in: path - required: true - description: home id - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/HomeDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/home: - post: - tags: - - Home - summary: Create a home - operationId: Home_Create - requestBody: - x-name: createOrUpdateHomeDTO - description: Home to create - content: - application/json: - schema: - $ref: '#/components/schemas/CreateOrUpdateHomeDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/HomeDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - put: - tags: - - Home - summary: Update a home - operationId: Home_Update - requestBody: - x-name: createOrUpdateHomeDTO - description: Home to update - content: - application/json: - schema: - $ref: '#/components/schemas/CreateOrUpdateHomeDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/HomeDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/home/{homeId}: - delete: - tags: - - Home - summary: Delete a home - operationId: Home_Delete - parameters: - - name: homeId - in: path - required: true - description: Id of home to delete - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/room/{homeId}: - get: - tags: - - Room - summary: Get all rooms for the specified home - operationId: Room_GetAll - parameters: - - name: homeId - in: path - required: true - description: Home Id - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/RoomSummaryDTO' - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/room/detail/{roomId}: - get: - tags: - - Room - summary: Get detail info of a specified room - operationId: Room_GetDetail - parameters: - - name: roomId - in: path - required: true - description: room id - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/RoomDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/room: - post: - tags: - - Room - summary: Create a room - operationId: Room_Create - requestBody: - x-name: roomCreateOrUpdateDetail - description: Room to create - content: - application/json: - schema: - $ref: '#/components/schemas/RoomCreateOrUpdateDetailDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/RoomDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - put: - tags: - - Room - summary: Update a room - operationId: Room_Update - requestBody: - x-name: roomCreateOrUpdateDetail - description: room to update - content: - application/json: - schema: - $ref: '#/components/schemas/RoomCreateOrUpdateDetailDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/RoomCreateOrUpdateDetailDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/room/{roomId}/device/{deviceId}: - delete: - tags: - - Room - summary: Delete device from a room - operationId: Room_Delete - parameters: - - name: deviceId - in: path - required: true - description: Id of device to delete from the room - schema: - type: string - nullable: true - x-position: 1 - - name: roomId - in: path - required: true - description: 'Id of room ' - schema: - type: string - nullable: true - x-position: 2 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/room/{roomId}: - delete: - tags: - - Room - summary: Delete a room - operationId: Room_Delete2 - parameters: - - name: roomId - in: path - required: true - description: 'Id of room ' - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/room/home/{homeId}: - delete: - tags: - - Room - summary: Delete all rooms for a specified home - operationId: Room_DeleteAllForHome - parameters: - - name: homeId - in: path - required: true - description: Home Id - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /azure: - post: - tags: - - Azure - operationId: Azure_Create - requestBody: - x-name: user - content: - application/json: - schema: - $ref: '#/components/schemas/AzureADAuthModel' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - /facebook: - post: - tags: - - Facebook - operationId: Facebook_Create - requestBody: - x-name: user - content: - application/json: - schema: - $ref: '#/components/schemas/FacebookAuthModel' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - /google: - post: - tags: - - Google - operationId: Google_Create - requestBody: - x-name: user - content: - application/json: - schema: - $ref: '#/components/schemas/GoogleAuthModel' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - /token: - post: - tags: - - Token - operationId: Token_Create - requestBody: - x-name: user - content: - application/json: - schema: - $ref: '#/components/schemas/User' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - /twitter: - post: - tags: - - Twitter - operationId: Twitter_Create - requestBody: - x-name: user - content: - application/json: - schema: - $ref: '#/components/schemas/TwitterAuthModel' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary -components: - schemas: - Book: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - bookName: - type: string - nullable: true - price: - type: number - format: decimal - category: - type: string - nullable: true - author: - type: string - nullable: true - DeviceSummaryDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - homeId: - type: string - nullable: true - description: - type: string - nullable: true - name: - type: string - nullable: true - model: - type: string - nullable: true - type: - $ref: '#/components/schemas/DeviceType' - status: - type: boolean - connectionStatus: - $ref: '#/components/schemas/ConnectionStatus' - roomId: - type: string - nullable: true - providerId: - type: string - nullable: true - providerName: - type: string - nullable: true - lastStateDate: - type: string - format: date-time - battery: - type: boolean - batteryStatus: - type: integer - format: int32 - DeviceType: - type: string - description: '' - x-enumNames: - - Sensor - - Actuator - - Camera - - Switch - - Light - - Sound - - Plug - - Multiplug - - Thermostat - - Valve - - Door - - Environment - - Motion - - Gateway - - Unknown - enum: - - Sensor - - Actuator - - Camera - - Switch - - Light - - Sound - - Plug - - Multiplug - - Thermostat - - Valve - - Door - - Environment - - Motion - - Gateway - - Unknown - ConnectionStatus: - type: string - description: '' - x-enumNames: - - Connected - - Disconnected - - Unknown - enum: - - Connected - - Disconnected - - Unknown - DeviceDetailDTO: - allOf: - - $ref: '#/components/schemas/DeviceSummaryDTO' - - type: object - additionalProperties: false - properties: - firmwareVersion: - type: string - nullable: true - hardwareVersion: - type: string - nullable: true - port: - type: integer - format: int32 - meansOfCommunications: - type: array - nullable: true - items: - $ref: '#/components/schemas/MeansOfCommunication' - createdDate: - type: string - format: date-time - updatedDate: - type: string - format: date-time - lastState: - type: string - nullable: true - ipAddress: - type: string - nullable: true - serviceIdentification: - type: string - nullable: true - manufacturerName: - type: string - nullable: true - groupIds: - type: array - nullable: true - items: - type: string - properties: - type: string - nullable: true - supportedOperations: - type: array - nullable: true - items: - type: string - MeansOfCommunication: - type: string - description: '' - x-enumNames: - - Wifi - - Bluetooth - - Zigbee - - Zwave - enum: - - Wifi - - Bluetooth - - Zigbee - - Zwave - ElectricityProduction: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - deviceId: - type: string - nullable: true - homeId: - type: string - nullable: true - watt: - type: number - format: double - ampere: - type: number - format: double - timestamp: - type: string - format: date-time - ViewBy: - type: string - description: '' - x-enumNames: - - Year - - Month - - Day - enum: - - Year - - Month - - Day - SmartPrinterMessage: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - type: - type: string - nullable: true - time: - type: string - nullable: true - temperature: - type: number - format: double - pressure: - type: number - format: double - smoke: - type: integer - format: int32 - SmartGardenMessage: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - type: - type: string - nullable: true - time: - type: string - nullable: true - temperature: - type: number - format: double - pressure: - type: number - format: double - humidity: - type: number - format: double - water: - type: integer - format: int32 - light: - type: integer - format: int32 - OddNice: - type: object - additionalProperties: false - properties: - teams: - type: array - nullable: true - items: - type: string - commence_time: - type: integer - format: int32 - home_team: - type: string - nullable: true - odds: - nullable: true - oneOf: - - $ref: '#/components/schemas/OddObject' - OddObject: - type: object - additionalProperties: false - properties: - homeOdd: - type: number - format: double - drawOdd: - type: number - format: double - visitOdd: - type: number - format: double - ProviderDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - name: - type: string - nullable: true - type: - $ref: '#/components/schemas/ProviderType' - homeId: - type: string - nullable: true - endpoint: - type: string - nullable: true - username: - type: string - nullable: true - password: - type: string - nullable: true - apiKey: - type: string - nullable: true - active: - type: boolean - ProviderType: - type: string - description: '' - x-enumNames: - - arlo - - meross - - yeelight - - zigbee2mqtt - enum: - - arlo - - meross - - yeelight - - zigbee2mqtt - ScreenDevice: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - name: - type: string - nullable: true - type: - type: string - nullable: true - location: - type: string - nullable: true - locationExplanation: - type: string - nullable: true - height: - type: integer - format: int32 - width: - type: integer - format: int32 - MqttMessageDTO: - type: object - additionalProperties: false - properties: - topic: - type: string - nullable: true - message: - type: string - nullable: true - online: - type: boolean - PanelSection: - type: object - additionalProperties: false - properties: - label: - type: string - nullable: true - icon: - type: string - nullable: true - color: - type: string - nullable: true - defaultRoute: - type: string - nullable: true - children: - type: array - nullable: true - items: - $ref: '#/components/schemas/PanelMenuItem' - PanelMenuItem: - type: object - additionalProperties: false - properties: - label: - type: string - nullable: true - route: - type: string - nullable: true - icon: - type: string - nullable: true - color: - type: string - nullable: true - badgeValue: - type: integer - format: int32 - badgeType: - type: string - nullable: true - children: - type: array - nullable: true - items: - $ref: '#/components/schemas/PanelMenuItem' - UserInfo: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - role: - type: string - nullable: true - email: - type: string - nullable: true - password: - type: string - nullable: true - firstName: - type: string - nullable: true - lastName: - type: string - nullable: true - token: - type: string - nullable: true - birthday: - type: string - format: date-time - homeIds: - type: array - nullable: true - items: - type: string - dateCreation: - type: string - format: date-time - address: - type: string - nullable: true - city: - type: string - nullable: true - state: - type: string - nullable: true - country: - type: string - nullable: true - language: - type: string - nullable: true - timeZone: - type: string - nullable: true - postalCode: - type: integer - format: int32 - LoginDTO: - type: object - additionalProperties: false - properties: - email: - type: string - nullable: true - password: - type: string - nullable: true - UserInfoDetailDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - email: - type: string - nullable: true - firstName: - type: string - nullable: true - lastName: - type: string - nullable: true - AlarmModeDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - homeId: - type: string - nullable: true - name: - type: string - nullable: true - type: - $ref: '#/components/schemas/AlarmType' - activated: - type: boolean - isDefault: - type: boolean - notification: - type: boolean - createdDate: - type: string - format: date-time - updatedDate: - type: string - format: date-time - AlarmType: - type: string - description: '' - x-enumNames: - - Home - - Absent - - Geolocalized - - Programmed - - Desarmed - - Custom - enum: - - Home - - Absent - - Geolocalized - - Programmed - - Desarmed - - Custom - AlarmModeDetailDTO: - allOf: - - $ref: '#/components/schemas/AlarmModeDTO' - - type: object - additionalProperties: false - properties: - triggers: - type: array - nullable: true - items: - $ref: '#/components/schemas/Trigger' - devices: - type: array - nullable: true - items: - $ref: '#/components/schemas/DeviceDetailDTO' - programmedMode: - nullable: true - oneOf: - - $ref: '#/components/schemas/ProgrammedMode' - geolocalizedMode: - nullable: true - oneOf: - - $ref: '#/components/schemas/GeolocalizedMode' - Trigger: - type: object - additionalProperties: false - properties: - providerId: - type: string - nullable: true - deviceId: - type: string - nullable: true - stateName: - type: string - nullable: true - stateValue: - type: string - nullable: true - type: - $ref: '#/components/schemas/TriggerType' - TriggerType: - type: string - description: '' - x-enumNames: - - MQTT - - WEB - - TIME - enum: - - MQTT - - WEB - - TIME - ProgrammedMode: - type: object - additionalProperties: false - properties: - monday: - type: array - nullable: true - items: - $ref: '#/components/schemas/TimePeriodAlarm' - tuesday: - type: array - nullable: true - items: - $ref: '#/components/schemas/TimePeriodAlarm' - wednesday: - type: array - nullable: true - items: - $ref: '#/components/schemas/TimePeriodAlarm' - thursday: - type: array - nullable: true - items: - $ref: '#/components/schemas/TimePeriodAlarm' - friday: - type: array - nullable: true - items: - $ref: '#/components/schemas/TimePeriodAlarm' - saturday: - type: array - nullable: true - items: - $ref: '#/components/schemas/TimePeriodAlarm' - sunday: - type: array - nullable: true - items: - $ref: '#/components/schemas/TimePeriodAlarm' - TimePeriodAlarm: - type: object - additionalProperties: false - properties: - start: - type: string - nullable: true - end: - type: string - nullable: true - alarmMode: - nullable: true - oneOf: - - $ref: '#/components/schemas/AlarmMode' - AlarmMode: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - homeId: - type: string - nullable: true - name: - type: string - nullable: true - activated: - type: boolean - isDefault: - type: boolean - notification: - type: boolean - createdDate: - type: string - format: date-time - updatedDate: - type: string - format: date-time - type: - $ref: '#/components/schemas/AlarmType' - programmedMode: - nullable: true - oneOf: - - $ref: '#/components/schemas/ProgrammedMode' - geolocalizedMode: - nullable: true - oneOf: - - $ref: '#/components/schemas/GeolocalizedMode' - triggers: - type: array - nullable: true - items: - $ref: '#/components/schemas/Trigger' - actions: - type: array - nullable: true - items: - $ref: '#/components/schemas/Action' - devicesIds: - type: array - nullable: true - items: - type: string - GeolocalizedMode: - type: object - additionalProperties: false - properties: - latitude: - type: string - nullable: true - longitude: - type: string - nullable: true - homeMode: - nullable: true - oneOf: - - $ref: '#/components/schemas/AlarmMode' - absentMode: - nullable: true - oneOf: - - $ref: '#/components/schemas/AlarmMode' - Action: - type: object - additionalProperties: false - properties: - groupId: - type: string - nullable: true - deviceId: - type: string - nullable: true - states: - type: array - nullable: true - items: - $ref: '#/components/schemas/AutomationState' - rawRequest: - type: string - nullable: true - providerId: - type: string - nullable: true - type: - $ref: '#/components/schemas/ActionType' - isForce: - type: boolean - AutomationState: - type: object - additionalProperties: false - properties: - name: - type: string - nullable: true - value: - type: string - nullable: true - ActionType: - type: string - description: '' - x-enumNames: - - DELAY - - DEVICE - - HTTP - - ZIGBEE2MQTT - - MQTT - - GROUP - enum: - - DELAY - - DEVICE - - HTTP - - ZIGBEE2MQTT - - MQTT - - GROUP - AlarmModeCreateOrUpdateDetailDTO: - allOf: - - $ref: '#/components/schemas/AlarmModeDTO' - - type: object - additionalProperties: false - properties: - triggers: - type: array - nullable: true - items: - $ref: '#/components/schemas/Trigger' - actions: - type: array - nullable: true - items: - $ref: '#/components/schemas/Action' - programmedMode: - nullable: true - oneOf: - - $ref: '#/components/schemas/ProgrammedMode' - geolocalizedMode: - nullable: true - oneOf: - - $ref: '#/components/schemas/GeolocalizedMode' - TokenDTO: - type: object - additionalProperties: false - properties: - access_token: - type: string - nullable: true - refresh_token: - type: string - nullable: true - scope: - type: string - nullable: true - token_type: - type: string - nullable: true - expires_in: - type: integer - format: int32 - expiration: - type: string - format: date-time - AutomationDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - name: - type: string - nullable: true - active: - type: boolean - homeId: - type: string - nullable: true - createdDate: - type: string - format: date-time - updatedDate: - type: string - format: date-time - AutomationDetailDTO: - allOf: - - $ref: '#/components/schemas/AutomationDTO' - - type: object - additionalProperties: false - properties: - triggers: - type: array - nullable: true - items: - $ref: '#/components/schemas/Trigger' - conditions: - type: array - nullable: true - items: - $ref: '#/components/schemas/Condition' - actions: - type: array - nullable: true - items: - $ref: '#/components/schemas/Action' - devicesIds: - type: array - nullable: true - items: - type: string - Condition: - type: object - additionalProperties: false - properties: - deviceId: - type: string - nullable: true - state: - nullable: true - oneOf: - - $ref: '#/components/schemas/AutomationState' - startTime: - type: string - nullable: true - endTime: - type: string - nullable: true - type: - $ref: '#/components/schemas/ConditionType' - value: - $ref: '#/components/schemas/ConditionValue' - ConditionType: - type: string - description: '' - x-enumNames: - - STATE - - TIME - enum: - - STATE - - TIME - ConditionValue: - type: string - description: '' - x-enumNames: - - EQUAL - - NOT_EQUAL - - BIGGER - - BIGGEST - - SMALLER - - SMALLEST - enum: - - EQUAL - - NOT_EQUAL - - BIGGER - - BIGGEST - - SMALLER - - SMALLEST - EventDetailDTO: - allOf: - - $ref: '#/components/schemas/EventDTO' - - type: object - additionalProperties: false - properties: - deviceState: - nullable: true - oneOf: - - $ref: '#/components/schemas/DeviceState' - automationTriggered: - nullable: true - oneOf: - - $ref: '#/components/schemas/AutomationTriggered' - alarmTriggered: - nullable: true - oneOf: - - $ref: '#/components/schemas/AlarmTriggered' - DeviceState: - type: object - additionalProperties: false - properties: - deviceId: - type: string - nullable: true - deviceName: - type: string - nullable: true - message: - type: string - nullable: true - deviceType: - $ref: '#/components/schemas/DeviceType' - AutomationTriggered: - type: object - additionalProperties: false - properties: - automationId: - type: string - nullable: true - automationName: - type: string - nullable: true - AlarmTriggered: - type: object - additionalProperties: false - properties: - alarmModeId: - type: string - nullable: true - alarmModeName: - type: string - nullable: true - type: - $ref: '#/components/schemas/AlarmType' - EventDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - homeId: - type: string - nullable: true - date: - type: string - format: date-time - type: - $ref: '#/components/schemas/EventType' - roomId: - type: string - nullable: true - EventType: - type: string - description: '' - x-enumNames: - - DeviceState - - AutomationTriggered - - AlarmTriggered - enum: - - DeviceState - - AutomationTriggered - - AlarmTriggered - GroupSummaryDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - homeId: - type: string - nullable: true - name: - type: string - nullable: true - type: - type: string - nullable: true - isAlarm: - type: boolean - GroupDetailDTO: - allOf: - - $ref: '#/components/schemas/GroupSummaryDTO' - - type: object - additionalProperties: false - properties: - createdDate: - type: string - format: date-time - updatedDate: - type: string - format: date-time - devices: - type: array - nullable: true - items: - $ref: '#/components/schemas/DeviceDetailDTO' - GroupCreateOrUpdateDetailDTO: - allOf: - - $ref: '#/components/schemas/GroupSummaryDTO' - - type: object - additionalProperties: false - properties: - deviceIds: - type: array - nullable: true - items: - type: string - HomeDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - name: - type: string - nullable: true - isAlarm: - type: boolean - isDefault: - type: boolean - currentAlarmMode: - nullable: true - oneOf: - - $ref: '#/components/schemas/AlarmModeDTO' - createdDate: - type: string - format: date-time - updatedDate: - type: string - format: date-time - usersIds: - type: array - nullable: true - items: - type: string - HomeDetailDTO: - allOf: - - $ref: '#/components/schemas/HomeDTO' - - type: object - additionalProperties: false - properties: - users: - type: array - nullable: true - items: - $ref: '#/components/schemas/UserInfoDetailDTO' - devices: - type: array - nullable: true - items: - $ref: '#/components/schemas/DeviceSummaryDTO' - automations: - type: array - nullable: true - items: - $ref: '#/components/schemas/AutomationDTO' - providers: - type: array - nullable: true - items: - $ref: '#/components/schemas/ProviderDTO' - groups: - type: array - nullable: true - items: - $ref: '#/components/schemas/GroupSummaryDTO' - CreateOrUpdateHomeDTO: - allOf: - - $ref: '#/components/schemas/HomeDTO' - - type: object - additionalProperties: false - properties: - usersIds: - type: array - nullable: true - items: - type: string - RoomSummaryDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - homeId: - type: string - nullable: true - name: - type: string - nullable: true - RoomDetailDTO: - allOf: - - $ref: '#/components/schemas/RoomSummaryDTO' - - type: object - additionalProperties: false - properties: - createdDate: - type: string - format: date-time - updatedDate: - type: string - format: date-time - devices: - type: array - nullable: true - items: - $ref: '#/components/schemas/DeviceDetailDTO' - RoomCreateOrUpdateDetailDTO: - allOf: - - $ref: '#/components/schemas/RoomSummaryDTO' - - type: object - additionalProperties: false - properties: - deviceIds: - type: array - nullable: true - items: - type: string - AzureADAuthModel: - type: object - additionalProperties: false - properties: - apiKey: - type: string - nullable: true - FacebookAuthModel: - type: object - additionalProperties: false - properties: - userAccessToken: - type: string - nullable: true - GoogleAuthModel: - type: object - additionalProperties: false - properties: - authorizationCode: - type: string - nullable: true - apiKey: - type: string - nullable: true - User: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - password: - type: string - nullable: true - TwitterAuthModel: - type: object - additionalProperties: false - properties: - apiKey: - type: string - nullable: true - securitySchemes: - bearer: - type: oauth2 - description: MyCore Authentication - flows: - password: - authorizationUrl: /authentication/Token - tokenUrl: /api/authentication/Token - scopes: - MyCore-api: MyCore WebAPI -security: - - bearer: [] -tags: - - name: Authentication - description: Authentication management +{ + "x-generator": "NSwag v13.9.2.0 (NJsonSchema v10.3.1.0 (Newtonsoft.Json v12.0.0.0))", + "openapi": "3.0.0", + "info": { + "title": "MyCore Service", + "description": "API description", + "version": "Version Pre-Alpha" + }, + "servers": [ + { + "url": "https://localhost:5001" + } + ], + "paths": { + "/api/books": { + "get": { + "tags": [ + "Books" + ], + "operationId": "Books_GetAll", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Book" + } + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "post": { + "tags": [ + "Books" + ], + "operationId": "Books_Create", + "requestBody": { + "x-name": "book", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Book" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Book" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/books/{id}": { + "get": { + "tags": [ + "Books" + ], + "operationId": "Books_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Book" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "put": { + "tags": [ + "Books" + ], + "operationId": "Books_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "requestBody": { + "x-name": "bookIn", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Book" + } + } + }, + "required": true, + "x-position": 2 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "delete": { + "tags": [ + "Books" + ], + "operationId": "Books_Delete", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/device/{homeId}": { + "get": { + "tags": [ + "Device" + ], + "summary": "Get all devices summary", + "operationId": "Device_GetAll", + "parameters": [ + { + "name": "homeId", + "in": "path", + "required": true, + "description": "Home Id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceSummaryDTO" + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/device/detail/{deviceId}": { + "get": { + "tags": [ + "Device" + ], + "summary": "Get a specific device info", + "operationId": "Device_GetDetail", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "description": "id of device", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceDetailDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/device/{homeId}/type/{type}": { + "get": { + "tags": [ + "Device" + ], + "summary": "Get list of devices from a type", + "operationId": "Device_GetDevicesByType", + "parameters": [ + { + "name": "homeId", + "in": "path", + "required": true, + "description": "Home Id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + }, + { + "name": "type", + "in": "path", + "required": true, + "description": "device type", + "schema": { + "$ref": "#/components/schemas/DeviceType" + }, + "x-position": 2 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceDetailDTO" + } + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/device": { + "post": { + "tags": [ + "Device" + ], + "summary": "Create a device", + "operationId": "Device_Create", + "requestBody": { + "x-name": "deviceDetailDTO", + "description": "Device to create", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceDetailDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceDetailDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/device/action": { + "post": { + "tags": [ + "Device" + ], + "summary": "Send action to device", + "operationId": "Device_SendAction", + "requestBody": { + "x-name": "action", + "description": "Action to sent", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Action" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/device/{homeId}/fromProvider/{providerId}": { + "post": { + "tags": [ + "Device" + ], + "summary": "Create devices from provider", + "operationId": "Device_CreateDevicesFromProvider", + "parameters": [ + { + "name": "homeId", + "in": "path", + "required": true, + "description": "Home Id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + }, + { + "name": "providerId", + "in": "path", + "required": true, + "description": "Id of Provider", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 2 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceDetailDTO" + } + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "401": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "421": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "get": { + "tags": [ + "Device" + ], + "summary": "Get devices from provider", + "operationId": "Device_GetDevicesFromProvider", + "parameters": [ + { + "name": "homeId", + "in": "path", + "required": true, + "description": "Home Id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + }, + { + "name": "providerId", + "in": "path", + "required": true, + "description": "Id of Provider", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 2 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceDetailDTO" + } + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "delete": { + "tags": [ + "Device" + ], + "summary": "Delete devices from provider", + "operationId": "Device_DeleteDevicesFromProvider", + "parameters": [ + { + "name": "homeId", + "in": "path", + "required": true, + "description": "Home Id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + }, + { + "name": "providerId", + "in": "path", + "required": true, + "description": "Id of Provider", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 2 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/device/zigbee2Mqtt/{homeId}": { + "get": { + "tags": [ + "Device" + ], + "summary": "Get all zigbee2Mqtt devices", + "operationId": "Device_GetDevicesFromZigbee2Mqtt", + "parameters": [ + { + "name": "homeId", + "in": "path", + "required": true, + "description": "Home Id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceDetailDTO" + } + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/device/{deviceId}": { + "put": { + "tags": [ + "Device" + ], + "summary": "Update a device", + "operationId": "Device_Update", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "x-position": 2 + } + ], + "requestBody": { + "x-name": "deviceDetailDTO", + "description": "Device to update", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceDetailDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceDetailDTO" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "delete": { + "tags": [ + "Device" + ], + "summary": "Delete a device", + "operationId": "Device_Delete", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "description": "Id of device to delete", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/device/home/{homeId}": { + "delete": { + "tags": [ + "Device" + ], + "summary": "Delete all device for a specified home", + "operationId": "Device_DeleteAllForHome", + "parameters": [ + { + "name": "homeId", + "in": "path", + "required": true, + "description": "Id of home", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/energy/electricity": { + "get": { + "tags": [ + "Energy" + ], + "summary": "Get summary production of Kwh/Year", + "operationId": "Energy_GetElectricityProduction", + "parameters": [ + { + "name": "homeId", + "in": "query", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + }, + { + "name": "viewBy", + "in": "query", + "schema": { + "$ref": "#/components/schemas/ViewBy" + }, + "x-position": 2 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ElectricityProduction" + } + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/iot/smartprinter/{idDevice}": { + "get": { + "tags": [ + "IOT" + ], + "summary": "Retrieve all SmartPrinterMessage", + "operationId": "IOT_GetSmartPrinterMessages", + "parameters": [ + { + "name": "id", + "in": "query", + "description": "Id of the smart printer message", + "schema": { + "type": "integer", + "format": "int32" + }, + "x-position": 1 + }, + { + "name": "idDevice", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "x-position": 2 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SmartPrinterMessage" + } + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "post": { + "tags": [ + "IOT" + ], + "summary": "It's the method to post data from mqtt broker to Database (Thanks Rpi!)", + "operationId": "IOT_PostToDBPrinter", + "parameters": [ + { + "name": "idDevice", + "in": "path", + "required": true, + "description": "Id of the device to upload to DB", + "schema": { + "type": "integer", + "format": "int32" + }, + "x-position": 1 + } + ], + "requestBody": { + "x-name": "content", + "description": "Content that will be uploaded", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SmartPrinterMessage" + } + } + } + }, + "required": true, + "x-position": 2 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/iot/smartgarden/{idDevice}": { + "post": { + "tags": [ + "IOT" + ], + "summary": "It's the method to post data from mqtt broker to Database (Thanks Rpi!)", + "operationId": "IOT_PostToDBSmartGarden", + "parameters": [ + { + "name": "idDevice", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + }, + "x-position": 1 + } + ], + "requestBody": { + "x-name": "content", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SmartGardenMessage" + } + } + } + }, + "required": true, + "x-position": 2 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/odd/country/{id}/{oddRequest}": { + "get": { + "tags": [ + "Odd" + ], + "summary": "Get odds for one country and one odd value maximum", + "operationId": "Odd_GetForCountry", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "id of country, e.g = BE for Belgium", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + }, + { + "name": "oddRequest", + "in": "path", + "required": true, + "description": "Odd Maximum value", + "schema": { + "type": "number", + "format": "double" + }, + "x-position": 2 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OddNice" + } + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/api/odd/{oddRequest}": { + "get": { + "tags": [ + "Odd" + ], + "summary": "Get odds for one country and one odd value maximum", + "operationId": "Odd_GetAll", + "parameters": [ + { + "name": "oddRequest", + "in": "path", + "required": true, + "description": "Odd Maximum value", + "schema": { + "type": "number", + "format": "double" + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OddNice" + } + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/provider/{homeId}": { + "get": { + "tags": [ + "Provider" + ], + "summary": "Get all home providers ", + "operationId": "Provider_GetAll", + "parameters": [ + { + "name": "homeId", + "in": "path", + "required": true, + "description": "Home Id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProviderDTO" + } + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/provider": { + "post": { + "tags": [ + "Provider" + ], + "summary": "Create a provider", + "operationId": "Provider_Create", + "requestBody": { + "x-name": "providerDTO", + "description": "Provider to create", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProviderDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProviderDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "put": { + "tags": [ + "Provider" + ], + "summary": "Update a provider", + "operationId": "Provider_Update", + "requestBody": { + "x-name": "providerDTO", + "description": "Provider to update", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProviderDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceDetailDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/provider/{providerId}": { + "delete": { + "tags": [ + "Provider" + ], + "summary": "Delete a provider", + "operationId": "Provider_Delete", + "parameters": [ + { + "name": "providerId", + "in": "path", + "required": true, + "description": "Id of provider to delete", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/device/screen": { + "get": { + "tags": [ + "ScreenDevice" + ], + "summary": "Get all screen devices", + "operationId": "ScreenDevice_GetAllScreenDevices", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScreenDevice" + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "post": { + "tags": [ + "ScreenDevice" + ], + "summary": "Create screen device", + "operationId": "ScreenDevice_CreateDevice", + "requestBody": { + "x-name": "screenDevice", + "description": "Screen device to create", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScreenDevice" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScreenDevice" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "put": { + "tags": [ + "ScreenDevice" + ], + "summary": "Update screen device", + "operationId": "ScreenDevice_UpdateDevice", + "requestBody": { + "x-name": "screenDevice", + "description": "Screen device to update", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScreenDevice" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScreenDevice" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/device/screen/{screenDeviceId}": { + "get": { + "tags": [ + "ScreenDevice" + ], + "summary": "Get screen device info", + "operationId": "ScreenDevice_GetDeviceInfo", + "parameters": [ + { + "name": "screenDeviceId", + "in": "path", + "required": true, + "description": "Id of the screen device you want to get information", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScreenDevice" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/device/screen/{deviceId}": { + "delete": { + "tags": [ + "ScreenDevice" + ], + "summary": "Delete device", + "operationId": "ScreenDevice_DeleteDevice", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "description": "Screen device id to update", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/mqtt": { + "post": { + "tags": [ + "MQTT" + ], + "summary": "Publish mqtt test", + "operationId": "MQTT_PublishMessage", + "requestBody": { + "x-name": "mqttMessageDTO", + "description": "Message to send", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MqttMessageDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "boolean" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/layout/panelSection": { + "get": { + "tags": [ + "Layout" + ], + "summary": "It's a test ! :) ", + "operationId": "Layout_Get", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PanelSection" + } + } + } + } + } + } + } + }, + "/api/token": { + "post": { + "tags": [ + "Token" + ], + "summary": "Connect user", + "operationId": "Token_ConnectUser", + "requestBody": { + "x-name": "loginDTO", + "description": "login info", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserInfo" + } + } + } + }, + "401": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/api/user": { + "get": { + "tags": [ + "User" + ], + "summary": "Get a list of user ", + "operationId": "User_GetAll", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserInfo" + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "post": { + "tags": [ + "User" + ], + "summary": "Create an user", + "operationId": "User_CreateUser", + "requestBody": { + "x-name": "newUser", + "description": "New user info", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserInfo" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserInfoDetailDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + }, + "put": { + "tags": [ + "User" + ], + "summary": "Update an user", + "operationId": "User_UpdateUser", + "requestBody": { + "x-name": "updatedUser", + "description": "User to update", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserInfo" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserInfoDetailDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/user/{id}": { + "get": { + "tags": [ + "User" + ], + "summary": "Get a specific user ", + "operationId": "User_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "id user", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserInfoDetailDTO" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "delete": { + "tags": [ + "User" + ], + "summary": "Delete an user", + "operationId": "User_DeleteUser", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Id of user to delete", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/user/email/{email}": { + "get": { + "tags": [ + "User" + ], + "summary": "Get a specific user by email", + "operationId": "User_GetByEmail", + "parameters": [ + { + "name": "email", + "in": "path", + "required": true, + "description": "user email", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserInfoDetailDTO" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/test": { + "get": { + "tags": [ + "Values" + ], + "summary": "It's a test ! :) ", + "operationId": "Values_GetAll", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "post": { + "tags": [ + "Values" + ], + "operationId": "Values_Post", + "requestBody": { + "x-name": "value", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/test/{id}": { + "get": { + "tags": [ + "Values" + ], + "operationId": "Values_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "put": { + "tags": [ + "Values" + ], + "operationId": "Values_Put", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + }, + "x-position": 1 + } + ], + "requestBody": { + "x-name": "value", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "required": true, + "x-position": 2 + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "delete": { + "tags": [ + "Values" + ], + "operationId": "Values_Delete", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/alarm/{homeId}": { + "get": { + "tags": [ + "Alarm" + ], + "summary": "Get all alarm modes for the specified home", + "operationId": "Alarm_GetAll", + "parameters": [ + { + "name": "homeId", + "in": "path", + "required": true, + "description": "Home Id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlarmModeDTO" + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/alarm/detail/{alarmModeId}": { + "get": { + "tags": [ + "Alarm" + ], + "summary": "Get detail info of a specified alarm mode", + "operationId": "Alarm_GetDetail", + "parameters": [ + { + "name": "alarmModeId", + "in": "path", + "required": true, + "description": "alarm id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlarmModeDetailDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/alarm": { + "post": { + "tags": [ + "Alarm" + ], + "summary": "Create an alarm mode", + "operationId": "Alarm_Create", + "requestBody": { + "x-name": "alarmModeCreateOrUpdateDetailDTO", + "description": "Alarm mode to create", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlarmModeCreateOrUpdateDetailDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlarmModeDetailDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "put": { + "tags": [ + "Alarm" + ], + "summary": "Update an alarm mode", + "operationId": "Alarm_Update", + "requestBody": { + "x-name": "alarmModeCreateOrUpdateDetailDTO", + "description": "alarm mode to update", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlarmModeCreateOrUpdateDetailDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlarmModeDetailDTO" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/alarm/defaults/{homeId}": { + "post": { + "tags": [ + "Alarm" + ], + "summary": "Create default alarm modes", + "operationId": "Alarm_CreateDefaultAlarms", + "parameters": [ + { + "name": "homeId", + "in": "path", + "required": true, + "description": "Home Id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "boolean" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/alarm/activate/{alarmModeId}": { + "post": { + "tags": [ + "Alarm" + ], + "summary": "Activate specified alarm mode", + "operationId": "Alarm_Activate", + "parameters": [ + { + "name": "alarmModeId", + "in": "path", + "required": true, + "description": "Alarm mode to activate", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/alarm/{alarmModeId}": { + "delete": { + "tags": [ + "Alarm" + ], + "summary": "Delete an alarm mode", + "operationId": "Alarm_Delete", + "parameters": [ + { + "name": "alarmModeId", + "in": "path", + "required": true, + "description": "Id of alarm mode to delete", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "405": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/alarm/home/{homeId}": { + "delete": { + "tags": [ + "Alarm" + ], + "summary": "Delete all alarm mode for a specified home", + "operationId": "Alarm_DeleteAllForHome", + "parameters": [ + { + "name": "homeId", + "in": "path", + "required": true, + "description": "Home Id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Authentication/Token": { + "post": { + "tags": [ + "Authentication" + ], + "summary": "Authenticate with form parameters (used by Swagger test client)", + "operationId": "Authentication_AuthenticateWithForm", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "properties": { + "grant_type": { + "type": "string", + "nullable": true + }, + "username": { + "type": "string", + "nullable": true + }, + "password": { + "type": "string", + "nullable": true + }, + "client_id": { + "type": "string", + "nullable": true + }, + "client_secret": { + "type": "string", + "nullable": true + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Token descriptor", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TokenDTO" + } + } + } + }, + "401": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/api/Authentication/Authenticate": { + "post": { + "tags": [ + "Authentication" + ], + "summary": "Authenticate with Json parameters (used by most clients)", + "operationId": "Authentication_AuthenticateWithJson", + "requestBody": { + "x-name": "login", + "description": "Login DTO", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "Token descriptor", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TokenDTO" + } + } + } + }, + "401": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/api/automation/{homeId}": { + "get": { + "tags": [ + "Automation" + ], + "summary": "Get all automations for the specified home", + "operationId": "Automation_GetAll", + "parameters": [ + { + "name": "homeId", + "in": "path", + "required": true, + "description": "Home Id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AutomationDTO" + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/automation/detail/{automationId}": { + "get": { + "tags": [ + "Automation" + ], + "summary": "Get detail info of a specified automation", + "operationId": "Automation_GetDetail", + "parameters": [ + { + "name": "automationId", + "in": "path", + "required": true, + "description": "automation id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationDetailDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/automation": { + "post": { + "tags": [ + "Automation" + ], + "summary": "Create an automation", + "operationId": "Automation_Create", + "requestBody": { + "x-name": "automationDetailDTO", + "description": "Automation to create", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationDetailDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "put": { + "tags": [ + "Automation" + ], + "summary": "Update an automation", + "operationId": "Automation_Update", + "requestBody": { + "x-name": "automationDetailDTO", + "description": "automation to update", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationDetailDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationDetailDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/automation/{automationId}": { + "delete": { + "tags": [ + "Automation" + ], + "summary": "Delete an automation", + "operationId": "Automation_Delete", + "parameters": [ + { + "name": "automationId", + "in": "path", + "required": true, + "description": "Id of automation to delete", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/automation/home/{homeId}": { + "delete": { + "tags": [ + "Automation" + ], + "summary": "Delete all automation for a specified home", + "operationId": "Automation_DeleteAllForHome", + "parameters": [ + { + "name": "homeId", + "in": "path", + "required": true, + "description": "Home Id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/event/{homeId}": { + "get": { + "tags": [ + "Event" + ], + "summary": "Get events for the specified home ", + "operationId": "Event_Get", + "parameters": [ + { + "name": "homeId", + "in": "path", + "required": true, + "description": "Home Id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + }, + { + "name": "DeviceId", + "in": "query", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 2 + }, + { + "name": "RoomId", + "in": "query", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 3 + }, + { + "name": "StartIndex", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "x-position": 4 + }, + { + "name": "Count", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "x-position": 5 + }, + { + "name": "DateStart", + "in": "query", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "x-position": 6 + }, + { + "name": "DateEnd", + "in": "query", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "x-position": 7 + }, + { + "name": "EventType", + "in": "query", + "schema": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/EventType" + } + ] + }, + "x-position": 8 + }, + { + "name": "DeviceType", + "in": "query", + "schema": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/DeviceType" + } + ] + }, + "x-position": 9 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListResponseOfEventDetailDTOAndEventHomeFilter" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/event/detail/{eventId}": { + "get": { + "tags": [ + "Event" + ], + "summary": "Get detail info of a specified event", + "operationId": "Event_GetDetail", + "parameters": [ + { + "name": "eventId", + "in": "path", + "required": true, + "description": "event id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventDetailDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/event/{eventId}": { + "delete": { + "tags": [ + "Event" + ], + "summary": "Delete an event", + "operationId": "Event_Delete", + "parameters": [ + { + "name": "eventId", + "in": "path", + "required": true, + "description": "Id of event to delete", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/event/home/{homeId}": { + "delete": { + "tags": [ + "Event" + ], + "summary": "Delete all events for a specified home", + "operationId": "Event_DeleteAllForHome", + "parameters": [ + { + "name": "homeId", + "in": "path", + "required": true, + "description": "Home Id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/group/{homeId}": { + "get": { + "tags": [ + "Group" + ], + "summary": "Get all groups for the specified home", + "operationId": "Group_GetAll", + "parameters": [ + { + "name": "homeId", + "in": "path", + "required": true, + "description": "Home Id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupSummaryDTO" + } + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/group/detail/{groupId}": { + "get": { + "tags": [ + "Group" + ], + "summary": "Get detail info of a specified group", + "operationId": "Group_GetDetail", + "parameters": [ + { + "name": "groupId", + "in": "path", + "required": true, + "description": "groupid", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupDetailDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/group/{homeId}/type/{type}": { + "get": { + "tags": [ + "Group" + ], + "summary": "Get list of group from a type", + "operationId": "Group_GetGroupsByType", + "parameters": [ + { + "name": "homeId", + "in": "path", + "required": true, + "description": "home Id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + }, + { + "name": "type", + "in": "path", + "required": true, + "description": "group type", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 2 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupSummaryDTO" + } + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/group/zigbee2Mqtt/{homeId}": { + "get": { + "tags": [ + "Group" + ], + "summary": "Get all zigbee2Mqtt groups", + "operationId": "Group_GetGroupsFromZigbee2Mqtt", + "parameters": [ + { + "name": "homeId", + "in": "path", + "required": true, + "description": "Home Id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupDetailDTO" + } + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/group": { + "post": { + "tags": [ + "Group" + ], + "summary": "Create a group", + "operationId": "Group_Create", + "requestBody": { + "x-name": "groupCreateOrUpdateDetail", + "description": "Group to create", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupCreateOrUpdateDetailDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupDetailDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "put": { + "tags": [ + "Group" + ], + "summary": "Update a group", + "operationId": "Group_Update", + "requestBody": { + "x-name": "groupCreateOrUpdateDetail", + "description": "group to update", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupCreateOrUpdateDetailDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupCreateOrUpdateDetailDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/group/{homeId}/fromZigbee": { + "post": { + "tags": [ + "Group" + ], + "summary": "Create groups from provider", + "operationId": "Group_CreateDevicesFromZigbee2Mqtt", + "parameters": [ + { + "name": "homeId", + "in": "path", + "required": true, + "description": "Home Id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupDetailDTO" + } + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/group/{groupId}/device/{deviceId}": { + "delete": { + "tags": [ + "Group" + ], + "summary": "Delete device from a group", + "operationId": "Group_Delete", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "description": "Id of device to delete from the group", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + }, + { + "name": "groupId", + "in": "path", + "required": true, + "description": "Id of group ", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 2 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/group/{groupId}": { + "delete": { + "tags": [ + "Group" + ], + "summary": "Delete a group", + "operationId": "Group_Delete2", + "parameters": [ + { + "name": "groupId", + "in": "path", + "required": true, + "description": "Id of group ", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/group/home/{homeId}": { + "delete": { + "tags": [ + "Group" + ], + "summary": "Delete all group for a specified home", + "operationId": "Group_DeleteAllForHome", + "parameters": [ + { + "name": "homeId", + "in": "path", + "required": true, + "description": "Home Id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/home/{userId}": { + "get": { + "tags": [ + "Home" + ], + "summary": "Get all home for specified user", + "operationId": "Home_GetAll", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "description": "User Id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HomeDTO" + } + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/home/detail/{homeId}": { + "get": { + "tags": [ + "Home" + ], + "summary": "Get detail info of a specified home", + "operationId": "Home_GetDetail", + "parameters": [ + { + "name": "homeId", + "in": "path", + "required": true, + "description": "home id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HomeDetailDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/home": { + "post": { + "tags": [ + "Home" + ], + "summary": "Create a home", + "operationId": "Home_Create", + "requestBody": { + "x-name": "createOrUpdateHomeDTO", + "description": "Home to create", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrUpdateHomeDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HomeDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "put": { + "tags": [ + "Home" + ], + "summary": "Update a home", + "operationId": "Home_Update", + "requestBody": { + "x-name": "createOrUpdateHomeDTO", + "description": "Home to update", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrUpdateHomeDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HomeDTO" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/home/{homeId}": { + "delete": { + "tags": [ + "Home" + ], + "summary": "Delete a home", + "operationId": "Home_Delete", + "parameters": [ + { + "name": "homeId", + "in": "path", + "required": true, + "description": "Id of home to delete", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/room/{homeId}": { + "get": { + "tags": [ + "Room" + ], + "summary": "Get all rooms for the specified home", + "operationId": "Room_GetAll", + "parameters": [ + { + "name": "homeId", + "in": "path", + "required": true, + "description": "Home Id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RoomSummaryDTO" + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/room/{homeId}/details": { + "get": { + "tags": [ + "Room" + ], + "summary": "Get all rooms main details for the specified home", + "operationId": "Room_GetAllWithMainDetails", + "parameters": [ + { + "name": "homeId", + "in": "path", + "required": true, + "description": "Home Id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RoomMainDetailDTO" + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/room/detail/{roomId}": { + "get": { + "tags": [ + "Room" + ], + "summary": "Get detail info of a specified room", + "operationId": "Room_GetDetail", + "parameters": [ + { + "name": "roomId", + "in": "path", + "required": true, + "description": "room id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoomDetailDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/room": { + "post": { + "tags": [ + "Room" + ], + "summary": "Create a room", + "operationId": "Room_Create", + "requestBody": { + "x-name": "roomCreateOrUpdateDetail", + "description": "Room to create", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoomCreateOrUpdateDetailDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoomDetailDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "put": { + "tags": [ + "Room" + ], + "summary": "Update a room", + "operationId": "Room_Update", + "requestBody": { + "x-name": "roomCreateOrUpdateDetail", + "description": "room to update", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoomCreateOrUpdateDetailDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoomCreateOrUpdateDetailDTO" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/room/{roomId}/device/{deviceId}": { + "delete": { + "tags": [ + "Room" + ], + "summary": "Delete device from a room", + "operationId": "Room_Delete", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "description": "Id of device to delete from the room", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + }, + { + "name": "roomId", + "in": "path", + "required": true, + "description": "Id of room ", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 2 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/room/{roomId}": { + "delete": { + "tags": [ + "Room" + ], + "summary": "Delete a room", + "operationId": "Room_Delete2", + "parameters": [ + { + "name": "roomId", + "in": "path", + "required": true, + "description": "Id of room ", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/room/home/{homeId}": { + "delete": { + "tags": [ + "Room" + ], + "summary": "Delete all rooms for a specified home", + "operationId": "Room_DeleteAllForHome", + "parameters": [ + { + "name": "homeId", + "in": "path", + "required": true, + "description": "Home Id", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/azure": { + "post": { + "tags": [ + "Azure" + ], + "operationId": "Azure_Create", + "requestBody": { + "x-name": "user", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AzureADAuthModel" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/facebook": { + "post": { + "tags": [ + "Facebook" + ], + "operationId": "Facebook_Create", + "requestBody": { + "x-name": "user", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FacebookAuthModel" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/google": { + "post": { + "tags": [ + "Google" + ], + "operationId": "Google_Create", + "requestBody": { + "x-name": "user", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GoogleAuthModel" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/token": { + "post": { + "tags": [ + "Token" + ], + "operationId": "Token_Create", + "requestBody": { + "x-name": "user", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/twitter": { + "post": { + "tags": [ + "Twitter" + ], + "operationId": "Twitter_Create", + "requestBody": { + "x-name": "user", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TwitterAuthModel" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "Book": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "bookName": { + "type": "string", + "nullable": true + }, + "price": { + "type": "number", + "format": "decimal" + }, + "category": { + "type": "string", + "nullable": true + }, + "author": { + "type": "string", + "nullable": true + } + } + }, + "DeviceSummaryDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "homeId": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "model": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/DeviceType" + }, + "status": { + "type": "boolean" + }, + "connectionStatus": { + "$ref": "#/components/schemas/ConnectionStatus" + }, + "roomId": { + "type": "string", + "nullable": true + }, + "providerId": { + "type": "string", + "nullable": true + }, + "providerName": { + "type": "string", + "nullable": true + }, + "lastStateDate": { + "type": "string", + "format": "date-time" + }, + "battery": { + "type": "boolean" + }, + "batteryStatus": { + "type": "integer", + "format": "int32" + } + } + }, + "DeviceType": { + "type": "string", + "description": "", + "x-enumNames": [ + "Sensor", + "Actuator", + "Camera", + "Switch", + "Light", + "Sound", + "Plug", + "Multiplug", + "Thermostat", + "Valve", + "Door", + "Environment", + "Motion", + "Gateway", + "Unknown" + ], + "enum": [ + "Sensor", + "Actuator", + "Camera", + "Switch", + "Light", + "Sound", + "Plug", + "Multiplug", + "Thermostat", + "Valve", + "Door", + "Environment", + "Motion", + "Gateway", + "Unknown" + ] + }, + "ConnectionStatus": { + "type": "string", + "description": "", + "x-enumNames": [ + "Connected", + "Disconnected", + "Unknown" + ], + "enum": [ + "Connected", + "Disconnected", + "Unknown" + ] + }, + "DeviceDetailDTO": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceSummaryDTO" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "firmwareVersion": { + "type": "string", + "nullable": true + }, + "hardwareVersion": { + "type": "string", + "nullable": true + }, + "port": { + "type": "integer", + "format": "int32" + }, + "meansOfCommunications": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/MeansOfCommunication" + } + }, + "createdDate": { + "type": "string", + "format": "date-time" + }, + "updatedDate": { + "type": "string", + "format": "date-time" + }, + "lastState": { + "type": "string", + "nullable": true + }, + "ipAddress": { + "type": "string", + "nullable": true + }, + "serviceIdentification": { + "type": "string", + "nullable": true + }, + "manufacturerName": { + "type": "string", + "nullable": true + }, + "groupIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + }, + "properties": { + "type": "string", + "nullable": true + }, + "supportedOperations": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + } + } + ] + }, + "MeansOfCommunication": { + "type": "string", + "description": "", + "x-enumNames": [ + "Wifi", + "Bluetooth", + "Zigbee", + "Zwave" + ], + "enum": [ + "Wifi", + "Bluetooth", + "Zigbee", + "Zwave" + ] + }, + "Action": { + "type": "object", + "additionalProperties": false, + "properties": { + "groupId": { + "type": "string", + "nullable": true + }, + "deviceId": { + "type": "string", + "nullable": true + }, + "states": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/AutomationState" + } + }, + "rawRequest": { + "type": "string", + "nullable": true + }, + "providerId": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/ActionType" + }, + "isForce": { + "type": "boolean" + } + } + }, + "AutomationState": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "value": { + "type": "string", + "nullable": true + } + } + }, + "ActionType": { + "type": "string", + "description": "", + "x-enumNames": [ + "DELAY", + "DEVICE", + "HTTP", + "ZIGBEE2MQTT", + "MQTT", + "GROUP" + ], + "enum": [ + "DELAY", + "DEVICE", + "HTTP", + "ZIGBEE2MQTT", + "MQTT", + "GROUP" + ] + }, + "ElectricityProduction": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "deviceId": { + "type": "string", + "nullable": true + }, + "homeId": { + "type": "string", + "nullable": true + }, + "watt": { + "type": "number", + "format": "double" + }, + "ampere": { + "type": "number", + "format": "double" + }, + "timestamp": { + "type": "string", + "format": "date-time" + } + } + }, + "ViewBy": { + "type": "string", + "description": "", + "x-enumNames": [ + "Year", + "Month", + "Day" + ], + "enum": [ + "Year", + "Month", + "Day" + ] + }, + "SmartPrinterMessage": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "nullable": true + }, + "time": { + "type": "string", + "nullable": true + }, + "temperature": { + "type": "number", + "format": "double" + }, + "pressure": { + "type": "number", + "format": "double" + }, + "smoke": { + "type": "integer", + "format": "int32" + } + } + }, + "SmartGardenMessage": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "nullable": true + }, + "time": { + "type": "string", + "nullable": true + }, + "temperature": { + "type": "number", + "format": "double" + }, + "pressure": { + "type": "number", + "format": "double" + }, + "humidity": { + "type": "number", + "format": "double" + }, + "water": { + "type": "integer", + "format": "int32" + }, + "light": { + "type": "integer", + "format": "int32" + } + } + }, + "OddNice": { + "type": "object", + "additionalProperties": false, + "properties": { + "teams": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + }, + "commence_time": { + "type": "integer", + "format": "int32" + }, + "home_team": { + "type": "string", + "nullable": true + }, + "odds": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/OddObject" + } + ] + } + } + }, + "OddObject": { + "type": "object", + "additionalProperties": false, + "properties": { + "homeOdd": { + "type": "number", + "format": "double" + }, + "drawOdd": { + "type": "number", + "format": "double" + }, + "visitOdd": { + "type": "number", + "format": "double" + } + } + }, + "ProviderDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/ProviderType" + }, + "homeId": { + "type": "string", + "nullable": true + }, + "endpoint": { + "type": "string", + "nullable": true + }, + "username": { + "type": "string", + "nullable": true + }, + "password": { + "type": "string", + "nullable": true + }, + "apiKey": { + "type": "string", + "nullable": true + }, + "active": { + "type": "boolean" + } + } + }, + "ProviderType": { + "type": "string", + "description": "", + "x-enumNames": [ + "arlo", + "meross", + "yeelight", + "zigbee2mqtt" + ], + "enum": [ + "arlo", + "meross", + "yeelight", + "zigbee2mqtt" + ] + }, + "ScreenDevice": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "nullable": true + }, + "location": { + "type": "string", + "nullable": true + }, + "locationExplanation": { + "type": "string", + "nullable": true + }, + "height": { + "type": "integer", + "format": "int32" + }, + "width": { + "type": "integer", + "format": "int32" + } + } + }, + "MqttMessageDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "topic": { + "type": "string", + "nullable": true + }, + "message": { + "type": "string", + "nullable": true + }, + "online": { + "type": "boolean" + } + } + }, + "PanelSection": { + "type": "object", + "additionalProperties": false, + "properties": { + "label": { + "type": "string", + "nullable": true + }, + "icon": { + "type": "string", + "nullable": true + }, + "color": { + "type": "string", + "nullable": true + }, + "defaultRoute": { + "type": "string", + "nullable": true + }, + "children": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/PanelMenuItem" + } + } + } + }, + "PanelMenuItem": { + "type": "object", + "additionalProperties": false, + "properties": { + "label": { + "type": "string", + "nullable": true + }, + "route": { + "type": "string", + "nullable": true + }, + "icon": { + "type": "string", + "nullable": true + }, + "color": { + "type": "string", + "nullable": true + }, + "badgeValue": { + "type": "integer", + "format": "int32" + }, + "badgeType": { + "type": "string", + "nullable": true + }, + "children": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/PanelMenuItem" + } + } + } + }, + "UserInfo": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "role": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string", + "nullable": true + }, + "password": { + "type": "string", + "nullable": true + }, + "firstName": { + "type": "string", + "nullable": true + }, + "lastName": { + "type": "string", + "nullable": true + }, + "token": { + "type": "string", + "nullable": true + }, + "birthday": { + "type": "string", + "format": "date-time" + }, + "homeIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + }, + "dateCreation": { + "type": "string", + "format": "date-time" + }, + "address": { + "type": "string", + "nullable": true + }, + "city": { + "type": "string", + "nullable": true + }, + "state": { + "type": "string", + "nullable": true + }, + "country": { + "type": "string", + "nullable": true + }, + "language": { + "type": "string", + "nullable": true + }, + "timeZone": { + "type": "string", + "nullable": true + }, + "postalCode": { + "type": "integer", + "format": "int32" + } + } + }, + "LoginDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "email": { + "type": "string", + "nullable": true + }, + "password": { + "type": "string", + "nullable": true + } + } + }, + "UserInfoDetailDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string", + "nullable": true + }, + "firstName": { + "type": "string", + "nullable": true + }, + "lastName": { + "type": "string", + "nullable": true + }, + "language": { + "type": "string", + "nullable": true + }, + "homeIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + } + }, + "AlarmModeDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "homeId": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/AlarmType" + }, + "activated": { + "type": "boolean" + }, + "isDefault": { + "type": "boolean" + }, + "notification": { + "type": "boolean" + }, + "createdDate": { + "type": "string", + "format": "date-time" + }, + "updatedDate": { + "type": "string", + "format": "date-time" + } + } + }, + "AlarmType": { + "type": "string", + "description": "", + "x-enumNames": [ + "Home", + "Absent", + "Geolocalized", + "Programmed", + "Desarmed", + "Custom" + ], + "enum": [ + "Home", + "Absent", + "Geolocalized", + "Programmed", + "Desarmed", + "Custom" + ] + }, + "AlarmModeDetailDTO": { + "allOf": [ + { + "$ref": "#/components/schemas/AlarmModeDTO" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "triggers": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/Trigger" + } + }, + "devices": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/DeviceDetailDTO" + } + }, + "programmedMode": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/ProgrammedMode" + } + ] + }, + "geolocalizedMode": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/GeolocalizedMode" + } + ] + } + } + } + ] + }, + "Trigger": { + "type": "object", + "additionalProperties": false, + "properties": { + "providerId": { + "type": "string", + "nullable": true + }, + "deviceId": { + "type": "string", + "nullable": true + }, + "stateName": { + "type": "string", + "nullable": true + }, + "stateValue": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/TriggerType" + } + } + }, + "TriggerType": { + "type": "string", + "description": "", + "x-enumNames": [ + "MQTT", + "WEB", + "TIME" + ], + "enum": [ + "MQTT", + "WEB", + "TIME" + ] + }, + "ProgrammedMode": { + "type": "object", + "additionalProperties": false, + "properties": { + "monday": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TimePeriodAlarm" + } + }, + "tuesday": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TimePeriodAlarm" + } + }, + "wednesday": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TimePeriodAlarm" + } + }, + "thursday": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TimePeriodAlarm" + } + }, + "friday": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TimePeriodAlarm" + } + }, + "saturday": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TimePeriodAlarm" + } + }, + "sunday": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TimePeriodAlarm" + } + } + } + }, + "TimePeriodAlarm": { + "type": "object", + "additionalProperties": false, + "properties": { + "start": { + "type": "string", + "nullable": true + }, + "end": { + "type": "string", + "nullable": true + }, + "alarmMode": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/AlarmMode" + } + ] + } + } + }, + "AlarmMode": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "homeId": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "activated": { + "type": "boolean" + }, + "isDefault": { + "type": "boolean" + }, + "notification": { + "type": "boolean" + }, + "createdDate": { + "type": "string", + "format": "date-time" + }, + "updatedDate": { + "type": "string", + "format": "date-time" + }, + "type": { + "$ref": "#/components/schemas/AlarmType" + }, + "programmedMode": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/ProgrammedMode" + } + ] + }, + "geolocalizedMode": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/GeolocalizedMode" + } + ] + }, + "triggers": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/Trigger" + } + }, + "actions": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/Action" + } + }, + "devicesIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + } + }, + "GeolocalizedMode": { + "type": "object", + "additionalProperties": false, + "properties": { + "latitude": { + "type": "string", + "nullable": true + }, + "longitude": { + "type": "string", + "nullable": true + }, + "homeMode": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/AlarmMode" + } + ] + }, + "absentMode": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/AlarmMode" + } + ] + } + } + }, + "AlarmModeCreateOrUpdateDetailDTO": { + "allOf": [ + { + "$ref": "#/components/schemas/AlarmModeDTO" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "triggers": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/Trigger" + } + }, + "actions": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/Action" + } + }, + "programmedMode": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/ProgrammedMode" + } + ] + }, + "geolocalizedMode": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/GeolocalizedMode" + } + ] + } + } + } + ] + }, + "TokenDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "access_token": { + "type": "string", + "nullable": true + }, + "refresh_token": { + "type": "string", + "nullable": true + }, + "scope": { + "type": "string", + "nullable": true + }, + "token_type": { + "type": "string", + "nullable": true + }, + "expires_in": { + "type": "integer", + "format": "int32" + }, + "expiration": { + "type": "string", + "format": "date-time" + } + } + }, + "AutomationDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "active": { + "type": "boolean" + }, + "homeId": { + "type": "string", + "nullable": true + }, + "createdDate": { + "type": "string", + "format": "date-time" + }, + "updatedDate": { + "type": "string", + "format": "date-time" + } + } + }, + "AutomationDetailDTO": { + "allOf": [ + { + "$ref": "#/components/schemas/AutomationDTO" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "triggers": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/Trigger" + } + }, + "conditions": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/Condition" + } + }, + "actions": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/Action" + } + }, + "devicesIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + } + } + ] + }, + "Condition": { + "type": "object", + "additionalProperties": false, + "properties": { + "deviceId": { + "type": "string", + "nullable": true + }, + "state": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/AutomationState" + } + ] + }, + "startTime": { + "type": "string", + "nullable": true + }, + "endTime": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/ConditionType" + }, + "value": { + "$ref": "#/components/schemas/ConditionValue" + } + } + }, + "ConditionType": { + "type": "string", + "description": "", + "x-enumNames": [ + "STATE", + "TIME" + ], + "enum": [ + "STATE", + "TIME" + ] + }, + "ConditionValue": { + "type": "string", + "description": "", + "x-enumNames": [ + "EQUAL", + "NOT_EQUAL", + "BIGGER", + "BIGGEST", + "SMALLER", + "SMALLEST" + ], + "enum": [ + "EQUAL", + "NOT_EQUAL", + "BIGGER", + "BIGGEST", + "SMALLER", + "SMALLEST" + ] + }, + "ListResponseOfEventDetailDTOAndEventHomeFilter": { + "type": "object", + "additionalProperties": false, + "properties": { + "values": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/EventDetailDTO" + } + }, + "requestParameters": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/EventHomeFilter" + } + ] + }, + "totalCount": { + "type": "integer", + "format": "int32" + }, + "actualCount": { + "type": "integer", + "format": "int32" + } + } + }, + "EventDetailDTO": { + "allOf": [ + { + "$ref": "#/components/schemas/EventDTO" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "deviceState": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/DeviceState" + } + ] + }, + "automationTriggered": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/AutomationTriggered" + } + ] + }, + "alarmTriggered": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/AlarmTriggered" + } + ] + } + } + } + ] + }, + "DeviceState": { + "type": "object", + "additionalProperties": false, + "properties": { + "deviceId": { + "type": "string", + "nullable": true + }, + "deviceName": { + "type": "string", + "nullable": true + }, + "message": { + "type": "string", + "nullable": true + }, + "deviceType": { + "$ref": "#/components/schemas/DeviceType" + } + } + }, + "AutomationTriggered": { + "type": "object", + "additionalProperties": false, + "properties": { + "automationId": { + "type": "string", + "nullable": true + }, + "automationName": { + "type": "string", + "nullable": true + } + } + }, + "AlarmTriggered": { + "type": "object", + "additionalProperties": false, + "properties": { + "alarmModeId": { + "type": "string", + "nullable": true + }, + "alarmModeName": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/AlarmType" + } + } + }, + "EventDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "homeId": { + "type": "string", + "nullable": true + }, + "date": { + "type": "string", + "format": "date-time" + }, + "type": { + "$ref": "#/components/schemas/EventType" + }, + "roomId": { + "type": "string", + "nullable": true + } + } + }, + "EventType": { + "type": "string", + "description": "", + "x-enumNames": [ + "DeviceState", + "AutomationTriggered", + "AlarmTriggered" + ], + "enum": [ + "DeviceState", + "AutomationTriggered", + "AlarmTriggered" + ] + }, + "EventHomeFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EventFilter" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "deviceId": { + "type": "string", + "nullable": true + }, + "roomId": { + "type": "string", + "nullable": true + } + } + } + ] + }, + "EventFilter": { + "type": "object", + "additionalProperties": false, + "properties": { + "startIndex": { + "type": "integer", + "format": "int32" + }, + "count": { + "type": "integer", + "format": "int32" + }, + "dateStart": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "dateEnd": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "eventType": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/EventType" + } + ] + }, + "deviceType": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/DeviceType" + } + ] + } + } + }, + "GroupSummaryDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "homeId": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "nullable": true + }, + "isAlarm": { + "type": "boolean" + } + } + }, + "GroupDetailDTO": { + "allOf": [ + { + "$ref": "#/components/schemas/GroupSummaryDTO" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "createdDate": { + "type": "string", + "format": "date-time" + }, + "updatedDate": { + "type": "string", + "format": "date-time" + }, + "devices": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/DeviceDetailDTO" + } + } + } + } + ] + }, + "GroupCreateOrUpdateDetailDTO": { + "allOf": [ + { + "$ref": "#/components/schemas/GroupSummaryDTO" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "deviceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + } + } + ] + }, + "HomeDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "isAlarm": { + "type": "boolean" + }, + "isDefault": { + "type": "boolean" + }, + "currentAlarmMode": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/AlarmModeDTO" + } + ] + }, + "createdDate": { + "type": "string", + "format": "date-time" + }, + "updatedDate": { + "type": "string", + "format": "date-time" + }, + "usersIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + } + }, + "HomeDetailDTO": { + "allOf": [ + { + "$ref": "#/components/schemas/HomeDTO" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "users": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/UserInfoDetailDTO" + } + }, + "devices": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/DeviceSummaryDTO" + } + }, + "automations": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/AutomationDTO" + } + }, + "providers": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ProviderDTO" + } + }, + "groups": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/GroupSummaryDTO" + } + } + } + } + ] + }, + "CreateOrUpdateHomeDTO": { + "allOf": [ + { + "$ref": "#/components/schemas/HomeDTO" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "usersIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + } + } + ] + }, + "RoomSummaryDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "homeId": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + } + } + }, + "RoomMainDetailDTO": { + "allOf": [ + { + "$ref": "#/components/schemas/RoomSummaryDTO" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "createdDate": { + "type": "string", + "format": "date-time" + }, + "updatedDate": { + "type": "string", + "format": "date-time" + }, + "environmentalDevices": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/DeviceDetailDTO" + } + }, + "securityDevices": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/DeviceDetailDTO" + } + } + } + } + ] + }, + "RoomDetailDTO": { + "allOf": [ + { + "$ref": "#/components/schemas/RoomSummaryDTO" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "createdDate": { + "type": "string", + "format": "date-time" + }, + "updatedDate": { + "type": "string", + "format": "date-time" + }, + "devices": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/DeviceDetailDTO" + } + } + } + } + ] + }, + "RoomCreateOrUpdateDetailDTO": { + "allOf": [ + { + "$ref": "#/components/schemas/RoomSummaryDTO" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "deviceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + } + } + ] + }, + "AzureADAuthModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "apiKey": { + "type": "string", + "nullable": true + } + } + }, + "FacebookAuthModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "userAccessToken": { + "type": "string", + "nullable": true + } + } + }, + "GoogleAuthModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "authorizationCode": { + "type": "string", + "nullable": true + }, + "apiKey": { + "type": "string", + "nullable": true + } + } + }, + "User": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "password": { + "type": "string", + "nullable": true + } + } + }, + "TwitterAuthModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "apiKey": { + "type": "string", + "nullable": true + } + } + } + }, + "securitySchemes": { + "bearer": { + "type": "oauth2", + "description": "MyCore Authentication", + "flows": { + "password": { + "authorizationUrl": "/authentication/Token", + "tokenUrl": "/api/authentication/Token", + "scopes": { + "MyCore-api": "MyCore WebAPI" + } + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ], + "tags": [ + { + "name": "Authentication", + "description": "Authentication management" + } + ] +} \ No newline at end of file diff --git a/mycore_api/swagger.yaml.bak b/mycore_api/swagger.yaml.bak new file mode 100644 index 0000000..fb96382 --- /dev/null +++ b/mycore_api/swagger.yaml.bak @@ -0,0 +1,4625 @@ +x-generator: NSwag v13.9.2.0 (NJsonSchema v10.3.1.0 (Newtonsoft.Json v12.0.0.0)) +openapi: 3.0.0 +info: + title: MyCore Service + description: API description + version: Version Pre-Alpha +servers: + - url: http://192.168.31.140 +paths: + /api/books: + get: + tags: + - Books + operationId: Books_GetAll + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Book' + security: + - bearer: [] + post: + tags: + - Books + operationId: Books_Create + requestBody: + x-name: book + content: + application/json: + schema: + $ref: '#/components/schemas/Book' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Book' + security: + - bearer: [] + /api/books/{id}: + get: + tags: + - Books + operationId: Books_Get + parameters: + - name: id + in: path + required: true + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Book' + security: + - bearer: [] + put: + tags: + - Books + operationId: Books_Update + parameters: + - name: id + in: path + required: true + schema: + type: string + nullable: true + x-position: 1 + requestBody: + x-name: bookIn + content: + application/json: + schema: + $ref: '#/components/schemas/Book' + required: true + x-position: 2 + responses: + '200': + description: '' + content: + application/octet-stream: + schema: + type: string + format: binary + security: + - bearer: [] + delete: + tags: + - Books + operationId: Books_Delete + parameters: + - name: id + in: path + required: true + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/octet-stream: + schema: + type: string + format: binary + security: + - bearer: [] + /api/device/{homeId}: + get: + tags: + - Device + summary: Get all devices summary + operationId: Device_GetAll + parameters: + - name: homeId + in: path + required: true + description: Home Id + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/DeviceSummaryDTO' + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/device/detail/{deviceId}: + get: + tags: + - Device + summary: Get a specific device info + operationId: Device_GetDetail + parameters: + - name: deviceId + in: path + required: true + description: id of device + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/DeviceDetailDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/device/{homeId}/type/{type}: + get: + tags: + - Device + summary: Get list of devices from a type + operationId: Device_GetDevicesByType + parameters: + - name: homeId + in: path + required: true + description: Home Id + schema: + type: string + nullable: true + x-position: 1 + - name: type + in: path + required: true + description: device type + schema: + $ref: '#/components/schemas/DeviceType' + x-position: 2 + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/DeviceDetailDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/device: + post: + tags: + - Device + summary: Create a device + operationId: Device_Create + requestBody: + x-name: deviceDetailDTO + description: Device to create + content: + application/json: + schema: + $ref: '#/components/schemas/DeviceDetailDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/DeviceDetailDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '409': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/device/{homeId}/fromProvider/{providerId}: + post: + tags: + - Device + summary: Create devices from provider + operationId: Device_CreateDevicesFromProvider + parameters: + - name: homeId + in: path + required: true + description: Home Id + schema: + type: string + nullable: true + x-position: 1 + - name: providerId + in: path + required: true + description: Id of Provider + schema: + type: string + nullable: true + x-position: 2 + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/DeviceDetailDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '401': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '421': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + get: + tags: + - Device + summary: Get devices from provider + operationId: Device_GetDevicesFromProvider + parameters: + - name: homeId + in: path + required: true + description: Home Id + schema: + type: string + nullable: true + x-position: 1 + - name: providerId + in: path + required: true + description: Id of Provider + schema: + type: string + nullable: true + x-position: 2 + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/DeviceDetailDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + delete: + tags: + - Device + summary: Delete devices from provider + operationId: Device_DeleteDevicesFromProvider + parameters: + - name: homeId + in: path + required: true + description: Home Id + schema: + type: string + nullable: true + x-position: 1 + - name: providerId + in: path + required: true + description: Id of Provider + schema: + type: string + nullable: true + x-position: 2 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/device/zigbee2Mqtt/{homeId}: + get: + tags: + - Device + summary: Get all zigbee2Mqtt devices + operationId: Device_GetDevicesFromZigbee2Mqtt + parameters: + - name: homeId + in: path + required: true + description: Home Id + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/DeviceDetailDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/device/{deviceId}: + put: + tags: + - Device + summary: Update a device + operationId: Device_Update + parameters: + - name: deviceId + in: path + required: true + schema: + type: string + x-position: 2 + requestBody: + x-name: deviceDetailDTO + description: Device to update + content: + application/json: + schema: + $ref: '#/components/schemas/DeviceDetailDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/DeviceDetailDTO' + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + delete: + tags: + - Device + summary: Delete a device + operationId: Device_Delete + parameters: + - name: deviceId + in: path + required: true + description: Id of device to delete + schema: + type: string + nullable: true + x-position: 1 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/device/home/{homeId}: + delete: + tags: + - Device + summary: Delete all device for a specified home + operationId: Device_DeleteAllForHome + parameters: + - name: homeId + in: path + required: true + description: Id of home + schema: + type: string + nullable: true + x-position: 1 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/energy/electricity: + get: + tags: + - Energy + summary: Get summary production of Kwh/Year + operationId: Energy_GetElectricityProduction + parameters: + - name: homeId + in: query + schema: + type: string + nullable: true + x-position: 1 + - name: viewBy + in: query + schema: + $ref: '#/components/schemas/ViewBy' + x-position: 2 + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ElectricityProduction' + security: + - bearer: [] + /api/iot/smartprinter/{idDevice}: + get: + tags: + - IOT + summary: Retrieve all SmartPrinterMessage + operationId: IOT_GetSmartPrinterMessages + parameters: + - name: id + in: query + description: Id of the smart printer message + schema: + type: integer + format: int32 + x-position: 1 + - name: idDevice + in: path + required: true + schema: + type: string + x-position: 2 + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SmartPrinterMessage' + security: + - bearer: [] + post: + tags: + - IOT + summary: It's the method to post data from mqtt broker to Database (Thanks Rpi!) + operationId: IOT_PostToDBPrinter + parameters: + - name: idDevice + in: path + required: true + description: Id of the device to upload to DB + schema: + type: integer + format: int32 + x-position: 1 + requestBody: + x-name: content + description: Content that will be uploaded + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SmartPrinterMessage' + required: true + x-position: 2 + responses: + '200': + description: '' + content: + application/octet-stream: + schema: + type: string + format: binary + security: + - bearer: [] + /api/iot/smartgarden/{idDevice}: + post: + tags: + - IOT + summary: It's the method to post data from mqtt broker to Database (Thanks Rpi!) + operationId: IOT_PostToDBSmartGarden + parameters: + - name: idDevice + in: path + required: true + schema: + type: integer + format: int32 + x-position: 1 + requestBody: + x-name: content + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SmartGardenMessage' + required: true + x-position: 2 + responses: + '200': + description: '' + content: + application/octet-stream: + schema: + type: string + format: binary + security: + - bearer: [] + /api/odd/country/{id}/{oddRequest}: + get: + tags: + - Odd + summary: Get odds for one country and one odd value maximum + operationId: Odd_GetForCountry + parameters: + - name: id + in: path + required: true + description: id of country, e.g = BE for Belgium + schema: + type: string + nullable: true + x-position: 1 + - name: oddRequest + in: path + required: true + description: Odd Maximum value + schema: + type: number + format: double + x-position: 2 + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OddNice' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + /api/odd/{oddRequest}: + get: + tags: + - Odd + summary: Get odds for one country and one odd value maximum + operationId: Odd_GetAll + parameters: + - name: oddRequest + in: path + required: true + description: Odd Maximum value + schema: + type: number + format: double + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OddNice' + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/provider/{homeId}: + get: + tags: + - Provider + summary: 'Get all home providers ' + operationId: Provider_GetAll + parameters: + - name: homeId + in: path + required: true + description: Home Id + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProviderDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/provider: + post: + tags: + - Provider + summary: Create a provider + operationId: Provider_Create + requestBody: + x-name: providerDTO + description: Provider to create + content: + application/json: + schema: + $ref: '#/components/schemas/ProviderDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ProviderDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '409': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + put: + tags: + - Provider + summary: Update a provider + operationId: Provider_Update + requestBody: + x-name: providerDTO + description: Provider to update + content: + application/json: + schema: + $ref: '#/components/schemas/ProviderDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/DeviceDetailDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/provider/{providerId}: + delete: + tags: + - Provider + summary: Delete a provider + operationId: Provider_Delete + parameters: + - name: providerId + in: path + required: true + description: Id of provider to delete + schema: + type: string + nullable: true + x-position: 1 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/device/screen: + get: + tags: + - ScreenDevice + summary: Get all screen devices + operationId: ScreenDevice_GetAllScreenDevices + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ScreenDevice' + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + post: + tags: + - ScreenDevice + summary: Create screen device + operationId: ScreenDevice_CreateDevice + requestBody: + x-name: screenDevice + description: Screen device to create + content: + application/json: + schema: + $ref: '#/components/schemas/ScreenDevice' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ScreenDevice' + '400': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + put: + tags: + - ScreenDevice + summary: Update screen device + operationId: ScreenDevice_UpdateDevice + requestBody: + x-name: screenDevice + description: Screen device to update + content: + application/json: + schema: + $ref: '#/components/schemas/ScreenDevice' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ScreenDevice' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/device/screen/{screenDeviceId}: + get: + tags: + - ScreenDevice + summary: Get screen device info + operationId: ScreenDevice_GetDeviceInfo + parameters: + - name: screenDeviceId + in: path + required: true + description: Id of the screen device you want to get information + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ScreenDevice' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/device/screen/{deviceId}: + delete: + tags: + - ScreenDevice + summary: Delete device + operationId: ScreenDevice_DeleteDevice + parameters: + - name: deviceId + in: path + required: true + description: Screen device id to update + schema: + type: string + nullable: true + x-position: 1 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/mqtt: + post: + tags: + - MQTT + summary: Publish mqtt test + operationId: MQTT_PublishMessage + requestBody: + x-name: mqttMessageDTO + description: Message to send + content: + application/json: + schema: + $ref: '#/components/schemas/MqttMessageDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + type: boolean + '400': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/layout/panelSection: + get: + tags: + - Layout + summary: 'It''s a test ! :) ' + operationId: Layout_Get + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PanelSection' + /api/token: + post: + tags: + - Token + summary: Connect user + operationId: Token_ConnectUser + requestBody: + x-name: loginDTO + description: login info + content: + application/json: + schema: + $ref: '#/components/schemas/LoginDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/UserInfo' + '401': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + /api/user: + get: + tags: + - User + summary: 'Get a list of user ' + operationId: User_GetAll + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UserInfo' + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + post: + tags: + - User + summary: Create an user + operationId: User_CreateUser + requestBody: + x-name: newUser + description: New user info + content: + application/json: + schema: + $ref: '#/components/schemas/UserInfo' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/UserInfoDetailDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '409': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + put: + tags: + - User + summary: Update an user + operationId: User_UpdateUser + requestBody: + x-name: updatedUser + description: User to update + content: + application/json: + schema: + $ref: '#/components/schemas/UserInfo' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/UserInfoDetailDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/user/{id}: + get: + tags: + - User + summary: 'Get a specific user ' + operationId: User_Get + parameters: + - name: id + in: path + required: true + description: id user + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/UserInfoDetailDTO' + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + delete: + tags: + - User + summary: Delete an user + operationId: User_DeleteUser + parameters: + - name: id + in: path + required: true + description: Id of user to delete + schema: + type: string + nullable: true + x-position: 1 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/test: + get: + tags: + - Values + summary: 'It''s a test ! :) ' + operationId: Values_GetAll + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + type: string + post: + tags: + - Values + operationId: Values_Post + requestBody: + x-name: value + content: + application/json: + schema: + type: string + required: true + x-position: 1 + responses: + '200': + description: '' + security: + - bearer: [] + /api/test/{id}: + get: + tags: + - Values + operationId: Values_Get + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int32 + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + put: + tags: + - Values + operationId: Values_Put + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int32 + x-position: 1 + requestBody: + x-name: value + content: + application/json: + schema: + type: string + required: true + x-position: 2 + responses: + '200': + description: '' + security: + - bearer: [] + delete: + tags: + - Values + operationId: Values_Delete + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int32 + x-position: 1 + responses: + '200': + description: '' + security: + - bearer: [] + /api/alarm/{homeId}: + get: + tags: + - Alarm + summary: Get all alarm modes for the specified home + operationId: Alarm_GetAll + parameters: + - name: homeId + in: path + required: true + description: Home Id + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/AlarmModeDTO' + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/alarm/detail/{alarmId}: + get: + tags: + - Alarm + summary: Get detail info of a specified alarm mode + operationId: Alarm_GetDetail + parameters: + - name: alarmModeId + in: query + description: alarm id + schema: + type: string + nullable: true + x-position: 1 + - name: alarmId + in: path + required: true + schema: + type: string + x-position: 2 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/AlarmModeDetailDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/alarm: + post: + tags: + - Alarm + summary: Create an alarm mode + operationId: Alarm_Create + requestBody: + x-name: alarmModeCreateOrUpdateDetailDTO + description: Alarm mode to create + content: + application/json: + schema: + $ref: '#/components/schemas/AlarmModeCreateOrUpdateDetailDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/AlarmModeDetailDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + put: + tags: + - Alarm + summary: Update an alarm mode + operationId: Alarm_Update + requestBody: + x-name: alarmModeCreateOrUpdateDetailDTO + description: alarm mode to update + content: + application/json: + schema: + $ref: '#/components/schemas/AlarmModeCreateOrUpdateDetailDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/AlarmModeDetailDTO' + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/alarm/defaults/{homeId}: + post: + tags: + - Alarm + summary: Create default alarm modes + operationId: Alarm_CreateDefaultAlarms + parameters: + - name: homeId + in: path + required: true + description: Home Id + schema: + type: string + nullable: true + x-position: 1 + responses: + '202': + description: '' + content: + application/json: + schema: + type: boolean + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '409': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/alarm/activate/{alarmModeId}: + post: + tags: + - Alarm + summary: Activate current alarm mode + operationId: Alarm_Activate + parameters: + - name: alarmModeId + in: path + required: true + description: Alarm mode to activate + schema: + type: string + nullable: true + x-position: 1 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '409': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/alarm/{alarmModeId}: + delete: + tags: + - Alarm + summary: Delete an alarm mode + operationId: Alarm_Delete + parameters: + - name: alarmModeId + in: path + required: true + description: Id of alarm mode to delete + schema: + type: string + nullable: true + x-position: 1 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '405': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/alarm/home/{homeId}: + delete: + tags: + - Alarm + summary: Delete all alarm mode for a specified home + operationId: Alarm_DeleteAllForHome + parameters: + - name: homeId + in: path + required: true + description: Home Id + schema: + type: string + nullable: true + x-position: 1 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/Authentication/Token: + post: + tags: + - Authentication + summary: Authenticate with form parameters (used by Swagger test client) + operationId: Authentication_AuthenticateWithForm + requestBody: + content: + multipart/form-data: + schema: + properties: + grant_type: + type: string + nullable: true + username: + type: string + nullable: true + password: + type: string + nullable: true + client_id: + type: string + nullable: true + client_secret: + type: string + nullable: true + responses: + '200': + description: Token descriptor + content: + application/json: + schema: + $ref: '#/components/schemas/TokenDTO' + '401': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + /api/Authentication/Authenticate: + post: + tags: + - Authentication + summary: Authenticate with Json parameters (used by most clients) + operationId: Authentication_AuthenticateWithJson + requestBody: + x-name: login + description: Login DTO + content: + application/json: + schema: + $ref: '#/components/schemas/LoginDTO' + required: true + x-position: 1 + responses: + '200': + description: Token descriptor + content: + application/json: + schema: + $ref: '#/components/schemas/TokenDTO' + '401': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + /api/automation/{homeId}: + get: + tags: + - Automation + summary: Get all automations for the specified home + operationId: Automation_GetAll + parameters: + - name: homeId + in: path + required: true + description: Home Id + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/AutomationDTO' + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/automation/detail/{automationId}: + get: + tags: + - Automation + summary: Get detail info of a specified automation + operationId: Automation_GetDetail + parameters: + - name: automationId + in: path + required: true + description: automation id + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationDetailDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/automation: + post: + tags: + - Automation + summary: Create an automation + operationId: Automation_Create + requestBody: + x-name: automationDetailDTO + description: Automation to create + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationDetailDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + put: + tags: + - Automation + summary: Update an automation + operationId: Automation_Update + requestBody: + x-name: automationDetailDTO + description: automation to update + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationDetailDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationDetailDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/automation/{automationId}: + delete: + tags: + - Automation + summary: Delete an automation + operationId: Automation_Delete + parameters: + - name: automationId + in: path + required: true + description: Id of automation to delete + schema: + type: string + nullable: true + x-position: 1 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/automation/home/{homeId}: + delete: + tags: + - Automation + summary: Delete all automation for a specified home + operationId: Automation_DeleteAllForHome + parameters: + - name: homeId + in: path + required: true + description: Home Id + schema: + type: string + nullable: true + x-position: 1 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/event/{homeId}: + get: + tags: + - Event + summary: 'Get events for the specified home ' + operationId: Event_Get + parameters: + - name: homeId + in: path + required: true + description: Home Id + schema: + type: string + nullable: true + x-position: 1 + - name: DeviceId + in: query + schema: + type: string + nullable: true + x-position: 2 + - name: RoomId + in: query + schema: + type: string + nullable: true + x-position: 3 + - name: StartIndex + in: query + schema: + type: integer + format: int32 + x-position: 4 + - name: Count + in: query + schema: + type: integer + format: int32 + x-position: 5 + - name: DateStart + in: query + schema: + type: string + format: date-time + nullable: true + x-position: 6 + - name: DateEnd + in: query + schema: + type: string + format: date-time + nullable: true + x-position: 7 + - name: EventType + in: query + schema: + nullable: true + oneOf: + - $ref: '#/components/schemas/EventType' + x-position: 8 + - name: DeviceType + in: query + schema: + nullable: true + oneOf: + - $ref: '#/components/schemas/DeviceType' + x-position: 9 + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EventDetailDTO' + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/event/detail/{eventId}: + get: + tags: + - Event + summary: Get detail info of a specified event + operationId: Event_GetDetail + parameters: + - name: eventId + in: path + required: true + description: event id + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/EventDetailDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/event/{eventId}: + delete: + tags: + - Event + summary: Delete an event + operationId: Event_Delete + parameters: + - name: eventId + in: path + required: true + description: Id of event to delete + schema: + type: string + nullable: true + x-position: 1 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/event/home/{homeId}: + delete: + tags: + - Event + summary: Delete all events for a specified home + operationId: Event_DeleteAllForHome + parameters: + - name: homeId + in: path + required: true + description: Home Id + schema: + type: string + nullable: true + x-position: 1 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/group/{homeId}: + get: + tags: + - Group + summary: Get all groups for the specified home + operationId: Group_GetAll + parameters: + - name: homeId + in: path + required: true + description: Home Id + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/GroupSummaryDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/group/detail/{groupId}: + get: + tags: + - Group + summary: Get detail info of a specified group + operationId: Group_GetDetail + parameters: + - name: groupId + in: path + required: true + description: groupid + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/GroupDetailDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/group/{homeId}/type/{type}: + get: + tags: + - Group + summary: Get list of group from a type + operationId: Group_GetGroupsByType + parameters: + - name: homeId + in: path + required: true + description: home Id + schema: + type: string + nullable: true + x-position: 1 + - name: type + in: path + required: true + description: group type + schema: + type: string + nullable: true + x-position: 2 + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/GroupSummaryDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/group/zigbee2Mqtt/{homeId}: + get: + tags: + - Group + summary: Get all zigbee2Mqtt groups + operationId: Group_GetGroupsFromZigbee2Mqtt + parameters: + - name: homeId + in: path + required: true + description: Home Id + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/GroupDetailDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/group: + post: + tags: + - Group + summary: Create a group + operationId: Group_Create + requestBody: + x-name: groupCreateOrUpdateDetail + description: Group to create + content: + application/json: + schema: + $ref: '#/components/schemas/GroupCreateOrUpdateDetailDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/GroupDetailDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + put: + tags: + - Group + summary: Update a group + operationId: Group_Update + requestBody: + x-name: groupCreateOrUpdateDetail + description: group to update + content: + application/json: + schema: + $ref: '#/components/schemas/GroupCreateOrUpdateDetailDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/GroupCreateOrUpdateDetailDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/group/{homeId}/fromZigbee: + post: + tags: + - Group + summary: Create groups from provider + operationId: Group_CreateDevicesFromZigbee2Mqtt + parameters: + - name: homeId + in: path + required: true + description: Home Id + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/GroupDetailDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/group/{groupId}/device/{deviceId}: + delete: + tags: + - Group + summary: Delete device from a group + operationId: Group_Delete + parameters: + - name: deviceId + in: path + required: true + description: Id of device to delete from the group + schema: + type: string + nullable: true + x-position: 1 + - name: groupId + in: path + required: true + description: 'Id of group ' + schema: + type: string + nullable: true + x-position: 2 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/group/{groupId}: + delete: + tags: + - Group + summary: Delete a group + operationId: Group_Delete2 + parameters: + - name: groupId + in: path + required: true + description: 'Id of group ' + schema: + type: string + nullable: true + x-position: 1 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/group/home/{homeId}: + delete: + tags: + - Group + summary: Delete all group for a specified home + operationId: Group_DeleteAllForHome + parameters: + - name: homeId + in: path + required: true + description: Home Id + schema: + type: string + nullable: true + x-position: 1 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/home/{userId}: + get: + tags: + - Home + summary: Get all home for specified user + operationId: Home_GetAll + parameters: + - name: userId + in: path + required: true + description: User Id + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/HomeDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/home/detail/{homeId}: + get: + tags: + - Home + summary: Get detail info of a specified home + operationId: Home_GetDetail + parameters: + - name: homeId + in: path + required: true + description: home id + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/HomeDetailDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/home: + post: + tags: + - Home + summary: Create a home + operationId: Home_Create + requestBody: + x-name: createOrUpdateHomeDTO + description: Home to create + content: + application/json: + schema: + $ref: '#/components/schemas/CreateOrUpdateHomeDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/HomeDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + put: + tags: + - Home + summary: Update a home + operationId: Home_Update + requestBody: + x-name: createOrUpdateHomeDTO + description: Home to update + content: + application/json: + schema: + $ref: '#/components/schemas/CreateOrUpdateHomeDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/HomeDTO' + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/home/{homeId}: + delete: + tags: + - Home + summary: Delete a home + operationId: Home_Delete + parameters: + - name: homeId + in: path + required: true + description: Id of home to delete + schema: + type: string + nullable: true + x-position: 1 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/room/{homeId}: + get: + tags: + - Room + summary: Get all rooms for the specified home + operationId: Room_GetAll + parameters: + - name: homeId + in: path + required: true + description: Home Id + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RoomSummaryDTO' + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/room/detail/{roomId}: + get: + tags: + - Room + summary: Get detail info of a specified room + operationId: Room_GetDetail + parameters: + - name: roomId + in: path + required: true + description: room id + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/RoomDetailDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/room: + post: + tags: + - Room + summary: Create a room + operationId: Room_Create + requestBody: + x-name: roomCreateOrUpdateDetail + description: Room to create + content: + application/json: + schema: + $ref: '#/components/schemas/RoomCreateOrUpdateDetailDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/RoomDetailDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + put: + tags: + - Room + summary: Update a room + operationId: Room_Update + requestBody: + x-name: roomCreateOrUpdateDetail + description: room to update + content: + application/json: + schema: + $ref: '#/components/schemas/RoomCreateOrUpdateDetailDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/RoomCreateOrUpdateDetailDTO' + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/room/{roomId}/device/{deviceId}: + delete: + tags: + - Room + summary: Delete device from a room + operationId: Room_Delete + parameters: + - name: deviceId + in: path + required: true + description: Id of device to delete from the room + schema: + type: string + nullable: true + x-position: 1 + - name: roomId + in: path + required: true + description: 'Id of room ' + schema: + type: string + nullable: true + x-position: 2 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/room/{roomId}: + delete: + tags: + - Room + summary: Delete a room + operationId: Room_Delete2 + parameters: + - name: roomId + in: path + required: true + description: 'Id of room ' + schema: + type: string + nullable: true + x-position: 1 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/room/home/{homeId}: + delete: + tags: + - Room + summary: Delete all rooms for a specified home + operationId: Room_DeleteAllForHome + parameters: + - name: homeId + in: path + required: true + description: Home Id + schema: + type: string + nullable: true + x-position: 1 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /azure: + post: + tags: + - Azure + operationId: Azure_Create + requestBody: + x-name: user + content: + application/json: + schema: + $ref: '#/components/schemas/AzureADAuthModel' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/octet-stream: + schema: + type: string + format: binary + /facebook: + post: + tags: + - Facebook + operationId: Facebook_Create + requestBody: + x-name: user + content: + application/json: + schema: + $ref: '#/components/schemas/FacebookAuthModel' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/octet-stream: + schema: + type: string + format: binary + /google: + post: + tags: + - Google + operationId: Google_Create + requestBody: + x-name: user + content: + application/json: + schema: + $ref: '#/components/schemas/GoogleAuthModel' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/octet-stream: + schema: + type: string + format: binary + /token: + post: + tags: + - Token + operationId: Token_Create + requestBody: + x-name: user + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/octet-stream: + schema: + type: string + format: binary + /twitter: + post: + tags: + - Twitter + operationId: Twitter_Create + requestBody: + x-name: user + content: + application/json: + schema: + $ref: '#/components/schemas/TwitterAuthModel' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/octet-stream: + schema: + type: string + format: binary +components: + schemas: + Book: + type: object + additionalProperties: false + properties: + id: + type: string + nullable: true + bookName: + type: string + nullable: true + price: + type: number + format: decimal + category: + type: string + nullable: true + author: + type: string + nullable: true + DeviceSummaryDTO: + type: object + additionalProperties: false + properties: + id: + type: string + nullable: true + homeId: + type: string + nullable: true + description: + type: string + nullable: true + name: + type: string + nullable: true + model: + type: string + nullable: true + type: + $ref: '#/components/schemas/DeviceType' + status: + type: boolean + connectionStatus: + $ref: '#/components/schemas/ConnectionStatus' + roomId: + type: string + nullable: true + providerId: + type: string + nullable: true + providerName: + type: string + nullable: true + lastStateDate: + type: string + format: date-time + battery: + type: boolean + batteryStatus: + type: integer + format: int32 + DeviceType: + type: string + description: '' + x-enumNames: + - Sensor + - Actuator + - Camera + - Switch + - Light + - Sound + - Plug + - Multiplug + - Thermostat + - Valve + - Door + - Environment + - Motion + - Gateway + - Unknown + enum: + - Sensor + - Actuator + - Camera + - Switch + - Light + - Sound + - Plug + - Multiplug + - Thermostat + - Valve + - Door + - Environment + - Motion + - Gateway + - Unknown + ConnectionStatus: + type: string + description: '' + x-enumNames: + - Connected + - Disconnected + - Unknown + enum: + - Connected + - Disconnected + - Unknown + DeviceDetailDTO: + allOf: + - $ref: '#/components/schemas/DeviceSummaryDTO' + - type: object + additionalProperties: false + properties: + firmwareVersion: + type: string + nullable: true + hardwareVersion: + type: string + nullable: true + port: + type: integer + format: int32 + meansOfCommunications: + type: array + nullable: true + items: + $ref: '#/components/schemas/MeansOfCommunication' + createdDate: + type: string + format: date-time + updatedDate: + type: string + format: date-time + lastState: + type: string + nullable: true + ipAddress: + type: string + nullable: true + serviceIdentification: + type: string + nullable: true + manufacturerName: + type: string + nullable: true + groupIds: + type: array + nullable: true + items: + type: string + properties: + type: string + nullable: true + supportedOperations: + type: array + nullable: true + items: + type: string + MeansOfCommunication: + type: string + description: '' + x-enumNames: + - Wifi + - Bluetooth + - Zigbee + - Zwave + enum: + - Wifi + - Bluetooth + - Zigbee + - Zwave + ElectricityProduction: + type: object + additionalProperties: false + properties: + id: + type: string + nullable: true + deviceId: + type: string + nullable: true + homeId: + type: string + nullable: true + watt: + type: number + format: double + ampere: + type: number + format: double + timestamp: + type: string + format: date-time + ViewBy: + type: string + description: '' + x-enumNames: + - Year + - Month + - Day + enum: + - Year + - Month + - Day + SmartPrinterMessage: + type: object + additionalProperties: false + properties: + id: + type: string + nullable: true + type: + type: string + nullable: true + time: + type: string + nullable: true + temperature: + type: number + format: double + pressure: + type: number + format: double + smoke: + type: integer + format: int32 + SmartGardenMessage: + type: object + additionalProperties: false + properties: + id: + type: string + nullable: true + type: + type: string + nullable: true + time: + type: string + nullable: true + temperature: + type: number + format: double + pressure: + type: number + format: double + humidity: + type: number + format: double + water: + type: integer + format: int32 + light: + type: integer + format: int32 + OddNice: + type: object + additionalProperties: false + properties: + teams: + type: array + nullable: true + items: + type: string + commence_time: + type: integer + format: int32 + home_team: + type: string + nullable: true + odds: + nullable: true + oneOf: + - $ref: '#/components/schemas/OddObject' + OddObject: + type: object + additionalProperties: false + properties: + homeOdd: + type: number + format: double + drawOdd: + type: number + format: double + visitOdd: + type: number + format: double + ProviderDTO: + type: object + additionalProperties: false + properties: + id: + type: string + nullable: true + name: + type: string + nullable: true + type: + $ref: '#/components/schemas/ProviderType' + homeId: + type: string + nullable: true + endpoint: + type: string + nullable: true + username: + type: string + nullable: true + password: + type: string + nullable: true + apiKey: + type: string + nullable: true + active: + type: boolean + ProviderType: + type: string + description: '' + x-enumNames: + - arlo + - meross + - yeelight + - zigbee2mqtt + enum: + - arlo + - meross + - yeelight + - zigbee2mqtt + ScreenDevice: + type: object + additionalProperties: false + properties: + id: + type: string + nullable: true + name: + type: string + nullable: true + type: + type: string + nullable: true + location: + type: string + nullable: true + locationExplanation: + type: string + nullable: true + height: + type: integer + format: int32 + width: + type: integer + format: int32 + MqttMessageDTO: + type: object + additionalProperties: false + properties: + topic: + type: string + nullable: true + message: + type: string + nullable: true + online: + type: boolean + PanelSection: + type: object + additionalProperties: false + properties: + label: + type: string + nullable: true + icon: + type: string + nullable: true + color: + type: string + nullable: true + defaultRoute: + type: string + nullable: true + children: + type: array + nullable: true + items: + $ref: '#/components/schemas/PanelMenuItem' + PanelMenuItem: + type: object + additionalProperties: false + properties: + label: + type: string + nullable: true + route: + type: string + nullable: true + icon: + type: string + nullable: true + color: + type: string + nullable: true + badgeValue: + type: integer + format: int32 + badgeType: + type: string + nullable: true + children: + type: array + nullable: true + items: + $ref: '#/components/schemas/PanelMenuItem' + UserInfo: + type: object + additionalProperties: false + properties: + id: + type: string + nullable: true + role: + type: string + nullable: true + email: + type: string + nullable: true + password: + type: string + nullable: true + firstName: + type: string + nullable: true + lastName: + type: string + nullable: true + token: + type: string + nullable: true + birthday: + type: string + format: date-time + homeIds: + type: array + nullable: true + items: + type: string + dateCreation: + type: string + format: date-time + address: + type: string + nullable: true + city: + type: string + nullable: true + state: + type: string + nullable: true + country: + type: string + nullable: true + language: + type: string + nullable: true + timeZone: + type: string + nullable: true + postalCode: + type: integer + format: int32 + LoginDTO: + type: object + additionalProperties: false + properties: + email: + type: string + nullable: true + password: + type: string + nullable: true + UserInfoDetailDTO: + type: object + additionalProperties: false + properties: + id: + type: string + nullable: true + email: + type: string + nullable: true + firstName: + type: string + nullable: true + lastName: + type: string + nullable: true + AlarmModeDTO: + type: object + additionalProperties: false + properties: + id: + type: string + nullable: true + homeId: + type: string + nullable: true + name: + type: string + nullable: true + type: + $ref: '#/components/schemas/AlarmType' + activated: + type: boolean + isDefault: + type: boolean + notification: + type: boolean + createdDate: + type: string + format: date-time + updatedDate: + type: string + format: date-time + AlarmType: + type: string + description: '' + x-enumNames: + - Home + - Absent + - Geolocalized + - Programmed + - Desarmed + - Custom + enum: + - Home + - Absent + - Geolocalized + - Programmed + - Desarmed + - Custom + AlarmModeDetailDTO: + allOf: + - $ref: '#/components/schemas/AlarmModeDTO' + - type: object + additionalProperties: false + properties: + triggers: + type: array + nullable: true + items: + $ref: '#/components/schemas/Trigger' + devices: + type: array + nullable: true + items: + $ref: '#/components/schemas/DeviceDetailDTO' + programmedMode: + nullable: true + oneOf: + - $ref: '#/components/schemas/ProgrammedMode' + geolocalizedMode: + nullable: true + oneOf: + - $ref: '#/components/schemas/GeolocalizedMode' + Trigger: + type: object + additionalProperties: false + properties: + providerId: + type: string + nullable: true + deviceId: + type: string + nullable: true + stateName: + type: string + nullable: true + stateValue: + type: string + nullable: true + type: + $ref: '#/components/schemas/TriggerType' + TriggerType: + type: string + description: '' + x-enumNames: + - MQTT + - WEB + - TIME + enum: + - MQTT + - WEB + - TIME + ProgrammedMode: + type: object + additionalProperties: false + properties: + monday: + type: array + nullable: true + items: + $ref: '#/components/schemas/TimePeriodAlarm' + tuesday: + type: array + nullable: true + items: + $ref: '#/components/schemas/TimePeriodAlarm' + wednesday: + type: array + nullable: true + items: + $ref: '#/components/schemas/TimePeriodAlarm' + thursday: + type: array + nullable: true + items: + $ref: '#/components/schemas/TimePeriodAlarm' + friday: + type: array + nullable: true + items: + $ref: '#/components/schemas/TimePeriodAlarm' + saturday: + type: array + nullable: true + items: + $ref: '#/components/schemas/TimePeriodAlarm' + sunday: + type: array + nullable: true + items: + $ref: '#/components/schemas/TimePeriodAlarm' + TimePeriodAlarm: + type: object + additionalProperties: false + properties: + start: + type: string + nullable: true + end: + type: string + nullable: true + alarmMode: + nullable: true + oneOf: + - $ref: '#/components/schemas/AlarmMode' + AlarmMode: + type: object + additionalProperties: false + properties: + id: + type: string + nullable: true + homeId: + type: string + nullable: true + name: + type: string + nullable: true + activated: + type: boolean + isDefault: + type: boolean + notification: + type: boolean + createdDate: + type: string + format: date-time + updatedDate: + type: string + format: date-time + type: + $ref: '#/components/schemas/AlarmType' + programmedMode: + nullable: true + oneOf: + - $ref: '#/components/schemas/ProgrammedMode' + geolocalizedMode: + nullable: true + oneOf: + - $ref: '#/components/schemas/GeolocalizedMode' + triggers: + type: array + nullable: true + items: + $ref: '#/components/schemas/Trigger' + actions: + type: array + nullable: true + items: + $ref: '#/components/schemas/Action' + devicesIds: + type: array + nullable: true + items: + type: string + GeolocalizedMode: + type: object + additionalProperties: false + properties: + latitude: + type: string + nullable: true + longitude: + type: string + nullable: true + homeMode: + nullable: true + oneOf: + - $ref: '#/components/schemas/AlarmMode' + absentMode: + nullable: true + oneOf: + - $ref: '#/components/schemas/AlarmMode' + Action: + type: object + additionalProperties: false + properties: + groupId: + type: string + nullable: true + deviceId: + type: string + nullable: true + states: + type: array + nullable: true + items: + $ref: '#/components/schemas/AutomationState' + rawRequest: + type: string + nullable: true + providerId: + type: string + nullable: true + type: + $ref: '#/components/schemas/ActionType' + isForce: + type: boolean + AutomationState: + type: object + additionalProperties: false + properties: + name: + type: string + nullable: true + value: + type: string + nullable: true + ActionType: + type: string + description: '' + x-enumNames: + - DELAY + - DEVICE + - HTTP + - ZIGBEE2MQTT + - MQTT + - GROUP + enum: + - DELAY + - DEVICE + - HTTP + - ZIGBEE2MQTT + - MQTT + - GROUP + AlarmModeCreateOrUpdateDetailDTO: + allOf: + - $ref: '#/components/schemas/AlarmModeDTO' + - type: object + additionalProperties: false + properties: + triggers: + type: array + nullable: true + items: + $ref: '#/components/schemas/Trigger' + actions: + type: array + nullable: true + items: + $ref: '#/components/schemas/Action' + programmedMode: + nullable: true + oneOf: + - $ref: '#/components/schemas/ProgrammedMode' + geolocalizedMode: + nullable: true + oneOf: + - $ref: '#/components/schemas/GeolocalizedMode' + TokenDTO: + type: object + additionalProperties: false + properties: + access_token: + type: string + nullable: true + refresh_token: + type: string + nullable: true + scope: + type: string + nullable: true + token_type: + type: string + nullable: true + expires_in: + type: integer + format: int32 + expiration: + type: string + format: date-time + AutomationDTO: + type: object + additionalProperties: false + properties: + id: + type: string + nullable: true + name: + type: string + nullable: true + active: + type: boolean + homeId: + type: string + nullable: true + createdDate: + type: string + format: date-time + updatedDate: + type: string + format: date-time + AutomationDetailDTO: + allOf: + - $ref: '#/components/schemas/AutomationDTO' + - type: object + additionalProperties: false + properties: + triggers: + type: array + nullable: true + items: + $ref: '#/components/schemas/Trigger' + conditions: + type: array + nullable: true + items: + $ref: '#/components/schemas/Condition' + actions: + type: array + nullable: true + items: + $ref: '#/components/schemas/Action' + devicesIds: + type: array + nullable: true + items: + type: string + Condition: + type: object + additionalProperties: false + properties: + deviceId: + type: string + nullable: true + state: + nullable: true + oneOf: + - $ref: '#/components/schemas/AutomationState' + startTime: + type: string + nullable: true + endTime: + type: string + nullable: true + type: + $ref: '#/components/schemas/ConditionType' + value: + $ref: '#/components/schemas/ConditionValue' + ConditionType: + type: string + description: '' + x-enumNames: + - STATE + - TIME + enum: + - STATE + - TIME + ConditionValue: + type: string + description: '' + x-enumNames: + - EQUAL + - NOT_EQUAL + - BIGGER + - BIGGEST + - SMALLER + - SMALLEST + enum: + - EQUAL + - NOT_EQUAL + - BIGGER + - BIGGEST + - SMALLER + - SMALLEST + EventDetailDTO: + allOf: + - $ref: '#/components/schemas/EventDTO' + - type: object + additionalProperties: false + properties: + deviceState: + nullable: true + oneOf: + - $ref: '#/components/schemas/DeviceState' + automationTriggered: + nullable: true + oneOf: + - $ref: '#/components/schemas/AutomationTriggered' + alarmTriggered: + nullable: true + oneOf: + - $ref: '#/components/schemas/AlarmTriggered' + DeviceState: + type: object + additionalProperties: false + properties: + deviceId: + type: string + nullable: true + deviceName: + type: string + nullable: true + message: + type: string + nullable: true + deviceType: + $ref: '#/components/schemas/DeviceType' + AutomationTriggered: + type: object + additionalProperties: false + properties: + automationId: + type: string + nullable: true + automationName: + type: string + nullable: true + AlarmTriggered: + type: object + additionalProperties: false + properties: + alarmModeId: + type: string + nullable: true + alarmModeName: + type: string + nullable: true + type: + $ref: '#/components/schemas/AlarmType' + EventDTO: + type: object + additionalProperties: false + properties: + id: + type: string + nullable: true + homeId: + type: string + nullable: true + date: + type: string + format: date-time + type: + $ref: '#/components/schemas/EventType' + roomId: + type: string + nullable: true + EventType: + type: string + description: '' + x-enumNames: + - DeviceState + - AutomationTriggered + - AlarmTriggered + enum: + - DeviceState + - AutomationTriggered + - AlarmTriggered + GroupSummaryDTO: + type: object + additionalProperties: false + properties: + id: + type: string + nullable: true + homeId: + type: string + nullable: true + name: + type: string + nullable: true + type: + type: string + nullable: true + isAlarm: + type: boolean + GroupDetailDTO: + allOf: + - $ref: '#/components/schemas/GroupSummaryDTO' + - type: object + additionalProperties: false + properties: + createdDate: + type: string + format: date-time + updatedDate: + type: string + format: date-time + devices: + type: array + nullable: true + items: + $ref: '#/components/schemas/DeviceDetailDTO' + GroupCreateOrUpdateDetailDTO: + allOf: + - $ref: '#/components/schemas/GroupSummaryDTO' + - type: object + additionalProperties: false + properties: + deviceIds: + type: array + nullable: true + items: + type: string + HomeDTO: + type: object + additionalProperties: false + properties: + id: + type: string + nullable: true + name: + type: string + nullable: true + isAlarm: + type: boolean + isDefault: + type: boolean + currentAlarmMode: + nullable: true + oneOf: + - $ref: '#/components/schemas/AlarmModeDTO' + createdDate: + type: string + format: date-time + updatedDate: + type: string + format: date-time + usersIds: + type: array + nullable: true + items: + type: string + HomeDetailDTO: + allOf: + - $ref: '#/components/schemas/HomeDTO' + - type: object + additionalProperties: false + properties: + users: + type: array + nullable: true + items: + $ref: '#/components/schemas/UserInfoDetailDTO' + devices: + type: array + nullable: true + items: + $ref: '#/components/schemas/DeviceSummaryDTO' + automations: + type: array + nullable: true + items: + $ref: '#/components/schemas/AutomationDTO' + providers: + type: array + nullable: true + items: + $ref: '#/components/schemas/ProviderDTO' + groups: + type: array + nullable: true + items: + $ref: '#/components/schemas/GroupSummaryDTO' + CreateOrUpdateHomeDTO: + allOf: + - $ref: '#/components/schemas/HomeDTO' + - type: object + additionalProperties: false + properties: + usersIds: + type: array + nullable: true + items: + type: string + RoomSummaryDTO: + type: object + additionalProperties: false + properties: + id: + type: string + nullable: true + homeId: + type: string + nullable: true + name: + type: string + nullable: true + RoomDetailDTO: + allOf: + - $ref: '#/components/schemas/RoomSummaryDTO' + - type: object + additionalProperties: false + properties: + createdDate: + type: string + format: date-time + updatedDate: + type: string + format: date-time + devices: + type: array + nullable: true + items: + $ref: '#/components/schemas/DeviceDetailDTO' + RoomCreateOrUpdateDetailDTO: + allOf: + - $ref: '#/components/schemas/RoomSummaryDTO' + - type: object + additionalProperties: false + properties: + deviceIds: + type: array + nullable: true + items: + type: string + AzureADAuthModel: + type: object + additionalProperties: false + properties: + apiKey: + type: string + nullable: true + FacebookAuthModel: + type: object + additionalProperties: false + properties: + userAccessToken: + type: string + nullable: true + GoogleAuthModel: + type: object + additionalProperties: false + properties: + authorizationCode: + type: string + nullable: true + apiKey: + type: string + nullable: true + User: + type: object + additionalProperties: false + properties: + id: + type: string + nullable: true + password: + type: string + nullable: true + TwitterAuthModel: + type: object + additionalProperties: false + properties: + apiKey: + type: string + nullable: true + securitySchemes: + bearer: + type: oauth2 + description: MyCore Authentication + flows: + password: + authorizationUrl: /authentication/Token + tokenUrl: /api/authentication/Token + scopes: + MyCore-api: MyCore WebAPI +security: + - bearer: [] +tags: + - name: Authentication + description: Authentication management diff --git a/mycore_api/test/event_filter_test.dart b/mycore_api/test/event_filter_test.dart new file mode 100644 index 0000000..23372b7 --- /dev/null +++ b/mycore_api/test/event_filter_test.dart @@ -0,0 +1,51 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.0 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: lines_longer_than_80_chars + +import 'package:mycoreapi/api.dart'; +import 'package:test/test.dart'; + +// tests for EventFilter +void main() { + final instance = EventFilter(); + + group('test EventFilter', () { + // int startIndex + test('to test the property `startIndex`', () async { + // TODO + }); + + // int count + test('to test the property `count`', () async { + // TODO + }); + + // DateTime dateStart + test('to test the property `dateStart`', () async { + // TODO + }); + + // DateTime dateEnd + test('to test the property `dateEnd`', () async { + // TODO + }); + + // OneOfEventType eventType + test('to test the property `eventType`', () async { + // TODO + }); + + // OneOfDeviceType deviceType + test('to test the property `deviceType`', () async { + // TODO + }); + + + }); + +} diff --git a/mycore_api/test/event_home_filter_all_of_test.dart b/mycore_api/test/event_home_filter_all_of_test.dart new file mode 100644 index 0000000..3ce0036 --- /dev/null +++ b/mycore_api/test/event_home_filter_all_of_test.dart @@ -0,0 +1,31 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.0 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: lines_longer_than_80_chars + +import 'package:mycoreapi/api.dart'; +import 'package:test/test.dart'; + +// tests for EventHomeFilterAllOf +void main() { + final instance = EventHomeFilterAllOf(); + + group('test EventHomeFilterAllOf', () { + // String deviceId + test('to test the property `deviceId`', () async { + // TODO + }); + + // String roomId + test('to test the property `roomId`', () async { + // TODO + }); + + + }); + +} diff --git a/mycore_api/test/event_home_filter_test.dart b/mycore_api/test/event_home_filter_test.dart new file mode 100644 index 0000000..199f1c0 --- /dev/null +++ b/mycore_api/test/event_home_filter_test.dart @@ -0,0 +1,61 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.0 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: lines_longer_than_80_chars + +import 'package:mycoreapi/api.dart'; +import 'package:test/test.dart'; + +// tests for EventHomeFilter +void main() { + final instance = EventHomeFilter(); + + group('test EventHomeFilter', () { + // int startIndex + test('to test the property `startIndex`', () async { + // TODO + }); + + // int count + test('to test the property `count`', () async { + // TODO + }); + + // DateTime dateStart + test('to test the property `dateStart`', () async { + // TODO + }); + + // DateTime dateEnd + test('to test the property `dateEnd`', () async { + // TODO + }); + + // OneOfEventType eventType + test('to test the property `eventType`', () async { + // TODO + }); + + // OneOfDeviceType deviceType + test('to test the property `deviceType`', () async { + // TODO + }); + + // String deviceId + test('to test the property `deviceId`', () async { + // TODO + }); + + // String roomId + test('to test the property `roomId`', () async { + // TODO + }); + + + }); + +} diff --git a/mycore_api/test/list_response_of_event_detail_dto_and_event_home_filter_test.dart b/mycore_api/test/list_response_of_event_detail_dto_and_event_home_filter_test.dart new file mode 100644 index 0000000..e8735b7 --- /dev/null +++ b/mycore_api/test/list_response_of_event_detail_dto_and_event_home_filter_test.dart @@ -0,0 +1,41 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.0 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: lines_longer_than_80_chars + +import 'package:mycoreapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ListResponseOfEventDetailDTOAndEventHomeFilter +void main() { + final instance = ListResponseOfEventDetailDTOAndEventHomeFilter(); + + group('test ListResponseOfEventDetailDTOAndEventHomeFilter', () { + // List values (default value: const []) + test('to test the property `values`', () async { + // TODO + }); + + // OneOfEventHomeFilter requestParameters + test('to test the property `requestParameters`', () async { + // TODO + }); + + // int totalCount + test('to test the property `totalCount`', () async { + // TODO + }); + + // int actualCount + test('to test the property `actualCount`', () async { + // TODO + }); + + + }); + +} diff --git a/mycore_api/test/room_main_detail_dto_all_of_test.dart b/mycore_api/test/room_main_detail_dto_all_of_test.dart new file mode 100644 index 0000000..ba2bc74 --- /dev/null +++ b/mycore_api/test/room_main_detail_dto_all_of_test.dart @@ -0,0 +1,41 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.0 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: lines_longer_than_80_chars + +import 'package:mycoreapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RoomMainDetailDTOAllOf +void main() { + final instance = RoomMainDetailDTOAllOf(); + + group('test RoomMainDetailDTOAllOf', () { + // DateTime createdDate + test('to test the property `createdDate`', () async { + // TODO + }); + + // DateTime updatedDate + test('to test the property `updatedDate`', () async { + // TODO + }); + + // List environmentalDevices (default value: const []) + test('to test the property `environmentalDevices`', () async { + // TODO + }); + + // List securityDevices (default value: const []) + test('to test the property `securityDevices`', () async { + // TODO + }); + + + }); + +} diff --git a/mycore_api/test/room_main_detail_dto_test.dart b/mycore_api/test/room_main_detail_dto_test.dart new file mode 100644 index 0000000..18cb4e6 --- /dev/null +++ b/mycore_api/test/room_main_detail_dto_test.dart @@ -0,0 +1,56 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.0 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: lines_longer_than_80_chars + +import 'package:mycoreapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RoomMainDetailDTO +void main() { + final instance = RoomMainDetailDTO(); + + group('test RoomMainDetailDTO', () { + // String id + test('to test the property `id`', () async { + // TODO + }); + + // String homeId + test('to test the property `homeId`', () async { + // TODO + }); + + // String name + test('to test the property `name`', () async { + // TODO + }); + + // DateTime createdDate + test('to test the property `createdDate`', () async { + // TODO + }); + + // DateTime updatedDate + test('to test the property `updatedDate`', () async { + // TODO + }); + + // List environmentalDevices (default value: const []) + test('to test the property `environmentalDevices`', () async { + // TODO + }); + + // List securityDevices (default value: const []) + test('to test the property `securityDevices`', () async { + // TODO + }); + + + }); + +} diff --git a/pubspec.lock b/pubspec.lock index e554a9f..e2503bc 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -97,6 +97,13 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + url: "https://pub.dartlang.org" + source: hosted + version: "0.18.1" flutter_test: dependency: "direct dev" description: flutter @@ -191,6 +198,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.0" + path_drawing: + dependency: transitive + description: + name: path_drawing + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.1+1" + path_parsing: + dependency: transitive + description: + name: path_parsing + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" pedantic: dependency: transitive description: @@ -198,6 +219,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.11.1" + petitparser: + dependency: transitive + description: + name: petitparser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.0" provider: dependency: "direct main" description: @@ -287,6 +315,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.3.0" + uuid: + dependency: "direct main" + description: + name: uuid + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.2" vector_math: dependency: transitive description: @@ -294,6 +329,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.1" + xml: + dependency: transitive + description: + name: xml + url: "https://pub.dartlang.org" + source: hosted + version: "4.5.1" sdks: dart: ">=2.15.0 <3.0.0" - flutter: ">=1.16.0" + flutter: ">=1.18.0-6.0.pre" diff --git a/pubspec.yaml b/pubspec.yaml index ce3d244..7d60b8a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -28,9 +28,11 @@ dependencies: sqflite: provider: ^5.0.0 enum_to_string: ^2.0.1 + flutter_svg: ^0.18.0 mqtt_client: ^8.1.0 rxdart: 0.22.0 flare_flutter: ^3.0.1 + uuid: ^2.2.2 mycoreapi: path: mycore_api # The following adds the Cupertino Icons font to your application.