diff --git a/ext/hivemq-edge-openapi-2025.21-SNAPSHOT.yaml b/ext/hivemq-edge-openapi-2025.21-SNAPSHOT.yaml index e3c43fe911..2bffd449e3 100644 --- a/ext/hivemq-edge-openapi-2025.21-SNAPSHOT.yaml +++ b/ext/hivemq-edge-openapi-2025.21-SNAPSHOT.yaml @@ -7906,6 +7906,16 @@ components: $ref: '#/components/schemas/DomainTag' required: - items + NorthboundMappingOwner: + allOf: + - $ref: '#/components/schemas/NorthboundMapping' + - type: object + properties: + adapterId: + type: string + description: The id of the adapter owning the tag + required: + - adapterId NorthboundMappingOwnerList: type: object properties: @@ -7913,18 +7923,19 @@ components: type: array description: List of result items that are returned by this endpoint items: - type: object - required: - - adapterId - - mapping - properties: - adapterId: - type: string - description: The id of the adapter owning the mapping - mapping: - $ref: '#/components/schemas/NorthboundMapping' + $ref: '#/components/schemas/NorthboundMappingOwner' required: - items + SouthboundMappingOwner: + allOf: + - $ref: '#/components/schemas/SouthboundMapping' + - type: object + properties: + adapterId: + type: string + description: The id of the adapter owning the tag + required: + - adapterId SouthboundMappingOwnerList: type: object properties: @@ -7932,16 +7943,7 @@ components: type: array description: List of result items that are returned by this endpoint items: - type: object - required: - - adapterId - - mapping - properties: - adapterId: - type: string - description: The id of the adapter owning the mapping - mapping: - $ref: '#/components/schemas/SouthboundMapping' + $ref: '#/components/schemas/SouthboundMappingOwner' required: - items TagSchema: @@ -7952,6 +7954,16 @@ components: protocolId: type: string description: The id assigned to the protocol adapter type + DomainTagOwner: + allOf: + - $ref: '#/components/schemas/DomainTag' + - type: object + properties: + adapterId: + type: string + description: The id of the adapter owning the tag + required: + - adapterId DomainTagOwnerList: type: object properties: @@ -7959,16 +7971,7 @@ components: type: array description: List of result items that are returned by this endpoint items: - type: object - required: - - adapterId - - mapping - properties: - adapterId: - type: string - description: The id of the adapter owning the tag - mapping: - $ref: '#/components/schemas/DomainTag' + $ref: '#/components/schemas/DomainTagOwner' required: - items ProtocolAdapterCategory: diff --git a/hivemq-edge-frontend/src/api/__generated__/HiveMqClient.ts b/hivemq-edge-frontend/src/api/__generated__/HiveMqClient.ts index 07fb8b052d..51c4d34b69 100644 --- a/hivemq-edge-frontend/src/api/__generated__/HiveMqClient.ts +++ b/hivemq-edge-frontend/src/api/__generated__/HiveMqClient.ts @@ -19,6 +19,7 @@ import { DataHubSchemasService } from './services/DataHubSchemasService'; import { DataHubScriptsService } from './services/DataHubScriptsService'; import { DataHubStateService } from './services/DataHubStateService'; import { DefaultService } from './services/DefaultService'; +import { DomainService } from './services/DomainService'; import { EventsService } from './services/EventsService'; import { FrontendService } from './services/FrontendService'; import { GatewayEndpointService } from './services/GatewayEndpointService'; @@ -48,6 +49,7 @@ export class HiveMqClient { public readonly dataHubScripts: DataHubScriptsService; public readonly dataHubState: DataHubStateService; public readonly default: DefaultService; + public readonly domain: DomainService; public readonly events: EventsService; public readonly frontend: FrontendService; public readonly gatewayEndpoint: GatewayEndpointService; @@ -65,7 +67,7 @@ export class HiveMqClient { constructor(config?: Partial, HttpRequest: HttpRequestConstructor = AxiosHttpRequest) { this.request = new HttpRequest({ BASE: config?.BASE ?? '', - VERSION: config?.VERSION ?? '2025.14-SNAPSHOT', + VERSION: config?.VERSION ?? '2025.19-SNAPSHOT', WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false, CREDENTIALS: config?.CREDENTIALS ?? 'include', TOKEN: config?.TOKEN, @@ -88,6 +90,7 @@ export class HiveMqClient { this.dataHubScripts = new DataHubScriptsService(this.request); this.dataHubState = new DataHubStateService(this.request); this.default = new DefaultService(this.request); + this.domain = new DomainService(this.request); this.events = new EventsService(this.request); this.frontend = new FrontendService(this.request); this.gatewayEndpoint = new GatewayEndpointService(this.request); diff --git a/hivemq-edge-frontend/src/api/__generated__/core/OpenAPI.ts b/hivemq-edge-frontend/src/api/__generated__/core/OpenAPI.ts index aa741db968..06d9025d87 100644 --- a/hivemq-edge-frontend/src/api/__generated__/core/OpenAPI.ts +++ b/hivemq-edge-frontend/src/api/__generated__/core/OpenAPI.ts @@ -21,7 +21,7 @@ export type OpenAPIConfig = { export const OpenAPI: OpenAPIConfig = { BASE: '', - VERSION: '2025.14-SNAPSHOT', + VERSION: '2025.19-SNAPSHOT', WITH_CREDENTIALS: false, CREDENTIALS: 'include', TOKEN: undefined, diff --git a/hivemq-edge-frontend/src/api/__generated__/index.ts b/hivemq-edge-frontend/src/api/__generated__/index.ts index a91ea326ca..4b3b625e82 100644 --- a/hivemq-edge-frontend/src/api/__generated__/index.ts +++ b/hivemq-edge-frontend/src/api/__generated__/index.ts @@ -14,24 +14,36 @@ export type { Adapter } from './models/Adapter'; export type { AdapterConfig } from './models/AdapterConfig'; export type { AdaptersList } from './models/AdaptersList'; export type { ApiBearerToken } from './models/ApiBearerToken'; +export type { ApiProblemDetails } from './models/ApiProblemDetails'; export type { Asset } from './models/Asset'; export type { AssetId } from './models/AssetId'; export { AssetMapping } from './models/AssetMapping'; +export type { AtLeastOneFieldMissingValidationError } from './models/AtLeastOneFieldMissingValidationError'; +export type { AtMostOneFunctionValidationError } from './models/AtMostOneFunctionValidationError'; export type { BehaviorPolicy } from './models/BehaviorPolicy'; +export type { BehaviorPolicyAlreadyPresentError } from './models/BehaviorPolicyAlreadyPresentError'; export type { BehaviorPolicyBehavior } from './models/BehaviorPolicyBehavior'; +export type { BehaviorPolicyCreationFailureError } from './models/BehaviorPolicyCreationFailureError'; export type { BehaviorPolicyDeserialization } from './models/BehaviorPolicyDeserialization'; export type { BehaviorPolicyDeserializer } from './models/BehaviorPolicyDeserializer'; +export type { BehaviorPolicyInvalidErrors } from './models/BehaviorPolicyInvalidErrors'; export type { BehaviorPolicyList } from './models/BehaviorPolicyList'; export type { BehaviorPolicyMatching } from './models/BehaviorPolicyMatching'; +export type { BehaviorPolicyNotFoundError } from './models/BehaviorPolicyNotFoundError'; export type { BehaviorPolicyOnEvent } from './models/BehaviorPolicyOnEvent'; export type { BehaviorPolicyOnTransition } from './models/BehaviorPolicyOnTransition'; +export type { BehaviorPolicyRejectedError } from './models/BehaviorPolicyRejectedError'; export { BehaviorPolicyTransitionEvent } from './models/BehaviorPolicyTransitionEvent'; +export type { BehaviorPolicyUpdateFailureError } from './models/BehaviorPolicyUpdateFailureError'; +export type { BehaviorPolicyValidationError } from './models/BehaviorPolicyValidationError'; export type { Bridge } from './models/Bridge'; export type { BridgeCustomUserProperty } from './models/BridgeCustomUserProperty'; export type { BridgeList } from './models/BridgeList'; export { BridgeSubscription } from './models/BridgeSubscription'; export { Capability } from './models/Capability'; export type { CapabilityList } from './models/CapabilityList'; +export type { ClientDisconnectedError } from './models/ClientDisconnectedError'; +export type { ClientNotFoundError } from './models/ClientNotFoundError'; export type { Combiner } from './models/Combiner'; export type { CombinerId } from './models/CombinerId'; export type { CombinerList } from './models/CombinerList'; @@ -41,18 +53,27 @@ export { DataIdentifierReference } from './models/DataIdentifierReference'; export type { DataPoint } from './models/DataPoint'; export type { DataPolicy } from './models/DataPolicy'; export type { DataPolicyAction } from './models/DataPolicyAction'; +export type { DataPolicyAlreadyPresentError } from './models/DataPolicyAlreadyPresentError'; +export type { DataPolicyCreationFailureError } from './models/DataPolicyCreationFailureError'; +export type { DataPolicyInvalidErrors } from './models/DataPolicyInvalidErrors'; export type { DataPolicyList } from './models/DataPolicyList'; export type { DataPolicyMatching } from './models/DataPolicyMatching'; +export type { DataPolicyNotFoundError } from './models/DataPolicyNotFoundError'; +export type { DataPolicyRejectedError } from './models/DataPolicyRejectedError'; +export type { DataPolicyUpdateFailureError } from './models/DataPolicyUpdateFailureError'; export type { DataPolicyValidation } from './models/DataPolicyValidation'; +export type { DataPolicyValidationError } from './models/DataPolicyValidationError'; export { DataPolicyValidator } from './models/DataPolicyValidator'; export type { DomainTag } from './models/DomainTag'; export type { DomainTagList } from './models/DomainTagList'; +export type { DomainTagOwner } from './models/DomainTagOwner'; +export type { DomainTagOwnerList } from './models/DomainTagOwnerList'; +export type { EmptyFieldValidationError } from './models/EmptyFieldValidationError'; export type { EntityReference } from './models/EntityReference'; export type { EntityReferenceList } from './models/EntityReferenceList'; export { EntityType } from './models/EntityType'; export type { EnvironmentProperties } from './models/EnvironmentProperties'; export type { Error } from './models/Error'; -export type { Errors } from './models/Errors'; export { Event } from './models/Event'; export type { EventList } from './models/EventList'; export type { Extension } from './models/Extension'; @@ -62,13 +83,24 @@ export type { FirstUseInformation } from './models/FirstUseInformation'; export type { FsmStateInformationItem } from './models/FsmStateInformationItem'; export type { FsmStatesInformationListItem } from './models/FsmStatesInformationListItem'; export type { FunctionMetadata } from './models/FunctionMetadata'; +export type { FunctionMustBePairedValidationError } from './models/FunctionMustBePairedValidationError'; export type { FunctionSpecs } from './models/FunctionSpecs'; export type { FunctionSpecsList } from './models/FunctionSpecsList'; export type { GatewayConfiguration } from './models/GatewayConfiguration'; export type { HealthStatus } from './models/HealthStatus'; +export type { IllegalEventTransitionValidationError } from './models/IllegalEventTransitionValidationError'; +export type { IllegalFunctionValidationError } from './models/IllegalFunctionValidationError'; export type { Instruction } from './models/Instruction'; +export type { InsufficientStorageError } from './models/InsufficientStorageError'; +export type { InternalServerError } from './models/InternalServerError'; export { InterpolationVariable } from './models/InterpolationVariable'; export type { InterpolationVariableList } from './models/InterpolationVariableList'; +export type { InvalidFieldLengthValidationError } from './models/InvalidFieldLengthValidationError'; +export type { InvalidFieldValueValidationError } from './models/InvalidFieldValueValidationError'; +export type { InvalidFunctionOrderValidationError } from './models/InvalidFunctionOrderValidationError'; +export type { InvalidIdentifierValidationError } from './models/InvalidIdentifierValidationError'; +export type { InvalidQueryParameterError } from './models/InvalidQueryParameterError'; +export type { InvalidSchemaVersionValidationError } from './models/InvalidSchemaVersionValidationError'; export type { ISA95ApiBean } from './models/ISA95ApiBean'; export type { JsonNode } from './models/JsonNode'; export type { Link } from './models/Link'; @@ -81,11 +113,14 @@ export type { ManagedAssetList } from './models/ManagedAssetList'; export type { MappingId } from './models/MappingId'; export type { Metric } from './models/Metric'; export type { MetricList } from './models/MetricList'; +export type { MissingFieldValidationError } from './models/MissingFieldValidationError'; export type { Module } from './models/Module'; export type { ModuleList } from './models/ModuleList'; export type { MqttUserProperty } from './models/MqttUserProperty'; -export { NorthboundMapping } from './models/NorthboundMapping'; +export type { NorthboundMapping } from './models/NorthboundMapping'; export type { NorthboundMappingList } from './models/NorthboundMappingList'; +export type { NorthboundMappingOwner } from './models/NorthboundMappingOwner'; +export type { NorthboundMappingOwnerList } from './models/NorthboundMappingOwnerList'; export { Notification } from './models/Notification'; export type { NotificationList } from './models/NotificationList'; export { ObjectNode } from './models/ObjectNode'; @@ -93,9 +128,13 @@ export type { PaginationCursor } from './models/PaginationCursor'; export { Payload } from './models/Payload'; export type { PayloadSample } from './models/PayloadSample'; export type { PayloadSampleList } from './models/PayloadSampleList'; +export type { PolicyIdMismatchError } from './models/PolicyIdMismatchError'; +export type { PolicyInsufficientStorageError } from './models/PolicyInsufficientStorageError'; +export type { PolicyNotFoundError } from './models/PolicyNotFoundError'; export type { PolicyOperation } from './models/PolicyOperation'; export type { PolicySchema } from './models/PolicySchema'; export { PolicyType } from './models/PolicyType'; +export type { PreconditionFailedError } from './models/PreconditionFailedError'; export type { PreLoginNotice } from './models/PreLoginNotice'; export type { ProblemDetails } from './models/ProblemDetails'; export type { ProtocolAdapter } from './models/ProtocolAdapter'; @@ -104,23 +143,51 @@ export type { ProtocolAdaptersList } from './models/ProtocolAdaptersList'; export type { PulseActivationToken } from './models/PulseActivationToken'; export { PulseStatus } from './models/PulseStatus'; export { QoS } from './models/QoS'; +export type { RequestBodyMissingError } from './models/RequestBodyMissingError'; +export type { RequestBodyParameterMissingError } from './models/RequestBodyParameterMissingError'; +export type { SchemaAlreadyPresentError } from './models/SchemaAlreadyPresentError'; +export type { SchemaEtagMismatchError } from './models/SchemaEtagMismatchError'; +export type { SchemaInsufficientStorageError } from './models/SchemaInsufficientStorageError'; +export type { SchemaInvalidErrors } from './models/SchemaInvalidErrors'; export type { SchemaList } from './models/SchemaList'; +export type { SchemaNotFoundError } from './models/SchemaNotFoundError'; +export type { SchemaParsingFailureError } from './models/SchemaParsingFailureError'; export type { SchemaReference } from './models/SchemaReference'; +export type { SchemaReferencedError } from './models/SchemaReferencedError'; +export type { SchemaValidationError } from './models/SchemaValidationError'; export { Script } from './models/Script'; +export type { ScriptAlreadyPresentError } from './models/ScriptAlreadyPresentError'; +export type { ScriptCreationFailureError } from './models/ScriptCreationFailureError'; +export type { ScriptEtagMismatchError } from './models/ScriptEtagMismatchError'; +export type { ScriptInsufficientStorageError } from './models/ScriptInsufficientStorageError'; +export type { ScriptInvalidErrors } from './models/ScriptInvalidErrors'; export type { ScriptList } from './models/ScriptList'; +export type { ScriptNotFoundError } from './models/ScriptNotFoundError'; +export type { ScriptParsingFailureError } from './models/ScriptParsingFailureError'; +export type { ScriptReferencedError } from './models/ScriptReferencedError'; +export type { ScriptSanitationFailureError } from './models/ScriptSanitationFailureError'; +export type { ScriptValidationError } from './models/ScriptValidationError'; export type { SouthboundMapping } from './models/SouthboundMapping'; export type { SouthboundMappingList } from './models/SouthboundMappingList'; +export type { SouthboundMappingOwner } from './models/SouthboundMappingOwner'; +export type { SouthboundMappingOwnerList } from './models/SouthboundMappingOwnerList'; export { Status } from './models/Status'; export type { StatusList } from './models/StatusList'; export { StatusTransitionCommand } from './models/StatusTransitionCommand'; export { StatusTransitionResult } from './models/StatusTransitionResult'; export type { TagSchema } from './models/TagSchema'; +export type { TemporaryNotAvailableError } from './models/TemporaryNotAvailableError'; export type { TlsConfiguration } from './models/TlsConfiguration'; export type { TopicFilter } from './models/TopicFilter'; export type { TopicFilterId } from './models/TopicFilterId'; export type { TopicFilterList } from './models/TopicFilterList'; +export type { TopicFilterMismatchError } from './models/TopicFilterMismatchError'; export { TypeIdentifier } from './models/TypeIdentifier'; +export type { UnknownVariableValidationError } from './models/UnknownVariableValidationError'; +export type { UnsupportedFieldValidationError } from './models/UnsupportedFieldValidationError'; +export type { UrlParameterMissingError } from './models/UrlParameterMissingError'; export type { UsernamePasswordCredentials } from './models/UsernamePasswordCredentials'; +export type { ValidationError } from './models/ValidationError'; export type { ValuesTree } from './models/ValuesTree'; export type { WebsocketConfiguration } from './models/WebsocketConfiguration'; @@ -128,24 +195,36 @@ export { $Adapter } from './schemas/$Adapter'; export { $AdapterConfig } from './schemas/$AdapterConfig'; export { $AdaptersList } from './schemas/$AdaptersList'; export { $ApiBearerToken } from './schemas/$ApiBearerToken'; +export { $ApiProblemDetails } from './schemas/$ApiProblemDetails'; export { $Asset } from './schemas/$Asset'; export { $AssetId } from './schemas/$AssetId'; export { $AssetMapping } from './schemas/$AssetMapping'; +export { $AtLeastOneFieldMissingValidationError } from './schemas/$AtLeastOneFieldMissingValidationError'; +export { $AtMostOneFunctionValidationError } from './schemas/$AtMostOneFunctionValidationError'; export { $BehaviorPolicy } from './schemas/$BehaviorPolicy'; +export { $BehaviorPolicyAlreadyPresentError } from './schemas/$BehaviorPolicyAlreadyPresentError'; export { $BehaviorPolicyBehavior } from './schemas/$BehaviorPolicyBehavior'; +export { $BehaviorPolicyCreationFailureError } from './schemas/$BehaviorPolicyCreationFailureError'; export { $BehaviorPolicyDeserialization } from './schemas/$BehaviorPolicyDeserialization'; export { $BehaviorPolicyDeserializer } from './schemas/$BehaviorPolicyDeserializer'; +export { $BehaviorPolicyInvalidErrors } from './schemas/$BehaviorPolicyInvalidErrors'; export { $BehaviorPolicyList } from './schemas/$BehaviorPolicyList'; export { $BehaviorPolicyMatching } from './schemas/$BehaviorPolicyMatching'; +export { $BehaviorPolicyNotFoundError } from './schemas/$BehaviorPolicyNotFoundError'; export { $BehaviorPolicyOnEvent } from './schemas/$BehaviorPolicyOnEvent'; export { $BehaviorPolicyOnTransition } from './schemas/$BehaviorPolicyOnTransition'; +export { $BehaviorPolicyRejectedError } from './schemas/$BehaviorPolicyRejectedError'; export { $BehaviorPolicyTransitionEvent } from './schemas/$BehaviorPolicyTransitionEvent'; +export { $BehaviorPolicyUpdateFailureError } from './schemas/$BehaviorPolicyUpdateFailureError'; +export { $BehaviorPolicyValidationError } from './schemas/$BehaviorPolicyValidationError'; export { $Bridge } from './schemas/$Bridge'; export { $BridgeCustomUserProperty } from './schemas/$BridgeCustomUserProperty'; export { $BridgeList } from './schemas/$BridgeList'; export { $BridgeSubscription } from './schemas/$BridgeSubscription'; export { $Capability } from './schemas/$Capability'; export { $CapabilityList } from './schemas/$CapabilityList'; +export { $ClientDisconnectedError } from './schemas/$ClientDisconnectedError'; +export { $ClientNotFoundError } from './schemas/$ClientNotFoundError'; export { $Combiner } from './schemas/$Combiner'; export { $CombinerId } from './schemas/$CombinerId'; export { $CombinerList } from './schemas/$CombinerList'; @@ -155,18 +234,27 @@ export { $DataIdentifierReference } from './schemas/$DataIdentifierReference'; export { $DataPoint } from './schemas/$DataPoint'; export { $DataPolicy } from './schemas/$DataPolicy'; export { $DataPolicyAction } from './schemas/$DataPolicyAction'; +export { $DataPolicyAlreadyPresentError } from './schemas/$DataPolicyAlreadyPresentError'; +export { $DataPolicyCreationFailureError } from './schemas/$DataPolicyCreationFailureError'; +export { $DataPolicyInvalidErrors } from './schemas/$DataPolicyInvalidErrors'; export { $DataPolicyList } from './schemas/$DataPolicyList'; export { $DataPolicyMatching } from './schemas/$DataPolicyMatching'; +export { $DataPolicyNotFoundError } from './schemas/$DataPolicyNotFoundError'; +export { $DataPolicyRejectedError } from './schemas/$DataPolicyRejectedError'; +export { $DataPolicyUpdateFailureError } from './schemas/$DataPolicyUpdateFailureError'; export { $DataPolicyValidation } from './schemas/$DataPolicyValidation'; +export { $DataPolicyValidationError } from './schemas/$DataPolicyValidationError'; export { $DataPolicyValidator } from './schemas/$DataPolicyValidator'; export { $DomainTag } from './schemas/$DomainTag'; export { $DomainTagList } from './schemas/$DomainTagList'; +export { $DomainTagOwner } from './schemas/$DomainTagOwner'; +export { $DomainTagOwnerList } from './schemas/$DomainTagOwnerList'; +export { $EmptyFieldValidationError } from './schemas/$EmptyFieldValidationError'; export { $EntityReference } from './schemas/$EntityReference'; export { $EntityReferenceList } from './schemas/$EntityReferenceList'; export { $EntityType } from './schemas/$EntityType'; export { $EnvironmentProperties } from './schemas/$EnvironmentProperties'; export { $Error } from './schemas/$Error'; -export { $Errors } from './schemas/$Errors'; export { $Event } from './schemas/$Event'; export { $EventList } from './schemas/$EventList'; export { $Extension } from './schemas/$Extension'; @@ -176,13 +264,24 @@ export { $FirstUseInformation } from './schemas/$FirstUseInformation'; export { $FsmStateInformationItem } from './schemas/$FsmStateInformationItem'; export { $FsmStatesInformationListItem } from './schemas/$FsmStatesInformationListItem'; export { $FunctionMetadata } from './schemas/$FunctionMetadata'; +export { $FunctionMustBePairedValidationError } from './schemas/$FunctionMustBePairedValidationError'; export { $FunctionSpecs } from './schemas/$FunctionSpecs'; export { $FunctionSpecsList } from './schemas/$FunctionSpecsList'; export { $GatewayConfiguration } from './schemas/$GatewayConfiguration'; export { $HealthStatus } from './schemas/$HealthStatus'; +export { $IllegalEventTransitionValidationError } from './schemas/$IllegalEventTransitionValidationError'; +export { $IllegalFunctionValidationError } from './schemas/$IllegalFunctionValidationError'; export { $Instruction } from './schemas/$Instruction'; +export { $InsufficientStorageError } from './schemas/$InsufficientStorageError'; +export { $InternalServerError } from './schemas/$InternalServerError'; export { $InterpolationVariable } from './schemas/$InterpolationVariable'; export { $InterpolationVariableList } from './schemas/$InterpolationVariableList'; +export { $InvalidFieldLengthValidationError } from './schemas/$InvalidFieldLengthValidationError'; +export { $InvalidFieldValueValidationError } from './schemas/$InvalidFieldValueValidationError'; +export { $InvalidFunctionOrderValidationError } from './schemas/$InvalidFunctionOrderValidationError'; +export { $InvalidIdentifierValidationError } from './schemas/$InvalidIdentifierValidationError'; +export { $InvalidQueryParameterError } from './schemas/$InvalidQueryParameterError'; +export { $InvalidSchemaVersionValidationError } from './schemas/$InvalidSchemaVersionValidationError'; export { $ISA95ApiBean } from './schemas/$ISA95ApiBean'; export { $JsonNode } from './schemas/$JsonNode'; export { $Link } from './schemas/$Link'; @@ -195,11 +294,14 @@ export { $ManagedAssetList } from './schemas/$ManagedAssetList'; export { $MappingId } from './schemas/$MappingId'; export { $Metric } from './schemas/$Metric'; export { $MetricList } from './schemas/$MetricList'; +export { $MissingFieldValidationError } from './schemas/$MissingFieldValidationError'; export { $Module } from './schemas/$Module'; export { $ModuleList } from './schemas/$ModuleList'; export { $MqttUserProperty } from './schemas/$MqttUserProperty'; export { $NorthboundMapping } from './schemas/$NorthboundMapping'; export { $NorthboundMappingList } from './schemas/$NorthboundMappingList'; +export { $NorthboundMappingOwner } from './schemas/$NorthboundMappingOwner'; +export { $NorthboundMappingOwnerList } from './schemas/$NorthboundMappingOwnerList'; export { $Notification } from './schemas/$Notification'; export { $NotificationList } from './schemas/$NotificationList'; export { $ObjectNode } from './schemas/$ObjectNode'; @@ -207,9 +309,13 @@ export { $PaginationCursor } from './schemas/$PaginationCursor'; export { $Payload } from './schemas/$Payload'; export { $PayloadSample } from './schemas/$PayloadSample'; export { $PayloadSampleList } from './schemas/$PayloadSampleList'; +export { $PolicyIdMismatchError } from './schemas/$PolicyIdMismatchError'; +export { $PolicyInsufficientStorageError } from './schemas/$PolicyInsufficientStorageError'; +export { $PolicyNotFoundError } from './schemas/$PolicyNotFoundError'; export { $PolicyOperation } from './schemas/$PolicyOperation'; export { $PolicySchema } from './schemas/$PolicySchema'; export { $PolicyType } from './schemas/$PolicyType'; +export { $PreconditionFailedError } from './schemas/$PreconditionFailedError'; export { $PreLoginNotice } from './schemas/$PreLoginNotice'; export { $ProblemDetails } from './schemas/$ProblemDetails'; export { $ProtocolAdapter } from './schemas/$ProtocolAdapter'; @@ -218,23 +324,51 @@ export { $ProtocolAdaptersList } from './schemas/$ProtocolAdaptersList'; export { $PulseActivationToken } from './schemas/$PulseActivationToken'; export { $PulseStatus } from './schemas/$PulseStatus'; export { $QoS } from './schemas/$QoS'; +export { $RequestBodyMissingError } from './schemas/$RequestBodyMissingError'; +export { $RequestBodyParameterMissingError } from './schemas/$RequestBodyParameterMissingError'; +export { $SchemaAlreadyPresentError } from './schemas/$SchemaAlreadyPresentError'; +export { $SchemaEtagMismatchError } from './schemas/$SchemaEtagMismatchError'; +export { $SchemaInsufficientStorageError } from './schemas/$SchemaInsufficientStorageError'; +export { $SchemaInvalidErrors } from './schemas/$SchemaInvalidErrors'; export { $SchemaList } from './schemas/$SchemaList'; +export { $SchemaNotFoundError } from './schemas/$SchemaNotFoundError'; +export { $SchemaParsingFailureError } from './schemas/$SchemaParsingFailureError'; export { $SchemaReference } from './schemas/$SchemaReference'; +export { $SchemaReferencedError } from './schemas/$SchemaReferencedError'; +export { $SchemaValidationError } from './schemas/$SchemaValidationError'; export { $Script } from './schemas/$Script'; +export { $ScriptAlreadyPresentError } from './schemas/$ScriptAlreadyPresentError'; +export { $ScriptCreationFailureError } from './schemas/$ScriptCreationFailureError'; +export { $ScriptEtagMismatchError } from './schemas/$ScriptEtagMismatchError'; +export { $ScriptInsufficientStorageError } from './schemas/$ScriptInsufficientStorageError'; +export { $ScriptInvalidErrors } from './schemas/$ScriptInvalidErrors'; export { $ScriptList } from './schemas/$ScriptList'; +export { $ScriptNotFoundError } from './schemas/$ScriptNotFoundError'; +export { $ScriptParsingFailureError } from './schemas/$ScriptParsingFailureError'; +export { $ScriptReferencedError } from './schemas/$ScriptReferencedError'; +export { $ScriptSanitationFailureError } from './schemas/$ScriptSanitationFailureError'; +export { $ScriptValidationError } from './schemas/$ScriptValidationError'; export { $SouthboundMapping } from './schemas/$SouthboundMapping'; export { $SouthboundMappingList } from './schemas/$SouthboundMappingList'; +export { $SouthboundMappingOwner } from './schemas/$SouthboundMappingOwner'; +export { $SouthboundMappingOwnerList } from './schemas/$SouthboundMappingOwnerList'; export { $Status } from './schemas/$Status'; export { $StatusList } from './schemas/$StatusList'; export { $StatusTransitionCommand } from './schemas/$StatusTransitionCommand'; export { $StatusTransitionResult } from './schemas/$StatusTransitionResult'; export { $TagSchema } from './schemas/$TagSchema'; +export { $TemporaryNotAvailableError } from './schemas/$TemporaryNotAvailableError'; export { $TlsConfiguration } from './schemas/$TlsConfiguration'; export { $TopicFilter } from './schemas/$TopicFilter'; export { $TopicFilterId } from './schemas/$TopicFilterId'; export { $TopicFilterList } from './schemas/$TopicFilterList'; +export { $TopicFilterMismatchError } from './schemas/$TopicFilterMismatchError'; export { $TypeIdentifier } from './schemas/$TypeIdentifier'; +export { $UnknownVariableValidationError } from './schemas/$UnknownVariableValidationError'; +export { $UnsupportedFieldValidationError } from './schemas/$UnsupportedFieldValidationError'; +export { $UrlParameterMissingError } from './schemas/$UrlParameterMissingError'; export { $UsernamePasswordCredentials } from './schemas/$UsernamePasswordCredentials'; +export { $ValidationError } from './schemas/$ValidationError'; export { $ValuesTree } from './schemas/$ValuesTree'; export { $WebsocketConfiguration } from './schemas/$WebsocketConfiguration'; @@ -251,6 +385,7 @@ export { DataHubSchemasService } from './services/DataHubSchemasService'; export { DataHubScriptsService } from './services/DataHubScriptsService'; export { DataHubStateService } from './services/DataHubStateService'; export { DefaultService } from './services/DefaultService'; +export { DomainService } from './services/DomainService'; export { EventsService } from './services/EventsService'; export { FrontendService } from './services/FrontendService'; export { GatewayEndpointService } from './services/GatewayEndpointService'; diff --git a/hivemq-edge-frontend/src/api/__generated__/models/ApiProblemDetails.ts b/hivemq-edge-frontend/src/api/__generated__/models/ApiProblemDetails.ts new file mode 100644 index 0000000000..1a451fcf0d --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/ApiProblemDetails.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ProblemDetails } from './ProblemDetails'; + +export type ApiProblemDetails = (ProblemDetails & Record); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/AtLeastOneFieldMissingValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/models/AtLeastOneFieldMissingValidationError.ts new file mode 100644 index 0000000000..4b13f83dd5 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/AtLeastOneFieldMissingValidationError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ValidationError } from './ValidationError'; + +export type AtLeastOneFieldMissingValidationError = (ValidationError & { + /** + * The missing json paths. + */ + paths: Array; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/AtMostOneFunctionValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/models/AtMostOneFunctionValidationError.ts new file mode 100644 index 0000000000..7d00c03708 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/AtMostOneFunctionValidationError.ts @@ -0,0 +1,22 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ValidationError } from './ValidationError'; + +export type AtMostOneFunctionValidationError = (ValidationError & { + /** + * The function. + */ + function: string; + /** + * The occurrences of the function. + */ + occurrences: number; + /** + * The json paths where the function occurs. + */ + paths: Array; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/BehaviorPolicyAlreadyPresentError.ts b/hivemq-edge-frontend/src/api/__generated__/models/BehaviorPolicyAlreadyPresentError.ts new file mode 100644 index 0000000000..35ee141904 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/BehaviorPolicyAlreadyPresentError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type BehaviorPolicyAlreadyPresentError = (ApiProblemDetails & { + /** + * The behavior policy id. + */ + id: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/BehaviorPolicyCreationFailureError.ts b/hivemq-edge-frontend/src/api/__generated__/models/BehaviorPolicyCreationFailureError.ts new file mode 100644 index 0000000000..a54b38ccef --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/BehaviorPolicyCreationFailureError.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type BehaviorPolicyCreationFailureError = ApiProblemDetails; + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/BehaviorPolicyInvalidErrors.ts b/hivemq-edge-frontend/src/api/__generated__/models/BehaviorPolicyInvalidErrors.ts new file mode 100644 index 0000000000..09c30eba6a --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/BehaviorPolicyInvalidErrors.ts @@ -0,0 +1,15 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; +import type { BehaviorPolicyValidationError } from './BehaviorPolicyValidationError'; + +export type BehaviorPolicyInvalidErrors = (ApiProblemDetails & { + /** + * List of child validation errors. + */ + childErrors: Array; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/BehaviorPolicyNotFoundError.ts b/hivemq-edge-frontend/src/api/__generated__/models/BehaviorPolicyNotFoundError.ts new file mode 100644 index 0000000000..3b691d1ce9 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/BehaviorPolicyNotFoundError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type BehaviorPolicyNotFoundError = (ApiProblemDetails & { + /** + * The data policy id. + */ + id: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/BehaviorPolicyRejectedError.ts b/hivemq-edge-frontend/src/api/__generated__/models/BehaviorPolicyRejectedError.ts new file mode 100644 index 0000000000..c583cdc0b4 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/BehaviorPolicyRejectedError.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type BehaviorPolicyRejectedError = ApiProblemDetails; + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/BehaviorPolicyUpdateFailureError.ts b/hivemq-edge-frontend/src/api/__generated__/models/BehaviorPolicyUpdateFailureError.ts new file mode 100644 index 0000000000..1935314c3d --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/BehaviorPolicyUpdateFailureError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type BehaviorPolicyUpdateFailureError = (ApiProblemDetails & { + /** + * The ID of the policy that failed to update. + */ + id: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/BehaviorPolicyValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/models/BehaviorPolicyValidationError.ts new file mode 100644 index 0000000000..3b4733fe14 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/BehaviorPolicyValidationError.ts @@ -0,0 +1,19 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { AtLeastOneFieldMissingValidationError } from './AtLeastOneFieldMissingValidationError'; +import type { EmptyFieldValidationError } from './EmptyFieldValidationError'; +import type { IllegalEventTransitionValidationError } from './IllegalEventTransitionValidationError'; +import type { IllegalFunctionValidationError } from './IllegalFunctionValidationError'; +import type { InvalidFieldLengthValidationError } from './InvalidFieldLengthValidationError'; +import type { InvalidFieldValueValidationError } from './InvalidFieldValueValidationError'; +import type { InvalidIdentifierValidationError } from './InvalidIdentifierValidationError'; +import type { InvalidSchemaVersionValidationError } from './InvalidSchemaVersionValidationError'; +import type { MissingFieldValidationError } from './MissingFieldValidationError'; +import type { UnsupportedFieldValidationError } from './UnsupportedFieldValidationError'; +import type { ValidationError } from './ValidationError'; + +export type BehaviorPolicyValidationError = (ValidationError & (IllegalEventTransitionValidationError | IllegalFunctionValidationError | InvalidSchemaVersionValidationError | AtLeastOneFieldMissingValidationError | EmptyFieldValidationError | InvalidFieldLengthValidationError | InvalidFieldValueValidationError | InvalidIdentifierValidationError | MissingFieldValidationError | UnsupportedFieldValidationError)); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/ClientDisconnectedError.ts b/hivemq-edge-frontend/src/api/__generated__/models/ClientDisconnectedError.ts new file mode 100644 index 0000000000..d1f24e5e55 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/ClientDisconnectedError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type ClientDisconnectedError = (ApiProblemDetails & { + /** + * The client id. + */ + id: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/ClientNotFoundError.ts b/hivemq-edge-frontend/src/api/__generated__/models/ClientNotFoundError.ts new file mode 100644 index 0000000000..f63a5c3f87 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/ClientNotFoundError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type ClientNotFoundError = (ApiProblemDetails & { + /** + * The client id. + */ + id: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/DataPolicyAlreadyPresentError.ts b/hivemq-edge-frontend/src/api/__generated__/models/DataPolicyAlreadyPresentError.ts new file mode 100644 index 0000000000..43af9ea623 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/DataPolicyAlreadyPresentError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type DataPolicyAlreadyPresentError = (ApiProblemDetails & { + /** + * The data policy id. + */ + id: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/DataPolicyCreationFailureError.ts b/hivemq-edge-frontend/src/api/__generated__/models/DataPolicyCreationFailureError.ts new file mode 100644 index 0000000000..03fdef0dd6 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/DataPolicyCreationFailureError.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type DataPolicyCreationFailureError = ApiProblemDetails; + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/DataPolicyInvalidErrors.ts b/hivemq-edge-frontend/src/api/__generated__/models/DataPolicyInvalidErrors.ts new file mode 100644 index 0000000000..2bf7edbf20 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/DataPolicyInvalidErrors.ts @@ -0,0 +1,15 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; +import type { DataPolicyValidationError } from './DataPolicyValidationError'; + +export type DataPolicyInvalidErrors = (ApiProblemDetails & { + /** + * List of child validation errors. + */ + childErrors: Array; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/DataPolicyNotFoundError.ts b/hivemq-edge-frontend/src/api/__generated__/models/DataPolicyNotFoundError.ts new file mode 100644 index 0000000000..12216acfed --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/DataPolicyNotFoundError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type DataPolicyNotFoundError = (ApiProblemDetails & { + /** + * The data policy id. + */ + id: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/DataPolicyRejectedError.ts b/hivemq-edge-frontend/src/api/__generated__/models/DataPolicyRejectedError.ts new file mode 100644 index 0000000000..e5e54e32d9 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/DataPolicyRejectedError.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type DataPolicyRejectedError = ApiProblemDetails; + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/DataPolicyUpdateFailureError.ts b/hivemq-edge-frontend/src/api/__generated__/models/DataPolicyUpdateFailureError.ts new file mode 100644 index 0000000000..cbbceee572 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/DataPolicyUpdateFailureError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type DataPolicyUpdateFailureError = (ApiProblemDetails & { + /** + * The ID of the policy that failed to update. + */ + id: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/DataPolicyValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/models/DataPolicyValidationError.ts new file mode 100644 index 0000000000..677ee85324 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/DataPolicyValidationError.ts @@ -0,0 +1,20 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { AtMostOneFunctionValidationError } from './AtMostOneFunctionValidationError'; +import type { EmptyFieldValidationError } from './EmptyFieldValidationError'; +import type { FunctionMustBePairedValidationError } from './FunctionMustBePairedValidationError'; +import type { InvalidFieldLengthValidationError } from './InvalidFieldLengthValidationError'; +import type { InvalidFieldValueValidationError } from './InvalidFieldValueValidationError'; +import type { InvalidFunctionOrderValidationError } from './InvalidFunctionOrderValidationError'; +import type { InvalidIdentifierValidationError } from './InvalidIdentifierValidationError'; +import type { InvalidSchemaVersionValidationError } from './InvalidSchemaVersionValidationError'; +import type { MissingFieldValidationError } from './MissingFieldValidationError'; +import type { UnknownVariableValidationError } from './UnknownVariableValidationError'; +import type { UnsupportedFieldValidationError } from './UnsupportedFieldValidationError'; +import type { ValidationError } from './ValidationError'; + +export type DataPolicyValidationError = (ValidationError & (AtMostOneFunctionValidationError | FunctionMustBePairedValidationError | InvalidFunctionOrderValidationError | InvalidSchemaVersionValidationError | UnknownVariableValidationError | EmptyFieldValidationError | InvalidFieldLengthValidationError | InvalidFieldValueValidationError | InvalidIdentifierValidationError | MissingFieldValidationError | UnsupportedFieldValidationError)); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/DomainTagOwner.ts b/hivemq-edge-frontend/src/api/__generated__/models/DomainTagOwner.ts new file mode 100644 index 0000000000..696f0af5e1 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/DomainTagOwner.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { DomainTag } from './DomainTag'; + +export type DomainTagOwner = (DomainTag & { + /** + * The id of the adapter owning the tag + */ + adapterId: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/DomainTagOwnerList.ts b/hivemq-edge-frontend/src/api/__generated__/models/DomainTagOwnerList.ts new file mode 100644 index 0000000000..0140eaabf5 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/DomainTagOwnerList.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { DomainTagOwner } from './DomainTagOwner'; + +export type DomainTagOwnerList = { + /** + * List of result items that are returned by this endpoint + */ + items: Array; +}; + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/EmptyFieldValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/models/EmptyFieldValidationError.ts new file mode 100644 index 0000000000..69dc33c6b3 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/EmptyFieldValidationError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ValidationError } from './ValidationError'; + +export type EmptyFieldValidationError = (ValidationError & { + /** + * The missing field. + */ + path: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/FunctionMustBePairedValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/models/FunctionMustBePairedValidationError.ts new file mode 100644 index 0000000000..431729444f --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/FunctionMustBePairedValidationError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ValidationError } from './ValidationError'; + +export type FunctionMustBePairedValidationError = (ValidationError & { + /** + * The existing function. + */ + existingFunction: string; + /** + * The missing function. + */ + missingFunction: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/FunctionSpecs.ts b/hivemq-edge-frontend/src/api/__generated__/models/FunctionSpecs.ts index 69990e1934..6e629cd8c0 100644 --- a/hivemq-edge-frontend/src/api/__generated__/models/FunctionSpecs.ts +++ b/hivemq-edge-frontend/src/api/__generated__/models/FunctionSpecs.ts @@ -19,11 +19,11 @@ export type FunctionSpecs = { */ metadata: FunctionMetadata; /** - * the full JSON-Schema describimng the function and its arguments + * the full JSON-Schema describing the function and its arguments */ schema: JsonNode; /** - * An optional UI Schema to customise the rendering of the configuraton form + * An optional UI Schema to customise the rendering of the configuration form */ uiSchema?: JsonNode; }; diff --git a/hivemq-edge-frontend/src/api/__generated__/models/IllegalEventTransitionValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/models/IllegalEventTransitionValidationError.ts new file mode 100644 index 0000000000..04bb611b4e --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/IllegalEventTransitionValidationError.ts @@ -0,0 +1,30 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ValidationError } from './ValidationError'; + +export type IllegalEventTransitionValidationError = (ValidationError & { + /** + * The event name. + */ + event: string; + /** + * The event from state. + */ + fromState: string; + /** + * The event id. + */ + id: string; + /** + * The path. + */ + path: string; + /** + * The event to state. + */ + toState: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/IllegalFunctionValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/models/IllegalFunctionValidationError.ts new file mode 100644 index 0000000000..521b312ef7 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/IllegalFunctionValidationError.ts @@ -0,0 +1,22 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ValidationError } from './ValidationError'; + +export type IllegalFunctionValidationError = (ValidationError & { + /** + * The event name. + */ + event: string; + /** + * The function id. + */ + id: string; + /** + * The json path. + */ + path: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/InsufficientStorageError.ts b/hivemq-edge-frontend/src/api/__generated__/models/InsufficientStorageError.ts new file mode 100644 index 0000000000..fb9a99eb64 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/InsufficientStorageError.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type InsufficientStorageError = ApiProblemDetails; + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/Errors.ts b/hivemq-edge-frontend/src/api/__generated__/models/InternalServerError.ts similarity index 53% rename from hivemq-edge-frontend/src/api/__generated__/models/Errors.ts rename to hivemq-edge-frontend/src/api/__generated__/models/InternalServerError.ts index 41e61734f7..6bdcf80a36 100644 --- a/hivemq-edge-frontend/src/api/__generated__/models/Errors.ts +++ b/hivemq-edge-frontend/src/api/__generated__/models/InternalServerError.ts @@ -3,4 +3,7 @@ /* tslint:disable */ /* eslint-disable */ -export type Errors = Record; +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type InternalServerError = ApiProblemDetails; + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/InvalidFieldLengthValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/models/InvalidFieldLengthValidationError.ts new file mode 100644 index 0000000000..8aa00bef40 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/InvalidFieldLengthValidationError.ts @@ -0,0 +1,30 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ValidationError } from './ValidationError'; + +export type InvalidFieldLengthValidationError = (ValidationError & { + /** + * The actual length of the field value. + */ + actualLength: number; + /** + * The minimum length expected for the field value. + */ + expectedMinimumLength: number; + /** + * The maximum length expected for the field value. + */ + expectedMaximumLength: number; + /** + * The invalid json path. + */ + path: string; + /** + * The invalid value. + */ + value: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/InvalidFieldValueValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/models/InvalidFieldValueValidationError.ts new file mode 100644 index 0000000000..7dd3f784f0 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/InvalidFieldValueValidationError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ValidationError } from './ValidationError'; + +export type InvalidFieldValueValidationError = (ValidationError & { + /** + * The invalid json path. + */ + path: string; + /** + * The invalid value. + */ + value?: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/InvalidFunctionOrderValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/models/InvalidFunctionOrderValidationError.ts new file mode 100644 index 0000000000..23dae4e19a --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/InvalidFunctionOrderValidationError.ts @@ -0,0 +1,22 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ValidationError } from './ValidationError'; + +export type InvalidFunctionOrderValidationError = (ValidationError & { + /** + * The function. + */ + function: string; + /** + * The json path. + */ + path: string; + /** + * The previous function. + */ + previousFunction: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/InvalidIdentifierValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/models/InvalidIdentifierValidationError.ts new file mode 100644 index 0000000000..dc5908e2f3 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/InvalidIdentifierValidationError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ValidationError } from './ValidationError'; + +export type InvalidIdentifierValidationError = (ValidationError & { + /** + * The invalid identifier path. + */ + path: string; + /** + * The invalid identifier value. + */ + value: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/InvalidQueryParameterError.ts b/hivemq-edge-frontend/src/api/__generated__/models/InvalidQueryParameterError.ts new file mode 100644 index 0000000000..ed1853f40a --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/InvalidQueryParameterError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type InvalidQueryParameterError = (ApiProblemDetails & { + /** + * The query parameter. + */ + parameter: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/InvalidSchemaVersionValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/models/InvalidSchemaVersionValidationError.ts new file mode 100644 index 0000000000..278e3b85c2 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/InvalidSchemaVersionValidationError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ValidationError } from './ValidationError'; + +export type InvalidSchemaVersionValidationError = (ValidationError & { + /** + * The schema id. + */ + id: string; + /** + * The schema version. + */ + version: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/MissingFieldValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/models/MissingFieldValidationError.ts new file mode 100644 index 0000000000..5fd95a9234 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/MissingFieldValidationError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ValidationError } from './ValidationError'; + +export type MissingFieldValidationError = (ValidationError & { + /** + * The missing path. + */ + path: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/NorthboundMapping.ts b/hivemq-edge-frontend/src/api/__generated__/models/NorthboundMapping.ts index 10814beabb..bbdcc485d6 100644 --- a/hivemq-edge-frontend/src/api/__generated__/models/NorthboundMapping.ts +++ b/hivemq-edge-frontend/src/api/__generated__/models/NorthboundMapping.ts @@ -23,10 +23,6 @@ export type NorthboundMapping = { * The message expiry interval. */ messageExpiryInterval?: number; - /** - * How collected tags should or shouldn't be aggregated. - */ - messageHandlingOptions?: NorthboundMapping.messageHandlingOptions; /** * The tag for which values hould be collected and sent out. */ @@ -41,16 +37,3 @@ export type NorthboundMapping = { userProperties?: Array; }; -export namespace NorthboundMapping { - - /** - * How collected tags should or shouldn't be aggregated. - */ - export enum messageHandlingOptions { - MQTTMESSAGE_PER_TAG = 'MQTTMessagePerTag', - MQTTMESSAGE_PER_SUBSCRIPTION = 'MQTTMessagePerSubscription', - } - - -} - diff --git a/hivemq-edge-frontend/src/api/__generated__/models/NorthboundMappingOwner.ts b/hivemq-edge-frontend/src/api/__generated__/models/NorthboundMappingOwner.ts new file mode 100644 index 0000000000..3cf44f6d82 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/NorthboundMappingOwner.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { NorthboundMapping } from './NorthboundMapping'; + +export type NorthboundMappingOwner = (NorthboundMapping & { + /** + * The id of the adapter owning the tag + */ + adapterId: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/NorthboundMappingOwnerList.ts b/hivemq-edge-frontend/src/api/__generated__/models/NorthboundMappingOwnerList.ts new file mode 100644 index 0000000000..ed4dd43851 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/NorthboundMappingOwnerList.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { NorthboundMappingOwner } from './NorthboundMappingOwner'; + +export type NorthboundMappingOwnerList = { + /** + * List of result items that are returned by this endpoint + */ + items: Array; +}; + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/PolicyIdMismatchError.ts b/hivemq-edge-frontend/src/api/__generated__/models/PolicyIdMismatchError.ts new file mode 100644 index 0000000000..a5d1ec865a --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/PolicyIdMismatchError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type PolicyIdMismatchError = (ApiProblemDetails & { + /** + * The actual id. + */ + actualId: string; + /** + * The expected id. + */ + expectedId: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/PolicyInsufficientStorageError.ts b/hivemq-edge-frontend/src/api/__generated__/models/PolicyInsufficientStorageError.ts new file mode 100644 index 0000000000..38370c9d68 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/PolicyInsufficientStorageError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type PolicyInsufficientStorageError = (ApiProblemDetails & { + /** + * The policy id. + */ + id: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/PolicyNotFoundError.ts b/hivemq-edge-frontend/src/api/__generated__/models/PolicyNotFoundError.ts new file mode 100644 index 0000000000..3dfc1b45b1 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/PolicyNotFoundError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type PolicyNotFoundError = (ApiProblemDetails & { + /** + * The policy id. + */ + id: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/PreconditionFailedError.ts b/hivemq-edge-frontend/src/api/__generated__/models/PreconditionFailedError.ts new file mode 100644 index 0000000000..5ce8427476 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/PreconditionFailedError.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type PreconditionFailedError = ApiProblemDetails; + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/ProblemDetails.ts b/hivemq-edge-frontend/src/api/__generated__/models/ProblemDetails.ts index 738b96215a..e0766f6ddb 100644 --- a/hivemq-edge-frontend/src/api/__generated__/models/ProblemDetails.ts +++ b/hivemq-edge-frontend/src/api/__generated__/models/ProblemDetails.ts @@ -11,6 +11,9 @@ export type ProblemDetails = { */ code?: string; detail?: string; + /** + * @deprecated + */ errors?: Array; status?: number; title: string; diff --git a/hivemq-edge-frontend/src/api/__generated__/models/RequestBodyMissingError.ts b/hivemq-edge-frontend/src/api/__generated__/models/RequestBodyMissingError.ts new file mode 100644 index 0000000000..c71a83c110 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/RequestBodyMissingError.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type RequestBodyMissingError = ApiProblemDetails; + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/RequestBodyParameterMissingError.ts b/hivemq-edge-frontend/src/api/__generated__/models/RequestBodyParameterMissingError.ts new file mode 100644 index 0000000000..83cefe37c6 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/RequestBodyParameterMissingError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type RequestBodyParameterMissingError = (ApiProblemDetails & { + /** + * The the missing request body parameter. + */ + parameter: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/SchemaAlreadyPresentError.ts b/hivemq-edge-frontend/src/api/__generated__/models/SchemaAlreadyPresentError.ts new file mode 100644 index 0000000000..5b89b24c89 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/SchemaAlreadyPresentError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type SchemaAlreadyPresentError = (ApiProblemDetails & { + /** + * The schema id. + */ + id: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/SchemaEtagMismatchError.ts b/hivemq-edge-frontend/src/api/__generated__/models/SchemaEtagMismatchError.ts new file mode 100644 index 0000000000..660922b7b6 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/SchemaEtagMismatchError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type SchemaEtagMismatchError = (ApiProblemDetails & { + /** + * The schema id. + */ + id: string; + /** + * The eTag. + */ + eTag?: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/SchemaInsufficientStorageError.ts b/hivemq-edge-frontend/src/api/__generated__/models/SchemaInsufficientStorageError.ts new file mode 100644 index 0000000000..1f732c05f6 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/SchemaInsufficientStorageError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type SchemaInsufficientStorageError = (ApiProblemDetails & { + /** + * The policy id. + */ + id: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/SchemaInvalidErrors.ts b/hivemq-edge-frontend/src/api/__generated__/models/SchemaInvalidErrors.ts new file mode 100644 index 0000000000..9e18140162 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/SchemaInvalidErrors.ts @@ -0,0 +1,15 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; +import type { SchemaValidationError } from './SchemaValidationError'; + +export type SchemaInvalidErrors = (ApiProblemDetails & { + /** + * List of child validation errors. + */ + childErrors: Array; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/SchemaNotFoundError.ts b/hivemq-edge-frontend/src/api/__generated__/models/SchemaNotFoundError.ts new file mode 100644 index 0000000000..3efcd51cad --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/SchemaNotFoundError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type SchemaNotFoundError = (ApiProblemDetails & { + /** + * The schema ID. + */ + id: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/SchemaParsingFailureError.ts b/hivemq-edge-frontend/src/api/__generated__/models/SchemaParsingFailureError.ts new file mode 100644 index 0000000000..ed02b7ccfb --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/SchemaParsingFailureError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type SchemaParsingFailureError = (ApiProblemDetails & { + /** + * The schema alias. + */ + alias: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/SchemaReferencedError.ts b/hivemq-edge-frontend/src/api/__generated__/models/SchemaReferencedError.ts new file mode 100644 index 0000000000..1e83b25d36 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/SchemaReferencedError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type SchemaReferencedError = (ApiProblemDetails & { + /** + * The schema ID. + */ + id: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/SchemaValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/models/SchemaValidationError.ts new file mode 100644 index 0000000000..e9dde963f6 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/SchemaValidationError.ts @@ -0,0 +1,15 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { EmptyFieldValidationError } from './EmptyFieldValidationError'; +import type { InvalidFieldLengthValidationError } from './InvalidFieldLengthValidationError'; +import type { InvalidFieldValueValidationError } from './InvalidFieldValueValidationError'; +import type { InvalidIdentifierValidationError } from './InvalidIdentifierValidationError'; +import type { MissingFieldValidationError } from './MissingFieldValidationError'; +import type { UnsupportedFieldValidationError } from './UnsupportedFieldValidationError'; +import type { ValidationError } from './ValidationError'; + +export type SchemaValidationError = (ValidationError & (EmptyFieldValidationError | InvalidFieldLengthValidationError | InvalidFieldValueValidationError | InvalidIdentifierValidationError | MissingFieldValidationError | UnsupportedFieldValidationError)); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/ScriptAlreadyPresentError.ts b/hivemq-edge-frontend/src/api/__generated__/models/ScriptAlreadyPresentError.ts new file mode 100644 index 0000000000..94a2a9a0ac --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/ScriptAlreadyPresentError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type ScriptAlreadyPresentError = (ApiProblemDetails & { + /** + * The script id. + */ + id: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/ScriptCreationFailureError.ts b/hivemq-edge-frontend/src/api/__generated__/models/ScriptCreationFailureError.ts new file mode 100644 index 0000000000..5d7eea5445 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/ScriptCreationFailureError.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type ScriptCreationFailureError = ApiProblemDetails; + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/ScriptEtagMismatchError.ts b/hivemq-edge-frontend/src/api/__generated__/models/ScriptEtagMismatchError.ts new file mode 100644 index 0000000000..7044d28729 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/ScriptEtagMismatchError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type ScriptEtagMismatchError = (ApiProblemDetails & { + /** + * The script id. + */ + id: string; + /** + * The eTag. + */ + eTag?: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/ScriptInsufficientStorageError.ts b/hivemq-edge-frontend/src/api/__generated__/models/ScriptInsufficientStorageError.ts new file mode 100644 index 0000000000..ff6ad36c52 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/ScriptInsufficientStorageError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type ScriptInsufficientStorageError = (ApiProblemDetails & { + /** + * The policy id. + */ + id: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/ScriptInvalidErrors.ts b/hivemq-edge-frontend/src/api/__generated__/models/ScriptInvalidErrors.ts new file mode 100644 index 0000000000..bfdbcd3899 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/ScriptInvalidErrors.ts @@ -0,0 +1,15 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; +import type { ScriptValidationError } from './ScriptValidationError'; + +export type ScriptInvalidErrors = (ApiProblemDetails & { + /** + * List of child validation errors. + */ + childErrors: Array; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/ScriptNotFoundError.ts b/hivemq-edge-frontend/src/api/__generated__/models/ScriptNotFoundError.ts new file mode 100644 index 0000000000..14c474e899 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/ScriptNotFoundError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type ScriptNotFoundError = (ApiProblemDetails & { + /** + * The script ID. + */ + id: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/ScriptParsingFailureError.ts b/hivemq-edge-frontend/src/api/__generated__/models/ScriptParsingFailureError.ts new file mode 100644 index 0000000000..92886467d5 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/ScriptParsingFailureError.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type ScriptParsingFailureError = ApiProblemDetails; + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/ScriptReferencedError.ts b/hivemq-edge-frontend/src/api/__generated__/models/ScriptReferencedError.ts new file mode 100644 index 0000000000..153b654083 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/ScriptReferencedError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type ScriptReferencedError = (ApiProblemDetails & { + /** + * The script ID. + */ + id: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/ScriptSanitationFailureError.ts b/hivemq-edge-frontend/src/api/__generated__/models/ScriptSanitationFailureError.ts new file mode 100644 index 0000000000..02c963e206 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/ScriptSanitationFailureError.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type ScriptSanitationFailureError = ApiProblemDetails; + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/ScriptValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/models/ScriptValidationError.ts new file mode 100644 index 0000000000..2447fc5ad0 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/ScriptValidationError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { InvalidFieldLengthValidationError } from './InvalidFieldLengthValidationError'; +import type { InvalidFieldValueValidationError } from './InvalidFieldValueValidationError'; +import type { InvalidIdentifierValidationError } from './InvalidIdentifierValidationError'; +import type { MissingFieldValidationError } from './MissingFieldValidationError'; +import type { UnsupportedFieldValidationError } from './UnsupportedFieldValidationError'; +import type { ValidationError } from './ValidationError'; + +export type ScriptValidationError = (ValidationError & (InvalidFieldLengthValidationError | InvalidFieldValueValidationError | InvalidIdentifierValidationError | MissingFieldValidationError | UnsupportedFieldValidationError)); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/SouthboundMappingOwner.ts b/hivemq-edge-frontend/src/api/__generated__/models/SouthboundMappingOwner.ts new file mode 100644 index 0000000000..b413211836 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/SouthboundMappingOwner.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { SouthboundMapping } from './SouthboundMapping'; + +export type SouthboundMappingOwner = (SouthboundMapping & { + /** + * The id of the adapter owning the tag + */ + adapterId: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/SouthboundMappingOwnerList.ts b/hivemq-edge-frontend/src/api/__generated__/models/SouthboundMappingOwnerList.ts new file mode 100644 index 0000000000..5772502e0c --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/SouthboundMappingOwnerList.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { SouthboundMappingOwner } from './SouthboundMappingOwner'; + +export type SouthboundMappingOwnerList = { + /** + * List of result items that are returned by this endpoint + */ + items: Array; +}; + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/TemporaryNotAvailableError.ts b/hivemq-edge-frontend/src/api/__generated__/models/TemporaryNotAvailableError.ts new file mode 100644 index 0000000000..523dc2c14b --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/TemporaryNotAvailableError.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type TemporaryNotAvailableError = ApiProblemDetails; + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/TopicFilterMismatchError.ts b/hivemq-edge-frontend/src/api/__generated__/models/TopicFilterMismatchError.ts new file mode 100644 index 0000000000..7b8b3500c8 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/TopicFilterMismatchError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type TopicFilterMismatchError = (ApiProblemDetails & { + /** + * The json path of the topic filter. + */ + path: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/UnknownVariableValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/models/UnknownVariableValidationError.ts new file mode 100644 index 0000000000..4c81ef3a93 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/UnknownVariableValidationError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ValidationError } from './ValidationError'; + +export type UnknownVariableValidationError = (ValidationError & { + /** + * The json path of the field. + */ + path: string; + /** + * The unknown variables. + */ + variables: Array; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/UnsupportedFieldValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/models/UnsupportedFieldValidationError.ts new file mode 100644 index 0000000000..1497d2a4a4 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/UnsupportedFieldValidationError.ts @@ -0,0 +1,22 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ValidationError } from './ValidationError'; + +export type UnsupportedFieldValidationError = (ValidationError & { + /** + * The actual value. + */ + actualValue: string; + /** + * The expected value. + */ + expectedValue: string; + /** + * The json path. + */ + path: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/UrlParameterMissingError.ts b/hivemq-edge-frontend/src/api/__generated__/models/UrlParameterMissingError.ts new file mode 100644 index 0000000000..1e4ee4f86f --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/UrlParameterMissingError.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ApiProblemDetails } from './ApiProblemDetails'; + +export type UrlParameterMissingError = (ApiProblemDetails & { + /** + * The name of the missing parameter. + */ + parameter: string; +}); + diff --git a/hivemq-edge-frontend/src/api/__generated__/models/ValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/models/ValidationError.ts new file mode 100644 index 0000000000..7440fdc5f0 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/models/ValidationError.ts @@ -0,0 +1,16 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type ValidationError = { + /** + * Detailed contextual description of the validation error. + */ + detail: string; + /** + * Type of the validation error. + */ + type: string; +}; + diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$ApiProblemDetails.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$ApiProblemDetails.ts new file mode 100644 index 0000000000..beb341116f --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$ApiProblemDetails.ts @@ -0,0 +1,16 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $ApiProblemDetails = { + type: 'all-of', + contains: [{ + type: 'ProblemDetails', + }, { + type: 'dictionary', + contains: { + properties: { + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$AtLeastOneFieldMissingValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$AtLeastOneFieldMissingValidationError.ts new file mode 100644 index 0000000000..d5bbcbbdcb --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$AtLeastOneFieldMissingValidationError.ts @@ -0,0 +1,22 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $AtLeastOneFieldMissingValidationError = { + type: 'all-of', + contains: [{ + type: 'ValidationError', + }, { + properties: { + paths: { + type: 'array', + contains: { + type: 'string', + description: `The json path.`, + format: 'json-path', + }, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$AtMostOneFunctionValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$AtMostOneFunctionValidationError.ts new file mode 100644 index 0000000000..87c77b9b89 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$AtMostOneFunctionValidationError.ts @@ -0,0 +1,32 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $AtMostOneFunctionValidationError = { + type: 'all-of', + contains: [{ + type: 'ValidationError', + }, { + properties: { + function: { + type: 'string', + description: `The function.`, + isRequired: true, + }, + occurrences: { + type: 'number', + description: `The occurrences of the function.`, + isRequired: true, + format: 'int32', + }, + paths: { + type: 'array', + contains: { + type: 'string', + format: 'json-path', + }, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$BehaviorPolicyAlreadyPresentError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$BehaviorPolicyAlreadyPresentError.ts new file mode 100644 index 0000000000..8170735137 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$BehaviorPolicyAlreadyPresentError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $BehaviorPolicyAlreadyPresentError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + id: { + type: 'string', + description: `The behavior policy id.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$BehaviorPolicyCreationFailureError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$BehaviorPolicyCreationFailureError.ts new file mode 100644 index 0000000000..4c9256036c --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$BehaviorPolicyCreationFailureError.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $BehaviorPolicyCreationFailureError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$BehaviorPolicyInvalidErrors.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$BehaviorPolicyInvalidErrors.ts new file mode 100644 index 0000000000..882704bec8 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$BehaviorPolicyInvalidErrors.ts @@ -0,0 +1,20 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $BehaviorPolicyInvalidErrors = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + childErrors: { + type: 'array', + contains: { + type: 'BehaviorPolicyValidationError', + }, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$BehaviorPolicyNotFoundError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$BehaviorPolicyNotFoundError.ts new file mode 100644 index 0000000000..725756dcb6 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$BehaviorPolicyNotFoundError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $BehaviorPolicyNotFoundError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + id: { + type: 'string', + description: `The data policy id.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$BehaviorPolicyRejectedError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$BehaviorPolicyRejectedError.ts new file mode 100644 index 0000000000..05e4d0c375 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$BehaviorPolicyRejectedError.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $BehaviorPolicyRejectedError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$BehaviorPolicyUpdateFailureError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$BehaviorPolicyUpdateFailureError.ts new file mode 100644 index 0000000000..88af7c5619 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$BehaviorPolicyUpdateFailureError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $BehaviorPolicyUpdateFailureError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + id: { + type: 'string', + description: `The ID of the policy that failed to update.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$BehaviorPolicyValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$BehaviorPolicyValidationError.ts new file mode 100644 index 0000000000..88a6166bed --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$BehaviorPolicyValidationError.ts @@ -0,0 +1,33 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $BehaviorPolicyValidationError = { + type: 'all-of', + contains: [{ + type: 'ValidationError', + }, { + type: 'one-of', + contains: [{ + type: 'IllegalEventTransitionValidationError', + }, { + type: 'IllegalFunctionValidationError', + }, { + type: 'InvalidSchemaVersionValidationError', + }, { + type: 'AtLeastOneFieldMissingValidationError', + }, { + type: 'EmptyFieldValidationError', + }, { + type: 'InvalidFieldLengthValidationError', + }, { + type: 'InvalidFieldValueValidationError', + }, { + type: 'InvalidIdentifierValidationError', + }, { + type: 'MissingFieldValidationError', + }, { + type: 'UnsupportedFieldValidationError', + }], + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$ClientDisconnectedError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$ClientDisconnectedError.ts new file mode 100644 index 0000000000..3b33248dee --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$ClientDisconnectedError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $ClientDisconnectedError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + id: { + type: 'string', + description: `The client id.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$ClientNotFoundError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$ClientNotFoundError.ts new file mode 100644 index 0000000000..c4430424bc --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$ClientNotFoundError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $ClientNotFoundError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + id: { + type: 'string', + description: `The client id.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$DataPolicyAlreadyPresentError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$DataPolicyAlreadyPresentError.ts new file mode 100644 index 0000000000..a1b3c1a7ef --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$DataPolicyAlreadyPresentError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $DataPolicyAlreadyPresentError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + id: { + type: 'string', + description: `The data policy id.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$DataPolicyCreationFailureError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$DataPolicyCreationFailureError.ts new file mode 100644 index 0000000000..f3e0eabaa9 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$DataPolicyCreationFailureError.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $DataPolicyCreationFailureError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$DataPolicyInvalidErrors.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$DataPolicyInvalidErrors.ts new file mode 100644 index 0000000000..38ea94dfa5 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$DataPolicyInvalidErrors.ts @@ -0,0 +1,20 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $DataPolicyInvalidErrors = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + childErrors: { + type: 'array', + contains: { + type: 'DataPolicyValidationError', + }, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$DataPolicyNotFoundError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$DataPolicyNotFoundError.ts new file mode 100644 index 0000000000..24612ec788 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$DataPolicyNotFoundError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $DataPolicyNotFoundError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + id: { + type: 'string', + description: `The data policy id.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$DataPolicyRejectedError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$DataPolicyRejectedError.ts new file mode 100644 index 0000000000..1babc3ee44 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$DataPolicyRejectedError.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $DataPolicyRejectedError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$DataPolicyUpdateFailureError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$DataPolicyUpdateFailureError.ts new file mode 100644 index 0000000000..c39ab7000f --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$DataPolicyUpdateFailureError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $DataPolicyUpdateFailureError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + id: { + type: 'string', + description: `The ID of the policy that failed to update.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$DataPolicyValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$DataPolicyValidationError.ts new file mode 100644 index 0000000000..5fc11cfdf6 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$DataPolicyValidationError.ts @@ -0,0 +1,35 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $DataPolicyValidationError = { + type: 'all-of', + contains: [{ + type: 'ValidationError', + }, { + type: 'one-of', + contains: [{ + type: 'AtMostOneFunctionValidationError', + }, { + type: 'FunctionMustBePairedValidationError', + }, { + type: 'InvalidFunctionOrderValidationError', + }, { + type: 'InvalidSchemaVersionValidationError', + }, { + type: 'UnknownVariableValidationError', + }, { + type: 'EmptyFieldValidationError', + }, { + type: 'InvalidFieldLengthValidationError', + }, { + type: 'InvalidFieldValueValidationError', + }, { + type: 'InvalidIdentifierValidationError', + }, { + type: 'MissingFieldValidationError', + }, { + type: 'UnsupportedFieldValidationError', + }], + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$DomainTagOwner.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$DomainTagOwner.ts new file mode 100644 index 0000000000..84c99b0171 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$DomainTagOwner.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $DomainTagOwner = { + type: 'all-of', + contains: [{ + type: 'DomainTag', + }, { + properties: { + adapterId: { + type: 'string', + description: `The id of the adapter owning the tag`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$DomainTagOwnerList.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$DomainTagOwnerList.ts new file mode 100644 index 0000000000..f797d41f9d --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$DomainTagOwnerList.ts @@ -0,0 +1,15 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $DomainTagOwnerList = { + properties: { + items: { + type: 'array', + contains: { + type: 'DomainTagOwner', + }, + isRequired: true, + }, + }, +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$EmptyFieldValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$EmptyFieldValidationError.ts new file mode 100644 index 0000000000..f0c83b2cb6 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$EmptyFieldValidationError.ts @@ -0,0 +1,19 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $EmptyFieldValidationError = { + type: 'all-of', + contains: [{ + type: 'ValidationError', + }, { + properties: { + path: { + type: 'string', + description: `The missing field.`, + isRequired: true, + format: 'json-path', + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$FunctionMustBePairedValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$FunctionMustBePairedValidationError.ts new file mode 100644 index 0000000000..4e5271308d --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$FunctionMustBePairedValidationError.ts @@ -0,0 +1,23 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $FunctionMustBePairedValidationError = { + type: 'all-of', + contains: [{ + type: 'ValidationError', + }, { + properties: { + existingFunction: { + type: 'string', + description: `The existing function.`, + isRequired: true, + }, + missingFunction: { + type: 'string', + description: `The missing function.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$FunctionSpecs.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$FunctionSpecs.ts index 3c9583d369..e18ad04db0 100644 --- a/hivemq-edge-frontend/src/api/__generated__/schemas/$FunctionSpecs.ts +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$FunctionSpecs.ts @@ -17,12 +17,12 @@ export const $FunctionSpecs = { }, schema: { type: 'JsonNode', - description: `the full JSON-Schema describimng the function and its arguments`, + description: `the full JSON-Schema describing the function and its arguments`, isRequired: true, }, uiSchema: { type: 'JsonNode', - description: `An optional UI Schema to customise the rendering of the configuraton form`, + description: `An optional UI Schema to customise the rendering of the configuration form`, }, }, } as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$IllegalEventTransitionValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$IllegalEventTransitionValidationError.ts new file mode 100644 index 0000000000..67c8ca80e6 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$IllegalEventTransitionValidationError.ts @@ -0,0 +1,38 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $IllegalEventTransitionValidationError = { + type: 'all-of', + contains: [{ + type: 'ValidationError', + }, { + properties: { + event: { + type: 'string', + description: `The event name.`, + isRequired: true, + }, + fromState: { + type: 'string', + description: `The event from state.`, + isRequired: true, + }, + id: { + type: 'string', + description: `The event id.`, + isRequired: true, + }, + path: { + type: 'string', + description: `The path.`, + isRequired: true, + }, + toState: { + type: 'string', + description: `The event to state.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$IllegalFunctionValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$IllegalFunctionValidationError.ts new file mode 100644 index 0000000000..c36702792e --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$IllegalFunctionValidationError.ts @@ -0,0 +1,29 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $IllegalFunctionValidationError = { + type: 'all-of', + contains: [{ + type: 'ValidationError', + }, { + properties: { + event: { + type: 'string', + description: `The event name.`, + isRequired: true, + }, + id: { + type: 'string', + description: `The function id.`, + isRequired: true, + }, + path: { + type: 'string', + description: `The json path.`, + isRequired: true, + format: 'json-path', + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$InsufficientStorageError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$InsufficientStorageError.ts new file mode 100644 index 0000000000..37163673b8 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$InsufficientStorageError.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $InsufficientStorageError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$Errors.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$InternalServerError.ts similarity index 54% rename from hivemq-edge-frontend/src/api/__generated__/schemas/$Errors.ts rename to hivemq-edge-frontend/src/api/__generated__/schemas/$InternalServerError.ts index 80f2f2cf88..849117bfdd 100644 --- a/hivemq-edge-frontend/src/api/__generated__/schemas/$Errors.ts +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$InternalServerError.ts @@ -2,10 +2,9 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export const $Errors = { - type: 'dictionary', - contains: { - properties: { - }, - }, +export const $InternalServerError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }], } as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$InvalidFieldLengthValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$InvalidFieldLengthValidationError.ts new file mode 100644 index 0000000000..200426b6b8 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$InvalidFieldLengthValidationError.ts @@ -0,0 +1,42 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $InvalidFieldLengthValidationError = { + type: 'all-of', + contains: [{ + type: 'ValidationError', + }, { + properties: { + actualLength: { + type: 'number', + description: `The actual length of the field value.`, + isRequired: true, + format: 'int32', + }, + expectedMinimumLength: { + type: 'number', + description: `The minimum length expected for the field value.`, + isRequired: true, + format: 'int32', + }, + expectedMaximumLength: { + type: 'number', + description: `The maximum length expected for the field value.`, + isRequired: true, + format: 'int32', + }, + path: { + type: 'string', + description: `The invalid json path.`, + isRequired: true, + format: 'json-path', + }, + value: { + type: 'string', + description: `The invalid value.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$InvalidFieldValueValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$InvalidFieldValueValidationError.ts new file mode 100644 index 0000000000..33a32ba051 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$InvalidFieldValueValidationError.ts @@ -0,0 +1,23 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $InvalidFieldValueValidationError = { + type: 'all-of', + contains: [{ + type: 'ValidationError', + }, { + properties: { + path: { + type: 'string', + description: `The invalid json path.`, + isRequired: true, + format: 'json-path', + }, + value: { + type: 'string', + description: `The invalid value.`, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$InvalidFunctionOrderValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$InvalidFunctionOrderValidationError.ts new file mode 100644 index 0000000000..7b920acce0 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$InvalidFunctionOrderValidationError.ts @@ -0,0 +1,29 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $InvalidFunctionOrderValidationError = { + type: 'all-of', + contains: [{ + type: 'ValidationError', + }, { + properties: { + function: { + type: 'string', + description: `The function.`, + isRequired: true, + }, + path: { + type: 'string', + description: `The json path.`, + isRequired: true, + format: 'json-path', + }, + previousFunction: { + type: 'string', + description: `The previous function.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$InvalidIdentifierValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$InvalidIdentifierValidationError.ts new file mode 100644 index 0000000000..7376729f7e --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$InvalidIdentifierValidationError.ts @@ -0,0 +1,24 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $InvalidIdentifierValidationError = { + type: 'all-of', + contains: [{ + type: 'ValidationError', + }, { + properties: { + path: { + type: 'string', + description: `The invalid identifier path.`, + isRequired: true, + format: 'json-path', + }, + value: { + type: 'string', + description: `The invalid identifier value.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$InvalidQueryParameterError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$InvalidQueryParameterError.ts new file mode 100644 index 0000000000..16f69bc71a --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$InvalidQueryParameterError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $InvalidQueryParameterError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + parameter: { + type: 'string', + description: `The query parameter.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$InvalidSchemaVersionValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$InvalidSchemaVersionValidationError.ts new file mode 100644 index 0000000000..42da246c16 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$InvalidSchemaVersionValidationError.ts @@ -0,0 +1,23 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $InvalidSchemaVersionValidationError = { + type: 'all-of', + contains: [{ + type: 'ValidationError', + }, { + properties: { + id: { + type: 'string', + description: `The schema id.`, + isRequired: true, + }, + version: { + type: 'string', + description: `The schema version.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$MissingFieldValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$MissingFieldValidationError.ts new file mode 100644 index 0000000000..82cd1f0213 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$MissingFieldValidationError.ts @@ -0,0 +1,19 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $MissingFieldValidationError = { + type: 'all-of', + contains: [{ + type: 'ValidationError', + }, { + properties: { + path: { + type: 'string', + description: `The missing path.`, + isRequired: true, + format: 'json-path', + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$NorthboundMapping.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$NorthboundMapping.ts index 41c3789269..c400d0b333 100644 --- a/hivemq-edge-frontend/src/api/__generated__/schemas/$NorthboundMapping.ts +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$NorthboundMapping.ts @@ -21,9 +21,6 @@ export const $NorthboundMapping = { description: `The message expiry interval.`, format: 'int64', }, - messageHandlingOptions: { - type: 'Enum', - }, tagName: { type: 'string', description: `The tag for which values hould be collected and sent out.`, diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$NorthboundMappingOwner.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$NorthboundMappingOwner.ts new file mode 100644 index 0000000000..647312e7a2 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$NorthboundMappingOwner.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $NorthboundMappingOwner = { + type: 'all-of', + contains: [{ + type: 'NorthboundMapping', + }, { + properties: { + adapterId: { + type: 'string', + description: `The id of the adapter owning the tag`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$NorthboundMappingOwnerList.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$NorthboundMappingOwnerList.ts new file mode 100644 index 0000000000..e2c191d20d --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$NorthboundMappingOwnerList.ts @@ -0,0 +1,15 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $NorthboundMappingOwnerList = { + properties: { + items: { + type: 'array', + contains: { + type: 'NorthboundMappingOwner', + }, + isRequired: true, + }, + }, +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$PolicyIdMismatchError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$PolicyIdMismatchError.ts new file mode 100644 index 0000000000..db4da018a2 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$PolicyIdMismatchError.ts @@ -0,0 +1,23 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $PolicyIdMismatchError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + actualId: { + type: 'string', + description: `The actual id.`, + isRequired: true, + }, + expectedId: { + type: 'string', + description: `The expected id.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$PolicyInsufficientStorageError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$PolicyInsufficientStorageError.ts new file mode 100644 index 0000000000..4f97849862 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$PolicyInsufficientStorageError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $PolicyInsufficientStorageError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + id: { + type: 'string', + description: `The policy id.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$PolicyNotFoundError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$PolicyNotFoundError.ts new file mode 100644 index 0000000000..1a1a512c4c --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$PolicyNotFoundError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $PolicyNotFoundError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + id: { + type: 'string', + description: `The policy id.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$PreconditionFailedError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$PreconditionFailedError.ts new file mode 100644 index 0000000000..5cc5beb548 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$PreconditionFailedError.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $PreconditionFailedError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$RequestBodyMissingError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$RequestBodyMissingError.ts new file mode 100644 index 0000000000..7c269bbbfb --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$RequestBodyMissingError.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $RequestBodyMissingError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$RequestBodyParameterMissingError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$RequestBodyParameterMissingError.ts new file mode 100644 index 0000000000..11d3ce66c6 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$RequestBodyParameterMissingError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $RequestBodyParameterMissingError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + parameter: { + type: 'string', + description: `The the missing request body parameter.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$SchemaAlreadyPresentError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$SchemaAlreadyPresentError.ts new file mode 100644 index 0000000000..bd2676ce7c --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$SchemaAlreadyPresentError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $SchemaAlreadyPresentError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + id: { + type: 'string', + description: `The schema id.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$SchemaEtagMismatchError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$SchemaEtagMismatchError.ts new file mode 100644 index 0000000000..2177876d18 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$SchemaEtagMismatchError.ts @@ -0,0 +1,22 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $SchemaEtagMismatchError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + id: { + type: 'string', + description: `The schema id.`, + isRequired: true, + }, + eTag: { + type: 'string', + description: `The eTag.`, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$SchemaInsufficientStorageError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$SchemaInsufficientStorageError.ts new file mode 100644 index 0000000000..07e68fdcbb --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$SchemaInsufficientStorageError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $SchemaInsufficientStorageError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + id: { + type: 'string', + description: `The policy id.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$SchemaInvalidErrors.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$SchemaInvalidErrors.ts new file mode 100644 index 0000000000..3e51abf572 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$SchemaInvalidErrors.ts @@ -0,0 +1,20 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $SchemaInvalidErrors = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + childErrors: { + type: 'array', + contains: { + type: 'SchemaValidationError', + }, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$SchemaNotFoundError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$SchemaNotFoundError.ts new file mode 100644 index 0000000000..388229a1bd --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$SchemaNotFoundError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $SchemaNotFoundError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + id: { + type: 'string', + description: `The schema ID.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$SchemaParsingFailureError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$SchemaParsingFailureError.ts new file mode 100644 index 0000000000..e6fbe8d4d3 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$SchemaParsingFailureError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $SchemaParsingFailureError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + alias: { + type: 'string', + description: `The schema alias.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$SchemaReferencedError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$SchemaReferencedError.ts new file mode 100644 index 0000000000..a33ac211a0 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$SchemaReferencedError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $SchemaReferencedError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + id: { + type: 'string', + description: `The schema ID.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$SchemaValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$SchemaValidationError.ts new file mode 100644 index 0000000000..5408cf0527 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$SchemaValidationError.ts @@ -0,0 +1,25 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $SchemaValidationError = { + type: 'all-of', + contains: [{ + type: 'ValidationError', + }, { + type: 'one-of', + contains: [{ + type: 'EmptyFieldValidationError', + }, { + type: 'InvalidFieldLengthValidationError', + }, { + type: 'InvalidFieldValueValidationError', + }, { + type: 'InvalidIdentifierValidationError', + }, { + type: 'MissingFieldValidationError', + }, { + type: 'UnsupportedFieldValidationError', + }], + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptAlreadyPresentError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptAlreadyPresentError.ts new file mode 100644 index 0000000000..aa99188d18 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptAlreadyPresentError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $ScriptAlreadyPresentError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + id: { + type: 'string', + description: `The script id.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptCreationFailureError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptCreationFailureError.ts new file mode 100644 index 0000000000..f5d1bdbc93 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptCreationFailureError.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $ScriptCreationFailureError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptEtagMismatchError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptEtagMismatchError.ts new file mode 100644 index 0000000000..133f619e8f --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptEtagMismatchError.ts @@ -0,0 +1,22 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $ScriptEtagMismatchError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + id: { + type: 'string', + description: `The script id.`, + isRequired: true, + }, + eTag: { + type: 'string', + description: `The eTag.`, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptInsufficientStorageError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptInsufficientStorageError.ts new file mode 100644 index 0000000000..25b88e5b09 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptInsufficientStorageError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $ScriptInsufficientStorageError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + id: { + type: 'string', + description: `The policy id.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptInvalidErrors.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptInvalidErrors.ts new file mode 100644 index 0000000000..3deac05846 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptInvalidErrors.ts @@ -0,0 +1,20 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $ScriptInvalidErrors = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + childErrors: { + type: 'array', + contains: { + type: 'ScriptValidationError', + }, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptNotFoundError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptNotFoundError.ts new file mode 100644 index 0000000000..70cbdf77b4 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptNotFoundError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $ScriptNotFoundError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + id: { + type: 'string', + description: `The script ID.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptParsingFailureError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptParsingFailureError.ts new file mode 100644 index 0000000000..f6fcb6f012 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptParsingFailureError.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $ScriptParsingFailureError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptReferencedError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptReferencedError.ts new file mode 100644 index 0000000000..b0e79ceada --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptReferencedError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $ScriptReferencedError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + id: { + type: 'string', + description: `The script ID.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptSanitationFailureError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptSanitationFailureError.ts new file mode 100644 index 0000000000..e5b0473d77 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptSanitationFailureError.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $ScriptSanitationFailureError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptValidationError.ts new file mode 100644 index 0000000000..037359f9f0 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$ScriptValidationError.ts @@ -0,0 +1,23 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $ScriptValidationError = { + type: 'all-of', + contains: [{ + type: 'ValidationError', + }, { + type: 'one-of', + contains: [{ + type: 'InvalidFieldLengthValidationError', + }, { + type: 'InvalidFieldValueValidationError', + }, { + type: 'InvalidIdentifierValidationError', + }, { + type: 'MissingFieldValidationError', + }, { + type: 'UnsupportedFieldValidationError', + }], + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$SouthboundMappingOwner.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$SouthboundMappingOwner.ts new file mode 100644 index 0000000000..19a11bd432 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$SouthboundMappingOwner.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $SouthboundMappingOwner = { + type: 'all-of', + contains: [{ + type: 'SouthboundMapping', + }, { + properties: { + adapterId: { + type: 'string', + description: `The id of the adapter owning the tag`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$SouthboundMappingOwnerList.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$SouthboundMappingOwnerList.ts new file mode 100644 index 0000000000..6180468118 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$SouthboundMappingOwnerList.ts @@ -0,0 +1,15 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $SouthboundMappingOwnerList = { + properties: { + items: { + type: 'array', + contains: { + type: 'SouthboundMappingOwner', + }, + isRequired: true, + }, + }, +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$TemporaryNotAvailableError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$TemporaryNotAvailableError.ts new file mode 100644 index 0000000000..bb2cd4d9ea --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$TemporaryNotAvailableError.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $TemporaryNotAvailableError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$TopicFilterMismatchError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$TopicFilterMismatchError.ts new file mode 100644 index 0000000000..88d3fc753d --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$TopicFilterMismatchError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $TopicFilterMismatchError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + path: { + type: 'string', + description: `The json path of the topic filter.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$UnknownVariableValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$UnknownVariableValidationError.ts new file mode 100644 index 0000000000..9987c81deb --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$UnknownVariableValidationError.ts @@ -0,0 +1,25 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $UnknownVariableValidationError = { + type: 'all-of', + contains: [{ + type: 'ValidationError', + }, { + properties: { + path: { + type: 'string', + description: `The json path of the field.`, + isRequired: true, + }, + variables: { + type: 'array', + contains: { + type: 'string', + }, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$UnsupportedFieldValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$UnsupportedFieldValidationError.ts new file mode 100644 index 0000000000..1a3dbfb88b --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$UnsupportedFieldValidationError.ts @@ -0,0 +1,29 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $UnsupportedFieldValidationError = { + type: 'all-of', + contains: [{ + type: 'ValidationError', + }, { + properties: { + actualValue: { + type: 'string', + description: `The actual value.`, + isRequired: true, + }, + expectedValue: { + type: 'string', + description: `The expected value.`, + isRequired: true, + }, + path: { + type: 'string', + description: `The json path.`, + isRequired: true, + format: 'json-path', + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$UrlParameterMissingError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$UrlParameterMissingError.ts new file mode 100644 index 0000000000..09600413a0 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$UrlParameterMissingError.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $UrlParameterMissingError = { + type: 'all-of', + contains: [{ + type: 'ApiProblemDetails', + }, { + properties: { + parameter: { + type: 'string', + description: `The name of the missing parameter.`, + isRequired: true, + }, + }, + }], +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/schemas/$ValidationError.ts b/hivemq-edge-frontend/src/api/__generated__/schemas/$ValidationError.ts new file mode 100644 index 0000000000..86eded99d3 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/schemas/$ValidationError.ts @@ -0,0 +1,19 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $ValidationError = { + properties: { + detail: { + type: 'string', + description: `Detailed contextual description of the validation error.`, + isRequired: true, + }, + type: { + type: 'string', + description: `Type of the validation error.`, + isRequired: true, + format: 'uri', + }, + }, +} as const; diff --git a/hivemq-edge-frontend/src/api/__generated__/services/CombinersService.ts b/hivemq-edge-frontend/src/api/__generated__/services/CombinersService.ts index 97ace0e2cc..d81010158b 100644 --- a/hivemq-edge-frontend/src/api/__generated__/services/CombinersService.ts +++ b/hivemq-edge-frontend/src/api/__generated__/services/CombinersService.ts @@ -43,6 +43,8 @@ export class CombinersService { body: requestBody, mediaType: 'application/json', errors: { + 400: `Topic, schema, or mapping ID invalid`, + 404: `Managed asset not found`, 409: `Combiner already exists`, }, }); @@ -113,6 +115,8 @@ export class CombinersService { body: requestBody, mediaType: 'application/json', errors: { + 400: `Topic, schema, or mapping ID invalid`, + 404: `Managed asset not found`, 409: `Combiner already exists`, }, }); diff --git a/hivemq-edge-frontend/src/api/__generated__/services/DataHubBehaviorPoliciesService.ts b/hivemq-edge-frontend/src/api/__generated__/services/DataHubBehaviorPoliciesService.ts index 117cf1a1fd..1e0ad95811 100644 --- a/hivemq-edge-frontend/src/api/__generated__/services/DataHubBehaviorPoliciesService.ts +++ b/hivemq-edge-frontend/src/api/__generated__/services/DataHubBehaviorPoliciesService.ts @@ -45,7 +45,8 @@ export class DataHubBehaviorPoliciesService { 'cursor': cursor, }, errors: { - 503: `Temporarily not available`, + 400: `URL parameter missing`, + 503: `Request resource temporary unavailable`, }, }); } @@ -69,10 +70,10 @@ export class DataHubBehaviorPoliciesService { mediaType: 'application/json', errors: { 400: `Policy creation failed`, - 409: `Already exists`, - 500: `Internal error`, - 503: `Temporarily unavailable`, - 507: `Insufficient storage error`, + 409: `Behavior policy already present`, + 500: `Internal server error`, + 503: `Request resource temporary unavailable`, + 507: `Insufficient storage`, }, }); } @@ -102,10 +103,10 @@ export class DataHubBehaviorPoliciesService { }, errors: { 400: `URL parameter missing`, - 404: `Policy not found`, + 404: `Behavior policy not found`, 412: `Precondition failed`, - 500: `Internal error`, - 503: `Temporarily not available`, + 500: `Internal server error`, + 503: `Request resource temporary unavailable`, }, }); } @@ -136,14 +137,16 @@ export class DataHubBehaviorPoliciesService { 'fields': fields, }, errors: { - 400: `Invalid query parameter`, + 400: `Bad request`, 404: `Policy not found`, + 500: `Internal server error`, + 503: `Request resource temporary unavailable`, }, }); } /** - * Update an existing policy + * Update an existing behavior policy * Update a behavior policy * * The path parameter 'policyId' must match the 'id' of the policy in the request body. @@ -171,12 +174,12 @@ export class DataHubBehaviorPoliciesService { body: requestBody, mediaType: 'application/json', errors: { - 400: `Policy creation failed`, - 404: `Policy not found`, + 400: `Behavior policy creation failed`, + 404: `Data policy not found`, 412: `Precondition failed`, - 500: `Internal error`, - 503: `Temporarily unavailable`, - 507: `Insufficient storage error`, + 500: `Internal server error`, + 503: `Request resource temporary unavailable`, + 507: `Insufficient storage`, }, }); } diff --git a/hivemq-edge-frontend/src/api/__generated__/services/DataHubDataPoliciesService.ts b/hivemq-edge-frontend/src/api/__generated__/services/DataHubDataPoliciesService.ts index 028ebb0728..c8f3e0213d 100644 --- a/hivemq-edge-frontend/src/api/__generated__/services/DataHubDataPoliciesService.ts +++ b/hivemq-edge-frontend/src/api/__generated__/services/DataHubDataPoliciesService.ts @@ -49,8 +49,6 @@ export class DataHubDataPoliciesService { }, errors: { 400: `URL parameter missing`, - 404: `DataPolicy not found`, - 500: `Internal server error`, 503: `Request resource temporary unavailable`, }, }); @@ -74,8 +72,8 @@ export class DataHubDataPoliciesService { body: requestBody, mediaType: 'application/json', errors: { - 400: `DataPolicy creation failed`, - 409: `DataPolicy already present`, + 400: `Data policy creation failed`, + 409: `Data policy already present`, 500: `Internal server error`, 503: `Request resource temporary unavailable`, 507: `Insufficient storage`, @@ -108,7 +106,8 @@ export class DataHubDataPoliciesService { }, errors: { 400: `URL parameter missing`, - 404: `DataPolicy not found`, + 404: `Data policy not found`, + 412: `Precondition failed`, 500: `Internal server error`, 503: `Request resource temporary unavailable`, }, @@ -143,6 +142,8 @@ export class DataHubDataPoliciesService { errors: { 400: `Bad request`, 404: `Resource not found`, + 500: `Internal server error`, + 503: `Request resource temporary unavailable`, }, }); } @@ -177,8 +178,9 @@ export class DataHubDataPoliciesService { body: requestBody, mediaType: 'application/json', errors: { - 400: `DataPolicy creation failed`, - 404: `DataPolicy not found`, + 400: `Data policy creation failed`, + 404: `Data policy not found`, + 412: `Precondition failed`, 500: `Internal server error`, 503: `Request resource temporary unavailable`, 507: `Insufficient storage`, diff --git a/hivemq-edge-frontend/src/api/__generated__/services/DataHubSchemasService.ts b/hivemq-edge-frontend/src/api/__generated__/services/DataHubSchemasService.ts index 483bb4b193..40a0337f43 100644 --- a/hivemq-edge-frontend/src/api/__generated__/services/DataHubSchemasService.ts +++ b/hivemq-edge-frontend/src/api/__generated__/services/DataHubSchemasService.ts @@ -45,6 +45,7 @@ export class DataHubSchemasService { 'cursor': cursor, }, errors: { + 400: `URL parameter missing`, 503: `Request resource temporary unavailable`, }, }); @@ -73,10 +74,11 @@ export class DataHubSchemasService { body: requestBody, mediaType: 'application/json', errors: { - 400: `Schema could not be validatetd`, - 409: `Schema already exists`, - 412: `Mismatch between schema and etag`, + 400: `Schema creation failed`, + 409: `Schema is already present`, + 412: `Schema doesn't match etag`, 500: `Internal server error`, + 503: `Request resource temporary unavailable`, 507: `Insufficient storage`, }, }); @@ -106,10 +108,10 @@ export class DataHubSchemasService { 'If-Match': ifMatch, }, errors: { - 400: `Schema referenced`, + 400: `URL parameter missing`, 404: `Schema not found`, - 412: `Mismatch between schema and etag`, - 500: `Internal server error`, + 412: `Schema doesn't match etag`, + 500: `Internal Server error`, 503: `Request resource temporary unavailable`, }, }); @@ -141,9 +143,10 @@ export class DataHubSchemasService { 'fields': fields, }, errors: { - 400: `A url parameter is missing`, + 400: `URL parameter missing`, 404: `Schema not found`, 500: `Internal server error`, + 503: `Request resource temporary unavailable`, }, }); } diff --git a/hivemq-edge-frontend/src/api/__generated__/services/DataHubScriptsService.ts b/hivemq-edge-frontend/src/api/__generated__/services/DataHubScriptsService.ts index c5c382c29b..40ffc55dc0 100644 --- a/hivemq-edge-frontend/src/api/__generated__/services/DataHubScriptsService.ts +++ b/hivemq-edge-frontend/src/api/__generated__/services/DataHubScriptsService.ts @@ -41,7 +41,8 @@ export class DataHubScriptsService { 'cursor': cursor, }, errors: { - 503: `Temporary not available`, + 400: `URL parameter missing`, + 503: `Request resource temporary unavailable`, }, }); } @@ -67,11 +68,11 @@ export class DataHubScriptsService { body: requestBody, mediaType: 'application/json', errors: { - 400: `Script is invalid`, + 400: `Script creation failed`, 409: `Script is already present`, 412: `Script doesn't match etag`, 500: `Internal server error`, - 503: `Temporary not available`, + 503: `Request resource temporary unavailable`, 507: `Insufficient storage`, }, }); @@ -99,11 +100,11 @@ export class DataHubScriptsService { 'If-Match': ifMatch, }, errors: { - 400: `Script is referenced`, + 400: `URL parameter missing`, 404: `Script not found`, 412: `Script doesn't match etag`, 500: `Internal Server error`, - 503: `Temporary not available`, + 503: `Request resource temporary unavailable`, }, }); } @@ -133,7 +134,7 @@ export class DataHubScriptsService { 400: `URL parameter missing`, 404: `Script not found`, 500: `Internal Server error`, - 503: `Temporary not available`, + 503: `Request resource temporary unavailable`, }, }); } diff --git a/hivemq-edge-frontend/src/api/__generated__/services/DataHubStateService.ts b/hivemq-edge-frontend/src/api/__generated__/services/DataHubStateService.ts index b8394de045..e1ab081590 100644 --- a/hivemq-edge-frontend/src/api/__generated__/services/DataHubStateService.ts +++ b/hivemq-edge-frontend/src/api/__generated__/services/DataHubStateService.ts @@ -31,8 +31,8 @@ export class DataHubStateService { }, errors: { 400: `URL parameter missing`, - 404: `Client is disconnected`, - 500: `Internal Server error`, + 404: `Client error`, + 500: `Internal server error`, }, }); } diff --git a/hivemq-edge-frontend/src/api/__generated__/services/DomainService.ts b/hivemq-edge-frontend/src/api/__generated__/services/DomainService.ts new file mode 100644 index 0000000000..b935bc2321 --- /dev/null +++ b/hivemq-edge-frontend/src/api/__generated__/services/DomainService.ts @@ -0,0 +1,87 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { DomainTagOwnerList } from '../models/DomainTagOwnerList'; +import type { ManagedAssetList } from '../models/ManagedAssetList'; +import type { NorthboundMappingOwnerList } from '../models/NorthboundMappingOwnerList'; +import type { SouthboundMappingOwnerList } from '../models/SouthboundMappingOwnerList'; +import type { TopicFilterList } from '../models/TopicFilterList'; + +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; + +export class DomainService { + + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * Get all the northbound mappings. + * Get all northbound mappings + * @returns NorthboundMappingOwnerList Success + * @throws ApiError + */ + public getNorthboundMappings(): CancelablePromise { + return this.httpRequest.request({ + method: 'GET', + url: '/api/v1/management/protocol-adapters/mappings/northboundMappings', + }); + } + + /** + * Get all the southbound mappings. + * Get all southbound mappings. + * @returns SouthboundMappingOwnerList Success + * @throws ApiError + */ + public getSouthboundMappings(): CancelablePromise { + return this.httpRequest.request({ + method: 'GET', + url: '/api/v1/management/protocol-adapters/mappings/southboundMappings', + }); + } + + /** + * Get the list of all tags created in this Edge instance + * Get the list of all domain tags created in this Edge instance + * @returns DomainTagOwnerList Success + * @throws ApiError + */ + public getDomainTags(): CancelablePromise { + return this.httpRequest.request({ + method: 'GET', + url: '/api/v1/management/protocol-adapters/tags', + }); + } + + /** + * Get the list of all topic filters created in this Edge instance + * Get the list of all topic filters created in this Edge instance + * @returns TopicFilterList Success + * @throws ApiError + */ + public getTopicFilters(): CancelablePromise { + return this.httpRequest.request({ + method: 'GET', + url: '/api/v1/management/topic-filters', + }); + } + + /** + * Get all managed assets + * Get all managed assets from the Pulse Client + * @returns ManagedAssetList Success + * @throws ApiError + */ + public getManagedAssets(): CancelablePromise { + return this.httpRequest.request({ + method: 'GET', + url: '/api/v1/management/pulse/managed-assets', + errors: { + 400: `Pulse not activated`, + 503: `Pulse Agent not connected`, + }, + }); + } + +} diff --git a/hivemq-edge-frontend/src/api/__generated__/services/ProtocolAdaptersService.ts b/hivemq-edge-frontend/src/api/__generated__/services/ProtocolAdaptersService.ts index c0a704b515..fce377a4d4 100644 --- a/hivemq-edge-frontend/src/api/__generated__/services/ProtocolAdaptersService.ts +++ b/hivemq-edge-frontend/src/api/__generated__/services/ProtocolAdaptersService.ts @@ -7,10 +7,13 @@ import type { AdapterConfig } from '../models/AdapterConfig'; import type { AdaptersList } from '../models/AdaptersList'; import type { DomainTag } from '../models/DomainTag'; import type { DomainTagList } from '../models/DomainTagList'; +import type { DomainTagOwnerList } from '../models/DomainTagOwnerList'; import type { JsonNode } from '../models/JsonNode'; import type { NorthboundMappingList } from '../models/NorthboundMappingList'; +import type { NorthboundMappingOwnerList } from '../models/NorthboundMappingOwnerList'; import type { ProtocolAdaptersList } from '../models/ProtocolAdaptersList'; import type { SouthboundMappingList } from '../models/SouthboundMappingList'; +import type { SouthboundMappingOwnerList } from '../models/SouthboundMappingOwnerList'; import type { Status } from '../models/Status'; import type { StatusList } from '../models/StatusList'; import type { StatusTransitionCommand } from '../models/StatusTransitionCommand'; @@ -485,28 +488,28 @@ export class ProtocolAdaptersService { } /** - * Get the mappings for northbound messages. + * Get all the northbound mappings. * Get all northbound mappings - * @returns NorthboundMappingList Success + * @returns NorthboundMappingOwnerList Success * @throws ApiError */ - public getNorthboundMappings(): CancelablePromise { + public getNorthboundMappings(): CancelablePromise { return this.httpRequest.request({ method: 'GET', - url: '/api/v1/management/protocol-adapters/northboundMappings', + url: '/api/v1/management/protocol-adapters/mappings/northboundMappings', }); } /** - * Get all southbound mappings. + * Get all the southbound mappings. * Get all southbound mappings. - * @returns SouthboundMappingList Success + * @returns SouthboundMappingOwnerList Success * @throws ApiError */ - public getSouthboundMappings(): CancelablePromise { + public getSouthboundMappings(): CancelablePromise { return this.httpRequest.request({ method: 'GET', - url: '/api/v1/management/protocol-adapters/southboundMappings', + url: '/api/v1/management/protocol-adapters/mappings/southboundMappings', }); } @@ -546,12 +549,12 @@ export class ProtocolAdaptersService { } /** + * Get the list of all tags created in this Edge instance * Get the list of all domain tags created in this Edge instance - * Get the list of all domain tags created in this Edge instance - * @returns DomainTagList Success + * @returns DomainTagOwnerList Success * @throws ApiError */ - public getDomainTags(): CancelablePromise { + public getDomainTags(): CancelablePromise { return this.httpRequest.request({ method: 'GET', url: '/api/v1/management/protocol-adapters/tags', diff --git a/hivemq-edge-frontend/src/api/__generated__/services/PulseService.ts b/hivemq-edge-frontend/src/api/__generated__/services/PulseService.ts index 2409aebfac..ba9e2929a6 100644 --- a/hivemq-edge-frontend/src/api/__generated__/services/PulseService.ts +++ b/hivemq-edge-frontend/src/api/__generated__/services/PulseService.ts @@ -194,6 +194,8 @@ export class PulseService { body: requestBody, mediaType: 'application/json', errors: { + 400: `Topic, schema, or mapping ID invalid`, + 404: `Managed asset not found`, 409: `Combiner already exists`, }, }); @@ -264,6 +266,8 @@ export class PulseService { body: requestBody, mediaType: 'application/json', errors: { + 400: `Topic, schema, or mapping ID invalid`, + 404: `Managed asset not found`, 409: `Combiner already exists`, }, }); diff --git a/hivemq-edge-frontend/src/api/hooks/useDomainModel/__handlers__/index.ts b/hivemq-edge-frontend/src/api/hooks/useDomainModel/__handlers__/index.ts index 4788984125..285d77934b 100644 --- a/hivemq-edge-frontend/src/api/hooks/useDomainModel/__handlers__/index.ts +++ b/hivemq-edge-frontend/src/api/hooks/useDomainModel/__handlers__/index.ts @@ -3,7 +3,7 @@ import type { RJSFSchema } from '@rjsf/utils' import { MockAdapterType } from '@/__test-utils__/adapters/types.ts' import type { ProblemDetails } from '@/api/types/http-problem-details.ts' -import type { DomainTag, DomainTagList, JsonNode, PayloadSampleList, TagSchema } from '@/api/__generated__' +import type { DomainTag, DomainTagOwnerList, JsonNode, PayloadSampleList, TagSchema } from '@/api/__generated__' import { MOCK_DEVICE_TAG_ADDRESS_MODBUS, MOCK_DEVICE_TAG_FAKE, @@ -141,9 +141,9 @@ export const handlers = [ }), http.get('**/management/protocol-adapters/tags', () => { - return HttpResponse.json( + return HttpResponse.json( { - items: [{ name: 'test/tag1', definition: MOCK_DEVICE_TAG_ADDRESS_MODBUS }], + items: [{ adapterId: 'test-adapter', name: 'test/tag1', definition: MOCK_DEVICE_TAG_ADDRESS_MODBUS }], }, { status: 200 } ) diff --git a/hivemq-edge-frontend/src/api/hooks/useDomainModel/useLisdtDomainNorthboundMappings.spec.ts b/hivemq-edge-frontend/src/api/hooks/useDomainModel/useLisdtDomainNorthboundMappings.spec.ts index 397f6eaca0..1d5c45c3ae 100644 --- a/hivemq-edge-frontend/src/api/hooks/useDomainModel/useLisdtDomainNorthboundMappings.spec.ts +++ b/hivemq-edge-frontend/src/api/hooks/useDomainModel/useLisdtDomainNorthboundMappings.spec.ts @@ -3,7 +3,7 @@ import { renderHook, waitFor } from '@testing-library/react' import { server } from '@/__test-utils__/msw/mockServer.ts' import { SimpleWrapper as wrapper } from '@/__test-utils__/hooks/SimpleWrapper.tsx' -import { type NorthboundMappingList } from '@/api/__generated__' +import { type NorthboundMappingOwnerList, QoS } from '@/api/__generated__' import { useListDomainNorthboundMappings } from '@/api/hooks/useDomainModel/useListDomainNorthboundMappings.ts' import { mappingHandlers } from '@/api/hooks/useProtocolAdapters/__handlers__/mapping.mocks.ts' @@ -23,16 +23,17 @@ describe('useListDomainNorthboundMappings', () => { expect(result.current.isLoading).toBeFalsy() expect(result.current.isSuccess).toBeTruthy() }) - expect(result.current.data).toStrictEqual({ + expect(result.current.data).toStrictEqual({ items: [ - expect.objectContaining({ + { + adapterId: 'test-adapter', includeTagNames: true, includeTimestamp: true, - maxQoS: 'AT_MOST_ONCE', + maxQoS: QoS.AT_MOST_ONCE, messageExpiryInterval: -1000, tagName: 'my/tag', topic: 'my/topic', - }), + }, ], }) }) diff --git a/hivemq-edge-frontend/src/api/hooks/useDomainModel/useListDomainNorthboundMappings.ts b/hivemq-edge-frontend/src/api/hooks/useDomainModel/useListDomainNorthboundMappings.ts index b09b6cfbd0..951db7c73b 100644 --- a/hivemq-edge-frontend/src/api/hooks/useDomainModel/useListDomainNorthboundMappings.ts +++ b/hivemq-edge-frontend/src/api/hooks/useDomainModel/useListDomainNorthboundMappings.ts @@ -1,13 +1,13 @@ import { useQuery } from '@tanstack/react-query' import { QUERY_KEYS } from '@/api/utils.ts' -import type { ApiError, NorthboundMappingList } from '@/api/__generated__' +import type { ApiError, NorthboundMappingOwnerList } from '@/api/__generated__' import { useHttpClient } from '@/api/hooks/useHttpClient/useHttpClient.ts' export const useListDomainNorthboundMappings = () => { const appClient = useHttpClient() - return useQuery({ + return useQuery({ queryKey: [QUERY_KEYS.NORTHBOUND_MAPPINGS], queryFn: () => appClient.protocolAdapters.getNorthboundMappings(), }) diff --git a/hivemq-edge-frontend/src/api/hooks/useDomainModel/useListDomainSouthboundMappings.spec.ts b/hivemq-edge-frontend/src/api/hooks/useDomainModel/useListDomainSouthboundMappings.spec.ts index 5af22244de..ede0adbebd 100644 --- a/hivemq-edge-frontend/src/api/hooks/useDomainModel/useListDomainSouthboundMappings.spec.ts +++ b/hivemq-edge-frontend/src/api/hooks/useDomainModel/useListDomainSouthboundMappings.spec.ts @@ -3,7 +3,7 @@ import { renderHook, waitFor } from '@testing-library/react' import { server } from '@/__test-utils__/msw/mockServer.ts' import { SimpleWrapper as wrapper } from '@/__test-utils__/hooks/SimpleWrapper.tsx' -import { type NorthboundMappingList } from '@/api/__generated__' +import { type SouthboundMappingOwnerList } from '@/api/__generated__' import { mappingHandlers } from '@/api/hooks/useProtocolAdapters/__handlers__/mapping.mocks.ts' import { useListDomainSouthboundMappings } from '@/api/hooks/useDomainModel/useListDomainSouthboundMappings.ts' @@ -23,9 +23,10 @@ describe('useListDomainNorthboundMappings', () => { expect(result.current.isLoading).toBeFalsy() expect(result.current.isSuccess).toBeTruthy() }) - expect(result.current.data).toStrictEqual({ + expect(result.current.data).toStrictEqual({ items: [ - expect.objectContaining({ + { + adapterId: 'test-adapter', fieldMapping: { instructions: [ { @@ -36,7 +37,7 @@ describe('useListDomainNorthboundMappings', () => { }, tagName: 'my/tag', topicFilter: 'my/filter', - }), + }, ], }) }) diff --git a/hivemq-edge-frontend/src/api/hooks/useDomainModel/useListDomainSouthboundMappings.ts b/hivemq-edge-frontend/src/api/hooks/useDomainModel/useListDomainSouthboundMappings.ts index 5b7d93b786..04555f73c7 100644 --- a/hivemq-edge-frontend/src/api/hooks/useDomainModel/useListDomainSouthboundMappings.ts +++ b/hivemq-edge-frontend/src/api/hooks/useDomainModel/useListDomainSouthboundMappings.ts @@ -1,13 +1,13 @@ import { useQuery } from '@tanstack/react-query' import { QUERY_KEYS } from '@/api/utils.ts' -import type { ApiError, SouthboundMappingList } from '@/api/__generated__' +import type { ApiError, SouthboundMappingOwnerList } from '@/api/__generated__' import { useHttpClient } from '@/api/hooks/useHttpClient/useHttpClient.ts' export const useListDomainSouthboundMappings = () => { const appClient = useHttpClient() - return useQuery({ + return useQuery({ queryKey: [QUERY_KEYS.SOUTHBOUND_MAPPINGS], queryFn: () => appClient.protocolAdapters.getSouthboundMappings(), }) diff --git a/hivemq-edge-frontend/src/api/hooks/useDomainModel/useListDomainTags.spec.ts b/hivemq-edge-frontend/src/api/hooks/useDomainModel/useListDomainTags.spec.ts index 0a18ef953e..316fed0dfb 100644 --- a/hivemq-edge-frontend/src/api/hooks/useDomainModel/useListDomainTags.spec.ts +++ b/hivemq-edge-frontend/src/api/hooks/useDomainModel/useListDomainTags.spec.ts @@ -3,7 +3,7 @@ import { renderHook, waitFor } from '@testing-library/react' import { server } from '@/__test-utils__/msw/mockServer.ts' import { SimpleWrapper as wrapper } from '@/__test-utils__/hooks/SimpleWrapper.tsx' -import { type DomainTagList } from '@/api/__generated__' +import { type DomainTagOwnerList } from '@/api/__generated__' import { useListDomainTags } from '@/api/hooks/useDomainModel/useListDomainTags.ts' import { handlers } from './__handlers__' @@ -23,9 +23,10 @@ describe('useListDomainTags', () => { expect(result.current.isLoading).toBeFalsy() expect(result.current.isSuccess).toBeTruthy() }) - expect(result.current.data).toStrictEqual({ + expect(result.current.data).toStrictEqual({ items: [ { + adapterId: 'test-adapter', definition: { endIdx: 1, startIdx: 0, diff --git a/hivemq-edge-frontend/src/api/hooks/useDomainModel/useListDomainTags.ts b/hivemq-edge-frontend/src/api/hooks/useDomainModel/useListDomainTags.ts index 6d5979841b..7e598a72f2 100644 --- a/hivemq-edge-frontend/src/api/hooks/useDomainModel/useListDomainTags.ts +++ b/hivemq-edge-frontend/src/api/hooks/useDomainModel/useListDomainTags.ts @@ -1,13 +1,13 @@ import { useQuery } from '@tanstack/react-query' import { QUERY_KEYS } from '@/api/utils.ts' -import type { ApiError, DomainTagList } from '@/api/__generated__' +import type { ApiError, DomainTagOwnerList } from '@/api/__generated__' import { useHttpClient } from '@/api/hooks/useHttpClient/useHttpClient.ts' export const useListDomainTags = () => { const appClient = useHttpClient() - return useQuery({ + return useQuery({ queryKey: [QUERY_KEYS.DISCOVERY_TAGS], queryFn: () => appClient.protocolAdapters.getDomainTags(), }) diff --git a/hivemq-edge-frontend/src/api/hooks/useProtocolAdapters/__handlers__/mapping.mocks.ts b/hivemq-edge-frontend/src/api/hooks/useProtocolAdapters/__handlers__/mapping.mocks.ts index 1a11401df4..596dc06a33 100644 --- a/hivemq-edge-frontend/src/api/hooks/useProtocolAdapters/__handlers__/mapping.mocks.ts +++ b/hivemq-edge-frontend/src/api/hooks/useProtocolAdapters/__handlers__/mapping.mocks.ts @@ -1,5 +1,12 @@ import { http, HttpResponse } from 'msw' -import type { SouthboundMappingList, SouthboundMapping, NorthboundMappingList, JsonNode } from '@/api/__generated__' +import type { + SouthboundMappingList, + SouthboundMapping, + NorthboundMappingList, + JsonNode, + NorthboundMappingOwnerList, + SouthboundMappingOwnerList, +} from '@/api/__generated__' import type { NorthboundMapping } from '@/api/__generated__' import { GENERATE_DATA_MODELS } from '@/api/hooks/useDomainModel/__handlers__' @@ -39,12 +46,18 @@ export const mappingHandlers = [ return HttpResponse.json({ items: [MOCK_NORTHBOUND_MAPPING] }, { status: 200 }) }), - http.get<{ adapterId: string }>('*/management/protocol-adapters/northboundMappings', () => { - return HttpResponse.json({ items: [MOCK_NORTHBOUND_MAPPING] }, { status: 200 }) + http.get<{ adapterId: string }>('*/management/protocol-adapters/mappings/northboundMappings', () => { + return HttpResponse.json( + { items: [{ adapterId: 'test-adapter', ...MOCK_NORTHBOUND_MAPPING }] }, + { status: 200 } + ) }), - http.get<{ adapterId: string }>('*/management/protocol-adapters/southboundMappings', () => { - return HttpResponse.json({ items: [MOCK_SOUTHBOUND_MAPPING] }, { status: 200 }) + http.get<{ adapterId: string }>('*/management/protocol-adapters/mappings/southboundMappings', () => { + return HttpResponse.json( + { items: [{ adapterId: 'test-adapter', ...MOCK_SOUTHBOUND_MAPPING }] }, + { status: 200 } + ) }), http.put<{ adapterId: string }>( diff --git a/hivemq-edge-frontend/src/modules/DomainOntology/DomainOntologyManager.spec.cy.tsx b/hivemq-edge-frontend/src/modules/DomainOntology/DomainOntologyManager.spec.cy.tsx index b99eec0770..3034a69360 100644 --- a/hivemq-edge-frontend/src/modules/DomainOntology/DomainOntologyManager.spec.cy.tsx +++ b/hivemq-edge-frontend/src/modules/DomainOntology/DomainOntologyManager.spec.cy.tsx @@ -5,8 +5,8 @@ describe('DomainOntologyManager', () => { cy.viewport(800, 500) cy.intercept('/api/v1/management/bridges', { items: [] }) cy.intercept('/api/v1/management/protocol-adapters/adapters', { items: [] }) - cy.intercept('/api/v1/management/protocol-adapters/northboundMappings', { items: [] }) - cy.intercept('/api/v1/management/protocol-adapters/southboundMappings', { items: [] }) + cy.intercept('/api/v1/management/protocol-adapters/mappings/northboundMappings', { items: [] }) + cy.intercept('/api/v1/management/protocol-adapters/mappings/southboundMappings', { items: [] }) cy.intercept('api/v1/management/protocol-adapters/tags', { items: [] }) cy.intercept('api/v1/management/topic-filters', { items: [] }) }) diff --git a/hivemq-edge-frontend/src/modules/DomainOntology/components/ConceptFlow.spec.cy.tsx b/hivemq-edge-frontend/src/modules/DomainOntology/components/ConceptFlow.spec.cy.tsx index a24920c218..4c3c6f35f6 100644 --- a/hivemq-edge-frontend/src/modules/DomainOntology/components/ConceptFlow.spec.cy.tsx +++ b/hivemq-edge-frontend/src/modules/DomainOntology/components/ConceptFlow.spec.cy.tsx @@ -7,16 +7,16 @@ describe('ConceptFlow', () => { const injectAllIntercept = () => { cy.intercept('/api/v1/management/bridges', { items: [] }) - cy.intercept('/api/v1/management/protocol-adapters/northboundMappings', { items: [] }) - cy.intercept('/api/v1/management/protocol-adapters/southboundMappings', { items: [] }) + cy.intercept('/api/v1/management/protocol-adapters/mappings/northboundMappings', { items: [] }) + cy.intercept('/api/v1/management/protocol-adapters/mappings/southboundMappings', { items: [] }) cy.intercept('api/v1/management/protocol-adapters/tags', { items: [] }) cy.intercept('api/v1/management/topic-filters', { items: [] }) } it('should render errors', () => { cy.intercept('/api/v1/management/bridges', { statusCode: 404 }) - cy.intercept('/api/v1/management/protocol-adapters/northboundMappings', { statusCode: 404 }) - cy.intercept('/api/v1/management/protocol-adapters/southboundMappings', { statusCode: 404 }) + cy.intercept('/api/v1/management/protocol-adapters/mappings/northboundMappings', { statusCode: 404 }) + cy.intercept('/api/v1/management/protocol-adapters/mappings/southboundMappings', { statusCode: 404 }) cy.intercept('api/v1/management/protocol-adapters/tags', { statusCode: 404 }) cy.intercept('api/v1/management/topic-filters', { statusCode: 404 }) cy.mountWithProviders() diff --git a/hivemq-edge-frontend/src/modules/DomainOntology/components/ConceptWheel.spec.cy.tsx b/hivemq-edge-frontend/src/modules/DomainOntology/components/ConceptWheel.spec.cy.tsx index fe8ad994f9..a576f0fdd2 100644 --- a/hivemq-edge-frontend/src/modules/DomainOntology/components/ConceptWheel.spec.cy.tsx +++ b/hivemq-edge-frontend/src/modules/DomainOntology/components/ConceptWheel.spec.cy.tsx @@ -7,16 +7,16 @@ describe('ConceptWheel', () => { const injectAllIntercept = () => { cy.intercept('/api/v1/management/bridges', { items: [] }) - cy.intercept('/api/v1/management/protocol-adapters/northboundMappings', { items: [] }) - cy.intercept('/api/v1/management/protocol-adapters/southboundMappings', { items: [] }) + cy.intercept('/api/v1/management/protocol-adapters/mappings/northboundMappings', { items: [] }) + cy.intercept('/api/v1/management/protocol-adapters/mappings/southboundMappings', { items: [] }) cy.intercept('api/v1/management/protocol-adapters/tags', { items: [] }) cy.intercept('api/v1/management/topic-filters', { items: [] }) } it('should render errors', () => { cy.intercept('/api/v1/management/bridges', { statusCode: 404 }) - cy.intercept('/api/v1/management/protocol-adapters/northboundMappings', { statusCode: 404 }) - cy.intercept('/api/v1/management/protocol-adapters/southboundMappings', { statusCode: 404 }) + cy.intercept('/api/v1/management/protocol-adapters/mappings/northboundMappings', { statusCode: 404 }) + cy.intercept('/api/v1/management/protocol-adapters/mappings/southboundMappings', { statusCode: 404 }) cy.intercept('api/v1/management/protocol-adapters/tags', { statusCode: 404 }) cy.intercept('api/v1/management/topic-filters', { statusCode: 404 }) cy.mountWithProviders() diff --git a/hivemq-edge-frontend/src/modules/DomainOntology/components/RelationEdgeBundling.spec.cy.tsx b/hivemq-edge-frontend/src/modules/DomainOntology/components/RelationEdgeBundling.spec.cy.tsx index eb5651834c..06d7cb0a4e 100644 --- a/hivemq-edge-frontend/src/modules/DomainOntology/components/RelationEdgeBundling.spec.cy.tsx +++ b/hivemq-edge-frontend/src/modules/DomainOntology/components/RelationEdgeBundling.spec.cy.tsx @@ -7,8 +7,8 @@ describe('RelationEdgeBundling', () => { it('should render errors', () => { cy.intercept('/api/v1/management/bridges', { statusCode: 404 }) - cy.intercept('/api/v1/management/protocol-adapters/northboundMappings', { statusCode: 404 }) - cy.intercept('/api/v1/management/protocol-adapters/southboundMappings', { statusCode: 404 }) + cy.intercept('/api/v1/management/protocol-adapters/mappings/northboundMappings', { statusCode: 404 }) + cy.intercept('/api/v1/management/protocol-adapters/mappings/southboundMappings', { statusCode: 404 }) cy.intercept('api/v1/management/protocol-adapters/tags', { statusCode: 404 }) cy.intercept('api/v1/management/topic-filters', { statusCode: 404 }) cy.mountWithProviders() diff --git a/hivemq-edge-frontend/src/modules/DomainOntology/components/RelationMatrix.spec.cy.tsx b/hivemq-edge-frontend/src/modules/DomainOntology/components/RelationMatrix.spec.cy.tsx index 2014a19d13..fdd256d473 100644 --- a/hivemq-edge-frontend/src/modules/DomainOntology/components/RelationMatrix.spec.cy.tsx +++ b/hivemq-edge-frontend/src/modules/DomainOntology/components/RelationMatrix.spec.cy.tsx @@ -7,16 +7,16 @@ describe('RelationMatrix', () => { const injectAllIntercept = () => { cy.intercept('/api/v1/management/bridges', { items: [] }) - cy.intercept('/api/v1/management/protocol-adapters/northboundMappings', { items: [] }) - cy.intercept('/api/v1/management/protocol-adapters/southboundMappings', { items: [] }) + cy.intercept('/api/v1/management/protocol-adapters/mappings/northboundMappings', { items: [] }) + cy.intercept('/api/v1/management/protocol-adapters/mappings/southboundMappings', { items: [] }) cy.intercept('api/v1/management/protocol-adapters/tags', { items: [] }) cy.intercept('api/v1/management/topic-filters', { items: [] }) } it('should render errors', () => { cy.intercept('/api/v1/management/bridges', { statusCode: 404 }) - cy.intercept('/api/v1/management/protocol-adapters/northboundMappings', { statusCode: 404 }) - cy.intercept('/api/v1/management/protocol-adapters/southboundMappings', { statusCode: 404 }) + cy.intercept('/api/v1/management/protocol-adapters/mappings/northboundMappings', { statusCode: 404 }) + cy.intercept('/api/v1/management/protocol-adapters/mappings/southboundMappings', { statusCode: 404 }) cy.intercept('api/v1/management/protocol-adapters/tags', { statusCode: 404 }) cy.intercept('api/v1/management/topic-filters', { statusCode: 404 }) cy.mountWithProviders() diff --git a/hivemq-edge-frontend/src/modules/DomainOntology/hooks/useGetChordMatrixData.spec.ts b/hivemq-edge-frontend/src/modules/DomainOntology/hooks/useGetChordMatrixData.spec.ts index 7c7f795b50..d5cb8a6bf7 100644 --- a/hivemq-edge-frontend/src/modules/DomainOntology/hooks/useGetChordMatrixData.spec.ts +++ b/hivemq-edge-frontend/src/modules/DomainOntology/hooks/useGetChordMatrixData.spec.ts @@ -5,6 +5,7 @@ import { renderHook, waitFor } from '@testing-library/react' import { server } from '@/__test-utils__/msw/mockServer.ts' import { SimpleWrapper as wrapper } from '@/__test-utils__/hooks/SimpleWrapper.tsx' +import type { NorthboundMappingOwnerList } from '@/api/__generated__' import { mappingHandlers } from '@/api/hooks/useProtocolAdapters/__handlers__/mapping.mocks.ts' import { handlers as protocolHandler } from '@/api/hooks/useProtocolAdapters/__handlers__' import { handlers as tahHandlers } from '@/api/hooks/useDomainModel/__handlers__' @@ -55,9 +56,11 @@ describe('useGetChordMatrixData', () => { it('should handle topic filter matching with mqttTopicMatch', async () => { server.use( - http.get('*/management/protocol-adapters/northboundMappings', () => { - return HttpResponse.json( - { items: [{ tagName: 'test/tag1', topic: 'sensor/temperature/room1' }] }, + http.get('*/management/protocol-adapters/mappings/northboundMappings', () => { + return HttpResponse.json( + { + items: [{ adapterId: 'test-adapter', tagName: 'test/tag1', topic: 'sensor/temperature/room1' }], + }, { status: 200 } ) }), diff --git a/hivemq-edge-frontend/src/modules/DomainOntology/hooks/useGetDomainOntology.spec.ts b/hivemq-edge-frontend/src/modules/DomainOntology/hooks/useGetDomainOntology.spec.ts index a40d40d382..bdabb4f05e 100644 --- a/hivemq-edge-frontend/src/modules/DomainOntology/hooks/useGetDomainOntology.spec.ts +++ b/hivemq-edge-frontend/src/modules/DomainOntology/hooks/useGetDomainOntology.spec.ts @@ -4,8 +4,8 @@ import { renderHook, waitFor } from '@testing-library/react' import { server } from '@/__test-utils__/msw/mockServer.ts' import { SimpleWrapper as wrapper } from '@/__test-utils__/hooks/SimpleWrapper.tsx' -import type { SouthboundMapping } from '@/api/__generated__' -import { type NorthboundMapping, QoS, type TopicFilter, type DomainTag } from '@/api/__generated__' +import type { DomainTagOwner, NorthboundMappingOwner, SouthboundMappingOwner, TopicFilter } from '@/api/__generated__' +import { QoS } from '@/api/__generated__' import { useGetDomainOntology } from '@/modules/DomainOntology/hooks/useGetDomainOntology.ts' import { mappingHandlers } from '@/api/hooks/useProtocolAdapters/__handlers__/mapping.mocks.ts' @@ -58,7 +58,9 @@ describe('useGetDomainOntology', () => { }) expect(result.current.tags).toStrictEqual( - successListOf({ + successListOf({ + adapterId: 'test-adapter', + definition: { endIdx: 1, startIdx: 0, @@ -76,7 +78,8 @@ describe('useGetDomainOntology', () => { }) expect(result.current.northMappings).toStrictEqual( - successListOf({ + successListOf({ + adapterId: 'test-adapter', includeTagNames: true, includeTimestamp: true, maxQoS: QoS.AT_MOST_ONCE, @@ -95,7 +98,8 @@ describe('useGetDomainOntology', () => { }) expect(result.current.southMappings).toStrictEqual( - successListOf({ + successListOf({ + adapterId: 'test-adapter', fieldMapping: { instructions: [ { diff --git a/hivemq-edge-frontend/src/modules/DomainOntology/hooks/useGetSankeyData.spec.ts b/hivemq-edge-frontend/src/modules/DomainOntology/hooks/useGetSankeyData.spec.ts index 7cf7515721..b865888663 100644 --- a/hivemq-edge-frontend/src/modules/DomainOntology/hooks/useGetSankeyData.spec.ts +++ b/hivemq-edge-frontend/src/modules/DomainOntology/hooks/useGetSankeyData.spec.ts @@ -5,6 +5,11 @@ import { renderHook, waitFor } from '@testing-library/react' import { server } from '@/__test-utils__/msw/mockServer.ts' import { SimpleWrapper as wrapper } from '@/__test-utils__/hooks/SimpleWrapper.tsx' +import type { + NorthboundMappingOwnerList, + SouthboundMappingOwner, + SouthboundMappingOwnerList, +} from '@/api/__generated__' import { mappingHandlers } from '@/api/hooks/useProtocolAdapters/__handlers__/mapping.mocks.ts' import { handlers as protocolHandler } from '@/api/hooks/useProtocolAdapters/__handlers__' import { handlers as tahHandlers } from '@/api/hooks/useDomainModel/__handlers__' @@ -71,16 +76,22 @@ describe('useGetSankeyData', () => { it('should handle southbound mappings with valid indices', async () => { server.use( - http.get('*/management/protocol-adapters/southboundMappings', () => { - return HttpResponse.json( + http.get('*/management/protocol-adapters/mappings/southboundMappings', () => { + return HttpResponse.json( { - items: [{ topicFilter: 'sensor/+/data', tagName: 'test/tag1' }], + items: [ + { + adapterId: 'test-adapter', + topicFilter: 'sensor/+/data', + tagName: 'test/tag1', + }, + ], }, { status: 200 } ) }), - http.get('*/management/protocol-adapters/northboundMappings', () => { - return HttpResponse.json({ items: [] }, { status: 200 }) + http.get('*/management/protocol-adapters/mappings/northboundMappings', () => { + return HttpResponse.json({ items: [] }, { status: 200 }) }), http.get('*/management/topic-filters', () => { return HttpResponse.json({ items: [{ topicFilter: 'sensor/+/data' }] }, { status: 200 }) @@ -112,16 +123,23 @@ describe('useGetSankeyData', () => { it('should skip southbound mappings with missing tagName', async () => { server.use( - http.get('*/management/protocol-adapters/southboundMappings', () => { - return HttpResponse.json( + http.get('*/management/protocol-adapters/mappings/southboundMappings', () => { + return HttpResponse.json( { - items: [{ topicFilter: 'sensor/+/data', tagName: null }, { topicFilter: 'device/#' }], + items: [ + { + adapterId: 'test-adapter', + topicFilter: 'sensor/+/data', + tagName: null, + } as unknown as SouthboundMappingOwner, + { adapterId: 'test-adapter', topicFilter: 'device/#' } as unknown as SouthboundMappingOwner, + ], }, { status: 200 } ) }), - http.get('*/management/protocol-adapters/northboundMappings', () => { - return HttpResponse.json({ items: [] }, { status: 200 }) + http.get('*/management/protocol-adapters/mappings/northboundMappings', () => { + return HttpResponse.json({ items: [] }, { status: 200 }) }), http.get('*/management/topic-filters', () => { return HttpResponse.json({ items: [] }, { status: 200 }) diff --git a/hivemq-edge-frontend/src/modules/DomainOntology/hooks/useGetSunburstData.spec.ts b/hivemq-edge-frontend/src/modules/DomainOntology/hooks/useGetSunburstData.spec.ts index 368f1694e7..56f2313399 100644 --- a/hivemq-edge-frontend/src/modules/DomainOntology/hooks/useGetSunburstData.spec.ts +++ b/hivemq-edge-frontend/src/modules/DomainOntology/hooks/useGetSunburstData.spec.ts @@ -53,10 +53,10 @@ describe('useGetSunburstData', () => { it('should return empty state when no topics or tags are available', async () => { server.use( - http.get('*/management/protocol-adapters/northboundMappings', () => { + http.get('*/management/protocol-adapters/mappings/northboundMappings', () => { return HttpResponse.json({ items: [] }, { status: 200 }) }), - http.get('*/management/protocol-adapters/southboundMappings', () => { + http.get('*/management/protocol-adapters/mappings/southboundMappings', () => { return HttpResponse.json({ items: [] }, { status: 200 }) }), http.get('*/management/domain-tags', () => { @@ -84,10 +84,10 @@ describe('useGetSunburstData', () => { it('should handle empty edgeTopics array', async () => { server.use( - http.get('*/management/protocol-adapters/northboundMappings', () => { + http.get('*/management/protocol-adapters/mappings/northboundMappings', () => { return HttpResponse.json({ items: [] }, { status: 200 }) }), - http.get('*/management/protocol-adapters/southboundMappings', () => { + http.get('*/management/protocol-adapters/mappings/southboundMappings', () => { return HttpResponse.json({ items: [] }, { status: 200 }) }), http.get('*/management/domain-tags', () => { diff --git a/hivemq-edge-frontend/src/modules/DomainOntology/hooks/useGetTreeData.spec.ts b/hivemq-edge-frontend/src/modules/DomainOntology/hooks/useGetTreeData.spec.ts index 4146937b22..8628c83e84 100644 --- a/hivemq-edge-frontend/src/modules/DomainOntology/hooks/useGetTreeData.spec.ts +++ b/hivemq-edge-frontend/src/modules/DomainOntology/hooks/useGetTreeData.spec.ts @@ -5,6 +5,7 @@ import { renderHook, waitFor } from '@testing-library/react' import { server } from '@/__test-utils__/msw/mockServer.ts' import { SimpleWrapper as wrapper } from '@/__test-utils__/hooks/SimpleWrapper.tsx' +import type { NorthboundMappingOwnerList, SouthboundMappingOwnerList } from '@/api/__generated__' import { mappingHandlers } from '@/api/hooks/useProtocolAdapters/__handlers__/mapping.mocks.ts' import { handlers as protocolHandler } from '@/api/hooks/useProtocolAdapters/__handlers__' import { handlers as tahHandlers } from '@/api/hooks/useDomainModel/__handlers__' @@ -56,7 +57,7 @@ describe('useGetTreeData', () => { { status: 200 } ) }), - http.get('*/management/protocol-adapters/northboundMappings', () => { + http.get('*/management/protocol-adapters/mappings/northboundMappings', () => { return HttpResponse.json({ items: [] }, { status: 200 }) }), http.get('*/management/domain-tags', () => { @@ -91,10 +92,10 @@ describe('useGetTreeData', () => { it('should build links for north mappings', async () => { // Override with explicit mock data to ensure tags and northbound mappings match server.use( - http.get('*/management/protocol-adapters/northboundMappings', () => { - return HttpResponse.json( + http.get('*/management/protocol-adapters/mappings/northboundMappings', () => { + return HttpResponse.json( { - items: [{ tagName: 'test/tag1', topic: 'my/topic' }], + items: [{ adapterId: 'test-adapter', tagName: 'test/tag1', topic: 'my/topic' }], }, { status: 200 } ) @@ -107,8 +108,8 @@ describe('useGetTreeData', () => { { status: 200 } ) }), - http.get('*/management/protocol-adapters/southboundMappings', () => { - return HttpResponse.json({ items: [] }, { status: 200 }) + http.get('*/management/protocol-adapters/mappings/southboundMappings', () => { + return HttpResponse.json({ items: [] }, { status: 200 }) }), http.get('*/management/topic-filters', () => { return HttpResponse.json({ items: [] }, { status: 200 }) @@ -147,19 +148,19 @@ describe('useGetTreeData', () => { it('should build links for south mappings', async () => { server.use( - http.get('*/management/protocol-adapters/southboundMappings', () => { - return HttpResponse.json( + http.get('*/management/protocol-adapters/mappings/southboundMappings', () => { + return HttpResponse.json( { items: [ - { topicFilter: 'input/filter1', tagName: 'device/tag1' }, - { topicFilter: 'input/filter2', tagName: 'device/tag2' }, + { adapterId: 'test-adapter', topicFilter: 'input/filter1', tagName: 'device/tag1' }, + { adapterId: 'test-adapter', topicFilter: 'input/filter2', tagName: 'device/tag2' }, ], }, { status: 200 } ) }), - http.get('*/management/protocol-adapters/northboundMappings', () => { - return HttpResponse.json({ items: [] }, { status: 200 }) + http.get('*/management/protocol-adapters/mappings/northboundMappings', () => { + return HttpResponse.json({ items: [] }, { status: 200 }) }), http.get('*/management/domain-tags', () => { return HttpResponse.json({ items: [] }, { status: 200 }) @@ -198,12 +199,12 @@ describe('useGetTreeData', () => { it('should build links for topic filter matching', async () => { server.use( - http.get('*/management/protocol-adapters/northboundMappings', () => { - return HttpResponse.json( + http.get('*/management/protocol-adapters/mappings/northboundMappings', () => { + return HttpResponse.json( { items: [ - { tagName: 'test/tag', topic: 'sensor/temperature/room1' }, - { tagName: 'test/tag', topic: 'sensor/humidity/room2' }, + { adapterId: 'test-adapter', tagName: 'test/tag', topic: 'sensor/temperature/room1' }, + { adapterId: 'test-adapter', tagName: 'test/tag', topic: 'sensor/humidity/room2' }, ], }, { status: 200 } diff --git a/hivemq-edge-frontend/src/modules/Workspace/components/drawers/NodePropertyDrawer.spec.cy.tsx b/hivemq-edge-frontend/src/modules/Workspace/components/drawers/NodePropertyDrawer.spec.cy.tsx index 7769f67016..01790c3145 100644 --- a/hivemq-edge-frontend/src/modules/Workspace/components/drawers/NodePropertyDrawer.spec.cy.tsx +++ b/hivemq-edge-frontend/src/modules/Workspace/components/drawers/NodePropertyDrawer.spec.cy.tsx @@ -78,5 +78,9 @@ describe('NodePropertyDrawer', () => { 'color-contrast': { enabled: false }, }, }) + + // check the panel control + cy.getByTestId('metrics-toggle').should('be.visible') + cy.getByTestId('overview-event-log').should('contain.text', 'The 5 most recent events for adapter my-adapter') }) }) diff --git a/hivemq-edge-frontend/src/modules/Workspace/components/filters/DrawerFilterToolbox.spec.cy.tsx b/hivemq-edge-frontend/src/modules/Workspace/components/filters/DrawerFilterToolbox.spec.cy.tsx index 0ef8fc69c9..546b711137 100644 --- a/hivemq-edge-frontend/src/modules/Workspace/components/filters/DrawerFilterToolbox.spec.cy.tsx +++ b/hivemq-edge-frontend/src/modules/Workspace/components/filters/DrawerFilterToolbox.spec.cy.tsx @@ -3,6 +3,7 @@ import { MOCK_PROTOCOL_S7 } from '@/__test-utils__/adapters/s7.ts' import { MOCK_ADAPTER_SIMULATION, MOCK_PROTOCOL_SIMULATION } from '@/__test-utils__/adapters/simulation.ts' import { MOCK_NODE_ADAPTER, MOCK_NODE_COMBINER, MOCK_NODE_DEVICE } from '@/__test-utils__/react-flow/nodes.ts' import { ReactFlowTesting } from '@/__test-utils__/react-flow/ReactFlowTesting.tsx' +import type { DomainTagOwnerList, NorthboundMappingOwnerList, SouthboundMappingOwnerList } from '@/api/__generated__' import { mockBridge } from '@/api/hooks/useGetBridges/__handlers__' import { MOCK_DEVICE_TAG_ADDRESS_MODBUS } from '@/api/hooks/useProtocolAdapters/__handlers__' import { @@ -50,12 +51,14 @@ describe('DrawerFilterToolbox', () => { items: [MOCK_ADAPTER_OPC_UA, { ...MOCK_ADAPTER_OPC_UA, id: 'opcua-boiler' }, MOCK_ADAPTER_SIMULATION], }) - cy.intercept('/api/v1/management/protocol-adapters/northboundMappings', { - items: [MOCK_NORTHBOUND_MAPPING], + cy.intercept('/api/v1/management/protocol-adapters/mappings/northboundMappings', { + items: [{ adapterId: 'test-adapter', ...MOCK_NORTHBOUND_MAPPING }], }) - cy.intercept('/api/v1/management/protocol-adapters/southboundMappings', { items: [MOCK_SOUTHBOUND_MAPPING] }) - cy.intercept('/api/v1/management/protocol-adapters/tags', { - items: [{ name: 'test/tag1', definition: MOCK_DEVICE_TAG_ADDRESS_MODBUS }], + cy.intercept('/api/v1/management/protocol-adapters/mappings/southboundMappings', { + items: [{ adapterId: 'test-adapter', ...MOCK_SOUTHBOUND_MAPPING }], + }) + cy.intercept('/api/v1/management/protocol-adapters/tags', { + items: [{ adapterId: 'test-adapter', name: 'test/tag1', definition: MOCK_DEVICE_TAG_ADDRESS_MODBUS }], }) cy.intercept('/api/v1/management/topic-filters', { items: [MOCK_TOPIC_FILTER], diff --git a/hivemq-edge-frontend/src/modules/Workspace/components/filters/FilterTopics.spec.cy.tsx b/hivemq-edge-frontend/src/modules/Workspace/components/filters/FilterTopics.spec.cy.tsx index e8ca5b28a5..06cf4520f7 100644 --- a/hivemq-edge-frontend/src/modules/Workspace/components/filters/FilterTopics.spec.cy.tsx +++ b/hivemq-edge-frontend/src/modules/Workspace/components/filters/FilterTopics.spec.cy.tsx @@ -1,3 +1,4 @@ +import type { DomainTagOwnerList, NorthboundMappingOwnerList, SouthboundMappingOwnerList } from '@/api/__generated__' import { mockBridge } from '@/api/hooks/useGetBridges/__handlers__' import { MOCK_DEVICE_TAG_ADDRESS_MODBUS } from '@/api/hooks/useProtocolAdapters/__handlers__' import { @@ -12,12 +13,14 @@ describe('FilterTopics', () => { beforeEach(() => { cy.viewport(800, 800) - cy.intercept('/api/v1/management/protocol-adapters/northboundMappings', { - items: [MOCK_NORTHBOUND_MAPPING], + cy.intercept('/api/v1/management/protocol-adapters/mappings/northboundMappings', { + items: [{ adapterId: 'test-adapter', ...MOCK_NORTHBOUND_MAPPING }], }) - cy.intercept('/api/v1/management/protocol-adapters/southboundMappings', { items: [MOCK_SOUTHBOUND_MAPPING] }) - cy.intercept('/api/v1/management/protocol-adapters/tags', { - items: [{ name: 'test/tag1', definition: MOCK_DEVICE_TAG_ADDRESS_MODBUS }], + cy.intercept('/api/v1/management/protocol-adapters/mappings/southboundMappings', { + items: [{ adapterId: 'test-adapter', ...MOCK_SOUTHBOUND_MAPPING }], + }) + cy.intercept('/api/v1/management/protocol-adapters/tags', { + items: [{ adapterId: 'test-adapter', name: 'test/tag1', definition: MOCK_DEVICE_TAG_ADDRESS_MODBUS }], }) cy.intercept('/api/v1/management/topic-filters', { items: [MOCK_TOPIC_FILTER], diff --git a/hivemq-edge-openapi/openapi/components/schemas/DomainTagOwner.yaml b/hivemq-edge-openapi/openapi/components/schemas/DomainTagOwner.yaml new file mode 100644 index 0000000000..3a60e6a90b --- /dev/null +++ b/hivemq-edge-openapi/openapi/components/schemas/DomainTagOwner.yaml @@ -0,0 +1,9 @@ +allOf: + - $ref: "./DomainTag.yaml" + - type: object + properties: + adapterId: + type: string + description: The id of the adapter owning the tag + required: + - adapterId diff --git a/hivemq-edge-openapi/openapi/components/schemas/DomainTagOwnerList.yaml b/hivemq-edge-openapi/openapi/components/schemas/DomainTagOwnerList.yaml index 115cc17742..38f35f1576 100644 --- a/hivemq-edge-openapi/openapi/components/schemas/DomainTagOwnerList.yaml +++ b/hivemq-edge-openapi/openapi/components/schemas/DomainTagOwnerList.yaml @@ -4,15 +4,6 @@ properties: type: array description: List of result items that are returned by this endpoint items: - type: object - required: - - adapterId - - mapping - properties: - adapterId: - type: string - description: The id of the adapter owning the tag - mapping: - $ref: ./DomainTag.yaml + $ref: ./DomainTagOwner.yaml required: - items diff --git a/hivemq-edge-openapi/openapi/components/schemas/NorthboundMappingOwner.yaml b/hivemq-edge-openapi/openapi/components/schemas/NorthboundMappingOwner.yaml new file mode 100644 index 0000000000..5fca0c7ca1 --- /dev/null +++ b/hivemq-edge-openapi/openapi/components/schemas/NorthboundMappingOwner.yaml @@ -0,0 +1,9 @@ +allOf: + - $ref: "./NorthboundMapping.yaml" + - type: object + properties: + adapterId: + type: string + description: The id of the adapter owning the tag + required: + - adapterId diff --git a/hivemq-edge-openapi/openapi/components/schemas/NorthboundMappingOwnerList.yaml b/hivemq-edge-openapi/openapi/components/schemas/NorthboundMappingOwnerList.yaml index 9aeeb6ff3e..23dc6c56ec 100644 --- a/hivemq-edge-openapi/openapi/components/schemas/NorthboundMappingOwnerList.yaml +++ b/hivemq-edge-openapi/openapi/components/schemas/NorthboundMappingOwnerList.yaml @@ -4,15 +4,6 @@ properties: type: array description: List of result items that are returned by this endpoint items: - type: object - required: - - adapterId - - mapping - properties: - adapterId: - type: string - description: The id of the adapter owning the mapping - mapping: - $ref: ./NorthboundMapping.yaml + $ref: ./NorthboundMappingOwner.yaml required: - items diff --git a/hivemq-edge-openapi/openapi/components/schemas/SouthboundMappingOwner.yaml b/hivemq-edge-openapi/openapi/components/schemas/SouthboundMappingOwner.yaml new file mode 100644 index 0000000000..9604a6bf37 --- /dev/null +++ b/hivemq-edge-openapi/openapi/components/schemas/SouthboundMappingOwner.yaml @@ -0,0 +1,9 @@ +allOf: + - $ref: "./SouthboundMapping.yaml" + - type: object + properties: + adapterId: + type: string + description: The id of the adapter owning the tag + required: + - adapterId diff --git a/hivemq-edge-openapi/openapi/components/schemas/SouthboundMappingOwnerList.yaml b/hivemq-edge-openapi/openapi/components/schemas/SouthboundMappingOwnerList.yaml index ab81a831ae..09882562c5 100644 --- a/hivemq-edge-openapi/openapi/components/schemas/SouthboundMappingOwnerList.yaml +++ b/hivemq-edge-openapi/openapi/components/schemas/SouthboundMappingOwnerList.yaml @@ -4,15 +4,6 @@ properties: type: array description: List of result items that are returned by this endpoint items: - type: object - required: - - adapterId - - mapping - properties: - adapterId: - type: string - description: The id of the adapter owning the mapping - mapping: - $ref: ./SouthboundMapping.yaml + $ref: ./SouthboundMappingOwner.yaml required: - items diff --git a/hivemq-edge/src/main/java/com/hivemq/api/resources/impl/ProtocolAdaptersResourceImpl.java b/hivemq-edge/src/main/java/com/hivemq/api/resources/impl/ProtocolAdaptersResourceImpl.java index 6c8f379092..669963b0c0 100644 --- a/hivemq-edge/src/main/java/com/hivemq/api/resources/impl/ProtocolAdaptersResourceImpl.java +++ b/hivemq-edge/src/main/java/com/hivemq/api/resources/impl/ProtocolAdaptersResourceImpl.java @@ -46,9 +46,12 @@ import com.hivemq.api.model.mappings.northbound.NorthboundMappingListModel; import com.hivemq.api.model.mappings.northbound.NorthboundMappingModel; import com.hivemq.api.utils.ApiErrorUtils; +import com.hivemq.configuration.entity.adapter.DomainTagOwnerConverter; import com.hivemq.configuration.entity.adapter.NorthboundMappingEntity; +import com.hivemq.configuration.entity.adapter.NorthboundMappingOwnerConverter; import com.hivemq.configuration.entity.adapter.ProtocolAdapterEntity; import com.hivemq.configuration.entity.adapter.SouthboundMappingEntity; +import com.hivemq.configuration.entity.adapter.SouthboundMappingOwnerConverter; import com.hivemq.configuration.entity.adapter.TagEntity; import com.hivemq.configuration.info.SystemInformation; import com.hivemq.configuration.reader.ProtocolAdapterExtractor; @@ -62,8 +65,11 @@ import com.hivemq.edge.api.model.AdaptersList; import com.hivemq.edge.api.model.DomainTag; import com.hivemq.edge.api.model.DomainTagList; +import com.hivemq.edge.api.model.DomainTagOwnerList; import com.hivemq.edge.api.model.NorthboundMappingList; +import com.hivemq.edge.api.model.NorthboundMappingOwnerList; import com.hivemq.edge.api.model.SouthboundMappingList; +import com.hivemq.edge.api.model.SouthboundMappingOwnerList; import com.hivemq.edge.api.model.Status; import com.hivemq.edge.api.model.StatusList; import com.hivemq.edge.api.model.StatusTransitionCommand; @@ -389,9 +395,8 @@ public int getDepth() { log.trace("Adapter '{}' was stopped successfully.", adapterId); } }); - case RESTART -> protocolAdapterManager - .stopAsync(adapterId, false) - .thenCompose(ignore -> protocolAdapterManager.startAsync(adapterId)) + case RESTART -> protocolAdapterManager.stopAsync(adapterId, false) + .thenCompose(ignore -> protocolAdapterManager.startAsync(adapterId)) .whenComplete((result, throwable) -> { if (throwable != null) { log.error("Failed to restart adapter '{}'.", adapterId, throwable); @@ -615,10 +620,12 @@ public int getDepth() { @Override public @NotNull Response getDomainTags() { final List domainTags = protocolAdapterManager.getDomainTags(); + final DomainTagOwnerList domainTagOwnerList = new DomainTagOwnerList(); + domainTags.stream() + .map(DomainTagOwnerConverter.INSTANCE::toRestEntity) + .forEach(domainTagOwnerList::addItemsItem); // empty list is also 200 as discussed. - return Response.ok(new DomainTagList().items(domainTags.stream() - .map(com.hivemq.persistence.domain.DomainTag::toModel) - .toList())).build(); + return Response.ok(domainTagOwnerList).build(); } @Override @@ -746,26 +753,26 @@ public int getDepth() { @Override public @NotNull Response getNorthboundMappings() { - return Response.status(200) - .entity(new NorthboundMappingListModel(configExtractor.getAllConfigs() + final NorthboundMappingOwnerList northboundMappingOwnerList = new NorthboundMappingOwnerList(); + configExtractor.getAllConfigs() + .forEach(adapter -> adapter.getNorthboundMappings() .stream() - .flatMap(adapter -> adapter.getNorthboundMappings() - .stream() - .map(NorthboundMappingModel::fromEntity)) - .toList())) - .build(); + .map(entity -> NorthboundMappingOwnerConverter.INSTANCE.toRestEntity(entity, + adapter.getAdapterId())) + .forEach(northboundMappingOwnerList::addItemsItem)); + return Response.status(200).entity(northboundMappingOwnerList).build(); } @Override public @NotNull Response getSouthboundMappings() { - return Response.status(200) - .entity(new SouthboundMappingList().items(configExtractor.getAllConfigs() + final SouthboundMappingOwnerList southboundMappingOwnerList = new SouthboundMappingOwnerList(); + configExtractor.getAllConfigs() + .forEach(adapter -> adapter.getSouthboundMappings() .stream() - .flatMap(adapter -> adapter.getSouthboundMappings() - .stream() - .map(SouthboundMappingEntity::toAPi)) - .toList())) - .build(); + .map(entity -> SouthboundMappingOwnerConverter.INSTANCE.toRestEntity(entity, + adapter.getAdapterId())) + .forEach(southboundMappingOwnerList::addItemsItem)); + return Response.status(200).entity(southboundMappingOwnerList).build(); } @Override @@ -938,14 +945,16 @@ public int getDepth() { final String errorMessage = String.format( "Cannot delete or rename tag '%s' for adapter '%s' because it is referenced in %d mapping(s): [%s]. " + - "Please remove or update these mappings before deleting or renaming the tag.", + "Please remove or update these mappings before deleting or renaming the tag.", tagName, adapter.getAdapterId(), allUsages.size(), String.join(", ", allUsages)); log.warn("Tag deletion/rename blocked for adapter '{}': tag '{}' is used in {} mapping(s)", - adapter.getAdapterId(), tagName, allUsages.size()); + adapter.getAdapterId(), + tagName, + allUsages.size()); return Optional.of(errorResponse(new com.hivemq.api.errors.adapters.DomainTagInUseError(errorMessage))); } diff --git a/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseApiEntityConverter.java b/hivemq-edge/src/main/java/com/hivemq/configuration/entity/EntityConverter.java similarity index 71% rename from hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseApiEntityConverter.java rename to hivemq-edge/src/main/java/com/hivemq/configuration/entity/EntityConverter.java index 7ca57973f5..6589335f52 100644 --- a/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseApiEntityConverter.java +++ b/hivemq-edge/src/main/java/com/hivemq/configuration/entity/EntityConverter.java @@ -14,10 +14,14 @@ * limitations under the License. */ -package com.hivemq.pulse.converters; +package com.hivemq.configuration.entity; import org.jetbrains.annotations.NotNull; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + /** * A generic interface for converting between REST entities and internal entities. * This interface defines methods for converting data models used in REST APIs @@ -26,7 +30,7 @@ * @param the type representing the REST entity. * @param the type representing the internal entity. */ -public interface PulseApiEntityConverter { +public interface EntityConverter { /** * Converts a REST entity to an internal entity. @@ -43,4 +47,12 @@ public interface PulseApiEntityConverter { * @return the converted REST entity. Will not be null. */ @NotNull RestEntity toRestEntity(final @NotNull InternalEntity internalEntity); + + default @NotNull List toInternalEntities(final @NotNull List restEntities) { + return restEntities.stream().map(this::toInternalEntity).collect(Collectors.toCollection(ArrayList::new)); + } + + default @NotNull List toRestEntities(final @NotNull List internalEntities) { + return internalEntities.stream().map(this::toRestEntity).collect(Collectors.toCollection(ArrayList::new)); + } } diff --git a/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/DomainTagOwnerConverter.java b/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/DomainTagOwnerConverter.java new file mode 100644 index 0000000000..32d1de6adb --- /dev/null +++ b/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/DomainTagOwnerConverter.java @@ -0,0 +1,45 @@ +/* + * Copyright 2019-present HiveMQ GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.hivemq.configuration.entity.adapter; + +import com.hivemq.configuration.entity.EntityConverter; +import com.hivemq.edge.api.model.DomainTagOwner; +import com.hivemq.persistence.domain.DomainTag; +import org.apache.commons.lang3.NotImplementedException; +import org.jetbrains.annotations.NotNull; + +public final class DomainTagOwnerConverter implements EntityConverter { + public static final DomainTagOwnerConverter INSTANCE = new DomainTagOwnerConverter(); + + private DomainTagOwnerConverter() { + } + + @Override + public @NotNull DomainTag toInternalEntity(final @NotNull DomainTagOwner entity) { + throw new NotImplementedException("DomainTagOwner to DomainTag conversion is not implemented"); + } + + @Override + public @NotNull DomainTagOwner toRestEntity(final @NotNull DomainTag entity) { + return DomainTagOwner.builder() + .adapterId(entity.getAdapterId()) + .name(entity.getTagName()) + .description(entity.getDescription()) + .definition(entity.getDefinition()) + .build(); + } +} diff --git a/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/MqttUserPropertyEntityConverter.java b/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/MqttUserPropertyEntityConverter.java new file mode 100644 index 0000000000..606ebb774c --- /dev/null +++ b/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/MqttUserPropertyEntityConverter.java @@ -0,0 +1,42 @@ +/* + * Copyright 2019-present HiveMQ GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.hivemq.configuration.entity.adapter; + +import com.hivemq.configuration.entity.EntityConverter; +import com.hivemq.edge.api.model.MqttUserProperty; +import org.jetbrains.annotations.NotNull; + +public final class MqttUserPropertyEntityConverter + implements EntityConverter { + public static final MqttUserPropertyEntityConverter INSTANCE = new MqttUserPropertyEntityConverter(); + + private MqttUserPropertyEntityConverter() { + } + + @Override + public @NotNull MqttUserPropertyEntity toInternalEntity(final @NotNull MqttUserProperty mqttUserProperty) { + return new MqttUserPropertyEntity(mqttUserProperty.getName(), mqttUserProperty.getValue()); + } + + @Override + public @NotNull MqttUserProperty toRestEntity(final @NotNull MqttUserPropertyEntity mqttUserPropertyEntity) { + return MqttUserProperty.builder() + .name(mqttUserPropertyEntity.getName()) + .value(mqttUserPropertyEntity.getValue()) + .build(); + } +} diff --git a/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/NorthboundMappingEntityConverter.java b/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/NorthboundMappingEntityConverter.java new file mode 100644 index 0000000000..1f87053291 --- /dev/null +++ b/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/NorthboundMappingEntityConverter.java @@ -0,0 +1,53 @@ +/* + * Copyright 2019-present HiveMQ GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.hivemq.configuration.entity.adapter; + +import com.hivemq.adapter.sdk.api.config.MessageHandlingOptions; +import com.hivemq.configuration.entity.EntityConverter; +import com.hivemq.edge.api.model.NorthboundMapping; +import org.jetbrains.annotations.NotNull; + +public final class NorthboundMappingEntityConverter + implements EntityConverter { + public static final NorthboundMappingEntityConverter INSTANCE = new NorthboundMappingEntityConverter(); + + private NorthboundMappingEntityConverter() { + } + + @Override + public @NotNull NorthboundMappingEntity toInternalEntity(final @NotNull NorthboundMapping entity) { + return new NorthboundMappingEntity(entity.getTagName(), + entity.getTopic(), + QoSConverter.INSTANCE.toInternalEntity(entity.getMaxQoS()).getQosNumber(), + MessageHandlingOptions.MQTTMessagePerTag, + entity.getIncludeTagNames(), + entity.getIncludeTimestamp(), + MqttUserPropertyEntityConverter.INSTANCE.toInternalEntities(entity.getUserProperties()), + entity.getMessageExpiryInterval()); + } + + @Override + public @NotNull NorthboundMapping toRestEntity(final @NotNull NorthboundMappingEntity entity) { + return new NorthboundMapping().tagName(entity.getTagName()) + .topic(entity.getTopic()) + .includeTagNames(entity.isIncludeTagNames()) + .includeTimestamp(entity.isIncludeTimestamp()) + .maxQoS(QoSConverter.INSTANCE.toRestEntity(entity.getMaxQoS())) + .messageExpiryInterval(entity.getMessageExpiryInterval()) + .userProperties(MqttUserPropertyEntityConverter.INSTANCE.toRestEntities(entity.getUserProperties())); + } +} diff --git a/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/NorthboundMappingOwnerConverter.java b/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/NorthboundMappingOwnerConverter.java new file mode 100644 index 0000000000..56b4a0e684 --- /dev/null +++ b/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/NorthboundMappingOwnerConverter.java @@ -0,0 +1,61 @@ +/* + * Copyright 2019-present HiveMQ GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.hivemq.configuration.entity.adapter; + +import com.hivemq.adapter.sdk.api.config.MessageHandlingOptions; +import com.hivemq.configuration.entity.EntityConverter; +import com.hivemq.edge.api.model.NorthboundMappingOwner; +import org.jetbrains.annotations.NotNull; + +public final class NorthboundMappingOwnerConverter + implements EntityConverter { + public static final NorthboundMappingOwnerConverter INSTANCE = new NorthboundMappingOwnerConverter(); + + private NorthboundMappingOwnerConverter() { + } + + @Override + public @NotNull NorthboundMappingEntity toInternalEntity(final @NotNull NorthboundMappingOwner entity) { + return new NorthboundMappingEntity(entity.getTagName(), + entity.getTopic(), + QoSConverter.INSTANCE.toInternalEntity(entity.getMaxQoS()).getQosNumber(), + MessageHandlingOptions.MQTTMessagePerTag, + entity.getIncludeTagNames(), + entity.getIncludeTimestamp(), + MqttUserPropertyEntityConverter.INSTANCE.toInternalEntities(entity.getUserProperties()), + entity.getMessageExpiryInterval()); + } + + public @NotNull NorthboundMappingOwner toRestEntity( + final @NotNull NorthboundMappingEntity entity, + final @NotNull String adapterId) { + return toRestEntity(entity).adapterId(adapterId); + } + + @Override + public @NotNull NorthboundMappingOwner toRestEntity(final @NotNull NorthboundMappingEntity entity) { + return NorthboundMappingOwner.builder() + .tagName(entity.getTagName()) + .topic(entity.getTopic()) + .includeTagNames(entity.isIncludeTagNames()) + .includeTimestamp(entity.isIncludeTimestamp()) + .maxQoS(QoSConverter.INSTANCE.toRestEntity(entity.getMaxQoS())) + .messageExpiryInterval(entity.getMessageExpiryInterval()) + .userProperties(MqttUserPropertyEntityConverter.INSTANCE.toRestEntities(entity.getUserProperties())) + .build(); + } +} diff --git a/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/QoSConverter.java b/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/QoSConverter.java new file mode 100644 index 0000000000..886fe5dd1e --- /dev/null +++ b/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/QoSConverter.java @@ -0,0 +1,51 @@ +/* + * Copyright 2019-present HiveMQ GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.hivemq.configuration.entity.adapter; + +import com.hivemq.configuration.entity.EntityConverter; +import com.hivemq.mqtt.message.QoS; +import org.jetbrains.annotations.NotNull; + +public final class QoSConverter implements EntityConverter { + public static final QoSConverter INSTANCE = new QoSConverter(); + + private QoSConverter() { + } + + @Override + public @NotNull QoS toInternalEntity(final @NotNull com.hivemq.edge.api.model.QoS qoS) { + return switch (qoS) { + case AT_MOST_ONCE -> QoS.AT_MOST_ONCE; + case AT_LEAST_ONCE -> QoS.AT_LEAST_ONCE; + case EXACTLY_ONCE -> QoS.EXACTLY_ONCE; + }; + } + + @Override + public @NotNull com.hivemq.edge.api.model.QoS toRestEntity(final @NotNull QoS qoS) { + return switch (qoS) { + case AT_MOST_ONCE -> com.hivemq.edge.api.model.QoS.AT_MOST_ONCE; + case AT_LEAST_ONCE -> com.hivemq.edge.api.model.QoS.AT_LEAST_ONCE; + case EXACTLY_ONCE -> com.hivemq.edge.api.model.QoS.EXACTLY_ONCE; + }; + } + + public @NotNull com.hivemq.edge.api.model.QoS toRestEntity(final int intQoS) { + final QoS qoS = QoS.valueOf(intQoS); + return toRestEntity(qoS == null ? QoS.AT_MOST_ONCE : qoS); + } +} diff --git a/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/SouthboundMappingEntity.java b/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/SouthboundMappingEntity.java index 4d7bbf7740..a29e1810bc 100644 --- a/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/SouthboundMappingEntity.java +++ b/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/SouthboundMappingEntity.java @@ -72,6 +72,10 @@ public SouthboundMappingEntity( return topicFilter; } + public @Nullable FieldMappingEntity getFieldMapping() { + return fieldMapping; + } + @Override public void validate(final @NotNull List validationEvents) { EntityValidatable.notEmpty(validationEvents, topicFilter, "topicFilter"); diff --git a/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/SouthboundMappingEntityConverter.java b/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/SouthboundMappingEntityConverter.java new file mode 100644 index 0000000000..c5cb979c9f --- /dev/null +++ b/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/SouthboundMappingEntityConverter.java @@ -0,0 +1,47 @@ +/* + * Copyright 2019-present HiveMQ GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.hivemq.configuration.entity.adapter; + +import com.hivemq.configuration.entity.EntityConverter; +import com.hivemq.configuration.entity.adapter.fieldmapping.FieldMappingEntityConverter; +import com.hivemq.edge.api.model.SouthboundMapping; +import org.apache.commons.lang3.NotImplementedException; +import org.jetbrains.annotations.NotNull; + +public final class SouthboundMappingEntityConverter + implements EntityConverter { + public static final SouthboundMappingEntityConverter INSTANCE = new SouthboundMappingEntityConverter(); + + private SouthboundMappingEntityConverter() { + } + + @Override + public @NotNull SouthboundMappingEntity toInternalEntity(final @NotNull SouthboundMapping entity) { + throw new NotImplementedException("SouthboundMapping to SouthboundMappingEntity conversion is not implemented"); + } + + @Override + public @NotNull SouthboundMapping toRestEntity(final @NotNull SouthboundMappingEntity entity) { + return SouthboundMapping.builder() + .tagName(entity.getTagName()) + .topicFilter(entity.getTopicFilter()) + .fieldMapping(entity.getFieldMapping() == null ? + null : + FieldMappingEntityConverter.INSTANCE_WITHOUT_SOURCE_REF.toRestEntity(entity.getFieldMapping())) + .build(); + } +} diff --git a/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/SouthboundMappingOwnerConverter.java b/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/SouthboundMappingOwnerConverter.java new file mode 100644 index 0000000000..a44d685a10 --- /dev/null +++ b/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/SouthboundMappingOwnerConverter.java @@ -0,0 +1,54 @@ +/* + * Copyright 2019-present HiveMQ GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.hivemq.configuration.entity.adapter; + +import com.hivemq.configuration.entity.EntityConverter; +import com.hivemq.configuration.entity.adapter.fieldmapping.FieldMappingEntityConverter; +import com.hivemq.edge.api.model.SouthboundMappingOwner; +import org.apache.commons.lang3.NotImplementedException; +import org.jetbrains.annotations.NotNull; + +public final class SouthboundMappingOwnerConverter + implements EntityConverter { + public static final SouthboundMappingOwnerConverter INSTANCE = new SouthboundMappingOwnerConverter(); + + private SouthboundMappingOwnerConverter() { + } + + @Override + public @NotNull SouthboundMappingEntity toInternalEntity(final @NotNull SouthboundMappingOwner entity) { + throw new NotImplementedException( + "SouthboundMappingOwner to SouthboundMappingEntity conversion is not implemented"); + } + + public @NotNull SouthboundMappingOwner toRestEntity( + final @NotNull SouthboundMappingEntity entity, + final @NotNull String adapterId) { + return toRestEntity(entity).adapterId(adapterId); + } + + @Override + public @NotNull SouthboundMappingOwner toRestEntity(final @NotNull SouthboundMappingEntity entity) { + return SouthboundMappingOwner.builder() + .tagName(entity.getTagName()) + .topicFilter(entity.getTopicFilter()) + .fieldMapping(entity.getFieldMapping() == null ? + null : + FieldMappingEntityConverter.INSTANCE_WITHOUT_SOURCE_REF.toRestEntity(entity.getFieldMapping())) + .build(); + } +} diff --git a/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/fieldmapping/FieldMappingEntityConverter.java b/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/fieldmapping/FieldMappingEntityConverter.java new file mode 100644 index 0000000000..eab2752e14 --- /dev/null +++ b/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/fieldmapping/FieldMappingEntityConverter.java @@ -0,0 +1,54 @@ +/* + * Copyright 2019-present HiveMQ GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.hivemq.configuration.entity.adapter.fieldmapping; + +import com.hivemq.configuration.entity.EntityConverter; +import com.hivemq.edge.api.model.FieldMapping; +import org.jetbrains.annotations.NotNull; + +public final class FieldMappingEntityConverter implements EntityConverter { + public static final FieldMappingEntityConverter INSTANCE = new FieldMappingEntityConverter(true); + public static final FieldMappingEntityConverter INSTANCE_WITHOUT_SOURCE_REF = + new FieldMappingEntityConverter(false); + private final boolean includeSourceRef; + + private FieldMappingEntityConverter(final boolean includeSourceRef) { + this.includeSourceRef = includeSourceRef; + } + + public boolean isIncludeSourceRef() { + return includeSourceRef; + } + + private @NotNull InstructionEntityConverter getInstructionEntityConverter() { + return includeSourceRef ? + InstructionEntityConverter.INSTANCE : + InstructionEntityConverter.INSTANCE_WITHOUT_SOURCE_REF; + } + + @Override + public @NotNull FieldMappingEntity toInternalEntity(final @NotNull FieldMapping entity) { + return new FieldMappingEntity(getInstructionEntityConverter().toInternalEntities(entity.getInstructions())); + } + + @Override + public @NotNull FieldMapping toRestEntity(final @NotNull FieldMappingEntity entity) { + return FieldMapping.builder() + .instructions(getInstructionEntityConverter().toRestEntities(entity.getInstructions())) + .build(); + } +} diff --git a/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/fieldmapping/InstructionEntityConverter.java b/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/fieldmapping/InstructionEntityConverter.java new file mode 100644 index 0000000000..5c857a54fc --- /dev/null +++ b/hivemq-edge/src/main/java/com/hivemq/configuration/entity/adapter/fieldmapping/InstructionEntityConverter.java @@ -0,0 +1,57 @@ +/* + * Copyright 2019-present HiveMQ GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.hivemq.configuration.entity.adapter.fieldmapping; + +import com.hivemq.configuration.entity.EntityConverter; +import com.hivemq.configuration.entity.combining.DataIdentifierReferenceEntityConverter; +import com.hivemq.edge.api.model.Instruction; +import org.jetbrains.annotations.NotNull; + +public final class InstructionEntityConverter implements EntityConverter { + public static final InstructionEntityConverter INSTANCE = new InstructionEntityConverter(true); + public static final InstructionEntityConverter INSTANCE_WITHOUT_SOURCE_REF = new InstructionEntityConverter(false); + + private final boolean includeSourceRef; + + private InstructionEntityConverter(final boolean includeSourceRef) { + this.includeSourceRef = includeSourceRef; + } + + public boolean isIncludeSourceRef() { + return includeSourceRef; + } + + @Override + public @NotNull InstructionEntity toInternalEntity(final @NotNull Instruction entity) { + return new InstructionEntity(entity.getSource(), + entity.getDestination(), + includeSourceRef && entity.getSourceRef() != null ? + DataIdentifierReferenceEntityConverter.INSTANCE.toInternalEntity(entity.getSourceRef()) : + null); + } + + @Override + public @NotNull Instruction toRestEntity(final @NotNull InstructionEntity entity) { + return Instruction.builder() + .destination(entity.getDestinationFieldName()) + .source(entity.getSourceFieldName()) + .sourceRef(includeSourceRef && entity.getOrigin() != null ? + DataIdentifierReferenceEntityConverter.INSTANCE.toRestEntity(entity.getOrigin()) : + null) + .build(); + } +} diff --git a/hivemq-edge/src/main/java/com/hivemq/configuration/entity/combining/DataIdentifierReferenceEntityConverter.java b/hivemq-edge/src/main/java/com/hivemq/configuration/entity/combining/DataIdentifierReferenceEntityConverter.java new file mode 100644 index 0000000000..6814be6748 --- /dev/null +++ b/hivemq-edge/src/main/java/com/hivemq/configuration/entity/combining/DataIdentifierReferenceEntityConverter.java @@ -0,0 +1,43 @@ +/* + * Copyright 2019-present HiveMQ GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.hivemq.configuration.entity.combining; + +import com.hivemq.configuration.entity.EntityConverter; +import com.hivemq.edge.api.model.DataIdentifierReference; +import org.jetbrains.annotations.NotNull; + +public final class DataIdentifierReferenceEntityConverter + implements EntityConverter { + public static final DataIdentifierReferenceEntityConverter INSTANCE = new DataIdentifierReferenceEntityConverter(); + + private DataIdentifierReferenceEntityConverter() { + } + + @Override + public @NotNull DataIdentifierReferenceEntity toInternalEntity(final @NotNull DataIdentifierReference entity) { + return new DataIdentifierReferenceEntity(entity.getId(), + DataIdentifierReferenceTypeConverter.INSTANCE.toInternalEntity(entity.getType())); + } + + @Override + public @NotNull DataIdentifierReference toRestEntity(final @NotNull DataIdentifierReferenceEntity entity) { + return DataIdentifierReference.builder() + .id(entity.getId()) + .type(DataIdentifierReferenceTypeConverter.INSTANCE.toRestEntity(entity.getType())) + .build(); + } +} diff --git a/hivemq-edge/src/main/java/com/hivemq/configuration/entity/combining/DataIdentifierReferenceTypeConverter.java b/hivemq-edge/src/main/java/com/hivemq/configuration/entity/combining/DataIdentifierReferenceTypeConverter.java new file mode 100644 index 0000000000..a2a071c236 --- /dev/null +++ b/hivemq-edge/src/main/java/com/hivemq/configuration/entity/combining/DataIdentifierReferenceTypeConverter.java @@ -0,0 +1,47 @@ +/* + * Copyright 2019-present HiveMQ GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.hivemq.configuration.entity.combining; + +import com.hivemq.combining.model.DataIdentifierReference; +import com.hivemq.configuration.entity.EntityConverter; +import org.jetbrains.annotations.NotNull; + +public final class DataIdentifierReferenceTypeConverter implements + EntityConverter { + public final static DataIdentifierReferenceTypeConverter INSTANCE = new DataIdentifierReferenceTypeConverter(); + + private DataIdentifierReferenceTypeConverter() { + } + + @Override + public @NotNull DataIdentifierReference.Type toInternalEntity(final @NotNull com.hivemq.edge.api.model.DataIdentifierReference.TypeEnum entity) { + return switch (entity) { + case PULSE_ASSET -> DataIdentifierReference.Type.PULSE_ASSET; + case TAG -> DataIdentifierReference.Type.TAG; + case TOPIC_FILTER -> DataIdentifierReference.Type.TOPIC_FILTER; + }; + } + + @Override + public @NotNull com.hivemq.edge.api.model.DataIdentifierReference.TypeEnum toRestEntity(final @NotNull DataIdentifierReference.Type entity) { + return switch (entity) { + case PULSE_ASSET -> com.hivemq.edge.api.model.DataIdentifierReference.TypeEnum.PULSE_ASSET; + case TAG -> com.hivemq.edge.api.model.DataIdentifierReference.TypeEnum.TAG; + case TOPIC_FILTER -> com.hivemq.edge.api.model.DataIdentifierReference.TypeEnum.TOPIC_FILTER; + }; + } +} diff --git a/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentActivationStatusConverter.java b/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentActivationStatusConverter.java index ea83a10782..c13a65769d 100644 --- a/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentActivationStatusConverter.java +++ b/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentActivationStatusConverter.java @@ -16,12 +16,13 @@ package com.hivemq.pulse.converters; +import com.hivemq.configuration.entity.EntityConverter; import com.hivemq.edge.api.model.PulseStatus; import com.hivemq.pulse.status.Status; import org.jetbrains.annotations.NotNull; public final class PulseAgentActivationStatusConverter - implements PulseApiEntityConverter { + implements EntityConverter { public final static PulseAgentActivationStatusConverter INSTANCE = new PulseAgentActivationStatusConverter(); private PulseAgentActivationStatusConverter() { diff --git a/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentAssetConverter.java b/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentAssetConverter.java index 9fb5820049..35f8df6b5e 100644 --- a/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentAssetConverter.java +++ b/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentAssetConverter.java @@ -16,11 +16,12 @@ package com.hivemq.pulse.converters; +import com.hivemq.configuration.entity.EntityConverter; import com.hivemq.edge.api.model.ManagedAsset; import com.hivemq.pulse.asset.PulseAgentAsset; import org.jetbrains.annotations.NotNull; -public class PulseAgentAssetConverter implements PulseApiEntityConverter { +public class PulseAgentAssetConverter implements EntityConverter { public static final PulseAgentAssetConverter INSTANCE = new PulseAgentAssetConverter(); private PulseAgentAssetConverter() { diff --git a/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentAssetMappingConverter.java b/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentAssetMappingConverter.java index b41b8d5e4a..ee443ac301 100644 --- a/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentAssetMappingConverter.java +++ b/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentAssetMappingConverter.java @@ -16,12 +16,13 @@ package com.hivemq.pulse.converters; +import com.hivemq.configuration.entity.EntityConverter; import com.hivemq.edge.api.model.AssetMapping; import com.hivemq.pulse.asset.PulseAgentAssetMapping; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -public class PulseAgentAssetMappingConverter implements PulseApiEntityConverter { +public class PulseAgentAssetMappingConverter implements EntityConverter { public static final PulseAgentAssetMappingConverter INSTANCE = new PulseAgentAssetMappingConverter(); private PulseAgentAssetMappingConverter() { diff --git a/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentAssetMappingStatusConverter.java b/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentAssetMappingStatusConverter.java index 3ba8c79596..37203c44b2 100644 --- a/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentAssetMappingStatusConverter.java +++ b/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentAssetMappingStatusConverter.java @@ -16,12 +16,13 @@ package com.hivemq.pulse.converters; +import com.hivemq.configuration.entity.EntityConverter; import com.hivemq.edge.api.model.AssetMapping; import com.hivemq.pulse.asset.PulseAgentAssetMappingStatus; import org.jetbrains.annotations.NotNull; public class PulseAgentAssetMappingStatusConverter - implements PulseApiEntityConverter { + implements EntityConverter { public static final PulseAgentAssetMappingStatusConverter INSTANCE = new PulseAgentAssetMappingStatusConverter(); private PulseAgentAssetMappingStatusConverter() { diff --git a/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentAssetSchemaConverter.java b/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentAssetSchemaConverter.java index 3013c64bc4..de3e416730 100644 --- a/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentAssetSchemaConverter.java +++ b/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentAssetSchemaConverter.java @@ -16,13 +16,14 @@ package com.hivemq.pulse.converters; +import com.hivemq.configuration.entity.EntityConverter; import org.jetbrains.annotations.NotNull; import java.nio.charset.StandardCharsets; import java.util.Base64; import java.util.Objects; -public class PulseAgentAssetSchemaConverter implements PulseApiEntityConverter { +public class PulseAgentAssetSchemaConverter implements EntityConverter { public static final PulseAgentAssetSchemaConverter INSTANCE = new PulseAgentAssetSchemaConverter(); public static final String DATA_APPLICATION_SCHEMA_JSON_BASE64 = "data:application/schema+json;base64,"; diff --git a/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentAssetsConverter.java b/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentAssetsConverter.java index ec1af83fc2..fd421ec476 100644 --- a/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentAssetsConverter.java +++ b/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentAssetsConverter.java @@ -16,11 +16,12 @@ package com.hivemq.pulse.converters; +import com.hivemq.configuration.entity.EntityConverter; import com.hivemq.edge.api.model.ManagedAssetList; import com.hivemq.pulse.asset.PulseAgentAssets; import org.jetbrains.annotations.NotNull; -public class PulseAgentAssetsConverter implements PulseApiEntityConverter { +public class PulseAgentAssetsConverter implements EntityConverter { public static final PulseAgentAssetsConverter INSTANCE = new PulseAgentAssetsConverter(); private PulseAgentAssetsConverter() { diff --git a/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentConnectionStatusConverter.java b/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentConnectionStatusConverter.java index 94a9ad8449..ebb633499f 100644 --- a/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentConnectionStatusConverter.java +++ b/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentConnectionStatusConverter.java @@ -16,12 +16,13 @@ package com.hivemq.pulse.converters; +import com.hivemq.configuration.entity.EntityConverter; import com.hivemq.edge.api.model.PulseStatus; import com.hivemq.pulse.status.Status; import org.jetbrains.annotations.NotNull; public final class PulseAgentConnectionStatusConverter - implements PulseApiEntityConverter { + implements EntityConverter { public final static PulseAgentConnectionStatusConverter INSTANCE = new PulseAgentConnectionStatusConverter(); private PulseAgentConnectionStatusConverter() { diff --git a/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentStatusConverter.java b/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentStatusConverter.java index 937ed2e128..36da393cb0 100644 --- a/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentStatusConverter.java +++ b/hivemq-edge/src/main/java/com/hivemq/pulse/converters/PulseAgentStatusConverter.java @@ -16,13 +16,14 @@ package com.hivemq.pulse.converters; +import com.hivemq.configuration.entity.EntityConverter; import com.hivemq.edge.api.model.PulseStatus; import com.hivemq.pulse.status.Status; import org.jetbrains.annotations.NotNull; import java.util.List; -public class PulseAgentStatusConverter implements PulseApiEntityConverter { +public class PulseAgentStatusConverter implements EntityConverter { public final static PulseAgentStatusConverter INSTANCE = new PulseAgentStatusConverter(); private PulseAgentStatusConverter() { diff --git a/hivemq-edge/src/test/java/com/hivemq/api/resources/impl/ProtocolAdaptersResourceImplTest.java b/hivemq-edge/src/test/java/com/hivemq/api/resources/impl/ProtocolAdaptersResourceImplTest.java index c4eb8a9c7e..014f8e81ab 100644 --- a/hivemq-edge/src/test/java/com/hivemq/api/resources/impl/ProtocolAdaptersResourceImplTest.java +++ b/hivemq-edge/src/test/java/com/hivemq/api/resources/impl/ProtocolAdaptersResourceImplTest.java @@ -16,25 +16,39 @@ package com.hivemq.api.resources.impl; import com.fasterxml.jackson.databind.ObjectMapper; +import com.hivemq.combining.model.DataIdentifierReference; +import com.hivemq.configuration.entity.adapter.DomainTagOwnerConverter; +import com.hivemq.configuration.entity.adapter.NorthboundMappingEntity; import com.hivemq.configuration.entity.adapter.ProtocolAdapterEntity; +import com.hivemq.configuration.entity.adapter.QoSConverter; +import com.hivemq.configuration.entity.adapter.SouthboundMappingEntity; import com.hivemq.configuration.entity.adapter.TagEntity; +import com.hivemq.configuration.entity.adapter.fieldmapping.FieldMappingEntity; +import com.hivemq.configuration.entity.adapter.fieldmapping.InstructionEntity; +import com.hivemq.configuration.entity.combining.DataIdentifierReferenceEntity; import com.hivemq.configuration.info.SystemInformation; import com.hivemq.configuration.reader.ProtocolAdapterExtractor; import com.hivemq.configuration.service.ConfigurationService; import com.hivemq.edge.HiveMQEdgeRemoteService; import com.hivemq.edge.VersionProvider; import com.hivemq.edge.api.model.DomainTagList; +import com.hivemq.edge.api.model.DomainTagOwnerList; +import com.hivemq.edge.api.model.FieldMapping; +import com.hivemq.edge.api.model.NorthboundMappingOwner; +import com.hivemq.edge.api.model.NorthboundMappingOwnerList; +import com.hivemq.edge.api.model.SouthboundMappingOwner; +import com.hivemq.edge.api.model.SouthboundMappingOwnerList; import com.hivemq.persistence.domain.DomainTag; import com.hivemq.persistence.domain.DomainTagAddResult; import com.hivemq.persistence.topicfilter.TopicFilterPersistence; import com.hivemq.protocols.InternalProtocolAdapterWritingService; import com.hivemq.protocols.ProtocolAdapterConfigConverter; import com.hivemq.protocols.ProtocolAdapterManager; +import jakarta.ws.rs.core.Response; import org.jetbrains.annotations.NotNull; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import jakarta.ws.rs.core.Response; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.ArrayList; @@ -42,7 +56,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import java.util.stream.IntStream; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.mockito.ArgumentMatchers.any; @@ -65,8 +81,7 @@ class ProtocolAdaptersResourceImplTest { private final ProtocolAdaptersResourceImpl protocolAdaptersResource = - new ProtocolAdaptersResourceImpl( - remoteService, + new ProtocolAdaptersResourceImpl(remoteService, configurationService, protocolAdapterManager, protocolAdapterWritingService, @@ -113,8 +128,9 @@ void addAdapterDomainTag_whenAddingSucceeds_thenReturn200() { when(protocolAdapterWritingService.writingEnabled()).thenReturn(false); var protocolAdapterEntity = mock(ProtocolAdapterEntity.class); - when(protocolAdapterEntity.getTags()) - .thenReturn(List.of(new TagEntity("tagExists","description", Map.of("address", "addressy1")))); + when(protocolAdapterEntity.getTags()).thenReturn(List.of(new TagEntity("tagExists", + "description", + Map.of("address", "addressy1")))); when(protocolAdapterExtractor.getAdapterByAdapterId("adapter")).thenReturn(Optional.of(protocolAdapterEntity)); when(protocolAdapterExtractor.updateAdapter(any())).thenReturn(true); @@ -135,8 +151,9 @@ void addAdapterDomainTag_whenAlreadyExists_thenReturn403() { when(protocolAdapterWritingService.writingEnabled()).thenReturn(false); var protocolAdapterEntity = mock(ProtocolAdapterEntity.class); - when(protocolAdapterEntity.getTags()) - .thenReturn(List.of(new TagEntity("tag","description", Map.of("address", "addressy1")))); + when(protocolAdapterEntity.getTags()).thenReturn(List.of(new TagEntity("tag", + "description", + Map.of("address", "addressy1")))); when(protocolAdapterExtractor.getAdapterByAdapterId("adapter")).thenReturn(Optional.of(protocolAdapterEntity)); when(protocolAdapterExtractor.updateAdapter(any())).thenReturn(false); @@ -156,13 +173,14 @@ void deleteDomainTag_whenTagExists_thenReturn200() { when(protocolAdapterExtractor.updateAdapter(any())).thenReturn(true); var protocolAdapterEntity = mock(ProtocolAdapterEntity.class); - when(protocolAdapterEntity.getTags()) - .thenReturn(List.of(new TagEntity("tag","description", Map.of("address", "addressy1")))); + when(protocolAdapterEntity.getTags()).thenReturn(List.of(new TagEntity("tag", + "description", + Map.of("address", "addressy1")))); when(protocolAdapterExtractor.getAdapterByAdapterId("adapter")).thenReturn(Optional.of(protocolAdapterEntity)); - final Response response = - protocolAdaptersResource.deleteAdapterDomainTags("adapter", URLEncoder.encode("tag", StandardCharsets.UTF_8)); + final Response response = protocolAdaptersResource.deleteAdapterDomainTags("adapter", + URLEncoder.encode("tag", StandardCharsets.UTF_8)); assertEquals(200, response.getStatus()); @@ -173,8 +191,8 @@ void deleteDomainTag_whenTagDoesNotExists_thenReturn403() { when(protocolAdapterWritingService.writingEnabled()).thenReturn(false); when(protocolAdapterExtractor.updateAdapter(any())).thenReturn(false); - final Response response = - protocolAdaptersResource.deleteAdapterDomainTags("adapter", URLEncoder.encode("tag", StandardCharsets.UTF_8)); + final Response response = protocolAdaptersResource.deleteAdapterDomainTags("adapter", + URLEncoder.encode("tag", StandardCharsets.UTF_8)); assertEquals(404, response.getStatus()); @@ -185,8 +203,9 @@ void updateDomainTag_whenTagExists_thenReturn200() { when(protocolAdapterWritingService.writingEnabled()).thenReturn(false); var protocolAdapterEntity = mock(ProtocolAdapterEntity.class); - when(protocolAdapterEntity.getTags()) - .thenReturn(List.of(new TagEntity("tag","description", Map.of("address", "addressy1")))); + when(protocolAdapterEntity.getTags()).thenReturn(List.of(new TagEntity("tag", + "description", + Map.of("address", "addressy1")))); when(protocolAdapterExtractor.getAdapterByAdapterId("adapter")).thenReturn(Optional.of(protocolAdapterEntity)); when(protocolAdapterExtractor.updateAdapter(any())).thenReturn(true); @@ -222,24 +241,114 @@ void getDomainTags() { final ArrayList domainTags = new ArrayList<>(); for (int i = 0; i < 10; i++) { domainTags.add(new DomainTag("tag" + i, - "1", + "adapter" + i, "description", objectMapper.valueToTree(Map.of("address", "addressy")))); } - when(protocolAdapterManager.getDomainTags()).thenReturn(domainTags); - final Response response = protocolAdaptersResource.getDomainTags(); + assertThat(response.getEntity()).isInstanceOfSatisfying(DomainTagOwnerList.class, domainTagOwnerList -> { + assertThat(domainTagOwnerList.getItems().size()).isEqualTo(domainTags.size()); + IntStream.range(0, domainTagOwnerList.getItems().size()) + .forEach(i -> assertThat(domainTagOwnerList.getItems() + .get(i)).isEqualTo(DomainTagOwnerConverter.INSTANCE.toRestEntity(domainTags.get(i)))); + }); + } - final Object entity = response.getEntity(); + @Test + void getNorthboundMappings() { + final int count = 5; + when(protocolAdapterExtractor.getAllConfigs()).thenReturn(IntStream.range(0, count) + .mapToObj(i -> new ProtocolAdapterEntity("adapter" + i, + "protocol" + i, + i, + Map.of("id", i), + List.of(new NorthboundMappingEntity("tagName" + i + ".a", + "topic" + i + ".a", + 0, + null, + false, + true, + List.of(), + 1234L + i), + new NorthboundMappingEntity("tagName" + i + ".b", + "topic" + i + ".b", + 1, + null, + false, + true, + List.of(), + 1234L + i)), + List.of(), + List.of())) + .toList()); + final Response response = protocolAdaptersResource.getNorthboundMappings(); + assertThat(response.getEntity()).isInstanceOfSatisfying(NorthboundMappingOwnerList.class, + northboundMappingOwnerList -> { + assertThat(northboundMappingOwnerList.getItems().size()).isEqualTo(count * 2); + IntStream.range(0, count * 2).forEach(i -> { + final NorthboundMappingOwner item = northboundMappingOwnerList.getItems().get(i); + assertThat(item.getAdapterId()).isEqualTo("adapter" + (i / 2)); + assertThat(item.getTagName()).isEqualTo("tagName" + (i / 2) + "." + ((i % 2 == 0 ? "a" : "b"))); + assertThat(item.getTopic()).isEqualTo("topic" + (i / 2) + "." + ((i % 2 == 0 ? "a" : "b"))); + assertThat(item.getMaxQoS()).isEqualTo(QoSConverter.INSTANCE.toRestEntity(i % 2)); + assertThat(item.getIncludeTagNames()).isFalse(); + assertThat(item.getIncludeTimestamp()).isTrue(); + assertThat(item.getMessageExpiryInterval()).isEqualTo(1234L + i / 2); + }); + }); + } - assertInstanceOf(DomainTagList.class, entity); - final DomainTagList domainTagList = (DomainTagList) entity; - assertEquals(domainTags.size(), domainTagList.getItems().size()); - for (int i = 0; i < domainTags.size(); i++) { - final DomainTag domainTag = domainTags.get(i); - assertEquals(domainTag.toModel(), domainTagList.getItems().get(i)); - } + @Test + void getSouthboundMappings() { + final int count = 5; + when(protocolAdapterExtractor.getAllConfigs()).thenReturn(IntStream.range(0, count) + .mapToObj(i -> new ProtocolAdapterEntity("adapter" + i, + "protocol" + i, + i, + Map.of("id", i), + List.of(), + List.of(new SouthboundMappingEntity("tagName" + i + ".a", + "topicFilter" + i + ".a", + new FieldMappingEntity(List.of(new InstructionEntity("sourceFieldName" + i + ".a", + "destinationFieldName" + i + ".a", + new DataIdentifierReferenceEntity("id" + i + ".a", + DataIdentifierReference.Type.PULSE_ASSET)))), + "fromNorthSchema" + i + ".a"), + new SouthboundMappingEntity("tagName" + i + ".b", + "topicFilter" + i + ".b", + new FieldMappingEntity(List.of(new InstructionEntity("sourceFieldName" + + i + + ".b", + "destinationFieldName" + i + ".b", + new DataIdentifierReferenceEntity("id" + i + ".b", + DataIdentifierReference.Type.PULSE_ASSET)))), + "fromNorthSchema" + i + ".b")), + List.of())) + .toList()); + final Response response = protocolAdaptersResource.getSouthboundMappings(); + assertThat(response.getEntity()).isInstanceOfSatisfying(SouthboundMappingOwnerList.class, + southboundMappingOwnerList -> { + assertThat(southboundMappingOwnerList.getItems().size()).isEqualTo(count * 2); + IntStream.range(0, count * 2).forEach(i -> { + final SouthboundMappingOwner item = southboundMappingOwnerList.getItems().get(i); + assertThat(item.getAdapterId()).isEqualTo("adapter" + (i / 2)); + assertThat(item.getTagName()).isEqualTo("tagName" + (i / 2) + "." + ((i % 2 == 0 ? "a" : "b"))); + assertThat(item.getTopicFilter()).isEqualTo("topicFilter" + + (i / 2) + + "." + + ((i % 2 == 0 ? "a" : "b"))); + final FieldMapping fieldMapping = item.getFieldMapping(); + assertThat(fieldMapping.getInstructions()).hasSize(1); + assertThat(fieldMapping.getInstructions().getFirst().getSource()).isEqualTo("sourceFieldName" + + (i / 2) + + "." + + ((i % 2 == 0 ? "a" : "b"))); + assertThat(fieldMapping.getInstructions().getFirst().getDestination()).isEqualTo( + "destinationFieldName" + (i / 2) + "." + ((i % 2 == 0 ? "a" : "b"))); + assertThat(fieldMapping.getInstructions().getFirst().getSourceRef()).isNull(); + }); + }); } @Test @@ -250,8 +359,7 @@ void testDeleteTagInUseByNorthboundMapping() { final String tagName = "temperature"; final com.hivemq.configuration.entity.adapter.NorthboundMappingEntity northboundMapping = - new com.hivemq.configuration.entity.adapter.NorthboundMappingEntity( - tagName, + new com.hivemq.configuration.entity.adapter.NorthboundMappingEntity(tagName, "test/topic", 1, null, @@ -261,13 +369,11 @@ void testDeleteTagInUseByNorthboundMapping() { null); final com.hivemq.configuration.entity.adapter.TagEntity tagEntity = - new com.hivemq.configuration.entity.adapter.TagEntity( - tagName, + new com.hivemq.configuration.entity.adapter.TagEntity(tagName, "description", Map.of("address", "test")); - final ProtocolAdapterEntity adapterEntity = new ProtocolAdapterEntity( - adapterId, + final ProtocolAdapterEntity adapterEntity = new ProtocolAdapterEntity(adapterId, "opcua", 1, Map.of(), @@ -290,20 +396,17 @@ void testDeleteTagInUseBySouthboundMapping() { final String tagName = "valve-control"; final com.hivemq.configuration.entity.adapter.SouthboundMappingEntity southboundMapping = - new com.hivemq.configuration.entity.adapter.SouthboundMappingEntity( - tagName, + new com.hivemq.configuration.entity.adapter.SouthboundMappingEntity(tagName, "commands/valve/+", null, "schema"); final com.hivemq.configuration.entity.adapter.TagEntity tagEntity = - new com.hivemq.configuration.entity.adapter.TagEntity( - tagName, + new com.hivemq.configuration.entity.adapter.TagEntity(tagName, "description", Map.of("address", "test")); - final ProtocolAdapterEntity adapterEntity = new ProtocolAdapterEntity( - adapterId, + final ProtocolAdapterEntity adapterEntity = new ProtocolAdapterEntity(adapterId, "modbus", 1, Map.of(), @@ -326,8 +429,7 @@ void testDeleteTagInUseByBothMappings() { final String tagName = "sensor-data"; final com.hivemq.configuration.entity.adapter.NorthboundMappingEntity northboundMapping = - new com.hivemq.configuration.entity.adapter.NorthboundMappingEntity( - tagName, + new com.hivemq.configuration.entity.adapter.NorthboundMappingEntity(tagName, "sensors/data", 1, null, @@ -337,20 +439,17 @@ void testDeleteTagInUseByBothMappings() { null); final com.hivemq.configuration.entity.adapter.SouthboundMappingEntity southboundMapping = - new com.hivemq.configuration.entity.adapter.SouthboundMappingEntity( - tagName, + new com.hivemq.configuration.entity.adapter.SouthboundMappingEntity(tagName, "commands/sensor/+", null, "schema"); final com.hivemq.configuration.entity.adapter.TagEntity tagEntity = - new com.hivemq.configuration.entity.adapter.TagEntity( - tagName, + new com.hivemq.configuration.entity.adapter.TagEntity(tagName, "description", Map.of("address", "test")); - final ProtocolAdapterEntity adapterEntity = new ProtocolAdapterEntity( - adapterId, + final ProtocolAdapterEntity adapterEntity = new ProtocolAdapterEntity(adapterId, "opcua", 1, Map.of(), @@ -373,19 +472,12 @@ void testDeleteTagNotInUse() { final String tagName = "unused-tag"; final com.hivemq.configuration.entity.adapter.TagEntity tagEntity = - new com.hivemq.configuration.entity.adapter.TagEntity( - tagName, + new com.hivemq.configuration.entity.adapter.TagEntity(tagName, "description", Map.of("address", "test")); - final ProtocolAdapterEntity adapterEntity = new ProtocolAdapterEntity( - adapterId, - "opcua", - 1, - Map.of(), - List.of(), - List.of(), - List.of(tagEntity)); + final ProtocolAdapterEntity adapterEntity = + new ProtocolAdapterEntity(adapterId, "opcua", 1, Map.of(), List.of(), List.of(), List.of(tagEntity)); when(protocolAdapterExtractor.getAdapterByAdapterId(adapterId)).thenReturn(Optional.of(adapterEntity)); when(protocolAdapterExtractor.updateAdapter(any())).thenReturn(true); @@ -404,8 +496,7 @@ void testUpdateTagRenameInUse() { final String newTagName = "temp-sensor"; final com.hivemq.configuration.entity.adapter.NorthboundMappingEntity northboundMapping = - new com.hivemq.configuration.entity.adapter.NorthboundMappingEntity( - oldTagName, + new com.hivemq.configuration.entity.adapter.NorthboundMappingEntity(oldTagName, "test/topic", 1, null, @@ -415,13 +506,11 @@ void testUpdateTagRenameInUse() { null); final com.hivemq.configuration.entity.adapter.TagEntity tagEntity = - new com.hivemq.configuration.entity.adapter.TagEntity( - oldTagName, + new com.hivemq.configuration.entity.adapter.TagEntity(oldTagName, "description", Map.of("address", "test")); - final ProtocolAdapterEntity adapterEntity = new ProtocolAdapterEntity( - adapterId, + final ProtocolAdapterEntity adapterEntity = new ProtocolAdapterEntity(adapterId, "opcua", 1, Map.of(), @@ -431,10 +520,10 @@ void testUpdateTagRenameInUse() { when(protocolAdapterExtractor.getAdapterByAdapterId(adapterId)).thenReturn(Optional.of(adapterEntity)); - final com.hivemq.edge.api.model.DomainTag updatedTag = new com.hivemq.edge.api.model.DomainTag() - .name(newTagName) - .description("description") - .definition(objectMapper.valueToTree(Map.of("address", "test"))); + final com.hivemq.edge.api.model.DomainTag updatedTag = + new com.hivemq.edge.api.model.DomainTag().name(newTagName) + .description("description") + .definition(objectMapper.valueToTree(Map.of("address", "test"))); final Response response = protocolAdaptersResource.updateAdapterDomainTag(adapterId, oldTagName, updatedTag); @@ -450,27 +539,20 @@ void testUpdateTagRenameNotInUse() { final String newTagName = "temp-sensor"; final com.hivemq.configuration.entity.adapter.TagEntity tagEntity = - new com.hivemq.configuration.entity.adapter.TagEntity( - oldTagName, + new com.hivemq.configuration.entity.adapter.TagEntity(oldTagName, "description", Map.of("address", "test")); - final ProtocolAdapterEntity adapterEntity = new ProtocolAdapterEntity( - adapterId, - "opcua", - 1, - Map.of(), - List.of(), - List.of(), - List.of(tagEntity)); + final ProtocolAdapterEntity adapterEntity = + new ProtocolAdapterEntity(adapterId, "opcua", 1, Map.of(), List.of(), List.of(), List.of(tagEntity)); when(protocolAdapterExtractor.getAdapterByAdapterId(adapterId)).thenReturn(Optional.of(adapterEntity)); when(protocolAdapterExtractor.updateAdapter(any())).thenReturn(true); - final com.hivemq.edge.api.model.DomainTag updatedTag = new com.hivemq.edge.api.model.DomainTag() - .name(newTagName) - .description("description") - .definition(objectMapper.valueToTree(Map.of("address", "test"))); + final com.hivemq.edge.api.model.DomainTag updatedTag = + new com.hivemq.edge.api.model.DomainTag().name(newTagName) + .description("description") + .definition(objectMapper.valueToTree(Map.of("address", "test"))); final Response response = protocolAdaptersResource.updateAdapterDomainTag(adapterId, oldTagName, updatedTag); @@ -485,8 +567,7 @@ void testUpdateTagWithoutRename() { final String tagName = "temperature"; final com.hivemq.configuration.entity.adapter.NorthboundMappingEntity northboundMapping = - new com.hivemq.configuration.entity.adapter.NorthboundMappingEntity( - tagName, + new com.hivemq.configuration.entity.adapter.NorthboundMappingEntity(tagName, "test/topic", 1, null, @@ -496,13 +577,11 @@ void testUpdateTagWithoutRename() { null); final com.hivemq.configuration.entity.adapter.TagEntity tagEntity = - new com.hivemq.configuration.entity.adapter.TagEntity( - tagName, + new com.hivemq.configuration.entity.adapter.TagEntity(tagName, "description", Map.of("address", "test")); - final ProtocolAdapterEntity adapterEntity = new ProtocolAdapterEntity( - adapterId, + final ProtocolAdapterEntity adapterEntity = new ProtocolAdapterEntity(adapterId, "opcua", 1, Map.of(), @@ -513,8 +592,7 @@ void testUpdateTagWithoutRename() { when(protocolAdapterExtractor.getAdapterByAdapterId(adapterId)).thenReturn(Optional.of(adapterEntity)); when(protocolAdapterExtractor.updateAdapter(any())).thenReturn(true); - final com.hivemq.edge.api.model.DomainTag updatedTag = new com.hivemq.edge.api.model.DomainTag() - .name(tagName) + final com.hivemq.edge.api.model.DomainTag updatedTag = new com.hivemq.edge.api.model.DomainTag().name(tagName) .description("updated description") .definition(objectMapper.valueToTree(Map.of("address", "new-address"))); @@ -532,8 +610,7 @@ void testBulkUpdateRemovingTagInUse() { final String tag2Name = "pressure"; final com.hivemq.configuration.entity.adapter.NorthboundMappingEntity northboundMapping = - new com.hivemq.configuration.entity.adapter.NorthboundMappingEntity( - tag1Name, + new com.hivemq.configuration.entity.adapter.NorthboundMappingEntity(tag1Name, "test/topic", 1, null, @@ -543,19 +620,16 @@ void testBulkUpdateRemovingTagInUse() { null); final com.hivemq.configuration.entity.adapter.TagEntity tag1Entity = - new com.hivemq.configuration.entity.adapter.TagEntity( - tag1Name, + new com.hivemq.configuration.entity.adapter.TagEntity(tag1Name, "description", Map.of("address", "test1")); final com.hivemq.configuration.entity.adapter.TagEntity tag2Entity = - new com.hivemq.configuration.entity.adapter.TagEntity( - tag2Name, + new com.hivemq.configuration.entity.adapter.TagEntity(tag2Name, "description", Map.of("address", "test2")); - final ProtocolAdapterEntity adapterEntity = new ProtocolAdapterEntity( - adapterId, + final ProtocolAdapterEntity adapterEntity = new ProtocolAdapterEntity(adapterId, "opcua", 1, Map.of(), @@ -566,9 +640,8 @@ void testBulkUpdateRemovingTagInUse() { when(protocolAdapterExtractor.getAdapterByAdapterId(adapterId)).thenReturn(Optional.of(adapterEntity)); // Only include tag2 in the new list (removing tag1 which is in use) - final DomainTagList newTagList = new DomainTagList() - .items(List.of(new com.hivemq.edge.api.model.DomainTag() - .name(tag2Name) + final DomainTagList newTagList = + new DomainTagList().items(List.of(new com.hivemq.edge.api.model.DomainTag().name(tag2Name) .description("description") .definition(objectMapper.valueToTree(Map.of("address", "test2"))))); @@ -586,19 +659,16 @@ void testBulkUpdateRemovingTagNotInUse() { final String tag2Name = "pressure"; final com.hivemq.configuration.entity.adapter.TagEntity tag1Entity = - new com.hivemq.configuration.entity.adapter.TagEntity( - tag1Name, + new com.hivemq.configuration.entity.adapter.TagEntity(tag1Name, "description", Map.of("address", "test1")); final com.hivemq.configuration.entity.adapter.TagEntity tag2Entity = - new com.hivemq.configuration.entity.adapter.TagEntity( - tag2Name, + new com.hivemq.configuration.entity.adapter.TagEntity(tag2Name, "description", Map.of("address", "test2")); - final ProtocolAdapterEntity adapterEntity = new ProtocolAdapterEntity( - adapterId, + final ProtocolAdapterEntity adapterEntity = new ProtocolAdapterEntity(adapterId, "opcua", 1, Map.of(), @@ -610,9 +680,8 @@ void testBulkUpdateRemovingTagNotInUse() { when(protocolAdapterExtractor.updateAdapter(any())).thenReturn(true); // Only include tag2 in the new list (removing tag1 which is NOT in use) - final DomainTagList newTagList = new DomainTagList() - .items(List.of(new com.hivemq.edge.api.model.DomainTag() - .name(tag2Name) + final DomainTagList newTagList = + new DomainTagList().items(List.of(new com.hivemq.edge.api.model.DomainTag().name(tag2Name) .description("description") .definition(objectMapper.valueToTree(Map.of("address", "test2")))));