From b210e5d11266bd11b98a193790fe39cb1ba2e1a6 Mon Sep 17 00:00:00 2001 From: Thomas Fransolet Date: Tue, 30 Mar 2021 19:13:44 +0200 Subject: [PATCH] MyCore api Service code generation ! + small test --- .gradle/5.2.1/fileChanges/last-build.bin | Bin 0 -> 1 bytes .gradle/5.2.1/fileHashes/fileHashes.lock | Bin 0 -> 17 bytes .gradle/5.2.1/gc.properties | 0 .../buildOutputCleanup.lock | Bin 0 -> 17 bytes .gradle/buildOutputCleanup/cache.properties | 2 + .gradle/vcs-1/gc.properties | 0 api/src/main/ressources/swagger.yaml | 3021 ----------------- lib/main.dart | 10 +- mycore_api/.openapi-generator/FILES | 93 +- mycore_api/README.md | 39 +- mycore_api/doc/Action.md | 2 +- mycore_api/doc/AuthenticationApi.md | 10 +- mycore_api/doc/Automation.md | 1 + mycore_api/doc/AutomationApi.md | 22 +- .../doc/AutomationCreateOrUpdateDetailDTO.md | 1 + mycore_api/doc/AutomationDTO.md | 1 + mycore_api/doc/AutomationDetailDTO.md | 1 + mycore_api/doc/AutomationState.md | 16 + mycore_api/doc/AzureApi.md | 2 +- mycore_api/doc/BooksApi.md | 2 +- mycore_api/doc/Condition.md | 2 +- mycore_api/doc/Device.md | 2 +- mycore_api/doc/DeviceApi.md | 24 +- mycore_api/doc/DeviceDetailDTO.md | 4 +- mycore_api/doc/DeviceDetailDTOAllOf.md | 2 +- mycore_api/doc/DeviceSummaryDTO.md | 2 +- mycore_api/doc/EnergyApi.md | 2 +- mycore_api/doc/FacebookApi.md | 2 +- mycore_api/doc/GoogleApi.md | 2 +- mycore_api/doc/GroupApi.md | 26 +- mycore_api/doc/IOTApi.md | 2 +- mycore_api/doc/LayoutApi.md | 2 +- mycore_api/doc/MQTTApi.md | 2 +- mycore_api/doc/OddApi.md | 2 +- mycore_api/doc/OddNice.md | 2 +- mycore_api/doc/OddObject.md | 17 + mycore_api/doc/PlaceDTO.md | 16 + mycore_api/doc/ProviderApi.md | 12 +- mycore_api/doc/RoomApi.md | 24 +- mycore_api/doc/ScreenConfiguration.md | 2 +- mycore_api/doc/ScreenDeviceApi.md | 56 +- mycore_api/doc/ScreenWidget.md | 27 + mycore_api/doc/TokenApi.md | 10 +- mycore_api/doc/TokenDTO.md | 20 + mycore_api/doc/TwitterApi.md | 2 +- mycore_api/doc/UserApi.md | 124 +- mycore_api/doc/ValuesApi.md | 2 +- mycore_api/lib/api.dart | 9 +- mycore_api/lib/api/authentication_api.dart | 12 +- mycore_api/lib/api/automation_api.dart | 21 +- mycore_api/lib/api/device_api.dart | 22 +- mycore_api/lib/api/group_api.dart | 34 +- mycore_api/lib/api/provider_api.dart | 8 +- mycore_api/lib/api/room_api.dart | 22 +- mycore_api/lib/api/screen_device_api.dart | 71 +- mycore_api/lib/api/token_api.dart | 9 +- mycore_api/lib/api/user_api.dart | 151 +- mycore_api/lib/api_client.dart | 22 +- mycore_api/lib/model/action.dart | 4 +- mycore_api/lib/model/automation.dart | 11 +- ...utomation_create_or_update_detail_dto.dart | 11 +- .../lib/model/automation_detail_dto.dart | 11 +- mycore_api/lib/model/automation_dto.dart | 11 +- mycore_api/lib/model/automation_state.dart | 80 + mycore_api/lib/model/condition.dart | 3 +- mycore_api/lib/model/device.dart | 3 +- mycore_api/lib/model/device_detail_dto.dart | 14 +- .../lib/model/device_detail_dto_all_of.dart | 3 +- mycore_api/lib/model/device_summary_dto.dart | 11 +- mycore_api/lib/model/odd_nice.dart | 15 +- .../model/{odd_h2_h.dart => odd_object.dart} | 36 +- mycore_api/lib/model/place_dto.dart | 80 + .../lib/model/screen_configuration.dart | 4 +- .../model/{widget.dart => screen_widget.dart} | 36 +- mycore_api/lib/model/state.dart | 80 - mycore_api/lib/model/token_dto.dart | 118 + mycore_api/swagger.yaml | 1249 +++++-- mycore_api/test/automation_state_test.dart | 31 + mycore_api/test/odd_object_test.dart | 36 + mycore_api/test/place_dto_test.dart | 31 + mycore_api/test/screen_widget_test.dart | 86 + mycore_api/test/token_dto_test.dart | 51 + pubspec.lock | 315 -- 83 files changed, 2186 insertions(+), 4138 deletions(-) create mode 100644 .gradle/5.2.1/fileChanges/last-build.bin create mode 100644 .gradle/5.2.1/fileHashes/fileHashes.lock create mode 100644 .gradle/5.2.1/gc.properties create mode 100644 .gradle/buildOutputCleanup/buildOutputCleanup.lock create mode 100644 .gradle/buildOutputCleanup/cache.properties create mode 100644 .gradle/vcs-1/gc.properties delete mode 100644 api/src/main/ressources/swagger.yaml create mode 100644 mycore_api/doc/AutomationState.md create mode 100644 mycore_api/doc/OddObject.md create mode 100644 mycore_api/doc/PlaceDTO.md create mode 100644 mycore_api/doc/ScreenWidget.md create mode 100644 mycore_api/doc/TokenDTO.md create mode 100644 mycore_api/lib/model/automation_state.dart rename mycore_api/lib/model/{odd_h2_h.dart => odd_object.dart} (56%) create mode 100644 mycore_api/lib/model/place_dto.dart rename mycore_api/lib/model/{widget.dart => screen_widget.dart} (72%) delete mode 100644 mycore_api/lib/model/state.dart create mode 100644 mycore_api/lib/model/token_dto.dart create mode 100644 mycore_api/test/automation_state_test.dart create mode 100644 mycore_api/test/odd_object_test.dart create mode 100644 mycore_api/test/place_dto_test.dart create mode 100644 mycore_api/test/screen_widget_test.dart create mode 100644 mycore_api/test/token_dto_test.dart diff --git a/.gradle/5.2.1/fileChanges/last-build.bin b/.gradle/5.2.1/fileChanges/last-build.bin new file mode 100644 index 0000000000000000000000000000000000000000..f76dd238ade08917e6712764a16a22005a50573d GIT binary patch literal 1 IcmZPo000310RR91 literal 0 HcmV?d00001 diff --git a/.gradle/5.2.1/fileHashes/fileHashes.lock b/.gradle/5.2.1/fileHashes/fileHashes.lock new file mode 100644 index 0000000000000000000000000000000000000000..6361a0d60b97481970ce8c270c5c29ccbfb26b63 GIT binary patch literal 17 TcmZRsxVVwIBqx6k0~7!NF}?%r literal 0 HcmV?d00001 diff --git a/.gradle/5.2.1/gc.properties b/.gradle/5.2.1/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 0000000000000000000000000000000000000000..05cf76e413e20bcdc93a172a968addb6af430f20 GIT binary patch literal 17 UcmZQR6j1Cx^|oLY0|YPv05H1))Bpeg literal 0 HcmV?d00001 diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 0000000..4cf0543 --- /dev/null +++ b/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Tue Mar 30 18:31:38 CEST 2021 +gradle.version=5.2.1 diff --git a/.gradle/vcs-1/gc.properties b/.gradle/vcs-1/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/api/src/main/ressources/swagger.yaml b/api/src/main/ressources/swagger.yaml deleted file mode 100644 index b6e83e3..0000000 --- a/api/src/main/ressources/swagger.yaml +++ /dev/null @@ -1,3021 +0,0 @@ -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/{userId}': - get: - tags: - - Device - summary: Get all devices summary - operationId: Device_GetAll - parameters: - - name: userId - in: path - required: true - description: Id of user - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/DeviceSummaryDTO' - 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' - security: - - bearer: [] - '/api/device/{userId}/type/{type}': - get: - tags: - - Device - summary: Get list of devices from a type - operationId: Device_GetDevicesByType - parameters: - - name: userId - in: path - required: true - description: user 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' - 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' - security: - - bearer: [] - '/api/device/{userId}/fromProvider/{providerId}': - post: - tags: - - Device - summary: Create devices from provider - operationId: Device_CreateDevicesFromProvider - parameters: - - name: userId - in: path - required: true - description: User 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' - security: - - bearer: [] - get: - tags: - - Device - summary: Get devices from provider - operationId: Device_GetDevicesFromProvider - parameters: - - name: userId - in: path - required: true - description: User 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' - security: - - bearer: [] - delete: - tags: - - Device - summary: Delete devices from provider - operationId: Device_DeleteDevicesFromProvider - parameters: - - name: userId - in: path - required: true - description: User 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/octet-stream: - schema: - type: string - format: binary - security: - - bearer: [] - '/api/device/zigbee2Mqtt/{userId}': - get: - tags: - - Device - summary: Get all zigbee2Mqtt devices - operationId: Device_GetDevicesFromZigbee2Mqtt - 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/DeviceDetailDTO' - 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' - 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: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - security: - - bearer: [] - '/api/device/user/{userId}': - delete: - tags: - - Device - summary: Delete all device for a specified - operationId: Device_DeleteAllForUser - parameters: - - name: userId - in: path - required: true - description: Id of user - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - security: - - bearer: [] - /api/energy/electricity: - get: - tags: - - Energy - summary: Get summary production of Kwh/Year - operationId: Energy_GetElectricityProduction - parameters: - - name: userId - 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' - '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/{userId}': - get: - tags: - - Provider - summary: 'Get all user providers ' - operationId: Provider_GetAll - parameters: - - name: userId - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ProviderDTO' - 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' - 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' - 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: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - security: - - bearer: [] - /api/device/screen: - get: - tags: - - ScreenDevice - operationId: ScreenDevice_GetAllScreenDevices - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ScreenDevice' - security: - - bearer: [] - post: - tags: - - ScreenDevice - operationId: ScreenDevice_CreateDevice - requestBody: - x-name: screenDevice - content: - application/json: - schema: - $ref: '#/components/schemas/ScreenDevice' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - security: - - bearer: [] - '/api/device/screen/{screenDeviceId}': - get: - tags: - - ScreenDevice - 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' - security: - - bearer: [] - put: - tags: - - ScreenDevice - operationId: ScreenDevice_UpdateDevice - parameters: - - name: screenDeviceId - in: path - required: true - schema: - type: integer - format: int32 - x-position: 1 - requestBody: - x-name: screenDevice - content: - application/json: - schema: - $ref: '#/components/schemas/ScreenDevice' - required: true - x-position: 2 - responses: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - security: - - bearer: [] - '/api/device/screen/{deviceId}': - delete: - tags: - - ScreenDevice - operationId: ScreenDevice_DeleteDevice - parameters: - - name: deviceId - 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/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 - 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 - operationId: Token_ConnectUser - requestBody: - x-name: loginDTO - content: - application/json: - schema: - $ref: '#/components/schemas/LoginDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/UserInfo' - /api/user: - get: - tags: - - User - summary: 'Get a list of user ' - operationId: User_Get - responses: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - security: - - bearer: [] - post: - tags: - - User - operationId: User_CreateUser - requestBody: - x-name: newUser - content: - application/json: - schema: - $ref: '#/components/schemas/UserInfo' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/UserInfoDetailDTO' - put: - tags: - - User - operationId: User_UpdateUser - requestBody: - x-name: updatedUser - content: - application/json: - schema: - $ref: '#/components/schemas/UserInfo' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/UserInfoDetailDTO' - security: - - bearer: [] - '/api/user/{id}': - get: - tags: - - User - summary: 'Get a specific user ' - operationId: User_Get2 - 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' - security: - - bearer: [] - delete: - tags: - - User - operationId: User_DeleteUser - 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/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/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: Success - content: - application/json: - schema: - $ref: '#/components/schemas/LoginDTO' - '401': - description: Invalid credentials - content: - application/json: - schema: - type: string - '500': - description: Error - 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: Success - content: - application/json: - schema: - $ref: '#/components/schemas/LoginDTO' - '401': - description: Invalid credentials - content: - application/json: - schema: - type: string - '500': - description: Error - content: - application/json: - schema: - type: string - '/api/automation/{userId}': - get: - tags: - - Automation - summary: Get all automations for the specified user - operationId: Automation_GetAll - parameters: - - name: userId - in: path - required: true - description: Id of user - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/RoomSummaryDTO' - 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' - security: - - bearer: [] - /api/automation: - post: - tags: - - Automation - operationId: Automation_Create - requestBody: - x-name: automationCreateOrUpdateDetail - content: - application/json: - schema: - $ref: '#/components/schemas/AutomationCreateOrUpdateDetailDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/AutomationDTO' - security: - - bearer: [] - put: - tags: - - Automation - summary: Update an automation - operationId: Automation_Update - requestBody: - x-name: automationCreateOrUpdateDetail - description: automation to update - content: - application/json: - schema: - $ref: '#/components/schemas/AutomationCreateOrUpdateDetailDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/AutomationCreateOrUpdateDetailDTO' - 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: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - security: - - bearer: [] - '/api/automation/user/{userId}': - delete: - tags: - - Automation - summary: Delete all automation for a specified - operationId: Automation_DeleteAllForUser - parameters: - - name: userId - in: path - required: true - description: Id of user - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - security: - - bearer: [] - '/api/group/{userId}': - get: - tags: - - Group - summary: Get all groups for the specified user - operationId: Group_GetAll - parameters: - - name: userId - in: path - required: true - description: Id of user - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/GroupSummaryDTO' - security: - - bearer: [] - '/api/group/detail/{groupId}': - get: - tags: - - Group - summary: Get detail info of a specified group - operationId: Group_GetDetail - parameters: - - name: userId - in: query - description: user id - schema: - type: string - nullable: true - x-position: 1 - - name: groupId - in: path - required: true - description: groupid - schema: - type: string - nullable: true - x-position: 2 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/GroupDetailDTO' - security: - - bearer: [] - '/api/group/{userId}/type/{type}': - get: - tags: - - Group - summary: Get list of group from a type - operationId: Group_GetGroupsByType - parameters: - - name: userId - in: path - required: true - description: user 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' - 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' - 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' - security: - - bearer: [] - '/api/group/{userId}/fromZigbee': - post: - tags: - - Group - summary: Create groups from provider - operationId: Group_CreateDevicesFromZigbee2Mqtt - 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/GroupDetailDTO' - 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: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - 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: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - security: - - bearer: [] - '/api/group/zigbee2Mqtt/{userId}': - get: - tags: - - Group - summary: Get all zigbee2Mqtt groups - operationId: Group_GetGroupsFromZigbee2Mqtt - 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/GroupDetailDTO' - security: - - bearer: [] - '/api/group/user/{userId}': - delete: - tags: - - Group - summary: Delete all group for a specified - operationId: Group_DeleteAllForUser - parameters: - - name: userId - in: path - required: true - description: Id of user - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - security: - - bearer: [] - '/api/room/{userId}': - get: - tags: - - Room - summary: Get all rooms for the specified user - operationId: Room_GetAll - parameters: - - name: userId - in: path - required: true - description: Id of user - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/RoomSummaryDTO' - security: - - bearer: [] - '/api/room/detail/{roomId}': - get: - tags: - - Room - summary: Get detail info of a specified room - operationId: Room_GetDetail - parameters: - - name: userId - in: query - description: user id - schema: - type: string - nullable: true - x-position: 1 - - name: roomId - in: path - required: true - description: room id - schema: - type: string - nullable: true - x-position: 2 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/RoomDetailDTO' - 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' - 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' - 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: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - 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: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - security: - - bearer: [] - '/api/room/user/{userId}': - delete: - tags: - - Room - summary: Delete all room for a specified - operationId: Room_DeleteAllForUser - parameters: - - name: userId - in: path - required: true - description: Id of user - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - 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 - userId: - 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' - locationId: - type: string - nullable: true - providerId: - type: string - nullable: true - providerName: - type: string - nullable: true - location: - nullable: true - oneOf: - - $ref: '#/components/schemas/LocationDTO' - 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 - LocationDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - name: - type: string - nullable: true - 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: object - nullable: true - additionalProperties: {} - 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 - userId: - 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/OddH2H' - OddH2H: - 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: - type: string - nullable: true - userId: - 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 - 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 - 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 - automations: - type: array - nullable: true - items: - $ref: '#/components/schemas/Automation' - devices: - type: array - nullable: true - items: - $ref: '#/components/schemas/Device' - providers: - type: array - nullable: true - items: - $ref: '#/components/schemas/Provider' - groups: - type: array - nullable: true - items: - $ref: '#/components/schemas/Group' - screenConfigurationIds: - type: array - nullable: true - items: - $ref: '#/components/schemas/ScreenConfiguration' - deviceIds: - type: array - nullable: true - items: - $ref: '#/components/schemas/ScreenDevice' - Automation: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - userId: - type: string - nullable: true - name: - type: string - nullable: true - createdDate: - type: string - format: date-time - updatedDate: - type: string - format: date-time - 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 - 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 - Condition: - type: object - additionalProperties: false - properties: - deviceId: - type: string - nullable: true - state: - nullable: true - oneOf: - - $ref: '#/components/schemas/State' - startTime: - type: string - nullable: true - endTime: - type: string - nullable: true - type: - $ref: '#/components/schemas/ConditionType' - value: - $ref: '#/components/schemas/ConditionValue' - State: - type: object - additionalProperties: false - properties: - name: - type: string - nullable: true - value: - type: string - nullable: true - 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 - 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/State' - rawRequest: - type: string - nullable: true - providerId: - type: string - nullable: true - type: - $ref: '#/components/schemas/ActionType' - ActionType: - type: string - description: '' - x-enumNames: - - DELAY - - DEVICE - - HTTP - - ZIGBEE2MQTT - - MQTT - - GROUP - enum: - - DELAY - - DEVICE - - HTTP - - ZIGBEE2MQTT - - MQTT - - GROUP - Device: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - userId: - type: string - nullable: true - name: - type: string - nullable: true - description: - type: string - nullable: true - model: - type: string - nullable: true - port: - type: integer - format: int32 - firmwareVersion: - type: string - nullable: true - hardwareVersion: - type: string - nullable: true - status: - type: boolean - type: - $ref: '#/components/schemas/DeviceType' - connectionStatus: - $ref: '#/components/schemas/ConnectionStatus' - locationId: - type: string - nullable: true - 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 - lastStateDate: - type: string - format: date-time - ipAddress: - type: string - nullable: true - serviceIdentification: - type: string - nullable: true - battery: - type: boolean - batteryStatus: - type: integer - format: int32 - providerId: - type: string - nullable: true - manufacturerName: - type: string - nullable: true - groupIds: - type: array - nullable: true - items: - type: string - properties: - type: object - nullable: true - additionalProperties: {} - supportedOperations: - type: array - nullable: true - items: - type: string - Provider: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - userId: - type: string - nullable: true - name: - type: string - nullable: true - type: - type: string - nullable: true - username: - type: string - nullable: true - password: - type: string - nullable: true - endpoint: - type: string - nullable: true - apiKey: - type: string - nullable: true - value: - type: string - nullable: true - active: - type: boolean - Group: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - userId: - type: string - nullable: true - name: - type: string - nullable: true - type: - type: string - nullable: true - serviceIdentification: - type: integer - format: int32 - isAlarm: - type: boolean - createdDate: - type: string - format: date-time - updatedDate: - type: string - format: date-time - devicesIds: - type: array - nullable: true - items: - type: string - ScreenConfiguration: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - name: - type: string - nullable: true - type: - type: string - nullable: true - widgets: - type: array - nullable: true - items: - $ref: '#/components/schemas/Widget' - height: - type: integer - format: int32 - width: - type: integer - format: int32 - Widget: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - name: - type: string - nullable: true - displayName: - type: string - nullable: true - type: - type: string - nullable: true - activated: - type: boolean - form: - type: string - nullable: true - font: - type: string - nullable: true - color: - type: string - nullable: true - size: - type: string - nullable: true - width: - type: integer - format: int32 - height: - type: integer - format: int32 - positionX: - type: integer - format: int32 - positionY: - 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 - RoomSummaryDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - userId: - type: string - nullable: true - name: - type: string - nullable: true - 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 - AutomationDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - name: - type: string - nullable: true - userId: - type: string - nullable: true - createdDate: - type: string - format: date-time - updatedDate: - type: string - format: date-time - AutomationCreateOrUpdateDetailDTO: - 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' - deviceIds: - type: array - nullable: true - items: - type: string - GroupSummaryDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - userId: - 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 - 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/lib/main.dart b/lib/main.dart index 21dc5ab..64560eb 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -85,15 +85,15 @@ class _MyHomePageState extends State { void authenticateTRY() async { print("try auth.. "); - LoginDTO loginDTO = new LoginDTO(email: "test", password: "test"); - LoginDTO user = await clientAPI.authenticationApi.authenticationAuthenticateWithJson(loginDTO); + LoginDTO loginDTO = new LoginDTO(email: "test@email.be", password: "kljqsdkljqsd"); + var user2 = await clientAPI.authenticationApi.authenticationAuthenticateWithJson(loginDTO); print("USER ??"); - print(user); + print(user2); // TODO Call authenticationAuthenticateWithJson to retrieve token and set apiclient bearer token with the result - /*var user2 = await clientAPI.userApi.userGet2("604a33639b4a377a413045b9"); + var user23 = await clientAPI.userApi.userGet("604a33639b4a377a413045b9"); print("user2 values ??"); - print(user2.email);*/ + print(user23.email); } // connection succeeded diff --git a/mycore_api/.openapi-generator/FILES b/mycore_api/.openapi-generator/FILES index abba30d..16817c4 100644 --- a/mycore_api/.openapi-generator/FILES +++ b/mycore_api/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md doc/Action.md @@ -12,6 +11,7 @@ doc/AutomationCreateOrUpdateDetailDTOAllOf.md doc/AutomationDTO.md doc/AutomationDetailDTO.md doc/AutomationDetailDTOAllOf.md +doc/AutomationState.md doc/AzureADAuthModel.md doc/AzureApi.md doc/Book.md @@ -41,16 +41,16 @@ doc/GroupDetailDTOAllOf.md doc/GroupSummaryDTO.md doc/IOTApi.md doc/LayoutApi.md -doc/LocationDTO.md doc/LoginDTO.md doc/MQTTApi.md doc/MeansOfCommunication.md doc/MqttMessageDTO.md doc/OddApi.md -doc/OddH2H.md doc/OddNice.md +doc/OddObject.md doc/PanelMenuItem.md doc/PanelSection.md +doc/PlaceDTO.md doc/Provider.md doc/ProviderApi.md doc/ProviderDTO.md @@ -61,10 +61,11 @@ doc/RoomSummaryDTO.md doc/ScreenConfiguration.md doc/ScreenDevice.md doc/ScreenDeviceApi.md +doc/ScreenWidget.md doc/SmartGardenMessage.md doc/SmartPrinterMessage.md -doc/State.md doc/TokenApi.md +doc/TokenDTO.md doc/Trigger.md doc/TriggerType.md doc/TwitterApi.md @@ -75,7 +76,6 @@ doc/UserInfo.md doc/UserInfoDetailDTO.md doc/ValuesApi.md doc/ViewBy.md -doc/Widget.md git_push.sh lib/api.dart lib/api/authentication_api.dart @@ -114,6 +114,7 @@ lib/model/automation_create_or_update_detail_dto_all_of.dart lib/model/automation_detail_dto.dart lib/model/automation_detail_dto_all_of.dart lib/model/automation_dto.dart +lib/model/automation_state.dart lib/model/azure_ad_auth_model.dart lib/model/book.dart lib/model/condition.dart @@ -134,14 +135,14 @@ lib/model/group_create_or_update_detail_dto_all_of.dart lib/model/group_detail_dto.dart lib/model/group_detail_dto_all_of.dart lib/model/group_summary_dto.dart -lib/model/location_dto.dart lib/model/login_dto.dart lib/model/means_of_communication.dart lib/model/mqtt_message_dto.dart -lib/model/odd_h2_h.dart lib/model/odd_nice.dart +lib/model/odd_object.dart lib/model/panel_menu_item.dart lib/model/panel_section.dart +lib/model/place_dto.dart lib/model/provider.dart lib/model/provider_dto.dart lib/model/room_create_or_update_detail_dto.dart @@ -149,9 +150,10 @@ lib/model/room_detail_dto.dart lib/model/room_summary_dto.dart lib/model/screen_configuration.dart lib/model/screen_device.dart +lib/model/screen_widget.dart lib/model/smart_garden_message.dart lib/model/smart_printer_message.dart -lib/model/state.dart +lib/model/token_dto.dart lib/model/trigger.dart lib/model/trigger_type.dart lib/model/twitter_auth_model.dart @@ -159,79 +161,4 @@ lib/model/user.dart lib/model/user_info.dart lib/model/user_info_detail_dto.dart lib/model/view_by.dart -lib/model/widget.dart pubspec.yaml -test/action_test.dart -test/action_type_test.dart -test/authentication_api_test.dart -test/automation_api_test.dart -test/automation_create_or_update_detail_dto_all_of_test.dart -test/automation_create_or_update_detail_dto_test.dart -test/automation_detail_dto_all_of_test.dart -test/automation_detail_dto_test.dart -test/automation_dto_test.dart -test/automation_test.dart -test/azure_ad_auth_model_test.dart -test/azure_api_test.dart -test/book_test.dart -test/books_api_test.dart -test/condition_test.dart -test/condition_type_test.dart -test/condition_value_test.dart -test/connection_status_test.dart -test/device_api_test.dart -test/device_detail_dto_all_of_test.dart -test/device_detail_dto_test.dart -test/device_summary_dto_test.dart -test/device_test.dart -test/device_type_test.dart -test/electricity_production_test.dart -test/energy_api_test.dart -test/facebook_api_test.dart -test/facebook_auth_model_test.dart -test/google_api_test.dart -test/google_auth_model_test.dart -test/group_api_test.dart -test/group_create_or_update_detail_dto_all_of_test.dart -test/group_create_or_update_detail_dto_test.dart -test/group_detail_dto_all_of_test.dart -test/group_detail_dto_test.dart -test/group_summary_dto_test.dart -test/group_test.dart -test/iot_api_test.dart -test/layout_api_test.dart -test/location_dto_test.dart -test/login_dto_test.dart -test/means_of_communication_test.dart -test/mqtt_api_test.dart -test/mqtt_message_dto_test.dart -test/odd_api_test.dart -test/odd_h2_h_test.dart -test/odd_nice_test.dart -test/panel_menu_item_test.dart -test/panel_section_test.dart -test/provider_api_test.dart -test/provider_dto_test.dart -test/provider_test.dart -test/room_api_test.dart -test/room_create_or_update_detail_dto_test.dart -test/room_detail_dto_test.dart -test/room_summary_dto_test.dart -test/screen_configuration_test.dart -test/screen_device_api_test.dart -test/screen_device_test.dart -test/smart_garden_message_test.dart -test/smart_printer_message_test.dart -test/state_test.dart -test/token_api_test.dart -test/trigger_test.dart -test/trigger_type_test.dart -test/twitter_api_test.dart -test/twitter_auth_model_test.dart -test/user_api_test.dart -test/user_info_detail_dto_test.dart -test/user_info_test.dart -test/user_test.dart -test/values_api_test.dart -test/view_by_test.dart -test/widget_test.dart diff --git a/mycore_api/README.md b/mycore_api/README.md index 220e744..78cf2a5 100644 --- a/mycore_api/README.md +++ b/mycore_api/README.md @@ -60,13 +60,13 @@ try { ## Documentation for API Endpoints -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *http://localhost:25049* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AuthenticationApi* | [**authenticationAuthenticateWithForm**](doc\/AuthenticationApi.md#authenticationauthenticatewithform) | **POST** /api/Authentication/Token | Authenticate with form parameters (used by Swagger test client) *AuthenticationApi* | [**authenticationAuthenticateWithJson**](doc\/AuthenticationApi.md#authenticationauthenticatewithjson) | **POST** /api/Authentication/Authenticate | Authenticate with Json parameters (used by most clients) -*AutomationApi* | [**automationCreate**](doc\/AutomationApi.md#automationcreate) | **POST** /api/automation | +*AutomationApi* | [**automationCreate**](doc\/AutomationApi.md#automationcreate) | **POST** /api/automation | Create an automation *AutomationApi* | [**automationDelete**](doc\/AutomationApi.md#automationdelete) | **DELETE** /api/automation/{automationId} | Delete an automation *AutomationApi* | [**automationDeleteAllForUser**](doc\/AutomationApi.md#automationdeleteallforuser) | **DELETE** /api/automation/user/{userId} | Delete all automation for a specified *AutomationApi* | [**automationGetAll**](doc\/AutomationApi.md#automationgetall) | **GET** /api/automation/{userId} | Get all automations for the specified user @@ -81,7 +81,7 @@ Class | Method | HTTP request | Description *DeviceApi* | [**deviceCreate**](doc\/DeviceApi.md#devicecreate) | **POST** /api/device | Create a device *DeviceApi* | [**deviceCreateDevicesFromProvider**](doc\/DeviceApi.md#devicecreatedevicesfromprovider) | **POST** /api/device/{userId}/fromProvider/{providerId} | Create devices from provider *DeviceApi* | [**deviceDelete**](doc\/DeviceApi.md#devicedelete) | **DELETE** /api/device/{deviceId} | Delete a device -*DeviceApi* | [**deviceDeleteAllForUser**](doc\/DeviceApi.md#devicedeleteallforuser) | **DELETE** /api/device/user/{userId} | Delete all device for a specified +*DeviceApi* | [**deviceDeleteAllForUser**](doc\/DeviceApi.md#devicedeleteallforuser) | **DELETE** /api/device/user/{userId} | Delete all device for a specified user *DeviceApi* | [**deviceDeleteDevicesFromProvider**](doc\/DeviceApi.md#devicedeletedevicesfromprovider) | **DELETE** /api/device/{userId}/fromProvider/{providerId} | Delete devices from provider *DeviceApi* | [**deviceGetAll**](doc\/DeviceApi.md#devicegetall) | **GET** /api/device/{userId} | Get all devices summary *DeviceApi* | [**deviceGetDetail**](doc\/DeviceApi.md#devicegetdetail) | **GET** /api/device/detail/{deviceId} | Get a specific device info @@ -116,23 +116,23 @@ Class | Method | HTTP request | Description *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* | [**roomDeleteAllForUser**](doc\/RoomApi.md#roomdeleteallforuser) | **DELETE** /api/room/user/{userId} | Delete all room for a specified +*RoomApi* | [**roomDeleteAllForUser**](doc\/RoomApi.md#roomdeleteallforuser) | **DELETE** /api/room/user/{userId} | Delete all room for a specified user *RoomApi* | [**roomGetAll**](doc\/RoomApi.md#roomgetall) | **GET** /api/room/{userId} | Get all rooms for the specified user *RoomApi* | [**roomGetDetail**](doc\/RoomApi.md#roomgetdetail) | **GET** /api/room/detail/{roomId} | Get detail info of a specified room *RoomApi* | [**roomUpdate**](doc\/RoomApi.md#roomupdate) | **PUT** /api/room | Update a room -*ScreenDeviceApi* | [**screenDeviceCreateDevice**](doc\/ScreenDeviceApi.md#screendevicecreatedevice) | **POST** /api/device/screen | -*ScreenDeviceApi* | [**screenDeviceDeleteDevice**](doc\/ScreenDeviceApi.md#screendevicedeletedevice) | **DELETE** /api/device/screen/{deviceId} | -*ScreenDeviceApi* | [**screenDeviceGetAllScreenDevices**](doc\/ScreenDeviceApi.md#screendevicegetallscreendevices) | **GET** /api/device/screen | -*ScreenDeviceApi* | [**screenDeviceGetDeviceInfo**](doc\/ScreenDeviceApi.md#screendevicegetdeviceinfo) | **GET** /api/device/screen/{screenDeviceId} | -*ScreenDeviceApi* | [**screenDeviceUpdateDevice**](doc\/ScreenDeviceApi.md#screendeviceupdatedevice) | **PUT** /api/device/screen/{screenDeviceId} | -*TokenApi* | [**tokenConnectUser**](doc\/TokenApi.md#tokenconnectuser) | **POST** /api/token | +*ScreenDeviceApi* | [**screenDeviceCreateDevice**](doc\/ScreenDeviceApi.md#screendevicecreatedevice) | **POST** /api/device/screen | Create screen device +*ScreenDeviceApi* | [**screenDeviceDeleteDevice**](doc\/ScreenDeviceApi.md#screendevicedeletedevice) | **DELETE** /api/device/screen/{deviceId} | Delete device +*ScreenDeviceApi* | [**screenDeviceGetAllScreenDevices**](doc\/ScreenDeviceApi.md#screendevicegetallscreendevices) | **GET** /api/device/screen | Get all screen devices +*ScreenDeviceApi* | [**screenDeviceGetDeviceInfo**](doc\/ScreenDeviceApi.md#screendevicegetdeviceinfo) | **GET** /api/device/screen/{screenDeviceId} | Get screen device info +*ScreenDeviceApi* | [**screenDeviceUpdateDevice**](doc\/ScreenDeviceApi.md#screendeviceupdatedevice) | **PUT** /api/device/screen | Update screen device +*TokenApi* | [**tokenConnectUser**](doc\/TokenApi.md#tokenconnectuser) | **POST** /api/token | Connect user *TokenApi* | [**tokenCreate**](doc\/TokenApi.md#tokencreate) | **POST** /token | *TwitterApi* | [**twitterCreate**](doc\/TwitterApi.md#twittercreate) | **POST** /twitter | -*UserApi* | [**userCreateUser**](doc\/UserApi.md#usercreateuser) | **POST** /api/user | -*UserApi* | [**userDeleteUser**](doc\/UserApi.md#userdeleteuser) | **DELETE** /api/user/{id} | -*UserApi* | [**userGet**](doc\/UserApi.md#userget) | **GET** /api/user | Get a list of user -*UserApi* | [**userGet2**](doc\/UserApi.md#userget2) | **GET** /api/user/{id} | Get a specific user -*UserApi* | [**userUpdateUser**](doc\/UserApi.md#userupdateuser) | **PUT** /api/user | +*UserApi* | [**userCreateUser**](doc\/UserApi.md#usercreateuser) | **POST** /api/user | Create an user +*UserApi* | [**userDeleteUser**](doc\/UserApi.md#userdeleteuser) | **DELETE** /api/user/{id} | Delete an user +*UserApi* | [**userGet**](doc\/UserApi.md#userget) | **GET** /api/user/{id} | Get a specific user +*UserApi* | [**userGetAll**](doc\/UserApi.md#usergetall) | **GET** /api/user | Get a list of user +*UserApi* | [**userUpdateUser**](doc\/UserApi.md#userupdateuser) | **PUT** /api/user | Update an user *ValuesApi* | [**valuesDelete**](doc\/ValuesApi.md#valuesdelete) | **DELETE** /api/test/{id} | *ValuesApi* | [**valuesGet**](doc\/ValuesApi.md#valuesget) | **GET** /api/test/{id} | *ValuesApi* | [**valuesGetAll**](doc\/ValuesApi.md#valuesgetall) | **GET** /api/test | It's a test ! :) @@ -150,6 +150,7 @@ Class | Method | HTTP request | Description - [AutomationDTO](doc\/AutomationDTO.md) - [AutomationDetailDTO](doc\/AutomationDetailDTO.md) - [AutomationDetailDTOAllOf](doc\/AutomationDetailDTOAllOf.md) + - [AutomationState](doc\/AutomationState.md) - [AzureADAuthModel](doc\/AzureADAuthModel.md) - [Book](doc\/Book.md) - [Condition](doc\/Condition.md) @@ -170,14 +171,14 @@ Class | Method | HTTP request | Description - [GroupDetailDTO](doc\/GroupDetailDTO.md) - [GroupDetailDTOAllOf](doc\/GroupDetailDTOAllOf.md) - [GroupSummaryDTO](doc\/GroupSummaryDTO.md) - - [LocationDTO](doc\/LocationDTO.md) - [LoginDTO](doc\/LoginDTO.md) - [MeansOfCommunication](doc\/MeansOfCommunication.md) - [MqttMessageDTO](doc\/MqttMessageDTO.md) - - [OddH2H](doc\/OddH2H.md) - [OddNice](doc\/OddNice.md) + - [OddObject](doc\/OddObject.md) - [PanelMenuItem](doc\/PanelMenuItem.md) - [PanelSection](doc\/PanelSection.md) + - [PlaceDTO](doc\/PlaceDTO.md) - [Provider](doc\/Provider.md) - [ProviderDTO](doc\/ProviderDTO.md) - [RoomCreateOrUpdateDetailDTO](doc\/RoomCreateOrUpdateDetailDTO.md) @@ -185,9 +186,10 @@ Class | Method | HTTP request | Description - [RoomSummaryDTO](doc\/RoomSummaryDTO.md) - [ScreenConfiguration](doc\/ScreenConfiguration.md) - [ScreenDevice](doc\/ScreenDevice.md) + - [ScreenWidget](doc\/ScreenWidget.md) - [SmartGardenMessage](doc\/SmartGardenMessage.md) - [SmartPrinterMessage](doc\/SmartPrinterMessage.md) - - [State](doc\/State.md) + - [TokenDTO](doc\/TokenDTO.md) - [Trigger](doc\/Trigger.md) - [TriggerType](doc\/TriggerType.md) - [TwitterAuthModel](doc\/TwitterAuthModel.md) @@ -195,7 +197,6 @@ Class | Method | HTTP request | Description - [UserInfo](doc\/UserInfo.md) - [UserInfoDetailDTO](doc\/UserInfoDetailDTO.md) - [ViewBy](doc\/ViewBy.md) - - [Widget](doc\/Widget.md) ## Documentation For Authorization diff --git a/mycore_api/doc/Action.md b/mycore_api/doc/Action.md index cccb51a..0b51014 100644 --- a/mycore_api/doc/Action.md +++ b/mycore_api/doc/Action.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **groupId** | **String** | | [optional] **deviceId** | **String** | | [optional] -**states** | [**List**](State.md) | | [optional] [default to const []] +**states** | [**List**](AutomationState.md) | | [optional] [default to const []] **rawRequest** | **String** | | [optional] **providerId** | **String** | | [optional] **type** | [**ActionType**](ActionType.md) | | [optional] diff --git a/mycore_api/doc/AuthenticationApi.md b/mycore_api/doc/AuthenticationApi.md index 19d7b68..d322452 100644 --- a/mycore_api/doc/AuthenticationApi.md +++ b/mycore_api/doc/AuthenticationApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *http://localhost:25049* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -14,7 +14,7 @@ Method | HTTP request | Description # **authenticationAuthenticateWithForm** -> LoginDTO authenticationAuthenticateWithForm(grantType, username, password, clientId, clientSecret) +> TokenDTO authenticationAuthenticateWithForm(grantType, username, password, clientId, clientSecret) Authenticate with form parameters (used by Swagger test client) @@ -51,7 +51,7 @@ Name | Type | Description | Notes ### Return type -[**LoginDTO**](LoginDTO.md) +[**TokenDTO**](TokenDTO.md) ### Authorization @@ -65,7 +65,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **authenticationAuthenticateWithJson** -> LoginDTO authenticationAuthenticateWithJson(loginDTO) +> TokenDTO authenticationAuthenticateWithJson(loginDTO) Authenticate with Json parameters (used by most clients) @@ -94,7 +94,7 @@ Name | Type | Description | Notes ### Return type -[**LoginDTO**](LoginDTO.md) +[**TokenDTO**](TokenDTO.md) ### Authorization diff --git a/mycore_api/doc/Automation.md b/mycore_api/doc/Automation.md index 7f21f61..c45de7e 100644 --- a/mycore_api/doc/Automation.md +++ b/mycore_api/doc/Automation.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **id** | **String** | | [optional] **userId** | **String** | | [optional] **name** | **String** | | [optional] +**active** | **bool** | | [optional] **createdDate** | [**DateTime**](DateTime.md) | | [optional] **updatedDate** | [**DateTime**](DateTime.md) | | [optional] **triggers** | [**List**](Trigger.md) | | [optional] [default to const []] diff --git a/mycore_api/doc/AutomationApi.md b/mycore_api/doc/AutomationApi.md index 222ff90..3ed0854 100644 --- a/mycore_api/doc/AutomationApi.md +++ b/mycore_api/doc/AutomationApi.md @@ -5,11 +5,11 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *http://localhost:25049* Method | HTTP request | Description ------------- | ------------- | ------------- -[**automationCreate**](AutomationApi.md#automationcreate) | **POST** /api/automation | +[**automationCreate**](AutomationApi.md#automationcreate) | **POST** /api/automation | Create an automation [**automationDelete**](AutomationApi.md#automationdelete) | **DELETE** /api/automation/{automationId} | Delete an automation [**automationDeleteAllForUser**](AutomationApi.md#automationdeleteallforuser) | **DELETE** /api/automation/user/{userId} | Delete all automation for a specified [**automationGetAll**](AutomationApi.md#automationgetall) | **GET** /api/automation/{userId} | Get all automations for the specified user @@ -20,7 +20,7 @@ Method | HTTP request | Description # **automationCreate** > AutomationDTO automationCreate(automationCreateOrUpdateDetailDTO) - +Create an automation ### Example ```dart @@ -29,7 +29,7 @@ import 'package:mycoreapi/api.dart'; //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = AutomationApi(); -final automationCreateOrUpdateDetailDTO = AutomationCreateOrUpdateDetailDTO(); // AutomationCreateOrUpdateDetailDTO | +final automationCreateOrUpdateDetailDTO = AutomationCreateOrUpdateDetailDTO(); // AutomationCreateOrUpdateDetailDTO | Automation to create try { final result = api_instance.automationCreate(automationCreateOrUpdateDetailDTO); @@ -43,7 +43,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **automationCreateOrUpdateDetailDTO** | [**AutomationCreateOrUpdateDetailDTO**](AutomationCreateOrUpdateDetailDTO.md)| | + **automationCreateOrUpdateDetailDTO** | [**AutomationCreateOrUpdateDetailDTO**](AutomationCreateOrUpdateDetailDTO.md)| Automation to create | ### Return type @@ -61,7 +61,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **automationDelete** -> MultipartFile automationDelete(automationId) +> String automationDelete(automationId) Delete an automation @@ -90,7 +90,7 @@ Name | Type | Description | Notes ### Return type -[**MultipartFile**](MultipartFile.md) +**String** ### Authorization @@ -99,12 +99,12 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/octet-stream + - **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) # **automationDeleteAllForUser** -> MultipartFile automationDeleteAllForUser(userId) +> String automationDeleteAllForUser(userId) Delete all automation for a specified @@ -133,7 +133,7 @@ Name | Type | Description | Notes ### Return type -[**MultipartFile**](MultipartFile.md) +**String** ### Authorization @@ -142,7 +142,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/octet-stream + - **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) diff --git a/mycore_api/doc/AutomationCreateOrUpdateDetailDTO.md b/mycore_api/doc/AutomationCreateOrUpdateDetailDTO.md index 0914263..55af5f8 100644 --- a/mycore_api/doc/AutomationCreateOrUpdateDetailDTO.md +++ b/mycore_api/doc/AutomationCreateOrUpdateDetailDTO.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | | [optional] **name** | **String** | | [optional] +**active** | **bool** | | [optional] **userId** | **String** | | [optional] **createdDate** | [**DateTime**](DateTime.md) | | [optional] **updatedDate** | [**DateTime**](DateTime.md) | | [optional] diff --git a/mycore_api/doc/AutomationDTO.md b/mycore_api/doc/AutomationDTO.md index c1af32f..5e17714 100644 --- a/mycore_api/doc/AutomationDTO.md +++ b/mycore_api/doc/AutomationDTO.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | | [optional] **name** | **String** | | [optional] +**active** | **bool** | | [optional] **userId** | **String** | | [optional] **createdDate** | [**DateTime**](DateTime.md) | | [optional] **updatedDate** | [**DateTime**](DateTime.md) | | [optional] diff --git a/mycore_api/doc/AutomationDetailDTO.md b/mycore_api/doc/AutomationDetailDTO.md index f5aedde..0ad0030 100644 --- a/mycore_api/doc/AutomationDetailDTO.md +++ b/mycore_api/doc/AutomationDetailDTO.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | | [optional] **name** | **String** | | [optional] +**active** | **bool** | | [optional] **userId** | **String** | | [optional] **createdDate** | [**DateTime**](DateTime.md) | | [optional] **updatedDate** | [**DateTime**](DateTime.md) | | [optional] diff --git a/mycore_api/doc/AutomationState.md b/mycore_api/doc/AutomationState.md new file mode 100644 index 0000000..dcd8a45 --- /dev/null +++ b/mycore_api/doc/AutomationState.md @@ -0,0 +1,16 @@ +# mycoreapi.model.AutomationState + +## Load the model package +```dart +import 'package:mycoreapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | [optional] +**value** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/mycore_api/doc/AzureApi.md b/mycore_api/doc/AzureApi.md index 53812e2..fddaa58 100644 --- a/mycore_api/doc/AzureApi.md +++ b/mycore_api/doc/AzureApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *http://localhost:25049* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/BooksApi.md b/mycore_api/doc/BooksApi.md index f3af77f..640b94a 100644 --- a/mycore_api/doc/BooksApi.md +++ b/mycore_api/doc/BooksApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *http://localhost:25049* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/Condition.md b/mycore_api/doc/Condition.md index 0d14c7a..3268817 100644 --- a/mycore_api/doc/Condition.md +++ b/mycore_api/doc/Condition.md @@ -9,7 +9,7 @@ import 'package:mycoreapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **deviceId** | **String** | | [optional] -**state** | [**OneOfState**](OneOfState.md) | | [optional] +**state** | [**OneOfAutomationState**](OneOfAutomationState.md) | | [optional] **startTime** | **String** | | [optional] **endTime** | **String** | | [optional] **type** | [**ConditionType**](ConditionType.md) | | [optional] diff --git a/mycore_api/doc/Device.md b/mycore_api/doc/Device.md index fe66fbb..adddc21 100644 --- a/mycore_api/doc/Device.md +++ b/mycore_api/doc/Device.md @@ -32,7 +32,7 @@ Name | Type | Description | Notes **providerId** | **String** | | [optional] **manufacturerName** | **String** | | [optional] **groupIds** | **List** | | [optional] [default to const []] -**properties** | [**Map**](Object.md) | | [optional] [default to const {}] +**properties** | **String** | | [optional] **supportedOperations** | **List** | | [optional] [default to const []] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mycore_api/doc/DeviceApi.md b/mycore_api/doc/DeviceApi.md index 9f7b8d5..2af1629 100644 --- a/mycore_api/doc/DeviceApi.md +++ b/mycore_api/doc/DeviceApi.md @@ -5,14 +5,14 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *http://localhost:25049* Method | HTTP request | Description ------------- | ------------- | ------------- [**deviceCreate**](DeviceApi.md#devicecreate) | **POST** /api/device | Create a device [**deviceCreateDevicesFromProvider**](DeviceApi.md#devicecreatedevicesfromprovider) | **POST** /api/device/{userId}/fromProvider/{providerId} | Create devices from provider [**deviceDelete**](DeviceApi.md#devicedelete) | **DELETE** /api/device/{deviceId} | Delete a device -[**deviceDeleteAllForUser**](DeviceApi.md#devicedeleteallforuser) | **DELETE** /api/device/user/{userId} | Delete all device for a specified +[**deviceDeleteAllForUser**](DeviceApi.md#devicedeleteallforuser) | **DELETE** /api/device/user/{userId} | Delete all device for a specified user [**deviceDeleteDevicesFromProvider**](DeviceApi.md#devicedeletedevicesfromprovider) | **DELETE** /api/device/{userId}/fromProvider/{providerId} | Delete devices from provider [**deviceGetAll**](DeviceApi.md#devicegetall) | **GET** /api/device/{userId} | Get all devices summary [**deviceGetDetail**](DeviceApi.md#devicegetdetail) | **GET** /api/device/detail/{deviceId} | Get a specific device info @@ -111,7 +111,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **deviceDelete** -> MultipartFile deviceDelete(deviceId) +> String deviceDelete(deviceId) Delete a device @@ -140,7 +140,7 @@ Name | Type | Description | Notes ### Return type -[**MultipartFile**](MultipartFile.md) +**String** ### Authorization @@ -149,14 +149,14 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/octet-stream + - **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) # **deviceDeleteAllForUser** -> MultipartFile deviceDeleteAllForUser(userId) +> String deviceDeleteAllForUser(userId) -Delete all device for a specified +Delete all device for a specified user ### Example ```dart @@ -183,7 +183,7 @@ Name | Type | Description | Notes ### Return type -[**MultipartFile**](MultipartFile.md) +**String** ### Authorization @@ -192,12 +192,12 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/octet-stream + - **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) # **deviceDeleteDevicesFromProvider** -> MultipartFile deviceDeleteDevicesFromProvider(userId, providerId) +> String deviceDeleteDevicesFromProvider(userId, providerId) Delete devices from provider @@ -228,7 +228,7 @@ Name | Type | Description | Notes ### Return type -[**MultipartFile**](MultipartFile.md) +**String** ### Authorization @@ -237,7 +237,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/octet-stream + - **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) diff --git a/mycore_api/doc/DeviceDetailDTO.md b/mycore_api/doc/DeviceDetailDTO.md index 359b390..dd56035 100644 --- a/mycore_api/doc/DeviceDetailDTO.md +++ b/mycore_api/doc/DeviceDetailDTO.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes **locationId** | **String** | | [optional] **providerId** | **String** | | [optional] **providerName** | **String** | | [optional] -**location** | [**OneOfLocationDTO**](OneOfLocationDTO.md) | | [optional] +**location** | [**OneOfPlaceDTO**](OneOfPlaceDTO.md) | | [optional] **lastStateDate** | [**DateTime**](DateTime.md) | | [optional] **battery** | **bool** | | [optional] **batteryStatus** | **int** | | [optional] @@ -34,7 +34,7 @@ Name | Type | Description | Notes **serviceIdentification** | **String** | | [optional] **manufacturerName** | **String** | | [optional] **groupIds** | **List** | | [optional] [default to const []] -**properties** | [**Map**](Object.md) | | [optional] [default to const {}] +**properties** | **String** | | [optional] **supportedOperations** | **List** | | [optional] [default to const []] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mycore_api/doc/DeviceDetailDTOAllOf.md b/mycore_api/doc/DeviceDetailDTOAllOf.md index 3de3325..e6fb511 100644 --- a/mycore_api/doc/DeviceDetailDTOAllOf.md +++ b/mycore_api/doc/DeviceDetailDTOAllOf.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes **serviceIdentification** | **String** | | [optional] **manufacturerName** | **String** | | [optional] **groupIds** | **List** | | [optional] [default to const []] -**properties** | [**Map**](Object.md) | | [optional] [default to const {}] +**properties** | **String** | | [optional] **supportedOperations** | **List** | | [optional] [default to const []] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mycore_api/doc/DeviceSummaryDTO.md b/mycore_api/doc/DeviceSummaryDTO.md index 79ef563..c642a75 100644 --- a/mycore_api/doc/DeviceSummaryDTO.md +++ b/mycore_api/doc/DeviceSummaryDTO.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes **locationId** | **String** | | [optional] **providerId** | **String** | | [optional] **providerName** | **String** | | [optional] -**location** | [**OneOfLocationDTO**](OneOfLocationDTO.md) | | [optional] +**location** | [**OneOfPlaceDTO**](OneOfPlaceDTO.md) | | [optional] **lastStateDate** | [**DateTime**](DateTime.md) | | [optional] **battery** | **bool** | | [optional] **batteryStatus** | **int** | | [optional] diff --git a/mycore_api/doc/EnergyApi.md b/mycore_api/doc/EnergyApi.md index 44c4290..bc037ab 100644 --- a/mycore_api/doc/EnergyApi.md +++ b/mycore_api/doc/EnergyApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *http://localhost:25049* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/FacebookApi.md b/mycore_api/doc/FacebookApi.md index 189a21b..6683ab2 100644 --- a/mycore_api/doc/FacebookApi.md +++ b/mycore_api/doc/FacebookApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *http://localhost:25049* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/GoogleApi.md b/mycore_api/doc/GoogleApi.md index 29e2edb..783c600 100644 --- a/mycore_api/doc/GoogleApi.md +++ b/mycore_api/doc/GoogleApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *http://localhost:25049* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/GroupApi.md b/mycore_api/doc/GroupApi.md index 814bf73..bcf716e 100644 --- a/mycore_api/doc/GroupApi.md +++ b/mycore_api/doc/GroupApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *http://localhost:25049* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -108,7 +108,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **groupDelete** -> MultipartFile groupDelete(deviceId, groupId) +> String groupDelete(deviceId, groupId) Delete device from a group @@ -139,7 +139,7 @@ Name | Type | Description | Notes ### Return type -[**MultipartFile**](MultipartFile.md) +**String** ### Authorization @@ -148,12 +148,12 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/octet-stream + - **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) # **groupDelete2** -> MultipartFile groupDelete2(groupId) +> String groupDelete2(groupId) Delete a group @@ -182,7 +182,7 @@ Name | Type | Description | Notes ### Return type -[**MultipartFile**](MultipartFile.md) +**String** ### Authorization @@ -191,12 +191,12 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/octet-stream + - **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) # **groupDeleteAllForUser** -> MultipartFile groupDeleteAllForUser(userId) +> String groupDeleteAllForUser(userId) Delete all group for a specified @@ -225,7 +225,7 @@ Name | Type | Description | Notes ### Return type -[**MultipartFile**](MultipartFile.md) +**String** ### Authorization @@ -234,7 +234,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/octet-stream + - **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) @@ -282,7 +282,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **groupGetDetail** -> GroupDetailDTO groupGetDetail(groupId, userId) +> GroupDetailDTO groupGetDetail(groupId) Get detail info of a specified group @@ -294,10 +294,9 @@ import 'package:mycoreapi/api.dart'; final api_instance = GroupApi(); final groupId = groupId_example; // String | groupid -final userId = userId_example; // String | user id try { - final result = api_instance.groupGetDetail(groupId, userId); + final result = api_instance.groupGetDetail(groupId); print(result); } catch (e) { print('Exception when calling GroupApi->groupGetDetail: $e\n'); @@ -309,7 +308,6 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **groupId** | **String**| groupid | - **userId** | **String**| user id | [optional] ### Return type diff --git a/mycore_api/doc/IOTApi.md b/mycore_api/doc/IOTApi.md index c999c1f..519e912 100644 --- a/mycore_api/doc/IOTApi.md +++ b/mycore_api/doc/IOTApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *http://localhost:25049* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/LayoutApi.md b/mycore_api/doc/LayoutApi.md index facfb02..dd7d018 100644 --- a/mycore_api/doc/LayoutApi.md +++ b/mycore_api/doc/LayoutApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *http://localhost:25049* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/MQTTApi.md b/mycore_api/doc/MQTTApi.md index 4d42331..e8ca3ed 100644 --- a/mycore_api/doc/MQTTApi.md +++ b/mycore_api/doc/MQTTApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *http://localhost:25049* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/OddApi.md b/mycore_api/doc/OddApi.md index 64f416c..307d47e 100644 --- a/mycore_api/doc/OddApi.md +++ b/mycore_api/doc/OddApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *http://localhost:25049* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/OddNice.md b/mycore_api/doc/OddNice.md index 40a7bb7..de75aaa 100644 --- a/mycore_api/doc/OddNice.md +++ b/mycore_api/doc/OddNice.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **teams** | **List** | | [optional] [default to const []] **commenceTime** | **int** | | [optional] **homeTeam** | **String** | | [optional] -**odds** | [**OneOfOddH2H**](OneOfOddH2H.md) | | [optional] +**odds** | [**OneOfOddObject**](OneOfOddObject.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mycore_api/doc/OddObject.md b/mycore_api/doc/OddObject.md new file mode 100644 index 0000000..5204f6b --- /dev/null +++ b/mycore_api/doc/OddObject.md @@ -0,0 +1,17 @@ +# mycoreapi.model.OddObject + +## Load the model package +```dart +import 'package:mycoreapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**homeOdd** | **double** | | [optional] +**drawOdd** | **double** | | [optional] +**visitOdd** | **double** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/mycore_api/doc/PlaceDTO.md b/mycore_api/doc/PlaceDTO.md new file mode 100644 index 0000000..7162ade --- /dev/null +++ b/mycore_api/doc/PlaceDTO.md @@ -0,0 +1,16 @@ +# mycoreapi.model.PlaceDTO + +## Load the model package +```dart +import 'package:mycoreapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**name** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/mycore_api/doc/ProviderApi.md b/mycore_api/doc/ProviderApi.md index bb566cc..96068a7 100644 --- a/mycore_api/doc/ProviderApi.md +++ b/mycore_api/doc/ProviderApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *http://localhost:25049* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -59,7 +59,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **providerDelete** -> MultipartFile providerDelete(providerId) +> String providerDelete(providerId) Delete a provider @@ -88,7 +88,7 @@ Name | Type | Description | Notes ### Return type -[**MultipartFile**](MultipartFile.md) +**String** ### Authorization @@ -97,7 +97,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/octet-stream + - **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) @@ -113,7 +113,7 @@ import 'package:mycoreapi/api.dart'; //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = ProviderApi(); -final userId = userId_example; // String | +final userId = userId_example; // String | Id of user try { final result = api_instance.providerGetAll(userId); @@ -127,7 +127,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **userId** | **String**| | + **userId** | **String**| Id of user | ### Return type diff --git a/mycore_api/doc/RoomApi.md b/mycore_api/doc/RoomApi.md index 3b7deb5..77f2099 100644 --- a/mycore_api/doc/RoomApi.md +++ b/mycore_api/doc/RoomApi.md @@ -5,14 +5,14 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *http://localhost:25049* Method | HTTP request | Description ------------- | ------------- | ------------- [**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 -[**roomDeleteAllForUser**](RoomApi.md#roomdeleteallforuser) | **DELETE** /api/room/user/{userId} | Delete all room for a specified +[**roomDeleteAllForUser**](RoomApi.md#roomdeleteallforuser) | **DELETE** /api/room/user/{userId} | Delete all room for a specified user [**roomGetAll**](RoomApi.md#roomgetall) | **GET** /api/room/{userId} | Get all rooms for the specified user [**roomGetDetail**](RoomApi.md#roomgetdetail) | **GET** /api/room/detail/{roomId} | Get detail info of a specified room [**roomUpdate**](RoomApi.md#roomupdate) | **PUT** /api/room | Update a room @@ -62,7 +62,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **roomDelete** -> MultipartFile roomDelete(deviceId, roomId) +> String roomDelete(deviceId, roomId) Delete device from a room @@ -93,7 +93,7 @@ Name | Type | Description | Notes ### Return type -[**MultipartFile**](MultipartFile.md) +**String** ### Authorization @@ -102,12 +102,12 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/octet-stream + - **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) # **roomDelete2** -> MultipartFile roomDelete2(roomId) +> String roomDelete2(roomId) Delete a room @@ -136,7 +136,7 @@ Name | Type | Description | Notes ### Return type -[**MultipartFile**](MultipartFile.md) +**String** ### Authorization @@ -145,14 +145,14 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/octet-stream + - **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) # **roomDeleteAllForUser** -> MultipartFile roomDeleteAllForUser(userId) +> String roomDeleteAllForUser(userId) -Delete all room for a specified +Delete all room for a specified user ### Example ```dart @@ -179,7 +179,7 @@ Name | Type | Description | Notes ### Return type -[**MultipartFile**](MultipartFile.md) +**String** ### Authorization @@ -188,7 +188,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/octet-stream + - **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) diff --git a/mycore_api/doc/ScreenConfiguration.md b/mycore_api/doc/ScreenConfiguration.md index 131ec98..1afefbb 100644 --- a/mycore_api/doc/ScreenConfiguration.md +++ b/mycore_api/doc/ScreenConfiguration.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **id** | **String** | | [optional] **name** | **String** | | [optional] **type** | **String** | | [optional] -**widgets** | [**List**](Widget.md) | | [optional] [default to const []] +**widgets** | [**List**](ScreenWidget.md) | | [optional] [default to const []] **height** | **int** | | [optional] **width** | **int** | | [optional] diff --git a/mycore_api/doc/ScreenDeviceApi.md b/mycore_api/doc/ScreenDeviceApi.md index 367d096..c5bfa26 100644 --- a/mycore_api/doc/ScreenDeviceApi.md +++ b/mycore_api/doc/ScreenDeviceApi.md @@ -5,21 +5,21 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *http://localhost:25049* Method | HTTP request | Description ------------- | ------------- | ------------- -[**screenDeviceCreateDevice**](ScreenDeviceApi.md#screendevicecreatedevice) | **POST** /api/device/screen | -[**screenDeviceDeleteDevice**](ScreenDeviceApi.md#screendevicedeletedevice) | **DELETE** /api/device/screen/{deviceId} | -[**screenDeviceGetAllScreenDevices**](ScreenDeviceApi.md#screendevicegetallscreendevices) | **GET** /api/device/screen | -[**screenDeviceGetDeviceInfo**](ScreenDeviceApi.md#screendevicegetdeviceinfo) | **GET** /api/device/screen/{screenDeviceId} | -[**screenDeviceUpdateDevice**](ScreenDeviceApi.md#screendeviceupdatedevice) | **PUT** /api/device/screen/{screenDeviceId} | +[**screenDeviceCreateDevice**](ScreenDeviceApi.md#screendevicecreatedevice) | **POST** /api/device/screen | Create screen device +[**screenDeviceDeleteDevice**](ScreenDeviceApi.md#screendevicedeletedevice) | **DELETE** /api/device/screen/{deviceId} | Delete device +[**screenDeviceGetAllScreenDevices**](ScreenDeviceApi.md#screendevicegetallscreendevices) | **GET** /api/device/screen | Get all screen devices +[**screenDeviceGetDeviceInfo**](ScreenDeviceApi.md#screendevicegetdeviceinfo) | **GET** /api/device/screen/{screenDeviceId} | Get screen device info +[**screenDeviceUpdateDevice**](ScreenDeviceApi.md#screendeviceupdatedevice) | **PUT** /api/device/screen | Update screen device # **screenDeviceCreateDevice** -> MultipartFile screenDeviceCreateDevice(screenDevice) - +> ScreenDevice screenDeviceCreateDevice(screenDevice) +Create screen device ### Example ```dart @@ -28,7 +28,7 @@ import 'package:mycoreapi/api.dart'; //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = ScreenDeviceApi(); -final screenDevice = ScreenDevice(); // ScreenDevice | +final screenDevice = ScreenDevice(); // ScreenDevice | Screen device to create try { final result = api_instance.screenDeviceCreateDevice(screenDevice); @@ -42,11 +42,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **screenDevice** | [**ScreenDevice**](ScreenDevice.md)| | + **screenDevice** | [**ScreenDevice**](ScreenDevice.md)| Screen device to create | ### Return type -[**MultipartFile**](MultipartFile.md) +[**ScreenDevice**](ScreenDevice.md) ### Authorization @@ -55,14 +55,14 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/octet-stream + - **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) # **screenDeviceDeleteDevice** -> MultipartFile screenDeviceDeleteDevice(deviceId) - +> String screenDeviceDeleteDevice(deviceId) +Delete device ### Example ```dart @@ -71,7 +71,7 @@ import 'package:mycoreapi/api.dart'; //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = ScreenDeviceApi(); -final deviceId = deviceId_example; // String | +final deviceId = deviceId_example; // String | Screen device id to update try { final result = api_instance.screenDeviceDeleteDevice(deviceId); @@ -85,11 +85,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **deviceId** | **String**| | + **deviceId** | **String**| Screen device id to update | ### Return type -[**MultipartFile**](MultipartFile.md) +**String** ### Authorization @@ -98,14 +98,14 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/octet-stream + - **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) # **screenDeviceGetAllScreenDevices** > List screenDeviceGetAllScreenDevices() - +Get all screen devices ### Example ```dart @@ -144,7 +144,7 @@ This endpoint does not need any parameter. # **screenDeviceGetDeviceInfo** > ScreenDevice screenDeviceGetDeviceInfo(screenDeviceId) - +Get screen device info ### Example ```dart @@ -185,9 +185,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) # **screenDeviceUpdateDevice** -> MultipartFile screenDeviceUpdateDevice(screenDeviceId, screenDevice) - +> ScreenDevice screenDeviceUpdateDevice(screenDevice) +Update screen device ### Example ```dart @@ -196,11 +196,10 @@ import 'package:mycoreapi/api.dart'; //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = ScreenDeviceApi(); -final screenDeviceId = 56; // int | -final screenDevice = ScreenDevice(); // ScreenDevice | +final screenDevice = ScreenDevice(); // ScreenDevice | Screen device to update try { - final result = api_instance.screenDeviceUpdateDevice(screenDeviceId, screenDevice); + final result = api_instance.screenDeviceUpdateDevice(screenDevice); print(result); } catch (e) { print('Exception when calling ScreenDeviceApi->screenDeviceUpdateDevice: $e\n'); @@ -211,12 +210,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **screenDeviceId** | **int**| | - **screenDevice** | [**ScreenDevice**](ScreenDevice.md)| | + **screenDevice** | [**ScreenDevice**](ScreenDevice.md)| Screen device to update | ### Return type -[**MultipartFile**](MultipartFile.md) +[**ScreenDevice**](ScreenDevice.md) ### Authorization @@ -225,7 +223,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/octet-stream + - **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) diff --git a/mycore_api/doc/ScreenWidget.md b/mycore_api/doc/ScreenWidget.md new file mode 100644 index 0000000..3ca3e6b --- /dev/null +++ b/mycore_api/doc/ScreenWidget.md @@ -0,0 +1,27 @@ +# mycoreapi.model.ScreenWidget + +## Load the model package +```dart +import 'package:mycoreapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**name** | **String** | | [optional] +**displayName** | **String** | | [optional] +**type** | **String** | | [optional] +**activated** | **bool** | | [optional] +**form** | **String** | | [optional] +**font** | **String** | | [optional] +**color** | **String** | | [optional] +**size** | **String** | | [optional] +**width** | **int** | | [optional] +**height** | **int** | | [optional] +**positionX** | **int** | | [optional] +**positionY** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/mycore_api/doc/TokenApi.md b/mycore_api/doc/TokenApi.md index fed3edd..abfebff 100644 --- a/mycore_api/doc/TokenApi.md +++ b/mycore_api/doc/TokenApi.md @@ -5,18 +5,18 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *http://localhost:25049* Method | HTTP request | Description ------------- | ------------- | ------------- -[**tokenConnectUser**](TokenApi.md#tokenconnectuser) | **POST** /api/token | +[**tokenConnectUser**](TokenApi.md#tokenconnectuser) | **POST** /api/token | Connect user [**tokenCreate**](TokenApi.md#tokencreate) | **POST** /token | # **tokenConnectUser** > UserInfo tokenConnectUser(loginDTO) - +Connect user ### Example ```dart @@ -25,7 +25,7 @@ import 'package:mycoreapi/api.dart'; //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = TokenApi(); -final loginDTO = LoginDTO(); // LoginDTO | +final loginDTO = LoginDTO(); // LoginDTO | login info try { final result = api_instance.tokenConnectUser(loginDTO); @@ -39,7 +39,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **loginDTO** | [**LoginDTO**](LoginDTO.md)| | + **loginDTO** | [**LoginDTO**](LoginDTO.md)| login info | ### Return type diff --git a/mycore_api/doc/TokenDTO.md b/mycore_api/doc/TokenDTO.md new file mode 100644 index 0000000..be926b3 --- /dev/null +++ b/mycore_api/doc/TokenDTO.md @@ -0,0 +1,20 @@ +# mycoreapi.model.TokenDTO + +## Load the model package +```dart +import 'package:mycoreapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**accessToken** | **String** | | [optional] +**refreshToken** | **String** | | [optional] +**scope** | **String** | | [optional] +**tokenType** | **String** | | [optional] +**expiresIn** | **int** | | [optional] +**expiration** | [**DateTime**](DateTime.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/mycore_api/doc/TwitterApi.md b/mycore_api/doc/TwitterApi.md index 04bf6e5..daf0096 100644 --- a/mycore_api/doc/TwitterApi.md +++ b/mycore_api/doc/TwitterApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *http://localhost:25049* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/doc/UserApi.md b/mycore_api/doc/UserApi.md index 4d8d8de..5d5208f 100644 --- a/mycore_api/doc/UserApi.md +++ b/mycore_api/doc/UserApi.md @@ -5,21 +5,21 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *http://localhost:25049* Method | HTTP request | Description ------------- | ------------- | ------------- -[**userCreateUser**](UserApi.md#usercreateuser) | **POST** /api/user | -[**userDeleteUser**](UserApi.md#userdeleteuser) | **DELETE** /api/user/{id} | -[**userGet**](UserApi.md#userget) | **GET** /api/user | Get a list of user -[**userGet2**](UserApi.md#userget2) | **GET** /api/user/{id} | Get a specific user -[**userUpdateUser**](UserApi.md#userupdateuser) | **PUT** /api/user | +[**userCreateUser**](UserApi.md#usercreateuser) | **POST** /api/user | Create an user +[**userDeleteUser**](UserApi.md#userdeleteuser) | **DELETE** /api/user/{id} | Delete an user +[**userGet**](UserApi.md#userget) | **GET** /api/user/{id} | Get a specific user +[**userGetAll**](UserApi.md#usergetall) | **GET** /api/user | Get a list of user +[**userUpdateUser**](UserApi.md#userupdateuser) | **PUT** /api/user | Update an user # **userCreateUser** > UserInfoDetailDTO userCreateUser(userInfo) - +Create an user ### Example ```dart @@ -28,7 +28,7 @@ import 'package:mycoreapi/api.dart'; //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = UserApi(); -final userInfo = UserInfo(); // UserInfo | +final userInfo = UserInfo(); // UserInfo | New user info try { final result = api_instance.userCreateUser(userInfo); @@ -42,7 +42,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **userInfo** | [**UserInfo**](UserInfo.md)| | + **userInfo** | [**UserInfo**](UserInfo.md)| New user info | ### Return type @@ -60,9 +60,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) # **userDeleteUser** -> MultipartFile userDeleteUser(id) - +> String userDeleteUser(id) +Delete an user ### Example ```dart @@ -71,7 +71,7 @@ import 'package:mycoreapi/api.dart'; //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = UserApi(); -final id = id_example; // String | +final id = id_example; // String | Id of user to delete try { final result = api_instance.userDeleteUser(id); @@ -85,11 +85,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **String**| | + **id** | **String**| Id of user to delete | ### Return type -[**MultipartFile**](MultipartFile.md) +**String** ### Authorization @@ -98,51 +98,12 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/octet-stream + - **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) # **userGet** -> MultipartFile userGet() - -Get a list of user - -### Example -```dart -import 'package:mycoreapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: bearer -//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; - -final api_instance = UserApi(); - -try { - final result = api_instance.userGet(); - print(result); -} catch (e) { - print('Exception when calling UserApi->userGet: $e\n'); -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**MultipartFile**](MultipartFile.md) - -### Authorization - -[bearer](../README.md#bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/octet-stream - -[[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) - -# **userGet2** -> UserInfoDetailDTO userGet2(id) +> UserInfoDetailDTO userGet(id) Get a specific user @@ -156,10 +117,10 @@ final api_instance = UserApi(); final id = id_example; // String | id user try { - final result = api_instance.userGet2(id); + final result = api_instance.userGet(id); print(result); } catch (e) { - print('Exception when calling UserApi->userGet2: $e\n'); + print('Exception when calling UserApi->userGet: $e\n'); } ``` @@ -184,10 +145,10 @@ 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) -# **userUpdateUser** -> UserInfoDetailDTO userUpdateUser(userInfo) - +# **userGetAll** +> List userGetAll() +Get a list of user ### Example ```dart @@ -196,7 +157,46 @@ import 'package:mycoreapi/api.dart'; //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = UserApi(); -final userInfo = UserInfo(); // UserInfo | + +try { + final result = api_instance.userGetAll(); + print(result); +} catch (e) { + print('Exception when calling UserApi->userGetAll: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List**](UserInfo.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **userUpdateUser** +> UserInfoDetailDTO userUpdateUser(userInfo) + +Update an user + +### Example +```dart +import 'package:mycoreapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = UserApi(); +final userInfo = UserInfo(); // UserInfo | User to update try { final result = api_instance.userUpdateUser(userInfo); @@ -210,7 +210,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **userInfo** | [**UserInfo**](UserInfo.md)| | + **userInfo** | [**UserInfo**](UserInfo.md)| User to update | ### Return type diff --git a/mycore_api/doc/ValuesApi.md b/mycore_api/doc/ValuesApi.md index 170a923..2ee67e6 100644 --- a/mycore_api/doc/ValuesApi.md +++ b/mycore_api/doc/ValuesApi.md @@ -5,7 +5,7 @@ import 'package:mycoreapi/api.dart'; ``` -All URIs are relative to *http://192.168.31.140* +All URIs are relative to *http://localhost:25049* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/mycore_api/lib/api.dart b/mycore_api/lib/api.dart index 20b5dd4..59d3152 100644 --- a/mycore_api/lib/api.dart +++ b/mycore_api/lib/api.dart @@ -56,6 +56,7 @@ part 'model/automation_create_or_update_detail_dto_all_of.dart'; part 'model/automation_dto.dart'; part 'model/automation_detail_dto.dart'; part 'model/automation_detail_dto_all_of.dart'; +part 'model/automation_state.dart'; part 'model/azure_ad_auth_model.dart'; part 'model/book.dart'; part 'model/condition.dart'; @@ -76,14 +77,14 @@ part 'model/group_create_or_update_detail_dto_all_of.dart'; part 'model/group_detail_dto.dart'; part 'model/group_detail_dto_all_of.dart'; part 'model/group_summary_dto.dart'; -part 'model/location_dto.dart'; part 'model/login_dto.dart'; part 'model/means_of_communication.dart'; part 'model/mqtt_message_dto.dart'; -part 'model/odd_h2_h.dart'; part 'model/odd_nice.dart'; +part 'model/odd_object.dart'; part 'model/panel_menu_item.dart'; part 'model/panel_section.dart'; +part 'model/place_dto.dart'; part 'model/provider.dart'; part 'model/provider_dto.dart'; part 'model/room_create_or_update_detail_dto.dart'; @@ -91,9 +92,10 @@ part 'model/room_detail_dto.dart'; part 'model/room_summary_dto.dart'; part 'model/screen_configuration.dart'; part 'model/screen_device.dart'; +part 'model/screen_widget.dart'; part 'model/smart_garden_message.dart'; part 'model/smart_printer_message.dart'; -part 'model/state.dart'; +part 'model/token_dto.dart'; part 'model/trigger.dart'; part 'model/trigger_type.dart'; part 'model/twitter_auth_model.dart'; @@ -101,7 +103,6 @@ part 'model/user.dart'; part 'model/user_info.dart'; part 'model/user_info_detail_dto.dart'; part 'model/view_by.dart'; -part 'model/widget.dart'; const _delimiters = {'csv': ',', 'ssv': ' ', 'tsv': '\t', 'pipes': '|'}; diff --git a/mycore_api/lib/api/authentication_api.dart b/mycore_api/lib/api/authentication_api.dart index af318e4..1a9a13a 100644 --- a/mycore_api/lib/api/authentication_api.dart +++ b/mycore_api/lib/api/authentication_api.dart @@ -117,7 +117,7 @@ class AuthenticationApi { /// * [String] clientId: /// /// * [String] clientSecret: - Future authenticationAuthenticateWithForm({ String grantType, String username, String password, String clientId, String clientSecret }) async { + Future authenticationAuthenticateWithForm({ String grantType, String username, String password, String clientId, String clientSecret }) async { final response = await authenticationAuthenticateWithFormWithHttpInfo( grantType: grantType, username: username, password: password, clientId: clientId, clientSecret: clientSecret ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -126,9 +126,9 @@ class AuthenticationApi { // 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), 'LoginDTO') as LoginDTO; + return apiClient.deserialize(_decodeBodyBytes(response), 'TokenDTO') as TokenDTO; } - return Future.value(null); + return Future.value(null); } /// Authenticate with Json parameters (used by most clients) @@ -187,7 +187,7 @@ class AuthenticationApi { /// /// * [LoginDTO] loginDTO (required): /// Login DTO - Future authenticationAuthenticateWithJson(LoginDTO loginDTO) async { + Future authenticationAuthenticateWithJson(LoginDTO loginDTO) async { final response = await authenticationAuthenticateWithJsonWithHttpInfo(loginDTO); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -196,8 +196,8 @@ class AuthenticationApi { // 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), 'LoginDTO') as LoginDTO; + return apiClient.deserialize(_decodeBodyBytes(response), 'TokenDTO') as TokenDTO; } - return Future.value(null); + return Future.value(null); } } diff --git a/mycore_api/lib/api/automation_api.dart b/mycore_api/lib/api/automation_api.dart index f032867..db42f23 100644 --- a/mycore_api/lib/api/automation_api.dart +++ b/mycore_api/lib/api/automation_api.dart @@ -15,10 +15,14 @@ class AutomationApi { final ApiClient apiClient; - /// Performs an HTTP 'POST /api/automation' operation and returns the [Response]. + /// Create an automation + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [AutomationCreateOrUpdateDetailDTO] automationCreateOrUpdateDetailDTO (required): + /// Automation to create Future automationCreateWithHttpInfo(AutomationCreateOrUpdateDetailDTO automationCreateOrUpdateDetailDTO) async { // Verify required params are set. if (automationCreateOrUpdateDetailDTO == null) { @@ -61,9 +65,12 @@ class AutomationApi { ); } + /// Create an automation + /// /// Parameters: /// /// * [AutomationCreateOrUpdateDetailDTO] automationCreateOrUpdateDetailDTO (required): + /// Automation to create Future automationCreate(AutomationCreateOrUpdateDetailDTO automationCreateOrUpdateDetailDTO) async { final response = await automationCreateWithHttpInfo(automationCreateOrUpdateDetailDTO); if (response.statusCode >= HttpStatus.badRequest) { @@ -135,7 +142,7 @@ class AutomationApi { /// /// * [String] automationId (required): /// Id of automation to delete - Future automationDelete(String automationId) async { + Future automationDelete(String automationId) async { final response = await automationDeleteWithHttpInfo(automationId); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -144,9 +151,9 @@ class AutomationApi { // 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), 'MultipartFile') as MultipartFile; + return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; } - return Future.value(null); + return Future.value(null); } /// Delete all automation for a specified @@ -206,7 +213,7 @@ class AutomationApi { /// /// * [String] userId (required): /// Id of user - Future automationDeleteAllForUser(String userId) async { + Future automationDeleteAllForUser(String userId) async { final response = await automationDeleteAllForUserWithHttpInfo(userId); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -215,9 +222,9 @@ class AutomationApi { // 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), 'MultipartFile') as MultipartFile; + return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; } - return Future.value(null); + return Future.value(null); } /// Get all automations for the specified user diff --git a/mycore_api/lib/api/device_api.dart b/mycore_api/lib/api/device_api.dart index c41b65b..2d8054d 100644 --- a/mycore_api/lib/api/device_api.dart +++ b/mycore_api/lib/api/device_api.dart @@ -225,7 +225,7 @@ class DeviceApi { /// /// * [String] deviceId (required): /// Id of device to delete - Future deviceDelete(String deviceId) async { + Future deviceDelete(String deviceId) async { final response = await deviceDeleteWithHttpInfo(deviceId); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -234,12 +234,12 @@ class DeviceApi { // 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), 'MultipartFile') as MultipartFile; + return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; } - return Future.value(null); + return Future.value(null); } - /// Delete all device for a specified + /// Delete all device for a specified user /// /// Note: This method returns the HTTP [Response]. /// @@ -290,13 +290,13 @@ class DeviceApi { ); } - /// Delete all device for a specified + /// Delete all device for a specified user /// /// Parameters: /// /// * [String] userId (required): /// Id of user - Future deviceDeleteAllForUser(String userId) async { + Future deviceDeleteAllForUser(String userId) async { final response = await deviceDeleteAllForUserWithHttpInfo(userId); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -305,9 +305,9 @@ class DeviceApi { // 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), 'MultipartFile') as MultipartFile; + return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; } - return Future.value(null); + return Future.value(null); } /// Delete devices from provider @@ -377,7 +377,7 @@ class DeviceApi { /// /// * [String] providerId (required): /// Id of Provider - Future deviceDeleteDevicesFromProvider(String userId, String providerId) async { + Future deviceDeleteDevicesFromProvider(String userId, String providerId) async { final response = await deviceDeleteDevicesFromProviderWithHttpInfo(userId, providerId); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -386,9 +386,9 @@ class DeviceApi { // 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), 'MultipartFile') as MultipartFile; + return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; } - return Future.value(null); + return Future.value(null); } /// Get all devices summary diff --git a/mycore_api/lib/api/group_api.dart b/mycore_api/lib/api/group_api.dart index a1964eb..dcbf5a7 100644 --- a/mycore_api/lib/api/group_api.dart +++ b/mycore_api/lib/api/group_api.dart @@ -225,7 +225,7 @@ class GroupApi { /// /// * [String] groupId (required): /// Id of group - Future groupDelete(String deviceId, String groupId) async { + Future groupDelete(String deviceId, String groupId) async { final response = await groupDeleteWithHttpInfo(deviceId, groupId); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -234,9 +234,9 @@ class GroupApi { // 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), 'MultipartFile') as MultipartFile; + return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; } - return Future.value(null); + return Future.value(null); } /// Delete a group @@ -296,7 +296,7 @@ class GroupApi { /// /// * [String] groupId (required): /// Id of group - Future groupDelete2(String groupId) async { + Future groupDelete2(String groupId) async { final response = await groupDelete2WithHttpInfo(groupId); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -305,9 +305,9 @@ class GroupApi { // 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), 'MultipartFile') as MultipartFile; + return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; } - return Future.value(null); + return Future.value(null); } /// Delete all group for a specified @@ -367,7 +367,7 @@ class GroupApi { /// /// * [String] userId (required): /// Id of user - Future groupDeleteAllForUser(String userId) async { + Future groupDeleteAllForUser(String userId) async { final response = await groupDeleteAllForUserWithHttpInfo(userId); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -376,9 +376,9 @@ class GroupApi { // 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), 'MultipartFile') as MultipartFile; + return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; } - return Future.value(null); + return Future.value(null); } /// Get all groups for the specified user @@ -462,10 +462,7 @@ class GroupApi { /// /// * [String] groupId (required): /// groupid - /// - /// * [String] userId: - /// user id - Future groupGetDetailWithHttpInfo(String groupId, { String userId }) async { + Future groupGetDetailWithHttpInfo(String groupId) async { // Verify required params are set. if (groupId == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: groupId'); @@ -480,10 +477,6 @@ class GroupApi { final headerParams = {}; final formParams = {}; - if (userId != null) { - queryParams.addAll(_convertParametersForCollectionFormat('', 'userId', userId)); - } - final contentTypes = []; final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; final authNames = ['bearer']; @@ -518,11 +511,8 @@ class GroupApi { /// /// * [String] groupId (required): /// groupid - /// - /// * [String] userId: - /// user id - Future groupGetDetail(String groupId, { String userId }) async { - final response = await groupGetDetailWithHttpInfo(groupId, userId: userId ); + Future groupGetDetail(String groupId) async { + final response = await groupGetDetailWithHttpInfo(groupId); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); } diff --git a/mycore_api/lib/api/provider_api.dart b/mycore_api/lib/api/provider_api.dart index 90f0751..f642d34 100644 --- a/mycore_api/lib/api/provider_api.dart +++ b/mycore_api/lib/api/provider_api.dart @@ -142,7 +142,7 @@ class ProviderApi { /// /// * [String] providerId (required): /// Id of provider to delete - Future providerDelete(String providerId) async { + Future providerDelete(String providerId) async { final response = await providerDeleteWithHttpInfo(providerId); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -151,9 +151,9 @@ class ProviderApi { // 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), 'MultipartFile') as MultipartFile; + return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; } - return Future.value(null); + return Future.value(null); } /// Get all user providers @@ -163,6 +163,7 @@ class ProviderApi { /// Parameters: /// /// * [String] userId (required): + /// Id of user Future providerGetAllWithHttpInfo(String userId) async { // Verify required params are set. if (userId == null) { @@ -211,6 +212,7 @@ class ProviderApi { /// Parameters: /// /// * [String] userId (required): + /// Id of user Future> providerGetAll(String userId) async { final response = await providerGetAllWithHttpInfo(userId); if (response.statusCode >= HttpStatus.badRequest) { diff --git a/mycore_api/lib/api/room_api.dart b/mycore_api/lib/api/room_api.dart index 8e9ed90..1ec88b4 100644 --- a/mycore_api/lib/api/room_api.dart +++ b/mycore_api/lib/api/room_api.dart @@ -152,7 +152,7 @@ class RoomApi { /// /// * [String] roomId (required): /// Id of room - Future roomDelete(String deviceId, String roomId) async { + Future roomDelete(String deviceId, String roomId) async { final response = await roomDeleteWithHttpInfo(deviceId, roomId); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -161,9 +161,9 @@ class RoomApi { // 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), 'MultipartFile') as MultipartFile; + return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; } - return Future.value(null); + return Future.value(null); } /// Delete a room @@ -223,7 +223,7 @@ class RoomApi { /// /// * [String] roomId (required): /// Id of room - Future roomDelete2(String roomId) async { + Future roomDelete2(String roomId) async { final response = await roomDelete2WithHttpInfo(roomId); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -232,12 +232,12 @@ class RoomApi { // 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), 'MultipartFile') as MultipartFile; + return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; } - return Future.value(null); + return Future.value(null); } - /// Delete all room for a specified + /// Delete all room for a specified user /// /// Note: This method returns the HTTP [Response]. /// @@ -288,13 +288,13 @@ class RoomApi { ); } - /// Delete all room for a specified + /// Delete all room for a specified user /// /// Parameters: /// /// * [String] userId (required): /// Id of user - Future roomDeleteAllForUser(String userId) async { + Future roomDeleteAllForUser(String userId) async { final response = await roomDeleteAllForUserWithHttpInfo(userId); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -303,9 +303,9 @@ class RoomApi { // 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), 'MultipartFile') as MultipartFile; + return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; } - return Future.value(null); + return Future.value(null); } /// Get all rooms for the specified user diff --git a/mycore_api/lib/api/screen_device_api.dart b/mycore_api/lib/api/screen_device_api.dart index 03b7854..6def34f 100644 --- a/mycore_api/lib/api/screen_device_api.dart +++ b/mycore_api/lib/api/screen_device_api.dart @@ -15,10 +15,14 @@ class ScreenDeviceApi { final ApiClient apiClient; - /// Performs an HTTP 'POST /api/device/screen' operation and returns the [Response]. + /// Create screen device + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [ScreenDevice] screenDevice (required): + /// Screen device to create Future screenDeviceCreateDeviceWithHttpInfo(ScreenDevice screenDevice) async { // Verify required params are set. if (screenDevice == null) { @@ -61,10 +65,13 @@ class ScreenDeviceApi { ); } + /// Create screen device + /// /// Parameters: /// /// * [ScreenDevice] screenDevice (required): - Future screenDeviceCreateDevice(ScreenDevice screenDevice) async { + /// Screen device to create + Future screenDeviceCreateDevice(ScreenDevice screenDevice) async { final response = await screenDeviceCreateDeviceWithHttpInfo(screenDevice); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -73,15 +80,19 @@ class ScreenDeviceApi { // 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), 'MultipartFile') as MultipartFile; + return apiClient.deserialize(_decodeBodyBytes(response), 'ScreenDevice') as ScreenDevice; } - return Future.value(null); + return Future.value(null); } - /// Performs an HTTP 'DELETE /api/device/screen/{deviceId}' operation and returns the [Response]. + /// Delete device + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [String] deviceId (required): + /// Screen device id to update Future screenDeviceDeleteDeviceWithHttpInfo(String deviceId) async { // Verify required params are set. if (deviceId == null) { @@ -125,10 +136,13 @@ class ScreenDeviceApi { ); } + /// Delete device + /// /// Parameters: /// /// * [String] deviceId (required): - Future screenDeviceDeleteDevice(String deviceId) async { + /// Screen device id to update + Future screenDeviceDeleteDevice(String deviceId) async { final response = await screenDeviceDeleteDeviceWithHttpInfo(deviceId); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -137,12 +151,14 @@ class ScreenDeviceApi { // 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), 'MultipartFile') as MultipartFile; + return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; } - return Future.value(null); + return Future.value(null); } - /// Performs an HTTP 'GET /api/device/screen' operation and returns the [Response]. + /// Get all screen devices + /// + /// Note: This method returns the HTTP [Response]. Future screenDeviceGetAllScreenDevicesWithHttpInfo() async { final path = r'/api/device/screen'; @@ -180,6 +196,7 @@ class ScreenDeviceApi { ); } + /// Get all screen devices Future> screenDeviceGetAllScreenDevices() async { final response = await screenDeviceGetAllScreenDevicesWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -196,7 +213,10 @@ class ScreenDeviceApi { return Future>.value(null); } - /// Performs an HTTP 'GET /api/device/screen/{screenDeviceId}' operation and returns the [Response]. + /// Get screen device info + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [String] screenDeviceId (required): @@ -244,6 +264,8 @@ class ScreenDeviceApi { ); } + /// Get screen device info + /// /// Parameters: /// /// * [String] screenDeviceId (required): @@ -262,23 +284,21 @@ class ScreenDeviceApi { return Future.value(null); } - /// Performs an HTTP 'PUT /api/device/screen/{screenDeviceId}' operation and returns the [Response]. + /// Update screen device + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// - /// * [int] screenDeviceId (required): - /// /// * [ScreenDevice] screenDevice (required): - Future screenDeviceUpdateDeviceWithHttpInfo(int screenDeviceId, ScreenDevice screenDevice) async { + /// Screen device to update + Future screenDeviceUpdateDeviceWithHttpInfo(ScreenDevice screenDevice) async { // Verify required params are set. - if (screenDeviceId == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: screenDeviceId'); - } if (screenDevice == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: screenDevice'); } - final path = r'/api/device/screen/{screenDeviceId}' - .replaceAll('{' + 'screenDeviceId' + '}', screenDeviceId.toString()); + final path = r'/api/device/screen'; Object postBody = screenDevice; @@ -314,13 +334,14 @@ class ScreenDeviceApi { ); } + /// Update screen device + /// /// Parameters: /// - /// * [int] screenDeviceId (required): - /// /// * [ScreenDevice] screenDevice (required): - Future screenDeviceUpdateDevice(int screenDeviceId, ScreenDevice screenDevice) async { - final response = await screenDeviceUpdateDeviceWithHttpInfo(screenDeviceId, screenDevice); + /// Screen device to update + Future screenDeviceUpdateDevice(ScreenDevice screenDevice) async { + final response = await screenDeviceUpdateDeviceWithHttpInfo(screenDevice); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); } @@ -328,8 +349,8 @@ class ScreenDeviceApi { // 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), 'MultipartFile') as MultipartFile; + return apiClient.deserialize(_decodeBodyBytes(response), 'ScreenDevice') as ScreenDevice; } - return Future.value(null); + return Future.value(null); } } diff --git a/mycore_api/lib/api/token_api.dart b/mycore_api/lib/api/token_api.dart index ac72635..88287aa 100644 --- a/mycore_api/lib/api/token_api.dart +++ b/mycore_api/lib/api/token_api.dart @@ -15,10 +15,14 @@ class TokenApi { final ApiClient apiClient; - /// Performs an HTTP 'POST /api/token' operation and returns the [Response]. + /// Connect user + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [LoginDTO] loginDTO (required): + /// login info Future tokenConnectUserWithHttpInfo(LoginDTO loginDTO) async { // Verify required params are set. if (loginDTO == null) { @@ -61,9 +65,12 @@ class TokenApi { ); } + /// Connect user + /// /// Parameters: /// /// * [LoginDTO] loginDTO (required): + /// login info Future tokenConnectUser(LoginDTO loginDTO) async { final response = await tokenConnectUserWithHttpInfo(loginDTO); if (response.statusCode >= HttpStatus.badRequest) { diff --git a/mycore_api/lib/api/user_api.dart b/mycore_api/lib/api/user_api.dart index 9c01f91..7a38f44 100644 --- a/mycore_api/lib/api/user_api.dart +++ b/mycore_api/lib/api/user_api.dart @@ -15,10 +15,14 @@ class UserApi { final ApiClient apiClient; - /// Performs an HTTP 'POST /api/user' operation and returns the [Response]. + /// Create an user + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [UserInfo] userInfo (required): + /// New user info Future userCreateUserWithHttpInfo(UserInfo userInfo) async { // Verify required params are set. if (userInfo == null) { @@ -61,9 +65,12 @@ class UserApi { ); } + /// Create an user + /// /// Parameters: /// /// * [UserInfo] userInfo (required): + /// New user info Future userCreateUser(UserInfo userInfo) async { final response = await userCreateUserWithHttpInfo(userInfo); if (response.statusCode >= HttpStatus.badRequest) { @@ -78,10 +85,14 @@ class UserApi { return Future.value(null); } - /// Performs an HTTP 'DELETE /api/user/{id}' operation and returns the [Response]. + /// Delete an user + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [String] id (required): + /// Id of user to delete Future userDeleteUserWithHttpInfo(String id) async { // Verify required params are set. if (id == null) { @@ -125,10 +136,13 @@ class UserApi { ); } + /// Delete an user + /// /// Parameters: /// /// * [String] id (required): - Future userDeleteUser(String id) async { + /// Id of user to delete + Future userDeleteUser(String id) async { final response = await userDeleteUserWithHttpInfo(id); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -137,64 +151,9 @@ class UserApi { // 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), 'MultipartFile') as MultipartFile; + return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; } - return Future.value(null); - } - - /// Get a list of user - /// - /// Note: This method returns the HTTP [Response]. - Future userGetWithHttpInfo() async { - final path = r'/api/user'; - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Get a list of user - Future userGet() async { - final response = await userGetWithHttpInfo(); - 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), 'MultipartFile') as MultipartFile; - } - return Future.value(null); + return Future.value(null); } /// Get a specific user @@ -205,7 +164,7 @@ class UserApi { /// /// * [String] id (required): /// id user - Future userGet2WithHttpInfo(String id) async { + Future userGetWithHttpInfo(String id) async { // Verify required params are set. if (id == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: id'); @@ -254,8 +213,8 @@ class UserApi { /// /// * [String] id (required): /// id user - Future userGet2(String id) async { - final response = await userGet2WithHttpInfo(id); + Future userGet(String id) async { + final response = await userGetWithHttpInfo(id); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); } @@ -268,10 +227,71 @@ class UserApi { return Future.value(null); } - /// Performs an HTTP 'PUT /api/user' operation and returns the [Response]. + /// Get a list of user + /// + /// Note: This method returns the HTTP [Response]. + Future userGetAllWithHttpInfo() async { + final path = r'/api/user'; + + Object postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + final contentTypes = []; + final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; + final authNames = ['bearer']; + + if ( + nullableContentType != null && + nullableContentType.toLowerCase().startsWith('multipart/form-data') + ) { + bool hasFields = false; + final mp = MultipartRequest(null, null); + if (hasFields) { + postBody = mp; + } + } else { + } + + return await apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + nullableContentType, + authNames, + ); + } + + /// Get a list of user + Future> userGetAll() async { + final response = await userGetAllWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body != null && response.statusCode != HttpStatus.noContent) { + return (apiClient.deserialize(_decodeBodyBytes(response), 'List') as List) + .cast() + .toList(growable: false); + } + return Future>.value(null); + } + + /// Update an user + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [UserInfo] userInfo (required): + /// User to update Future userUpdateUserWithHttpInfo(UserInfo userInfo) async { // Verify required params are set. if (userInfo == null) { @@ -314,9 +334,12 @@ class UserApi { ); } + /// Update an user + /// /// Parameters: /// /// * [UserInfo] userInfo (required): + /// User to update Future userUpdateUser(UserInfo userInfo) async { final response = await userUpdateUserWithHttpInfo(userInfo); if (response.statusCode >= HttpStatus.badRequest) { diff --git a/mycore_api/lib/api_client.dart b/mycore_api/lib/api_client.dart index 5c1de36..94d433d 100644 --- a/mycore_api/lib/api_client.dart +++ b/mycore_api/lib/api_client.dart @@ -10,9 +10,9 @@ part of openapi.api; class ApiClient { - ApiClient({this.basePath = 'http://192.168.31.140', deserializeDelegate}) { + ApiClient({this.basePath = 'http://localhost:25049'}) { // Setup authentications (key: authentication name, value: authentication). - _authentications[r'bearer'] = OAuth(accessToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InRlc3RAZW1haWwuYmUiLCJuYmYiOjE2MTY3MDY1MzcsImV4cCI6MTYyMTg5MDUzNywiaWF0IjoxNjE2NzA2NTM3fQ.pY5XM2QqoIOGtnfYfvG8a5IxkmRPKDYsRGeBwMnVrfM"); + _authentications[r'bearer'] = OAuth(); } final String basePath; @@ -173,6 +173,8 @@ class ApiClient { return AutomationDetailDTO.fromJson(value); case 'AutomationDetailDTOAllOf': return AutomationDetailDTOAllOf.fromJson(value); + case 'AutomationState': + return AutomationState.fromJson(value); case 'AzureADAuthModel': return AzureADAuthModel.fromJson(value); case 'Book': @@ -217,8 +219,6 @@ class ApiClient { return GroupDetailDTOAllOf.fromJson(value); case 'GroupSummaryDTO': return GroupSummaryDTO.fromJson(value); - case 'LocationDTO': - return LocationDTO.fromJson(value); case 'LoginDTO': return LoginDTO.fromJson(value); case 'MeansOfCommunication': @@ -226,14 +226,16 @@ class ApiClient { case 'MqttMessageDTO': return MqttMessageDTO.fromJson(value); - case 'OddH2H': - return OddH2H.fromJson(value); case 'OddNice': return OddNice.fromJson(value); + case 'OddObject': + return OddObject.fromJson(value); case 'PanelMenuItem': return PanelMenuItem.fromJson(value); case 'PanelSection': return PanelSection.fromJson(value); + case 'PlaceDTO': + return PlaceDTO.fromJson(value); case 'Provider': return Provider.fromJson(value); case 'ProviderDTO': @@ -248,12 +250,14 @@ class ApiClient { return ScreenConfiguration.fromJson(value); case 'ScreenDevice': return ScreenDevice.fromJson(value); + case 'ScreenWidget': + return ScreenWidget.fromJson(value); case 'SmartGardenMessage': return SmartGardenMessage.fromJson(value); case 'SmartPrinterMessage': return SmartPrinterMessage.fromJson(value); - case 'State': - return StateAPI.fromJson(value); + case 'TokenDTO': + return TokenDTO.fromJson(value); case 'Trigger': return Trigger.fromJson(value); case 'TriggerType': @@ -270,8 +274,6 @@ class ApiClient { case 'ViewBy': return ViewByTypeTransformer().decode(value); - case 'Widget': - return WidgetAPI.fromJson(value); default: Match match; if (value is List && (match = _regList.firstMatch(targetType)) != null) { diff --git a/mycore_api/lib/model/action.dart b/mycore_api/lib/model/action.dart index 085280a..3d0b9d3 100644 --- a/mycore_api/lib/model/action.dart +++ b/mycore_api/lib/model/action.dart @@ -24,7 +24,7 @@ class Action { String deviceId; - List states; + List states; String rawRequest; @@ -83,7 +83,7 @@ class Action { : Action( groupId: json[r'groupId'], deviceId: json[r'deviceId'], - states: StateAPI.listFromJson(json[r'states']), + states: AutomationState.listFromJson(json[r'states']), rawRequest: json[r'rawRequest'], providerId: json[r'providerId'], type: ActionType.fromJson(json[r'type']), diff --git a/mycore_api/lib/model/automation.dart b/mycore_api/lib/model/automation.dart index 91bb5cd..5eb1e9a 100644 --- a/mycore_api/lib/model/automation.dart +++ b/mycore_api/lib/model/automation.dart @@ -15,6 +15,7 @@ class Automation { this.id, this.userId, this.name, + this.active, this.createdDate, this.updatedDate, this.triggers, @@ -29,6 +30,8 @@ class Automation { String name; + bool active; + DateTime createdDate; DateTime updatedDate; @@ -46,6 +49,7 @@ class Automation { other.id == id && other.userId == userId && other.name == name && + other.active == active && other.createdDate == createdDate && other.updatedDate == updatedDate && other.triggers == triggers && @@ -58,6 +62,7 @@ class Automation { (id == null ? 0 : id.hashCode) + (userId == null ? 0 : userId.hashCode) + (name == null ? 0 : name.hashCode) + + (active == null ? 0 : active.hashCode) + (createdDate == null ? 0 : createdDate.hashCode) + (updatedDate == null ? 0 : updatedDate.hashCode) + (triggers == null ? 0 : triggers.hashCode) + @@ -66,7 +71,7 @@ class Automation { (devicesIds == null ? 0 : devicesIds.hashCode); @override - String toString() => 'Automation[id=$id, userId=$userId, name=$name, createdDate=$createdDate, updatedDate=$updatedDate, triggers=$triggers, conditions=$conditions, actions=$actions, devicesIds=$devicesIds]'; + String toString() => 'Automation[id=$id, userId=$userId, name=$name, active=$active, createdDate=$createdDate, updatedDate=$updatedDate, triggers=$triggers, conditions=$conditions, actions=$actions, devicesIds=$devicesIds]'; Map toJson() { final json = {}; @@ -79,6 +84,9 @@ class Automation { if (name != null) { json[r'name'] = name; } + if (active != null) { + json[r'active'] = active; + } if (createdDate != null) { json[r'createdDate'] = createdDate.toUtc().toIso8601String(); } @@ -108,6 +116,7 @@ class Automation { id: json[r'id'], userId: json[r'userId'], name: json[r'name'], + active: json[r'active'], createdDate: json[r'createdDate'] == null ? null : DateTime.parse(json[r'createdDate']), diff --git a/mycore_api/lib/model/automation_create_or_update_detail_dto.dart b/mycore_api/lib/model/automation_create_or_update_detail_dto.dart index 32ff3a1..3216b8d 100644 --- a/mycore_api/lib/model/automation_create_or_update_detail_dto.dart +++ b/mycore_api/lib/model/automation_create_or_update_detail_dto.dart @@ -14,6 +14,7 @@ class AutomationCreateOrUpdateDetailDTO { AutomationCreateOrUpdateDetailDTO({ this.id, this.name, + this.active, this.userId, this.createdDate, this.updatedDate, @@ -27,6 +28,8 @@ class AutomationCreateOrUpdateDetailDTO { String name; + bool active; + String userId; DateTime createdDate; @@ -45,6 +48,7 @@ class AutomationCreateOrUpdateDetailDTO { bool operator ==(Object other) => identical(this, other) || other is AutomationCreateOrUpdateDetailDTO && other.id == id && other.name == name && + other.active == active && other.userId == userId && other.createdDate == createdDate && other.updatedDate == updatedDate && @@ -57,6 +61,7 @@ class AutomationCreateOrUpdateDetailDTO { int get hashCode => (id == null ? 0 : id.hashCode) + (name == null ? 0 : name.hashCode) + + (active == null ? 0 : active.hashCode) + (userId == null ? 0 : userId.hashCode) + (createdDate == null ? 0 : createdDate.hashCode) + (updatedDate == null ? 0 : updatedDate.hashCode) + @@ -66,7 +71,7 @@ class AutomationCreateOrUpdateDetailDTO { (deviceIds == null ? 0 : deviceIds.hashCode); @override - String toString() => 'AutomationCreateOrUpdateDetailDTO[id=$id, name=$name, userId=$userId, createdDate=$createdDate, updatedDate=$updatedDate, triggers=$triggers, conditions=$conditions, actions=$actions, deviceIds=$deviceIds]'; + String toString() => 'AutomationCreateOrUpdateDetailDTO[id=$id, name=$name, active=$active, userId=$userId, createdDate=$createdDate, updatedDate=$updatedDate, triggers=$triggers, conditions=$conditions, actions=$actions, deviceIds=$deviceIds]'; Map toJson() { final json = {}; @@ -76,6 +81,9 @@ class AutomationCreateOrUpdateDetailDTO { if (name != null) { json[r'name'] = name; } + if (active != null) { + json[r'active'] = active; + } if (userId != null) { json[r'userId'] = userId; } @@ -107,6 +115,7 @@ class AutomationCreateOrUpdateDetailDTO { : AutomationCreateOrUpdateDetailDTO( id: json[r'id'], name: json[r'name'], + active: json[r'active'], userId: json[r'userId'], createdDate: json[r'createdDate'] == null ? null diff --git a/mycore_api/lib/model/automation_detail_dto.dart b/mycore_api/lib/model/automation_detail_dto.dart index e3f3f9d..46371cd 100644 --- a/mycore_api/lib/model/automation_detail_dto.dart +++ b/mycore_api/lib/model/automation_detail_dto.dart @@ -14,6 +14,7 @@ class AutomationDetailDTO { AutomationDetailDTO({ this.id, this.name, + this.active, this.userId, this.createdDate, this.updatedDate, @@ -27,6 +28,8 @@ class AutomationDetailDTO { String name; + bool active; + String userId; DateTime createdDate; @@ -45,6 +48,7 @@ class AutomationDetailDTO { bool operator ==(Object other) => identical(this, other) || other is AutomationDetailDTO && other.id == id && other.name == name && + other.active == active && other.userId == userId && other.createdDate == createdDate && other.updatedDate == updatedDate && @@ -57,6 +61,7 @@ class AutomationDetailDTO { int get hashCode => (id == null ? 0 : id.hashCode) + (name == null ? 0 : name.hashCode) + + (active == null ? 0 : active.hashCode) + (userId == null ? 0 : userId.hashCode) + (createdDate == null ? 0 : createdDate.hashCode) + (updatedDate == null ? 0 : updatedDate.hashCode) + @@ -66,7 +71,7 @@ class AutomationDetailDTO { (devicesIds == null ? 0 : devicesIds.hashCode); @override - String toString() => 'AutomationDetailDTO[id=$id, name=$name, userId=$userId, createdDate=$createdDate, updatedDate=$updatedDate, triggers=$triggers, conditions=$conditions, actions=$actions, devicesIds=$devicesIds]'; + String toString() => 'AutomationDetailDTO[id=$id, name=$name, active=$active, userId=$userId, createdDate=$createdDate, updatedDate=$updatedDate, triggers=$triggers, conditions=$conditions, actions=$actions, devicesIds=$devicesIds]'; Map toJson() { final json = {}; @@ -76,6 +81,9 @@ class AutomationDetailDTO { if (name != null) { json[r'name'] = name; } + if (active != null) { + json[r'active'] = active; + } if (userId != null) { json[r'userId'] = userId; } @@ -107,6 +115,7 @@ class AutomationDetailDTO { : AutomationDetailDTO( id: json[r'id'], name: json[r'name'], + active: json[r'active'], userId: json[r'userId'], createdDate: json[r'createdDate'] == null ? null diff --git a/mycore_api/lib/model/automation_dto.dart b/mycore_api/lib/model/automation_dto.dart index 68bed66..779c392 100644 --- a/mycore_api/lib/model/automation_dto.dart +++ b/mycore_api/lib/model/automation_dto.dart @@ -14,6 +14,7 @@ class AutomationDTO { AutomationDTO({ this.id, this.name, + this.active, this.userId, this.createdDate, this.updatedDate, @@ -23,6 +24,8 @@ class AutomationDTO { String name; + bool active; + String userId; DateTime createdDate; @@ -33,6 +36,7 @@ class AutomationDTO { bool operator ==(Object other) => identical(this, other) || other is AutomationDTO && other.id == id && other.name == name && + other.active == active && other.userId == userId && other.createdDate == createdDate && other.updatedDate == updatedDate; @@ -41,12 +45,13 @@ class AutomationDTO { int get hashCode => (id == null ? 0 : id.hashCode) + (name == null ? 0 : name.hashCode) + + (active == null ? 0 : active.hashCode) + (userId == null ? 0 : userId.hashCode) + (createdDate == null ? 0 : createdDate.hashCode) + (updatedDate == null ? 0 : updatedDate.hashCode); @override - String toString() => 'AutomationDTO[id=$id, name=$name, userId=$userId, createdDate=$createdDate, updatedDate=$updatedDate]'; + String toString() => 'AutomationDTO[id=$id, name=$name, active=$active, userId=$userId, createdDate=$createdDate, updatedDate=$updatedDate]'; Map toJson() { final json = {}; @@ -56,6 +61,9 @@ class AutomationDTO { if (name != null) { json[r'name'] = name; } + if (active != null) { + json[r'active'] = active; + } if (userId != null) { json[r'userId'] = userId; } @@ -75,6 +83,7 @@ class AutomationDTO { : AutomationDTO( id: json[r'id'], name: json[r'name'], + active: json[r'active'], userId: json[r'userId'], createdDate: json[r'createdDate'] == null ? null diff --git a/mycore_api/lib/model/automation_state.dart b/mycore_api/lib/model/automation_state.dart new file mode 100644 index 0000000..7c55189 --- /dev/null +++ b/mycore_api/lib/model/automation_state.dart @@ -0,0 +1,80 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.0 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class AutomationState { + /// Returns a new [AutomationState] instance. + AutomationState({ + this.name, + this.value, + }); + + String name; + + String value; + + @override + bool operator ==(Object other) => identical(this, other) || other is AutomationState && + other.name == name && + other.value == value; + + @override + int get hashCode => + (name == null ? 0 : name.hashCode) + + (value == null ? 0 : value.hashCode); + + @override + String toString() => 'AutomationState[name=$name, value=$value]'; + + Map toJson() { + final json = {}; + if (name != null) { + json[r'name'] = name; + } + if (value != null) { + json[r'value'] = value; + } + return json; + } + + /// Returns a new [AutomationState] instance and imports its values from + /// [json] if it's non-null, null if [json] is null. + static AutomationState fromJson(Map json) => json == null + ? null + : AutomationState( + name: json[r'name'], + value: json[r'value'], + ); + + static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => + json == null || json.isEmpty + ? true == emptyIsNull ? null : [] + : json.map((v) => AutomationState.fromJson(v)).toList(growable: true == growable); + + static Map mapFromJson(Map json) { + final map = {}; + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic v) => map[key] = AutomationState.fromJson(v)); + } + return map; + } + + // maps a json object with a list of AutomationState-objects as value to a dart map + static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { + final map = >{}; + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic v) { + map[key] = AutomationState.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); + }); + } + return map; + } +} + diff --git a/mycore_api/lib/model/condition.dart b/mycore_api/lib/model/condition.dart index 8fdf70e..390b350 100644 --- a/mycore_api/lib/model/condition.dart +++ b/mycore_api/lib/model/condition.dart @@ -22,7 +22,7 @@ class Condition { String deviceId; - StateAPI state; + AutomationState state; String startTime; @@ -82,6 +82,7 @@ class Condition { ? null : Condition( deviceId: json[r'deviceId'], + state: AutomationState.fromJson(json[r'state']), startTime: json[r'startTime'], endTime: json[r'endTime'], type: ConditionType.fromJson(json[r'type']), diff --git a/mycore_api/lib/model/device.dart b/mycore_api/lib/model/device.dart index 91ce1af..e1b49b2 100644 --- a/mycore_api/lib/model/device.dart +++ b/mycore_api/lib/model/device.dart @@ -88,7 +88,7 @@ class Device { List groupIds; - Map properties; + String properties; List supportedOperations; @@ -273,6 +273,7 @@ class Device { groupIds: json[r'groupIds'] == null ? null : (json[r'groupIds'] as List).cast(), + properties: json[r'properties'], supportedOperations: json[r'supportedOperations'] == null ? null : (json[r'supportedOperations'] as List).cast(), diff --git a/mycore_api/lib/model/device_detail_dto.dart b/mycore_api/lib/model/device_detail_dto.dart index 0f2a2da..5178692 100644 --- a/mycore_api/lib/model/device_detail_dto.dart +++ b/mycore_api/lib/model/device_detail_dto.dart @@ -23,6 +23,7 @@ class DeviceDetailDTO { this.locationId, this.providerId, this.providerName, + this.location, this.lastStateDate, this.battery, this.batteryStatus, @@ -63,6 +64,8 @@ class DeviceDetailDTO { String providerName; + PlaceDTO location; + DateTime lastStateDate; bool battery; @@ -91,7 +94,7 @@ class DeviceDetailDTO { List groupIds; - Map properties; + String properties; List supportedOperations; @@ -108,6 +111,7 @@ class DeviceDetailDTO { other.locationId == locationId && other.providerId == providerId && other.providerName == providerName && + other.location == location && other.lastStateDate == lastStateDate && other.battery == battery && other.batteryStatus == batteryStatus && @@ -138,6 +142,7 @@ class DeviceDetailDTO { (locationId == null ? 0 : locationId.hashCode) + (providerId == null ? 0 : providerId.hashCode) + (providerName == null ? 0 : providerName.hashCode) + + (location == null ? 0 : location.hashCode) + (lastStateDate == null ? 0 : lastStateDate.hashCode) + (battery == null ? 0 : battery.hashCode) + (batteryStatus == null ? 0 : batteryStatus.hashCode) + @@ -156,7 +161,7 @@ class DeviceDetailDTO { (supportedOperations == null ? 0 : supportedOperations.hashCode); @override - String toString() => 'DeviceDetailDTO[id=$id, userId=$userId, description=$description, name=$name, model=$model, type=$type, status=$status, connectionStatus=$connectionStatus, locationId=$locationId, providerId=$providerId, providerName=$providerName, lastStateDate=$lastStateDate, battery=$battery, batteryStatus=$batteryStatus, firmwareVersion=$firmwareVersion, hardwareVersion=$hardwareVersion, port=$port, meansOfCommunications=$meansOfCommunications, createdDate=$createdDate, updatedDate=$updatedDate, lastState=$lastState, ipAddress=$ipAddress, serviceIdentification=$serviceIdentification, manufacturerName=$manufacturerName, groupIds=$groupIds, properties=$properties, supportedOperations=$supportedOperations]'; + String toString() => 'DeviceDetailDTO[id=$id, userId=$userId, description=$description, name=$name, model=$model, type=$type, status=$status, connectionStatus=$connectionStatus, locationId=$locationId, providerId=$providerId, providerName=$providerName, location=$location, lastStateDate=$lastStateDate, battery=$battery, batteryStatus=$batteryStatus, firmwareVersion=$firmwareVersion, hardwareVersion=$hardwareVersion, port=$port, meansOfCommunications=$meansOfCommunications, createdDate=$createdDate, updatedDate=$updatedDate, lastState=$lastState, ipAddress=$ipAddress, serviceIdentification=$serviceIdentification, manufacturerName=$manufacturerName, groupIds=$groupIds, properties=$properties, supportedOperations=$supportedOperations]'; Map toJson() { final json = {}; @@ -193,6 +198,9 @@ class DeviceDetailDTO { if (providerName != null) { json[r'providerName'] = providerName; } + if (location != null) { + json[r'location'] = location; + } if (lastStateDate != null) { json[r'lastStateDate'] = lastStateDate.toUtc().toIso8601String(); } @@ -260,6 +268,7 @@ class DeviceDetailDTO { locationId: json[r'locationId'], providerId: json[r'providerId'], providerName: json[r'providerName'], + location: PlaceDTO.fromJson(json[r'location']), lastStateDate: json[r'lastStateDate'] == null ? null : DateTime.parse(json[r'lastStateDate']), @@ -282,6 +291,7 @@ class DeviceDetailDTO { groupIds: json[r'groupIds'] == null ? null : (json[r'groupIds'] as List).cast(), + properties: json[r'properties'], supportedOperations: json[r'supportedOperations'] == null ? null : (json[r'supportedOperations'] as List).cast(), diff --git a/mycore_api/lib/model/device_detail_dto_all_of.dart b/mycore_api/lib/model/device_detail_dto_all_of.dart index 0dd57f2..62a285f 100644 --- a/mycore_api/lib/model/device_detail_dto_all_of.dart +++ b/mycore_api/lib/model/device_detail_dto_all_of.dart @@ -49,7 +49,7 @@ class DeviceDetailDTOAllOf { List groupIds; - Map properties; + String properties; List supportedOperations; @@ -154,6 +154,7 @@ class DeviceDetailDTOAllOf { groupIds: json[r'groupIds'] == null ? null : (json[r'groupIds'] as List).cast(), + properties: json[r'properties'], supportedOperations: json[r'supportedOperations'] == null ? null : (json[r'supportedOperations'] as List).cast(), diff --git a/mycore_api/lib/model/device_summary_dto.dart b/mycore_api/lib/model/device_summary_dto.dart index a4d5739..6280915 100644 --- a/mycore_api/lib/model/device_summary_dto.dart +++ b/mycore_api/lib/model/device_summary_dto.dart @@ -23,6 +23,7 @@ class DeviceSummaryDTO { this.locationId, this.providerId, this.providerName, + this.location, this.lastStateDate, this.battery, this.batteryStatus, @@ -50,6 +51,8 @@ class DeviceSummaryDTO { String providerName; + PlaceDTO location; + DateTime lastStateDate; bool battery; @@ -69,6 +72,7 @@ class DeviceSummaryDTO { other.locationId == locationId && other.providerId == providerId && other.providerName == providerName && + other.location == location && other.lastStateDate == lastStateDate && other.battery == battery && other.batteryStatus == batteryStatus; @@ -86,12 +90,13 @@ class DeviceSummaryDTO { (locationId == null ? 0 : locationId.hashCode) + (providerId == null ? 0 : providerId.hashCode) + (providerName == null ? 0 : providerName.hashCode) + + (location == null ? 0 : location.hashCode) + (lastStateDate == null ? 0 : lastStateDate.hashCode) + (battery == null ? 0 : battery.hashCode) + (batteryStatus == null ? 0 : batteryStatus.hashCode); @override - String toString() => 'DeviceSummaryDTO[id=$id, userId=$userId, description=$description, name=$name, model=$model, type=$type, status=$status, connectionStatus=$connectionStatus, locationId=$locationId, providerId=$providerId, providerName=$providerName, lastStateDate=$lastStateDate, battery=$battery, batteryStatus=$batteryStatus]'; + String toString() => 'DeviceSummaryDTO[id=$id, userId=$userId, description=$description, name=$name, model=$model, type=$type, status=$status, connectionStatus=$connectionStatus, locationId=$locationId, providerId=$providerId, providerName=$providerName, location=$location, lastStateDate=$lastStateDate, battery=$battery, batteryStatus=$batteryStatus]'; Map toJson() { final json = {}; @@ -128,6 +133,9 @@ class DeviceSummaryDTO { if (providerName != null) { json[r'providerName'] = providerName; } + if (location != null) { + json[r'location'] = location; + } if (lastStateDate != null) { json[r'lastStateDate'] = lastStateDate.toUtc().toIso8601String(); } @@ -156,6 +164,7 @@ class DeviceSummaryDTO { locationId: json[r'locationId'], providerId: json[r'providerId'], providerName: json[r'providerName'], + location: PlaceDTO.fromJson(json[r'location']), lastStateDate: json[r'lastStateDate'] == null ? null : DateTime.parse(json[r'lastStateDate']), diff --git a/mycore_api/lib/model/odd_nice.dart b/mycore_api/lib/model/odd_nice.dart index 91ccc7c..71390a4 100644 --- a/mycore_api/lib/model/odd_nice.dart +++ b/mycore_api/lib/model/odd_nice.dart @@ -15,6 +15,7 @@ class OddNice { this.teams, this.commenceTime, this.homeTeam, + this.odds, }); List teams; @@ -23,20 +24,24 @@ class OddNice { String homeTeam; + OddObject odds; + @override bool operator ==(Object other) => identical(this, other) || other is OddNice && other.teams == teams && other.commenceTime == commenceTime && - other.homeTeam == homeTeam; + other.homeTeam == homeTeam && + other.odds == odds; @override int get hashCode => (teams == null ? 0 : teams.hashCode) + (commenceTime == null ? 0 : commenceTime.hashCode) + - (homeTeam == null ? 0 : homeTeam.hashCode); + (homeTeam == null ? 0 : homeTeam.hashCode) + + (odds == null ? 0 : odds.hashCode); @override - String toString() => 'OddNice[teams=$teams, commenceTime=$commenceTime, homeTeam=$homeTeam]'; + String toString() => 'OddNice[teams=$teams, commenceTime=$commenceTime, homeTeam=$homeTeam, odds=$odds]'; Map toJson() { final json = {}; @@ -49,6 +54,9 @@ class OddNice { if (homeTeam != null) { json[r'home_team'] = homeTeam; } + if (odds != null) { + json[r'odds'] = odds; + } return json; } @@ -62,6 +70,7 @@ class OddNice { : (json[r'teams'] as List).cast(), commenceTime: json[r'commence_time'], homeTeam: json[r'home_team'], + odds: OddObject.fromJson(json[r'odds']), ); static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => diff --git a/mycore_api/lib/model/odd_h2_h.dart b/mycore_api/lib/model/odd_object.dart similarity index 56% rename from mycore_api/lib/model/odd_h2_h.dart rename to mycore_api/lib/model/odd_object.dart index 944f420..72a301d 100644 --- a/mycore_api/lib/model/odd_h2_h.dart +++ b/mycore_api/lib/model/odd_object.dart @@ -9,9 +9,9 @@ part of openapi.api; -class OddH2H { - /// Returns a new [OddH2H] instance. - OddH2H({ +class OddObject { + /// Returns a new [OddObject] instance. + OddObject({ this.homeOdd, this.drawOdd, this.visitOdd, @@ -24,7 +24,7 @@ class OddH2H { double visitOdd; @override - bool operator ==(Object other) => identical(this, other) || other is OddH2H && + bool operator ==(Object other) => identical(this, other) || other is OddObject && other.homeOdd == homeOdd && other.drawOdd == drawOdd && other.visitOdd == visitOdd; @@ -36,7 +36,7 @@ class OddH2H { (visitOdd == null ? 0 : visitOdd.hashCode); @override - String toString() => 'OddH2H[homeOdd=$homeOdd, drawOdd=$drawOdd, visitOdd=$visitOdd]'; + String toString() => 'OddObject[homeOdd=$homeOdd, drawOdd=$drawOdd, visitOdd=$visitOdd]'; Map toJson() { final json = {}; @@ -52,35 +52,35 @@ class OddH2H { return json; } - /// Returns a new [OddH2H] instance and imports its values from + /// Returns a new [OddObject] instance and imports its values from /// [json] if it's non-null, null if [json] is null. - static OddH2H fromJson(Map json) => json == null + static OddObject fromJson(Map json) => json == null ? null - : OddH2H( + : OddObject( homeOdd: json[r'homeOdd'], drawOdd: json[r'drawOdd'], visitOdd: json[r'visitOdd'], ); - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => + static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => OddH2H.fromJson(v)).toList(growable: true == growable); + ? true == emptyIsNull ? null : [] + : json.map((v) => OddObject.fromJson(v)).toList(growable: true == growable); - static Map mapFromJson(Map json) { - final map = {}; + static Map mapFromJson(Map json) { + final map = {}; if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = OddH2H.fromJson(v)); + json.forEach((String key, dynamic v) => map[key] = OddObject.fromJson(v)); } return map; } - // maps a json object with a list of OddH2H-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; + // maps a json object with a list of OddObject-objects as value to a dart map + static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { + final map = >{}; if (json != null && json.isNotEmpty) { json.forEach((String key, dynamic v) { - map[key] = OddH2H.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); + map[key] = OddObject.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); }); } return map; diff --git a/mycore_api/lib/model/place_dto.dart b/mycore_api/lib/model/place_dto.dart new file mode 100644 index 0000000..9bf0965 --- /dev/null +++ b/mycore_api/lib/model/place_dto.dart @@ -0,0 +1,80 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.0 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class PlaceDTO { + /// Returns a new [PlaceDTO] instance. + PlaceDTO({ + this.id, + this.name, + }); + + String id; + + String name; + + @override + bool operator ==(Object other) => identical(this, other) || other is PlaceDTO && + other.id == id && + other.name == name; + + @override + int get hashCode => + (id == null ? 0 : id.hashCode) + + (name == null ? 0 : name.hashCode); + + @override + String toString() => 'PlaceDTO[id=$id, name=$name]'; + + Map toJson() { + final json = {}; + if (id != null) { + json[r'id'] = id; + } + if (name != null) { + json[r'name'] = name; + } + return json; + } + + /// Returns a new [PlaceDTO] instance and imports its values from + /// [json] if it's non-null, null if [json] is null. + static PlaceDTO fromJson(Map json) => json == null + ? null + : PlaceDTO( + id: json[r'id'], + name: json[r'name'], + ); + + static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => + json == null || json.isEmpty + ? true == emptyIsNull ? null : [] + : json.map((v) => PlaceDTO.fromJson(v)).toList(growable: true == growable); + + static Map mapFromJson(Map json) { + final map = {}; + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic v) => map[key] = PlaceDTO.fromJson(v)); + } + return map; + } + + // maps a json object with a list of PlaceDTO-objects as value to a dart map + static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { + final map = >{}; + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic v) { + map[key] = PlaceDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); + }); + } + return map; + } +} + diff --git a/mycore_api/lib/model/screen_configuration.dart b/mycore_api/lib/model/screen_configuration.dart index cfa6aee..b78a6d9 100644 --- a/mycore_api/lib/model/screen_configuration.dart +++ b/mycore_api/lib/model/screen_configuration.dart @@ -26,7 +26,7 @@ class ScreenConfiguration { String type; - List widgets; + List widgets; int height; @@ -84,7 +84,7 @@ class ScreenConfiguration { id: json[r'id'], name: json[r'name'], type: json[r'type'], - widgets: WidgetAPI.listFromJson(json[r'widgets']), + widgets: ScreenWidget.listFromJson(json[r'widgets']), height: json[r'height'], width: json[r'width'], ); diff --git a/mycore_api/lib/model/widget.dart b/mycore_api/lib/model/screen_widget.dart similarity index 72% rename from mycore_api/lib/model/widget.dart rename to mycore_api/lib/model/screen_widget.dart index f78812e..398a6a3 100644 --- a/mycore_api/lib/model/widget.dart +++ b/mycore_api/lib/model/screen_widget.dart @@ -9,9 +9,9 @@ part of openapi.api; -class WidgetAPI { - /// Returns a new [Widget] instance. - WidgetAPI({ +class ScreenWidget { + /// Returns a new [ScreenWidget] instance. + ScreenWidget({ this.id, this.name, this.displayName, @@ -54,7 +54,7 @@ class WidgetAPI { int positionY; @override - bool operator ==(Object other) => identical(this, other) || other is WidgetAPI && + bool operator ==(Object other) => identical(this, other) || other is ScreenWidget && other.id == id && other.name == name && other.displayName == displayName && @@ -86,7 +86,7 @@ class WidgetAPI { (positionY == null ? 0 : positionY.hashCode); @override - String toString() => 'Widget[id=$id, name=$name, displayName=$displayName, type=$type, activated=$activated, form=$form, font=$font, color=$color, size=$size, width=$width, height=$height, positionX=$positionX, positionY=$positionY]'; + String toString() => 'ScreenWidget[id=$id, name=$name, displayName=$displayName, type=$type, activated=$activated, form=$form, font=$font, color=$color, size=$size, width=$width, height=$height, positionX=$positionX, positionY=$positionY]'; Map toJson() { final json = {}; @@ -132,11 +132,11 @@ class WidgetAPI { return json; } - /// Returns a new [Widget] instance and imports its values from + /// Returns a new [ScreenWidget] instance and imports its values from /// [json] if it's non-null, null if [json] is null. - static WidgetAPI fromJson(Map json) => json == null + static ScreenWidget fromJson(Map json) => json == null ? null - : WidgetAPI( + : ScreenWidget( id: json[r'id'], name: json[r'name'], displayName: json[r'displayName'], @@ -152,25 +152,25 @@ class WidgetAPI { positionY: json[r'positionY'], ); - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => + static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => WidgetAPI.fromJson(v)).toList(growable: true == growable); + ? true == emptyIsNull ? null : [] + : json.map((v) => ScreenWidget.fromJson(v)).toList(growable: true == growable); - static Map mapFromJson(Map json) { - final map = {}; + static Map mapFromJson(Map json) { + final map = {}; if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = WidgetAPI.fromJson(v)); + json.forEach((String key, dynamic v) => map[key] = ScreenWidget.fromJson(v)); } return map; } - // maps a json object with a list of Widget-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; + // maps a json object with a list of ScreenWidget-objects as value to a dart map + static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { + final map = >{}; if (json != null && json.isNotEmpty) { json.forEach((String key, dynamic v) { - map[key] = WidgetAPI.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); + map[key] = ScreenWidget.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); }); } return map; diff --git a/mycore_api/lib/model/state.dart b/mycore_api/lib/model/state.dart deleted file mode 100644 index 28f7ce9..0000000 --- a/mycore_api/lib/model/state.dart +++ /dev/null @@ -1,80 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class StateAPI { - /// Returns a new [State] instance. - StateAPI({ - this.name, - this.value, - }); - - String name; - - String value; - - @override - bool operator ==(Object other) => identical(this, other) || other is StateAPI && - other.name == name && - other.value == value; - - @override - int get hashCode => - (name == null ? 0 : name.hashCode) + - (value == null ? 0 : value.hashCode); - - @override - String toString() => 'State[name=$name, value=$value]'; - - Map toJson() { - final json = {}; - if (name != null) { - json[r'name'] = name; - } - if (value != null) { - json[r'value'] = value; - } - return json; - } - - /// Returns a new [State] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static StateAPI fromJson(Map json) => json == null - ? null - : StateAPI( - name: json[r'name'], - value: json[r'value'], - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => StateAPI.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = StateAPI.fromJson(v)); - } - return map; - } - - // maps a json object with a list of State-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = StateAPI.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/mycore_api/lib/model/token_dto.dart b/mycore_api/lib/model/token_dto.dart new file mode 100644 index 0000000..5ef4e57 --- /dev/null +++ b/mycore_api/lib/model/token_dto.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.0 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class TokenDTO { + /// Returns a new [TokenDTO] instance. + TokenDTO({ + this.accessToken, + this.refreshToken, + this.scope, + this.tokenType, + this.expiresIn, + this.expiration, + }); + + String accessToken; + + String refreshToken; + + String scope; + + String tokenType; + + int expiresIn; + + DateTime expiration; + + @override + bool operator ==(Object other) => identical(this, other) || other is TokenDTO && + other.accessToken == accessToken && + other.refreshToken == refreshToken && + other.scope == scope && + other.tokenType == tokenType && + other.expiresIn == expiresIn && + other.expiration == expiration; + + @override + int get hashCode => + (accessToken == null ? 0 : accessToken.hashCode) + + (refreshToken == null ? 0 : refreshToken.hashCode) + + (scope == null ? 0 : scope.hashCode) + + (tokenType == null ? 0 : tokenType.hashCode) + + (expiresIn == null ? 0 : expiresIn.hashCode) + + (expiration == null ? 0 : expiration.hashCode); + + @override + String toString() => 'TokenDTO[accessToken=$accessToken, refreshToken=$refreshToken, scope=$scope, tokenType=$tokenType, expiresIn=$expiresIn, expiration=$expiration]'; + + Map toJson() { + final json = {}; + if (accessToken != null) { + json[r'access_token'] = accessToken; + } + if (refreshToken != null) { + json[r'refresh_token'] = refreshToken; + } + if (scope != null) { + json[r'scope'] = scope; + } + if (tokenType != null) { + json[r'token_type'] = tokenType; + } + if (expiresIn != null) { + json[r'expires_in'] = expiresIn; + } + if (expiration != null) { + json[r'expiration'] = expiration.toUtc().toIso8601String(); + } + return json; + } + + /// Returns a new [TokenDTO] instance and imports its values from + /// [json] if it's non-null, null if [json] is null. + static TokenDTO fromJson(Map json) => json == null + ? null + : TokenDTO( + accessToken: json[r'access_token'], + refreshToken: json[r'refresh_token'], + scope: json[r'scope'], + tokenType: json[r'token_type'], + expiresIn: json[r'expires_in'], + expiration: json[r'expiration'] == null + ? null + : DateTime.parse(json[r'expiration']), + ); + + static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => + json == null || json.isEmpty + ? true == emptyIsNull ? null : [] + : json.map((v) => TokenDTO.fromJson(v)).toList(growable: true == growable); + + static Map mapFromJson(Map json) { + final map = {}; + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic v) => map[key] = TokenDTO.fromJson(v)); + } + return map; + } + + // maps a json object with a list of TokenDTO-objects as value to a dart map + static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { + final map = >{}; + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic v) { + map[key] = TokenDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); + }); + } + return map; + } +} + diff --git a/mycore_api/swagger.yaml b/mycore_api/swagger.yaml index b6e83e3..209777e 100644 --- a/mycore_api/swagger.yaml +++ b/mycore_api/swagger.yaml @@ -5,7 +5,7 @@ info: description: API description version: Version Pre-Alpha servers: - - url: 'http://192.168.31.140' + - url: 'http://localhost:25049' paths: /api/books: get: @@ -142,6 +142,12 @@ paths: type: array items: $ref: '#/components/schemas/DeviceSummaryDTO' + '500': + description: '' + content: + application/json: + schema: + type: string security: - bearer: [] '/api/device/detail/{deviceId}': @@ -166,6 +172,24 @@ paths: 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/{userId}/type/{type}': @@ -199,6 +223,18 @@ paths: 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: @@ -223,6 +259,30 @@ paths: 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/{userId}/fromProvider/{providerId}': @@ -257,6 +317,36 @@ paths: 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: @@ -290,6 +380,24 @@ paths: 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: @@ -315,13 +423,30 @@ paths: nullable: true x-position: 2 responses: - '200': + '202': description: '' content: - application/octet-stream: + 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 - format: binary security: - bearer: [] '/api/device/zigbee2Mqtt/{userId}': @@ -348,6 +473,24 @@ paths: 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}': @@ -379,6 +522,18 @@ paths: 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: @@ -396,20 +551,37 @@ paths: nullable: true x-position: 1 responses: - '200': + '202': description: '' content: - application/octet-stream: + 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 - format: binary security: - bearer: [] '/api/device/user/{userId}': delete: tags: - Device - summary: Delete all device for a specified + summary: Delete all device for a specified user operationId: Device_DeleteAllForUser parameters: - name: userId @@ -421,13 +593,30 @@ paths: nullable: true x-position: 1 responses: - '200': + '202': description: '' content: - application/octet-stream: + 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 - format: binary security: - bearer: [] /api/energy/electricity: @@ -591,6 +780,12 @@ paths: type: array items: $ref: '#/components/schemas/OddNice' + '400': + description: '' + content: + application/json: + schema: + type: string '404': description: '' content: @@ -651,6 +846,7 @@ paths: - name: userId in: path required: true + description: Id of user schema: type: string nullable: true @@ -664,6 +860,24 @@ paths: 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: @@ -688,6 +902,30 @@ paths: 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: @@ -711,6 +949,24 @@ paths: 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}': @@ -729,19 +985,37 @@ paths: nullable: true x-position: 1 responses: - '200': + '202': description: '' content: - application/octet-stream: + 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 - format: binary security: - bearer: [] /api/device/screen: get: tags: - ScreenDevice + summary: Get all screen devices operationId: ScreenDevice_GetAllScreenDevices responses: '200': @@ -752,14 +1026,22 @@ paths: 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: @@ -770,16 +1052,63 @@ paths: '200': description: '' content: - application/octet-stream: + 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 - format: binary security: - bearer: [] '/api/device/screen/{screenDeviceId}': get: tags: - ScreenDevice + summary: Get screen device info operationId: ScreenDevice_GetDeviceInfo parameters: - name: screenDeviceId @@ -797,59 +1126,66 @@ paths: application/json: schema: $ref: '#/components/schemas/ScreenDevice' - security: - - bearer: [] - put: - tags: - - ScreenDevice - operationId: ScreenDevice_UpdateDevice - parameters: - - name: screenDeviceId - in: path - required: true - schema: - type: integer - format: int32 - x-position: 1 - requestBody: - x-name: screenDevice - content: - application/json: - schema: - $ref: '#/components/schemas/ScreenDevice' - required: true - x-position: 2 - responses: - '200': + '400': description: '' content: - application/octet-stream: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: schema: type: string - format: binary 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: - '200': + '202': description: '' content: - application/octet-stream: + 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 - format: binary security: - bearer: [] /api/mqtt: @@ -874,6 +1210,18 @@ paths: 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: @@ -895,9 +1243,11 @@ paths: post: tags: - Token + summary: Connect user operationId: Token_ConnectUser requestBody: x-name: loginDTO + description: login info content: application/json: schema: @@ -911,28 +1261,49 @@ paths: 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_Get + operationId: User_GetAll responses: '200': description: '' content: - application/octet-stream: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UserInfo' + '500': + description: '' + content: + application/json: schema: type: string - format: binary security: - bearer: [] post: tags: - User + summary: Create an user operationId: User_CreateUser requestBody: x-name: newUser + description: New user info content: application/json: schema: @@ -946,12 +1317,32 @@ paths: 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: @@ -965,6 +1356,24 @@ paths: 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}': @@ -972,7 +1381,7 @@ paths: tags: - User summary: 'Get a specific user ' - operationId: User_Get2 + operationId: User_Get parameters: - name: id in: path @@ -989,28 +1398,59 @@ paths: 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: - '200': + '202': description: '' content: - application/octet-stream: + 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 - format: binary security: - bearer: [] /api/test: @@ -1137,19 +1577,19 @@ paths: nullable: true responses: '200': - description: Success + description: Token descriptor content: application/json: schema: - $ref: '#/components/schemas/LoginDTO' + $ref: '#/components/schemas/TokenDTO' '401': - description: Invalid credentials + description: '' content: application/json: schema: type: string '500': - description: Error + description: '' content: application/json: schema: @@ -1171,19 +1611,19 @@ paths: x-position: 1 responses: '200': - description: Success + description: Token descriptor content: application/json: schema: - $ref: '#/components/schemas/LoginDTO' + $ref: '#/components/schemas/TokenDTO' '401': - description: Invalid credentials + description: '' content: application/json: schema: type: string '500': - description: Error + description: '' content: application/json: schema: @@ -1212,6 +1652,12 @@ paths: type: array items: $ref: '#/components/schemas/RoomSummaryDTO' + '500': + description: '' + content: + application/json: + schema: + type: string security: - bearer: [] '/api/automation/detail/{automationId}': @@ -1236,15 +1682,35 @@ paths: 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: automationCreateOrUpdateDetail + description: Automation to create content: application/json: schema: @@ -1258,6 +1724,18 @@ paths: 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: @@ -1281,6 +1759,24 @@ paths: application/json: schema: $ref: '#/components/schemas/AutomationCreateOrUpdateDetailDTO' + '400': + description: '' + 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}': @@ -1299,13 +1795,30 @@ paths: nullable: true x-position: 1 responses: - '200': + '202': description: '' content: - application/octet-stream: + 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 - format: binary security: - bearer: [] '/api/automation/user/{userId}': @@ -1324,13 +1837,30 @@ paths: nullable: true x-position: 1 responses: - '200': + '202': description: '' content: - application/octet-stream: + 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 - format: binary security: - bearer: [] '/api/group/{userId}': @@ -1357,6 +1887,18 @@ paths: 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}': @@ -1366,13 +1908,6 @@ paths: summary: Get detail info of a specified group operationId: Group_GetDetail parameters: - - name: userId - in: query - description: user id - schema: - type: string - nullable: true - x-position: 1 - name: groupId in: path required: true @@ -1380,7 +1915,7 @@ paths: schema: type: string nullable: true - x-position: 2 + x-position: 1 responses: '200': description: '' @@ -1388,6 +1923,24 @@ paths: 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/{userId}/type/{type}': @@ -1422,137 +1975,18 @@ paths: type: array items: $ref: '#/components/schemas/GroupSummaryDTO' - 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': + '400': description: '' content: application/json: - schema: - $ref: '#/components/schemas/GroupDetailDTO' - 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' - security: - - bearer: [] - '/api/group/{userId}/fromZigbee': - post: - tags: - - Group - summary: Create groups from provider - operationId: Group_CreateDevicesFromZigbee2Mqtt - 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/GroupDetailDTO' - 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: - '200': - description: '' - content: - application/octet-stream: schema: type: string - format: binary - 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: - '200': + '500': description: '' content: - application/octet-stream: + application/json: schema: type: string - format: binary security: - bearer: [] '/api/group/zigbee2Mqtt/{userId}': @@ -1579,6 +2013,237 @@ paths: 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/{userId}/fromZigbee': + post: + tags: + - Group + summary: Create groups from provider + operationId: Group_CreateDevicesFromZigbee2Mqtt + 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/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/user/{userId}': @@ -1597,13 +2262,30 @@ paths: nullable: true x-position: 1 responses: - '200': + '202': description: '' content: - application/octet-stream: + 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 - format: binary security: - bearer: [] '/api/room/{userId}': @@ -1630,6 +2312,12 @@ paths: type: array items: $ref: '#/components/schemas/RoomSummaryDTO' + '500': + description: '' + content: + application/json: + schema: + type: string security: - bearer: [] '/api/room/detail/{roomId}': @@ -1661,6 +2349,24 @@ paths: 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: @@ -1685,6 +2391,18 @@ paths: 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: @@ -1708,6 +2426,18 @@ paths: 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}': @@ -1734,13 +2464,30 @@ paths: nullable: true x-position: 2 responses: - '200': + '202': description: '' content: - application/octet-stream: + 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 - format: binary security: - bearer: [] '/api/room/{roomId}': @@ -1759,20 +2506,37 @@ paths: nullable: true x-position: 1 responses: - '200': + '202': description: '' content: - application/octet-stream: + 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 - format: binary security: - bearer: [] '/api/room/user/{userId}': delete: tags: - Room - summary: Delete all room for a specified + summary: Delete all room for a specified user operationId: Room_DeleteAllForUser parameters: - name: userId @@ -1784,13 +2548,30 @@ paths: nullable: true x-position: 1 responses: - '200': + '202': description: '' content: - application/octet-stream: + 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 - format: binary security: - bearer: [] /azure: @@ -1956,7 +2737,7 @@ components: location: nullable: true oneOf: - - $ref: '#/components/schemas/LocationDTO' + - $ref: '#/components/schemas/PlaceDTO' lastStateDate: type: string format: date-time @@ -2011,7 +2792,7 @@ components: - Connected - Disconnected - Unknown - LocationDTO: + PlaceDTO: type: object additionalProperties: false properties: @@ -2065,9 +2846,8 @@ components: items: type: string properties: - type: object + type: string nullable: true - additionalProperties: {} supportedOperations: type: array nullable: true @@ -2187,8 +2967,8 @@ components: odds: nullable: true oneOf: - - $ref: '#/components/schemas/OddH2H' - OddH2H: + - $ref: '#/components/schemas/OddObject' + OddObject: type: object additionalProperties: false properties: @@ -2411,6 +3191,8 @@ components: name: type: string nullable: true + active: + type: boolean createdDate: type: string format: date-time @@ -2476,7 +3258,7 @@ components: state: nullable: true oneOf: - - $ref: '#/components/schemas/State' + - $ref: '#/components/schemas/AutomationState' startTime: type: string nullable: true @@ -2487,7 +3269,7 @@ components: $ref: '#/components/schemas/ConditionType' value: $ref: '#/components/schemas/ConditionValue' - State: + AutomationState: type: object additionalProperties: false properties: @@ -2537,7 +3319,7 @@ components: type: array nullable: true items: - $ref: '#/components/schemas/State' + $ref: '#/components/schemas/AutomationState' rawRequest: type: string nullable: true @@ -2640,9 +3422,8 @@ components: items: type: string properties: - type: object + type: string nullable: true - additionalProperties: {} supportedOperations: type: array nullable: true @@ -2730,14 +3511,14 @@ components: type: array nullable: true items: - $ref: '#/components/schemas/Widget' + $ref: '#/components/schemas/ScreenWidget' height: type: integer format: int32 width: type: integer format: int32 - Widget: + ScreenWidget: type: object additionalProperties: false properties: @@ -2805,6 +3586,28 @@ components: lastName: type: string nullable: true + 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 RoomSummaryDTO: type: object additionalProperties: false @@ -2854,6 +3657,8 @@ components: name: type: string nullable: true + active: + type: boolean userId: type: string nullable: true diff --git a/mycore_api/test/automation_state_test.dart b/mycore_api/test/automation_state_test.dart new file mode 100644 index 0000000..c4880f7 --- /dev/null +++ b/mycore_api/test/automation_state_test.dart @@ -0,0 +1,31 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.0 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: lines_longer_than_80_chars + +import 'package:mycoreapi/api.dart'; +import 'package:test/test.dart'; + +// tests for AutomationState +void main() { + final instance = AutomationState(); + + group('test AutomationState', () { + // String name + test('to test the property `name`', () async { + // TODO + }); + + // String value + test('to test the property `value`', () async { + // TODO + }); + + + }); + +} diff --git a/mycore_api/test/odd_object_test.dart b/mycore_api/test/odd_object_test.dart new file mode 100644 index 0000000..b0d8599 --- /dev/null +++ b/mycore_api/test/odd_object_test.dart @@ -0,0 +1,36 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.0 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: lines_longer_than_80_chars + +import 'package:mycoreapi/api.dart'; +import 'package:test/test.dart'; + +// tests for OddObject +void main() { + final instance = OddObject(); + + group('test OddObject', () { + // double homeOdd + test('to test the property `homeOdd`', () async { + // TODO + }); + + // double drawOdd + test('to test the property `drawOdd`', () async { + // TODO + }); + + // double visitOdd + test('to test the property `visitOdd`', () async { + // TODO + }); + + + }); + +} diff --git a/mycore_api/test/place_dto_test.dart b/mycore_api/test/place_dto_test.dart new file mode 100644 index 0000000..5957b7d --- /dev/null +++ b/mycore_api/test/place_dto_test.dart @@ -0,0 +1,31 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.0 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: lines_longer_than_80_chars + +import 'package:mycoreapi/api.dart'; +import 'package:test/test.dart'; + +// tests for PlaceDTO +void main() { + final instance = PlaceDTO(); + + group('test PlaceDTO', () { + // String id + test('to test the property `id`', () async { + // TODO + }); + + // String name + test('to test the property `name`', () async { + // TODO + }); + + + }); + +} diff --git a/mycore_api/test/screen_widget_test.dart b/mycore_api/test/screen_widget_test.dart new file mode 100644 index 0000000..d3d96cd --- /dev/null +++ b/mycore_api/test/screen_widget_test.dart @@ -0,0 +1,86 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.0 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: lines_longer_than_80_chars + +import 'package:mycoreapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ScreenWidget +void main() { + final instance = ScreenWidget(); + + group('test ScreenWidget', () { + // String id + test('to test the property `id`', () async { + // TODO + }); + + // String name + test('to test the property `name`', () async { + // TODO + }); + + // String displayName + test('to test the property `displayName`', () async { + // TODO + }); + + // String type + test('to test the property `type`', () async { + // TODO + }); + + // bool activated + test('to test the property `activated`', () async { + // TODO + }); + + // String form + test('to test the property `form`', () async { + // TODO + }); + + // String font + test('to test the property `font`', () async { + // TODO + }); + + // String color + test('to test the property `color`', () async { + // TODO + }); + + // String size + test('to test the property `size`', () async { + // TODO + }); + + // int width + test('to test the property `width`', () async { + // TODO + }); + + // int height + test('to test the property `height`', () async { + // TODO + }); + + // int positionX + test('to test the property `positionX`', () async { + // TODO + }); + + // int positionY + test('to test the property `positionY`', () async { + // TODO + }); + + + }); + +} diff --git a/mycore_api/test/token_dto_test.dart b/mycore_api/test/token_dto_test.dart new file mode 100644 index 0000000..fcc9ced --- /dev/null +++ b/mycore_api/test/token_dto_test.dart @@ -0,0 +1,51 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.0 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: lines_longer_than_80_chars + +import 'package:mycoreapi/api.dart'; +import 'package:test/test.dart'; + +// tests for TokenDTO +void main() { + final instance = TokenDTO(); + + group('test TokenDTO', () { + // String accessToken + test('to test the property `accessToken`', () async { + // TODO + }); + + // String refreshToken + test('to test the property `refreshToken`', () async { + // TODO + }); + + // String scope + test('to test the property `scope`', () async { + // TODO + }); + + // String tokenType + test('to test the property `tokenType`', () async { + // TODO + }); + + // int expiresIn + test('to test the property `expiresIn`', () async { + // TODO + }); + + // DateTime expiration + test('to test the property `expiration`', () async { + // TODO + }); + + + }); + +} diff --git a/pubspec.lock b/pubspec.lock index a946c23..7ccda81 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,27 +1,6 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: - analyzer: - dependency: transitive - description: - name: analyzer - url: "https://pub.dartlang.org" - source: hosted - version: "0.38.5" - analyzer_plugin: - dependency: transitive - description: - name: analyzer_plugin - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.1" - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "1.6.0" async: dependency: transitive description: @@ -36,69 +15,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" - build: - dependency: transitive - description: - name: build - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.2" - build_config: - dependency: transitive - description: - name: build_config - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.2" - build_daemon: - dependency: transitive - description: - name: build_daemon - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - build_resolvers: - dependency: transitive - description: - name: build_resolvers - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - build_runner: - dependency: "direct dev" - description: - name: build_runner - url: "https://pub.dartlang.org" - source: hosted - version: "1.9.0" - build_runner_core: - dependency: transitive - description: - name: build_runner_core - url: "https://pub.dartlang.org" - source: hosted - version: "5.1.0" - built_collection: - dependency: transitive - description: - name: built_collection - url: "https://pub.dartlang.org" - source: hosted - version: "4.3.2" - built_value: - dependency: transitive - description: - name: built_value - url: "https://pub.dartlang.org" - source: hosted - version: "6.8.2" - built_value_generator: - dependency: "direct dev" - description: - name: built_value_generator - url: "https://pub.dartlang.org" - source: hosted - version: "6.8.2" characters: dependency: transitive description: @@ -113,13 +29,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.2.0" - checked_yaml: - dependency: transitive - description: - name: checked_yaml - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.4" clock: dependency: transitive description: @@ -127,13 +36,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.0" - code_builder: - dependency: transitive - description: - name: code_builder - url: "https://pub.dartlang.org" - source: hosted - version: "3.2.0" collection: dependency: transitive description: @@ -155,13 +57,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.5" - csslib: - dependency: transitive - description: - name: csslib - url: "https://pub.dartlang.org" - source: hosted - version: "0.16.2" cupertino_icons: dependency: "direct main" description: @@ -169,13 +64,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.2" - dart_style: - dependency: transitive - description: - name: dart_style - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.3" event_bus: dependency: transitive description: @@ -190,20 +78,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.2.0" - file: - dependency: transitive - description: - name: file - url: "https://pub.dartlang.org" - source: hosted - version: "5.2.1" - fixnum: - dependency: transitive - description: - name: fixnum - url: "https://pub.dartlang.org" - source: hosted - version: "0.10.11" flutter: dependency: "direct main" description: flutter @@ -214,34 +88,6 @@ packages: description: flutter source: sdk version: "0.0.0" - front_end: - dependency: transitive - description: - name: front_end - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.27" - glob: - dependency: transitive - description: - name: glob - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - graphs: - dependency: transitive - description: - name: graphs - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - html: - dependency: transitive - description: - name: html - url: "https://pub.dartlang.org" - source: hosted - version: "0.14.0+4" http: dependency: transitive description: @@ -249,13 +95,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.12.2" - http_multi_server: - dependency: transitive - description: - name: http_multi_server - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.0" http_parser: dependency: transitive description: @@ -270,41 +109,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.16.1" - io: - dependency: transitive - description: - name: io - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.5" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.3" - json_annotation: - dependency: transitive - description: - name: json_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.1" - kernel: - dependency: transitive - description: - name: kernel - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.27" - logging: - dependency: transitive - description: - name: logging - url: "https://pub.dartlang.org" - source: hosted - version: "0.11.4" matcher: dependency: transitive description: @@ -319,13 +123,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.3.0" - mime: - dependency: transitive - description: - name: mime - url: "https://pub.dartlang.org" - source: hosted - version: "0.9.7" mqtt_client: dependency: "direct main" description: @@ -340,34 +137,6 @@ packages: relative: true source: path version: "1.0.0" - node_interop: - dependency: transitive - description: - name: node_interop - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - node_io: - dependency: transitive - description: - name: node_io - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - package_config: - dependency: transitive - description: - name: package_config - url: "https://pub.dartlang.org" - source: hosted - version: "1.9.3" - package_resolver: - dependency: transitive - description: - name: package_resolver - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.10" path: dependency: transitive description: @@ -382,34 +151,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.11.0" - pool: - dependency: transitive - description: - name: pool - url: "https://pub.dartlang.org" - source: hosted - version: "1.5.0" - pub_semver: - dependency: transitive - description: - name: pub_semver - url: "https://pub.dartlang.org" - source: hosted - version: "1.4.4" - pubspec_parse: - dependency: transitive - description: - name: pubspec_parse - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.8" - quiver: - dependency: transitive - description: - name: quiver - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.5" rxdart: dependency: "direct main" description: @@ -417,32 +158,11 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.22.0" - shelf: - dependency: transitive - description: - name: shelf - url: "https://pub.dartlang.org" - source: hosted - version: "0.7.9" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.4+1" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" - source_gen: - dependency: transitive - description: - name: source_gen - url: "https://pub.dartlang.org" - source: hosted - version: "0.9.4+6" source_span: dependency: transitive description: @@ -464,13 +184,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" - stream_transform: - dependency: transitive - description: - name: stream_transform - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.20" string_scanner: dependency: transitive description: @@ -492,13 +205,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.2.19" - timing: - dependency: transitive - description: - name: timing - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.1+3" typed_data: dependency: transitive description: @@ -513,26 +219,5 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" - watcher: - dependency: transitive - description: - name: watcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.9.7+15" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - yaml: - dependency: transitive - description: - name: yaml - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.1" sdks: dart: ">=2.12.0-0.0 <3.0.0"