diff --git a/lib/Components/Custom_Navigation_Bar/custom_app_bar.dart b/lib/Components/Custom_Navigation_Bar/custom_app_bar.dart index eb98bfe..19c7364 100644 --- a/lib/Components/Custom_Navigation_Bar/custom_app_bar.dart +++ b/lib/Components/Custom_Navigation_Bar/custom_app_bar.dart @@ -8,7 +8,7 @@ import 'package:provider/provider.dart'; import 'custom_clipper.dart'; class CustomAppBar extends StatelessWidget implements PreferredSizeWidget { - final double _preferredHeight = 55; + final double _preferredHeight = 50; @override Widget build(BuildContext context) { Size size = MediaQuery.of(context).size; diff --git a/lib/Components/Custom_Navigation_Bar/custom_nav_item.dart b/lib/Components/Custom_Navigation_Bar/custom_nav_item.dart index 0919a5d..cb66ce5 100644 --- a/lib/Components/Custom_Navigation_Bar/custom_nav_item.dart +++ b/lib/Components/Custom_Navigation_Bar/custom_nav_item.dart @@ -2,6 +2,7 @@ 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:myhomie_app/constants.dart'; import 'package:provider/provider.dart'; class CustomNavItem extends StatelessWidget { @@ -22,8 +23,12 @@ class CustomNavItem extends StatelessWidget { setPage(); }, child: Container( - width: 50, - height: 50, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(25), + color: kMainColor, + ), + width: 55, + height: 55, child: getIconSvg(icon, size.width * 0.1, index.getIndex()), ), ); diff --git a/lib/Models/homieContext.dart b/lib/Models/homieContext.dart index 4bf7e95..e4255a1 100644 --- a/lib/Models/homieContext.dart +++ b/lib/Models/homieContext.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:mqtt_client/mqtt_server_client.dart'; +import 'package:mycoreapi/api.dart'; import 'dart:convert'; import 'package:myhomie_app/client.dart'; @@ -22,7 +23,7 @@ class HomieAppContext with ChangeNotifier{ 'homeId': homeId, 'host': host, 'language': language, - 'token': token, + 'token': token }; } @@ -32,7 +33,8 @@ class HomieAppContext with ChangeNotifier{ host: json['host'] as String, homeId: json['homeId'] as String, language: json['language'] as String, - token: json['token'] as String + token: json['token'] as String, + //roomsMainDetails: json['roomsMainDetails'] as List ); } diff --git a/lib/Screens/Login/components/body.dart b/lib/Screens/Login/components/body.dart index 0d304a8..94e81f9 100644 --- a/lib/Screens/Login/components/body.dart +++ b/lib/Screens/Login/components/body.dart @@ -64,11 +64,13 @@ class _BodyState extends State { UserInfoDetailDTO user = await clientAPI.userApi.userGet("6182c472e20a6dbcfe8fe82c"); // TO replace user get by email + print(user); + homieAppContext.host = "http://192.168.31.140";// 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.language = user.language == null ? 'FR': user.language; // homieAppContext.token = token.accessToken; // TODO check if we select by default or ask user to select diff --git a/lib/Screens/Main/Home/home.dart b/lib/Screens/Main/Home/home.dart index b167a50..1743836 100644 --- a/lib/Screens/Main/Home/home.dart +++ b/lib/Screens/Main/Home/home.dart @@ -1,5 +1,9 @@ import 'package:flutter/material.dart'; +import 'package:mycoreapi/api.dart'; +import 'package:myhomie_app/Components/loading.dart'; +import 'package:myhomie_app/Models/homieContext.dart'; import 'package:myhomie_app/app_context.dart'; +import 'package:myhomie_app/constants.dart'; import 'package:provider/provider.dart'; class HomeScreen extends StatefulWidget { @@ -22,17 +26,25 @@ class _HomeScreenState extends State { Widget build(BuildContext context) { Size size = MediaQuery.of(context).size; final appContext = Provider.of(context); + HomieAppContext homieAppContext = appContext.getContext(); - return interfaceElements(); - + print(homieAppContext.homeId); + print(homieAppContext.clientAPI.roomApi); + // TODO /*if(appContext.getContext().feed != null) { return interfaceElements(); - } else { + } else {*/ return FutureBuilder( - future: Message.getMessages(this.messages, appContext, false, true), - builder: (context, AsyncSnapshot> snapshot) { + future: homieAppContext.clientAPI.roomApi.roomGetAllWithMainDetails(homieAppContext.homeId), + builder: (context, AsyncSnapshot> snapshot) { if (snapshot.connectionState == ConnectionState.done) { - return interfaceElements(); + print("connectionState done"); + print(snapshot); + if(snapshot.data != null) { + return interfaceElements(snapshot.data); + } else { + return Text("No data - or error"); + } } else if (snapshot.connectionState == ConnectionState.none) { print('ConnectionState.none'); return Text("No data"); @@ -41,18 +53,24 @@ class _HomeScreenState extends State { } } ); - }*/ + //} } - interfaceElements() { + interfaceElements(List roomsMaindetails) { Size size = MediaQuery.of(context).size; final appContext = Provider.of(context); + HomieAppContext homieAppContext = appContext.getContext(); + + print(roomsMaindetails.length); + print(roomsMaindetails[0].door); + print(roomsMaindetails[0].isDoor); + return RefreshIndicator( color: Theme.of(context).primaryColor, displacement: 20, onRefresh: () async { - print("TODO refresh"); - //await Message.getMessages(this.messages, appContext, true, true); + print("onRefresh"); + await homieAppContext.clientAPI.roomApi.roomGetAllWithMainDetails(homieAppContext.homeId); }, child: Container( height: size.height * 0.8, @@ -60,11 +78,138 @@ class _HomeScreenState extends State { child: Column( mainAxisAlignment: MainAxisAlignment.start, children: [ - Text("TODO Home - coucou test") + GridView.builder( + shrinkWrap: true, + gridDelegate: new SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, childAspectRatio: 1), + itemCount: roomsMaindetails.length, + itemBuilder: (BuildContext context, int index) { + return InkWell( + onTap: () { + setState(() { + //selectedSection = menuDTO.sections[index]; + print("Hero to room detail"); + }); + }, + child: Container( + decoration: boxDecorationRoom(roomsMaindetails[index], false), + padding: const EdgeInsets.all(5), + margin: EdgeInsets.symmetric(vertical: 8, horizontal: 8), + child: Stack( + children: [ + Column( + children: [ + Align( + alignment: Alignment.bottomLeft, + child: Text( + roomsMaindetails[index].name, + style: new TextStyle(fontSize: kDetailSize, color: kBackgroundSecondGrey), + ), + ), + ], + ), + + if(roomsMaindetails[index].isTemperature) + Positioned( + bottom: 10, + left: 0, + child: Row( + children: [ + Icon( + Icons.thermostat, + size: 20, + color: kMainColor, + ), + Text( + roomsMaindetails[index].temperature, + style: new TextStyle(fontSize: kDescriptionDetailSize, color: kBackgroundSecondGrey), + maxLines: 1, + ), + ], + ) + ), + + if(roomsMaindetails[index].isHumidity) + Positioned( + bottom: 10, + left: roomsMaindetails[index].isTemperature ? 55 : 0, + child: Row( + children: [ + Icon( + Icons.water, + size: 20, + color: kMainColor, + ), + Text( + roomsMaindetails[index].humidity, + style: new TextStyle(fontSize: kDescriptionDetailSize, color: kBackgroundSecondGrey), + maxLines: 1, + ), + ], + ) + ), + + if(roomsMaindetails[index].isDoor) + Positioned( + bottom: 10, + right: 5, + child: Row( + children: [ + Icon( + Icons.motion_photos_on_rounded, + size: 20, + color: !roomsMaindetails[index].door ? kMainColor : kBackgroundSecondGrey, + ), + ], + ) + ), + + if(roomsMaindetails[index].isMotion) + Positioned( + bottom: 10, + right: roomsMaindetails[index].isDoor ? 20 : 5, + child: Row( + children: [ + Icon( + Icons.directions_walk, + size: 20, + color: roomsMaindetails[index].motion ? kMainColor : kBackgroundSecondGrey, + ), + ], + ) + ), + ], + ), + ), + ); + } + ), ], ), ), ), ); } +} + +boxDecorationRoom(RoomMainDetailDTO roomMainDetailDTO, bool isSelected) { + return BoxDecoration( + color: kBackgroundLight, + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(20.0), + /*image: roomMainDetailDTO.imageSource != null ? new DecorationImage( + fit: BoxFit.contain, + colorFilter: !isSelected? new ColorFilter.mode(Colors.black.withOpacity(0.5), BlendMode.dstATop) : null, + image: new NetworkImage( + section.imageSource, + ), + ): null,*/ + boxShadow: [ + BoxShadow( + color: kBackgroundSecondGrey, + spreadRadius: 0.5, + blurRadius: 6, + offset: Offset(0, 1.5), // changes position of shadow + ), + ], + ); } \ No newline at end of file diff --git a/lib/Screens/Main/MainPage.dart b/lib/Screens/Main/MainPage.dart index 2d6c79e..427238f 100644 --- a/lib/Screens/Main/MainPage.dart +++ b/lib/Screens/Main/MainPage.dart @@ -1,8 +1,5 @@ -import 'dart:convert'; - import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; -import 'package:mqtt_client/mqtt_client.dart'; import 'package:mqtt_client/mqtt_server_client.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'; @@ -32,105 +29,19 @@ class MainPage extends StatefulWidget { } 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() { - setState(() { - _counter++; - - print("client.connectionStatus !!! ==" + client.connectionStatus.toString()); - if (client.connectionStatus.state == MqttConnectionState.connected) { - const pubTopic = 'topic/test'; - final builder = MqttClientPayloadBuilder(); - builder.addString('Hello MQTT'); - client.publishMessage(pubTopic, MqttQos.atLeastOnce, builder.payload); - } - }); - }*/ - - // connection succeeded -/* void onConnected() { - print('Connected !!!!!!!!!!!! ----------------------------------'); - - client.updates.listen((List> c) { - final MqttPublishMessage message = c[0].payload; - final payload = MqttPublishPayload.bytesToStringAsString(message.payload.message); - print('Received message:$payload from topic: ${c[0].topic}>'); - }); - } - -// unconnected - void onDisconnected() { - print('Disconnected'); - } - -// subscribe to topic succeeded - void onSubscribed(String topic) { - print('Subscribed topic: $topic'); - } - -// subscribe to topic failed - void onSubscribeFail(String topic) { - print('Failed to subscribe $topic'); - } - -// unsubscribe succeeded - void onUnsubscribed(String topic) { - print('Unsubscribed topic: $topic'); - } - - Future connect() async { - client.logging(on: false); - client.keepAlivePeriod = 20; - client.onDisconnected = onDisconnected; - client.onConnected = onConnected; - client.onSubscribed = onSubscribed; - - /// Security context - /*SecurityContext context = new SecurityContext() - ..useCertificateChain('path/to/my_cert.pem') - ..usePrivateKey('path/to/my_key.pem', password: 'key_password') - ..setClientAuthorities('path/to/client.crt', password: 'password');*/ - //client.setProtocolV31(); - //client.secure = true; - //client.securityContext = context; - - final connMessage = MqttConnectMessage() - .authenticateAs('thomas', 'MyCore,1') // TODO ONLINE - /*.keepAliveFor(60) - .withWillTopic('willtopic') - .withWillMessage('Will message')*/ - .withClientIdentifier("TESSST") - .startClean(); - //.withWillQos(MqttQos.atLeastOnce); - //client.secure = true; - client.connectionMessage = connMessage; - client.autoReconnect = true; - try { - await client.connect(); - } catch (e) { - print('Exception: $e'); - client.disconnect(); - } - - client.subscribe("#", MqttQos.atLeastOnce); - - return client; - return null; - }*/ - @override Widget build(BuildContext context) { final appContext = Provider.of(context); + HomieAppContext homieAppContext = appContext.getContext(); // TODO something if null + final MqttServerClient client = homieAppContext.clientMQTT; // TODO Add switch button or check online connexion if local broker available + //homieAppContext.clientMQTT = new MqttServerClient(homieAppContext.host.replaceAll('http://', ''),'my_homie_app_'+ Uuid().v1()); + Size size = MediaQuery.of(context).size; if (!MQTTHelper.instance.isInstantiated) @@ -139,8 +50,6 @@ class _MainPageState extends State { MQTTHelper.instance.connect(appContext); } - HomieAppContext homieAppContext = appContext.getContext(); - return ChangeNotifierProvider( create: (_) => Index(0, appContext.getContext()), child: Scaffold( @@ -188,7 +97,7 @@ class _MainPageState extends State { floatingActionButton: FloatingActionButton( backgroundColor: kMainColor, onPressed: () { - var message = { + /* var message = { "userId": homieAppContext.userId, "width": size.width, "height": size.height, @@ -211,15 +120,10 @@ class _MainPageState extends State { builder2.addString(jsonEncode(message2)); + print("Send request"); + 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), ), diff --git a/lib/constants.dart b/lib/constants.dart index 4661745..5e2c04b 100644 --- a/lib/constants.dart +++ b/lib/constants.dart @@ -6,6 +6,12 @@ const kTitleTextColor = Color(0xFF303030); const kBodyTextColor = Color(0xFF4B4B4B); // TODO const kTextLightColor = Color(0xFFCED5DF); // #ced5df +const kBackgroundLight = Color(0xfff3f3f3); +const kBackgroundSecondGrey = Color(0xFF5b5b63); + +const kDetailSize = 20.0; +const kDescriptionDetailSize = 15.0; + const kMainColor = Color(0xFF308aae); /* const kTextStyle = TextStyle( diff --git a/lib/main.dart b/lib/main.dart index 63997db..83b8041 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -20,7 +20,8 @@ void main() async { if(localContext != null) { print("we've got an local db !"); localContext.clientAPI = new Client(localContext.host); // TODO "http://192.168.31.140" - isLogged = localContext.token != null; // TODO refresh token.. + //isLogged = localContext.token != null; // TODO refresh token.. + isLogged = false; print(localContext); } else { print("NO LOCAL DB !"); diff --git a/mycore_api/.openapi-generator/FILES b/mycore_api/.openapi-generator/FILES index 597c08c..c409ccc 100644 --- a/mycore_api/.openapi-generator/FILES +++ b/mycore_api/.openapi-generator/FILES @@ -208,9 +208,3 @@ lib/model/user_info.dart lib/model/user_info_detail_dto.dart lib/model/view_by.dart pubspec.yaml -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 c87ce65..6aff251 100644 --- a/mycore_api/README.md +++ b/mycore_api/README.md @@ -56,7 +56,7 @@ try { ## Documentation for API Endpoints -All URIs are relative to *https://localhost:5001* +All URIs are relative to *http://localhost:5000* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- @@ -127,9 +127,10 @@ Class | Method | HTTP request | Description *ProviderApi* | [**providerDelete**](doc\/ProviderApi.md#providerdelete) | **DELETE** /api/provider/{providerId} | Delete a provider *ProviderApi* | [**providerGetAll**](doc\/ProviderApi.md#providergetall) | **GET** /api/provider/{homeId} | Get all home providers *ProviderApi* | [**providerUpdate**](doc\/ProviderApi.md#providerupdate) | **PUT** /api/provider | Update a provider +*RoomApi* | [**roomAddDeviceToRoom**](doc\/RoomApi.md#roomadddevicetoroom) | **PUT** /api/room/{roomId} | Add devices in the specified room *RoomApi* | [**roomCreate**](doc\/RoomApi.md#roomcreate) | **POST** /api/room | Create a room -*RoomApi* | [**roomDelete**](doc\/RoomApi.md#roomdelete) | **DELETE** /api/room/{roomId}/device/{deviceId} | Delete device from a room -*RoomApi* | [**roomDelete2**](doc\/RoomApi.md#roomdelete2) | **DELETE** /api/room/{roomId} | Delete a room +*RoomApi* | [**roomDelete**](doc\/RoomApi.md#roomdelete) | **DELETE** /api/room/{roomId} | Delete a room +*RoomApi* | [**roomDelete2**](doc\/RoomApi.md#roomdelete2) | **DELETE** /api/room/{roomId}/device/{deviceId} | Delete device from 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 diff --git a/mycore_api/doc/AlarmApi.md b/mycore_api/doc/AlarmApi.md index 9e210a0..ee0b71f 100644 --- a/mycore_api/doc/AlarmApi.md +++ b/mycore_api/doc/AlarmApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *https://localhost:5001* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/AuthenticationApi.md b/mycore_api/doc/AuthenticationApi.md index 8b1c3ff..b996c89 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 *https://localhost:5001* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/AutomationApi.md b/mycore_api/doc/AutomationApi.md index 2d1afeb..7912e8a 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 *https://localhost:5001* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/AzureApi.md b/mycore_api/doc/AzureApi.md index 4c13570..77b096d 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 *https://localhost:5001* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/BooksApi.md b/mycore_api/doc/BooksApi.md index 601d744..6bdff46 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 *https://localhost:5001* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/DeviceApi.md b/mycore_api/doc/DeviceApi.md index 4058b43..b9dae3e 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 *https://localhost:5001* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/EnergyApi.md b/mycore_api/doc/EnergyApi.md index f11f992..add8f51 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 *https://localhost:5001* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/EventApi.md b/mycore_api/doc/EventApi.md index 5c0027b..c386fb6 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 *https://localhost:5001* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/FacebookApi.md b/mycore_api/doc/FacebookApi.md index c14398f..d33af2a 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 *https://localhost:5001* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/GoogleApi.md b/mycore_api/doc/GoogleApi.md index b94adba..039ee0f 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 *https://localhost:5001* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/GroupApi.md b/mycore_api/doc/GroupApi.md index 9d6df3f..194bb41 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 *https://localhost:5001* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/HomeApi.md b/mycore_api/doc/HomeApi.md index bbe529b..5fa3b15 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 *https://localhost:5001* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/IOTApi.md b/mycore_api/doc/IOTApi.md index 894c188..2ab1ec2 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 *https://localhost:5001* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/LayoutApi.md b/mycore_api/doc/LayoutApi.md index 420a66c..5435092 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 *https://localhost:5001* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/MQTTApi.md b/mycore_api/doc/MQTTApi.md index ab16e20..0e31849 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 *https://localhost:5001* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/OddApi.md b/mycore_api/doc/OddApi.md index 182c6c1..f30b595 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 *https://localhost:5001* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/ProviderApi.md b/mycore_api/doc/ProviderApi.md index bcb4dd6..e9716f1 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 *https://localhost:5001* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/RoomApi.md b/mycore_api/doc/RoomApi.md index 3969394..ad72908 100644 --- a/mycore_api/doc/RoomApi.md +++ b/mycore_api/doc/RoomApi.md @@ -5,13 +5,14 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *https://localhost:5001* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- +[**roomAddDeviceToRoom**](RoomApi.md#roomadddevicetoroom) | **PUT** /api/room/{roomId} | Add devices in the specified room [**roomCreate**](RoomApi.md#roomcreate) | **POST** /api/room | Create a room -[**roomDelete**](RoomApi.md#roomdelete) | **DELETE** /api/room/{roomId}/device/{deviceId} | Delete device from a room -[**roomDelete2**](RoomApi.md#roomdelete2) | **DELETE** /api/room/{roomId} | Delete a room +[**roomDelete**](RoomApi.md#roomdelete) | **DELETE** /api/room/{roomId} | Delete a room +[**roomDelete2**](RoomApi.md#roomdelete2) | **DELETE** /api/room/{roomId}/device/{deviceId} | Delete device from 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 @@ -19,6 +20,51 @@ Method | HTTP request | Description [**roomUpdate**](RoomApi.md#roomupdate) | **PUT** /api/room | Update a room +# **roomAddDeviceToRoom** +> RoomDetailDTO roomAddDeviceToRoom(roomId, requestBody) + +Add devices in the specified room + +### 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 roomId = roomId_example; // String | Room Id +final requestBody = [List()]; // List | Device Ids + +try { + final result = api_instance.roomAddDeviceToRoom(roomId, requestBody); + print(result); +} catch (e) { + print('Exception when calling RoomApi->roomAddDeviceToRoom: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **roomId** | **String**| Room Id | + **requestBody** | [**List**](String.md)| Device Ids | + +### Return type + +[**RoomDetailDTO**](RoomDetailDTO.md) + +### 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) + # **roomCreate** > RoomDetailDTO roomCreate(roomCreateOrUpdateDetailDTO) @@ -63,9 +109,9 @@ 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) # **roomDelete** -> String roomDelete(deviceId, roomId) +> String roomDelete(roomId) -Delete device from a room +Delete a room ### Example ```dart @@ -74,11 +120,10 @@ import 'package:mycoreapi/api.dart'; //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = RoomApi(); -final deviceId = deviceId_example; // String | Id of device to delete from the room final roomId = roomId_example; // String | Id of room try { - final result = api_instance.roomDelete(deviceId, roomId); + final result = api_instance.roomDelete(roomId); print(result); } catch (e) { print('Exception when calling RoomApi->roomDelete: $e\n'); @@ -89,7 +134,6 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **deviceId** | **String**| Id of device to delete from the room | **roomId** | **String**| Id of room | ### Return type @@ -108,9 +152,9 @@ 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) # **roomDelete2** -> String roomDelete2(roomId) +> String roomDelete2(deviceId, roomId) -Delete a room +Delete device from a room ### Example ```dart @@ -119,10 +163,11 @@ import 'package:mycoreapi/api.dart'; //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = RoomApi(); +final deviceId = deviceId_example; // String | Id of device to delete from the room final roomId = roomId_example; // String | Id of room try { - final result = api_instance.roomDelete2(roomId); + final result = api_instance.roomDelete2(deviceId, roomId); print(result); } catch (e) { print('Exception when calling RoomApi->roomDelete2: $e\n'); @@ -133,6 +178,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **deviceId** | **String**| Id of device to delete from the room | **roomId** | **String**| Id of room | ### Return type diff --git a/mycore_api/doc/RoomMainDetailDTO.md b/mycore_api/doc/RoomMainDetailDTO.md index 7f1ce26..7a28efe 100644 --- a/mycore_api/doc/RoomMainDetailDTO.md +++ b/mycore_api/doc/RoomMainDetailDTO.md @@ -13,6 +13,14 @@ Name | Type | Description | Notes **name** | **String** | | [optional] **createdDate** | [**DateTime**](DateTime.md) | | [optional] **updatedDate** | [**DateTime**](DateTime.md) | | [optional] +**isTemperature** | **bool** | | [optional] +**temperature** | **String** | | [optional] +**isHumidity** | **bool** | | [optional] +**humidity** | **String** | | [optional] +**isMotion** | **bool** | | [optional] +**motion** | **bool** | | [optional] +**isDoor** | **bool** | | [optional] +**door** | **bool** | | [optional] **environmentalDevices** | [**List**](DeviceDetailDTO.md) | | [optional] [default to const []] **securityDevices** | [**List**](DeviceDetailDTO.md) | | [optional] [default to const []] diff --git a/mycore_api/doc/RoomMainDetailDTOAllOf.md b/mycore_api/doc/RoomMainDetailDTOAllOf.md index c1cb2b9..8dc495c 100644 --- a/mycore_api/doc/RoomMainDetailDTOAllOf.md +++ b/mycore_api/doc/RoomMainDetailDTOAllOf.md @@ -10,6 +10,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **createdDate** | [**DateTime**](DateTime.md) | | [optional] **updatedDate** | [**DateTime**](DateTime.md) | | [optional] +**isTemperature** | **bool** | | [optional] +**temperature** | **String** | | [optional] +**isHumidity** | **bool** | | [optional] +**humidity** | **String** | | [optional] +**isMotion** | **bool** | | [optional] +**motion** | **bool** | | [optional] +**isDoor** | **bool** | | [optional] +**door** | **bool** | | [optional] **environmentalDevices** | [**List**](DeviceDetailDTO.md) | | [optional] [default to const []] **securityDevices** | [**List**](DeviceDetailDTO.md) | | [optional] [default to const []] diff --git a/mycore_api/doc/ScreenDeviceApi.md b/mycore_api/doc/ScreenDeviceApi.md index 96323a5..314565c 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 *https://localhost:5001* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/TokenApi.md b/mycore_api/doc/TokenApi.md index ec16fd5..9c8a82c 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 *https://localhost:5001* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/TwitterApi.md b/mycore_api/doc/TwitterApi.md index 968e67e..11050d6 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 *https://localhost:5001* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/UserApi.md b/mycore_api/doc/UserApi.md index 35f23a4..89f2c7a 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 *https://localhost:5001* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/ValuesApi.md b/mycore_api/doc/ValuesApi.md index 8487496..416a89c 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 *https://localhost:5001* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/lib/api/room_api.dart b/mycore_api/lib/api/room_api.dart index 55c6ad8..db5c5a2 100644 --- a/mycore_api/lib/api/room_api.dart +++ b/mycore_api/lib/api/room_api.dart @@ -15,6 +15,86 @@ class RoomApi { final ApiClient apiClient; + /// Add devices in the specified room + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] roomId (required): + /// Room Id + /// + /// * [List] requestBody (required): + /// Device Ids + Future roomAddDeviceToRoomWithHttpInfo(String roomId, List requestBody) async { + // Verify required params are set. + if (roomId == null) { + throw ApiException(HttpStatus.badRequest, 'Missing required param: roomId'); + } + if (requestBody == null) { + throw ApiException(HttpStatus.badRequest, 'Missing required param: requestBody'); + } + + final path = r'/api/room/{roomId}' + .replaceAll('{' + 'roomId' + '}', roomId.toString()); + + Object postBody = requestBody; + + 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, + 'PUT', + queryParams, + postBody, + headerParams, + formParams, + nullableContentType, + authNames, + ); + } + + /// Add devices in the specified room + /// + /// Parameters: + /// + /// * [String] roomId (required): + /// Room Id + /// + /// * [List] requestBody (required): + /// Device Ids + Future roomAddDeviceToRoom(String roomId, List requestBody) async { + final response = await roomAddDeviceToRoomWithHttpInfo(roomId, requestBody); + 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), 'RoomDetailDTO') as RoomDetailDTO; + } + return Future.value(null); + } + /// Create a room /// /// Note: This method returns the HTTP [Response]. @@ -85,6 +165,77 @@ class RoomApi { return Future.value(null); } + /// Delete a room + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] roomId (required): + /// Id of room + Future roomDeleteWithHttpInfo(String roomId) async { + // Verify required params are set. + if (roomId == null) { + throw ApiException(HttpStatus.badRequest, 'Missing required param: roomId'); + } + + final path = r'/api/room/{roomId}' + .replaceAll('{' + 'roomId' + '}', roomId.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, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + nullableContentType, + authNames, + ); + } + + /// Delete a room + /// + /// Parameters: + /// + /// * [String] roomId (required): + /// Id of room + Future roomDelete(String roomId) async { + final response = await roomDeleteWithHttpInfo(roomId); + 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); + } + /// Delete device from a room /// /// Note: This method returns the HTTP [Response]. @@ -96,7 +247,7 @@ class RoomApi { /// /// * [String] roomId (required): /// Id of room - Future roomDeleteWithHttpInfo(String deviceId, String roomId) async { + Future roomDelete2WithHttpInfo(String deviceId, String roomId) async { // Verify required params are set. if (deviceId == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: deviceId'); @@ -152,79 +303,8 @@ class RoomApi { /// /// * [String] roomId (required): /// Id of room - Future roomDelete(String deviceId, String roomId) async { - final response = await roomDeleteWithHttpInfo(deviceId, roomId); - 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); - } - - /// Delete a room - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] roomId (required): - /// Id of room - Future roomDelete2WithHttpInfo(String roomId) async { - // Verify required params are set. - if (roomId == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: roomId'); - } - - final path = r'/api/room/{roomId}' - .replaceAll('{' + 'roomId' + '}', roomId.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, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Delete a room - /// - /// Parameters: - /// - /// * [String] roomId (required): - /// Id of room - Future roomDelete2(String roomId) async { - final response = await roomDelete2WithHttpInfo(roomId); + Future roomDelete2(String deviceId, String roomId) async { + final response = await roomDelete2WithHttpInfo(deviceId, roomId); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); } diff --git a/mycore_api/lib/api_client.dart b/mycore_api/lib/api_client.dart index a20703d..584293b 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 = 'https://localhost:5001'}) { + ApiClient({this.basePath = 'http://localhost:5000'}) { // Setup authentications (key: authentication name, value: authentication). _authentications[r'bearer'] = OAuth(); } diff --git a/mycore_api/lib/model/room_main_detail_dto.dart b/mycore_api/lib/model/room_main_detail_dto.dart index ec85dd9..2a98d46 100644 --- a/mycore_api/lib/model/room_main_detail_dto.dart +++ b/mycore_api/lib/model/room_main_detail_dto.dart @@ -17,6 +17,14 @@ class RoomMainDetailDTO { this.name, this.createdDate, this.updatedDate, + this.isTemperature, + this.temperature, + this.isHumidity, + this.humidity, + this.isMotion, + this.motion, + this.isDoor, + this.door, this.environmentalDevices, this.securityDevices, }); @@ -31,6 +39,22 @@ class RoomMainDetailDTO { DateTime updatedDate; + bool isTemperature; + + String temperature; + + bool isHumidity; + + String humidity; + + bool isMotion; + + bool motion; + + bool isDoor; + + bool door; + List environmentalDevices; List securityDevices; @@ -42,6 +66,14 @@ class RoomMainDetailDTO { other.name == name && other.createdDate == createdDate && other.updatedDate == updatedDate && + other.isTemperature == isTemperature && + other.temperature == temperature && + other.isHumidity == isHumidity && + other.humidity == humidity && + other.isMotion == isMotion && + other.motion == motion && + other.isDoor == isDoor && + other.door == door && other.environmentalDevices == environmentalDevices && other.securityDevices == securityDevices; @@ -52,11 +84,19 @@ class RoomMainDetailDTO { (name == null ? 0 : name.hashCode) + (createdDate == null ? 0 : createdDate.hashCode) + (updatedDate == null ? 0 : updatedDate.hashCode) + + (isTemperature == null ? 0 : isTemperature.hashCode) + + (temperature == null ? 0 : temperature.hashCode) + + (isHumidity == null ? 0 : isHumidity.hashCode) + + (humidity == null ? 0 : humidity.hashCode) + + (isMotion == null ? 0 : isMotion.hashCode) + + (motion == null ? 0 : motion.hashCode) + + (isDoor == null ? 0 : isDoor.hashCode) + + (door == null ? 0 : door.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]'; + String toString() => 'RoomMainDetailDTO[id=$id, homeId=$homeId, name=$name, createdDate=$createdDate, updatedDate=$updatedDate, isTemperature=$isTemperature, temperature=$temperature, isHumidity=$isHumidity, humidity=$humidity, isMotion=$isMotion, motion=$motion, isDoor=$isDoor, door=$door, environmentalDevices=$environmentalDevices, securityDevices=$securityDevices]'; Map toJson() { final json = {}; @@ -75,6 +115,30 @@ class RoomMainDetailDTO { if (updatedDate != null) { json[r'updatedDate'] = updatedDate.toUtc().toIso8601String(); } + if (isTemperature != null) { + json[r'isTemperature'] = isTemperature; + } + if (temperature != null) { + json[r'temperature'] = temperature; + } + if (isHumidity != null) { + json[r'isHumidity'] = isHumidity; + } + if (humidity != null) { + json[r'humidity'] = humidity; + } + if (isMotion != null) { + json[r'isMotion'] = isMotion; + } + if (motion != null) { + json[r'motion'] = motion; + } + if (isDoor != null) { + json[r'isDoor'] = isDoor; + } + if (door != null) { + json[r'door'] = door; + } if (environmentalDevices != null) { json[r'environmentalDevices'] = environmentalDevices; } @@ -98,6 +162,14 @@ class RoomMainDetailDTO { updatedDate: json[r'updatedDate'] == null ? null : DateTime.parse(json[r'updatedDate']), + isTemperature: json[r'isTemperature'], + temperature: json[r'temperature'], + isHumidity: json[r'isHumidity'], + humidity: json[r'humidity'], + isMotion: json[r'isMotion'], + motion: json[r'motion'], + isDoor: json[r'isDoor'], + door: json[r'door'], environmentalDevices: DeviceDetailDTO.listFromJson(json[r'environmentalDevices']), securityDevices: DeviceDetailDTO.listFromJson(json[r'securityDevices']), ); 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 index bebb534..2176246 100644 --- a/mycore_api/lib/model/room_main_detail_dto_all_of.dart +++ b/mycore_api/lib/model/room_main_detail_dto_all_of.dart @@ -14,6 +14,14 @@ class RoomMainDetailDTOAllOf { RoomMainDetailDTOAllOf({ this.createdDate, this.updatedDate, + this.isTemperature, + this.temperature, + this.isHumidity, + this.humidity, + this.isMotion, + this.motion, + this.isDoor, + this.door, this.environmentalDevices, this.securityDevices, }); @@ -22,6 +30,22 @@ class RoomMainDetailDTOAllOf { DateTime updatedDate; + bool isTemperature; + + String temperature; + + bool isHumidity; + + String humidity; + + bool isMotion; + + bool motion; + + bool isDoor; + + bool door; + List environmentalDevices; List securityDevices; @@ -30,6 +54,14 @@ class RoomMainDetailDTOAllOf { bool operator ==(Object other) => identical(this, other) || other is RoomMainDetailDTOAllOf && other.createdDate == createdDate && other.updatedDate == updatedDate && + other.isTemperature == isTemperature && + other.temperature == temperature && + other.isHumidity == isHumidity && + other.humidity == humidity && + other.isMotion == isMotion && + other.motion == motion && + other.isDoor == isDoor && + other.door == door && other.environmentalDevices == environmentalDevices && other.securityDevices == securityDevices; @@ -37,11 +69,19 @@ class RoomMainDetailDTOAllOf { int get hashCode => (createdDate == null ? 0 : createdDate.hashCode) + (updatedDate == null ? 0 : updatedDate.hashCode) + + (isTemperature == null ? 0 : isTemperature.hashCode) + + (temperature == null ? 0 : temperature.hashCode) + + (isHumidity == null ? 0 : isHumidity.hashCode) + + (humidity == null ? 0 : humidity.hashCode) + + (isMotion == null ? 0 : isMotion.hashCode) + + (motion == null ? 0 : motion.hashCode) + + (isDoor == null ? 0 : isDoor.hashCode) + + (door == null ? 0 : door.hashCode) + (environmentalDevices == null ? 0 : environmentalDevices.hashCode) + (securityDevices == null ? 0 : securityDevices.hashCode); @override - String toString() => 'RoomMainDetailDTOAllOf[createdDate=$createdDate, updatedDate=$updatedDate, environmentalDevices=$environmentalDevices, securityDevices=$securityDevices]'; + String toString() => 'RoomMainDetailDTOAllOf[createdDate=$createdDate, updatedDate=$updatedDate, isTemperature=$isTemperature, temperature=$temperature, isHumidity=$isHumidity, humidity=$humidity, isMotion=$isMotion, motion=$motion, isDoor=$isDoor, door=$door, environmentalDevices=$environmentalDevices, securityDevices=$securityDevices]'; Map toJson() { final json = {}; @@ -51,6 +91,30 @@ class RoomMainDetailDTOAllOf { if (updatedDate != null) { json[r'updatedDate'] = updatedDate.toUtc().toIso8601String(); } + if (isTemperature != null) { + json[r'isTemperature'] = isTemperature; + } + if (temperature != null) { + json[r'temperature'] = temperature; + } + if (isHumidity != null) { + json[r'isHumidity'] = isHumidity; + } + if (humidity != null) { + json[r'humidity'] = humidity; + } + if (isMotion != null) { + json[r'isMotion'] = isMotion; + } + if (motion != null) { + json[r'motion'] = motion; + } + if (isDoor != null) { + json[r'isDoor'] = isDoor; + } + if (door != null) { + json[r'door'] = door; + } if (environmentalDevices != null) { json[r'environmentalDevices'] = environmentalDevices; } @@ -71,6 +135,14 @@ class RoomMainDetailDTOAllOf { updatedDate: json[r'updatedDate'] == null ? null : DateTime.parse(json[r'updatedDate']), + isTemperature: json[r'isTemperature'], + temperature: json[r'temperature'], + isHumidity: json[r'isHumidity'], + humidity: json[r'humidity'], + isMotion: json[r'isMotion'], + motion: json[r'motion'], + isDoor: json[r'isDoor'], + door: json[r'door'], environmentalDevices: DeviceDetailDTO.listFromJson(json[r'environmentalDevices']), securityDevices: DeviceDetailDTO.listFromJson(json[r'securityDevices']), ); diff --git a/mycore_api/swagger.yaml b/mycore_api/swagger.yaml index 49d6cf4..f4bdebb 100644 --- a/mycore_api/swagger.yaml +++ b/mycore_api/swagger.yaml @@ -1,7604 +1,4888 @@ -{ - "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 +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://localhost:5000 +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}: + put: + tags: + - Room + summary: Add devices in the specified room + operationId: Room_AddDeviceToRoom + parameters: + - name: roomId + in: path + required: true + description: Room Id + schema: + type: string + nullable: true + x-position: 1 + requestBody: + x-name: deviceIds + description: Device Ids + content: + application/json: + schema: + type: array + items: + type: string + required: true + x-position: 2 + 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: [] + delete: + tags: + - Room + summary: Delete a room + operationId: Room_Delete + 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/{roomId}/device/{deviceId}: + delete: + tags: + - Room + summary: Delete device from a room + operationId: Room_Delete2 + 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/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 + isTemperature: + type: boolean + temperature: + type: string + nullable: true + isHumidity: + type: boolean + humidity: + type: string + nullable: true + isMotion: + type: boolean + motion: + type: boolean + nullable: true + isDoor: + type: boolean + door: + type: boolean + nullable: true + 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 diff --git a/mycore_api/swagger.yaml.bak b/mycore_api/swagger.yaml.bak index fb96382..49d6cf4 100644 --- a/mycore_api/swagger.yaml.bak +++ b/mycore_api/swagger.yaml.bak @@ -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