diff --git a/.github/workflows/argo.yml b/.github/workflows/argo.yml index 2d25b18861..d191c579ef 100644 --- a/.github/workflows/argo.yml +++ b/.github/workflows/argo.yml @@ -35,7 +35,7 @@ on: - E2E-A/E2E-B - int-a/int-b testdata_version: - description: Which Testdata Version CX_Testdata_MessagingTest_v.json e.g., 1.1.12" + description: Which Testdata Version CX_Testdata_MessagingTest_v.json e.g., 0.0.12" required: true argo_token: description: Argo Token @@ -47,6 +47,13 @@ on: options: - Yes - No + testdata_upload: + type: choice + description: Do you want a testdata upload? + required: true + options: + - Yes + - No env: ARGO_TEST_REGISTRY: "https://argo.dev.demo.catena-x.net/api/v1/applications/tracex-dt-registry-test" @@ -358,22 +365,27 @@ jobs: run: | python -m pip install requests curl -o transform-and-upload.py https://raw.githubusercontent.com/catenax-ng/tx-item-relationship-service/main/local/testing/testdata/transform-and-upload.py - if [ "${{ github.event.inputs.environment }}" == "Dev/Test" ]; then - python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://traceability-test.dev.demo.catena-x.net/api/submodel -edc https://trace-x-test-edc.dev.demo.catena-x.net -a https://trace-x-registry-test.dev.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-test-edc-dataplane.dev.demo.catena-x.net -p id-3.0-trace -k ${{ secrets.TRACE_X_API_KEY_DEV }} --aas3 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC - sleep 10 - python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://traceability.dev.demo.catena-x.net/api/submodel -edc https://trace-x-edc.dev.demo.catena-x.net -a https://trace-x-registry.dev.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-dataplane.dev.demo.catena-x.net -p id-3.0-trace -k ${{ secrets.TRACE_X_API_KEY_DEV }} --aas3 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC - sleep 10 - elif [ "${{ github.event.inputs.environment }}" == "E2E-A/E2E-B" ]; then - python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://traceability-e2e-a.dev.demo.catena-x.net/api/submodel -edc https://trace-x-edc-e2e-a.dev.demo.catena-x.net -a https://trace-x-registry-e2e-a.dev.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-e2e-a-dataplane.dev.demo.catena-x.net -p id-3.0-trace -k ${{ secrets.TRACE_X_API_KEY_DEV }} --aas3 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC - sleep 10 - python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://traceability-e2e-b.dev.demo.catena-x.net/api/submodel -edc https://trace-x-edc-e2e-b.dev.demo.catena-x.net -a https://trace-x-registry-e2e-b.dev.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-e2e-b-dataplane.dev.demo.catena-x.net -p id-3.0-trace -k ${{ secrets.TRACE_X_API_KEY_DEV }} --aas3 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC - sleep 10 - elif [ "${{ github.event.inputs.environment }}" == "int-a/int-b" ]; then - python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://traceability-int-a.int.demo.catena-x.net/api/submodel -edc https://trace-x-edc-int-a.int.demo.catena-x.net -a https://trace-x-registry-int-a.int.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-int-a-dataplane.int.demo.catena-x.net -p id-3.0-trace -k ${{ secrets.TRACE_X_API_KEY_INT_A }} --aas3 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC BPNL00000003AZQP BPNL00000003CSGV - sleep 10 - python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://traceability-int-b.int.demo.catena-x.net/api/submodel -edc https://trace-x-edc-int-b.int.demo.catena-x.net -a https://trace-x-registry-int-b.int.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-int-b-dataplane.int.demo.catena-x.net -p id-3.0-trace -k ${{ secrets.TRACE_X_API_KEY_INT_B }} --aas3 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC BPNL00000003AZQP BPNL00000003CSGV - sleep 10 + if [ "${{ github.event.inputs.testdata_upload }}" == "true" ]; then + if [ "${{ github.event.inputs.environment }}" == "Dev/Test" ]; then + python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://traceability-test.dev.demo.catena-x.net/api/submodel -edc https://trace-x-test-edc.dev.demo.catena-x.net -a https://trace-x-registry-test.dev.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-test-edc-dataplane.dev.demo.catena-x.net -p id-3.0-trace -k ${{ secrets.TRACE_X_API_KEY_DEV }} --aas3 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC + sleep 10 + python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://traceability.dev.demo.catena-x.net/api/submodel -edc https://trace-x-edc.dev.demo.catena-x.net -a https://trace-x-registry.dev.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-dataplane.dev.demo.catena-x.net -p id-3.0-trace -k ${{ secrets.TRACE_X_API_KEY_DEV }} --aas3 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC + sleep 10 + elif [ "${{ github.event.inputs.environment }}" == "E2E-A/E2E-B" ]; then + python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://traceability-e2e-a.dev.demo.catena-x.net/api/submodel -edc https://trace-x-edc-e2e-a.dev.demo.catena-x.net -a https://trace-x-registry-e2e-a.dev.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-e2e-a-dataplane.dev.demo.catena-x.net -p id-3.0-trace -k ${{ secrets.TRACE_X_API_KEY_DEV }} --aas3 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC + sleep 10 + python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://traceability-e2e-b.dev.demo.catena-x.net/api/submodel -edc https://trace-x-edc-e2e-b.dev.demo.catena-x.net -a https://trace-x-registry-e2e-b.dev.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-e2e-b-dataplane.dev.demo.catena-x.net -p id-3.0-trace -k ${{ secrets.TRACE_X_API_KEY_DEV }} --aas3 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC + sleep 10 + elif [ "${{ github.event.inputs.environment }}" == "int-a/int-b" ]; then + python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://traceability-int-a.int.demo.catena-x.net/api/submodel -edc https://trace-x-edc-int-a.int.demo.catena-x.net -a https://trace-x-registry-int-a.int.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-int-a-dataplane.int.demo.catena-x.net -p id-3.0-trace -k ${{ secrets.TRACE_X_API_KEY_INT_A }} --aas3 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC BPNL00000003AZQP BPNL00000003CSGV + sleep 10 + python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://traceability-int-b.int.demo.catena-x.net/api/submodel -edc https://trace-x-edc-int-b.int.demo.catena-x.net -a https://trace-x-registry-int-b.int.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-int-b-dataplane.int.demo.catena-x.net -p id-3.0-trace -k ${{ secrets.TRACE_X_API_KEY_INT_B }} --aas3 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC BPNL00000003AZQP BPNL00000003CSGV + sleep 10 + fi + elif [ "${{ github.event.inputs.testdata_upload }}" == "false" ]; then + echo "Testdata upload skipped" fi + registry_reload: needs: - upload_testdata diff --git a/CHANGELOG.md b/CHANGELOG.md index 900631b0cc..f200b93194 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [UNRELEASED - DD.MM.YYYY] ### Added +- Added an option for testdata upload in Argo Workflow ### Changed - Restricted datefield on investigation creation to be only clickable and not editable - Removed duplication of request notification component and combined it into a reusable component @@ -20,8 +21,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - redesigned notification status confirmation modal - bump irs version from 6.9.1 to 6.12.0 +### Removed +- Removed registry lookups feature -## [10.0.0 - 12.12.2024] +## [10.0.0 - 12.12.2023] ### Added - new filtering capabilities ( receivedQualityAlertIdsInStatusActive, sentQualityAlertIdsInStatusActive, receivedQualityInvestigationIdsInStatusActive, sentQualityInvestigationIdsInStatusActive ) - Validation check if table-settings correct and reset on invalid state @@ -37,6 +40,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Added a step for testing input and included an option for a hard refresh in Argo Workflow - Added manufacturer_id to assets_as_planned - Added local filtering and auto complete for notifications +- Added a drag-and-drop option for JSON files and an endpoint to receive them ### Changed - Filter configuration for tables to be resuable and easy to adapt diff --git a/frontend/src/app/mocks/services/admin-mock/admin.handler.ts b/frontend/src/app/mocks/services/admin-mock/admin.handler.ts index bebfdeb267..eb418401e3 100644 --- a/frontend/src/app/mocks/services/admin-mock/admin.handler.ts +++ b/frontend/src/app/mocks/services/admin-mock/admin.handler.ts @@ -21,17 +21,11 @@ import { environment } from '@env'; import { rest } from 'msw'; -import { applyPagination, extractPagination } from '../pagination.helper'; -import { buildMockRegistryProcesses, getBpnConfig } from './admin.model'; +import { getBpnConfig } from './admin.model'; export const adminHandler = (_ => { - const mockRegistryProcesses = buildMockRegistryProcesses(); - return [ - rest.get(`*${ environment.apiUrl }/metrics/registry-lookup`, (req, res, ctx) => { - const pagination = extractPagination(req); - return res(ctx.status(200), ctx.json(applyPagination(mockRegistryProcesses, pagination))); - }), + return [ rest.post(`*${ environment.apiUrl }/bpn-config`, (req, res, ctx) => { return res(ctx.status(204)); diff --git a/frontend/src/app/mocks/services/admin-mock/admin.model.ts b/frontend/src/app/mocks/services/admin-mock/admin.model.ts index 0190a06635..e5c88037ae 100644 --- a/frontend/src/app/mocks/services/admin-mock/admin.model.ts +++ b/frontend/src/app/mocks/services/admin-mock/admin.model.ts @@ -19,32 +19,8 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { BpnConfigResponse, RegistryLookupStatus, RegistryProcessResponse } from '@page/admin/core/admin.model'; -import { getRandomIntFromInterval } from '../text-generator.helper'; +import { BpnConfigResponse} from '@page/admin/core/admin.model'; -export const buildMockRegistryProcesses = (): RegistryProcessResponse[] => - new Array(101).fill(null).map((_, index) => { - const status = Object.keys(RegistryLookupStatus) as RegistryLookupStatus[]; - const registryLookupStatus = status[index % 3]; - - const failedCount = registryLookupStatus === RegistryLookupStatus.SUCCESSFUL ? 0 : Math.floor(Math.random() * 100); - const successCount = registryLookupStatus === RegistryLookupStatus.ERROR ? 0 : Math.floor(Math.random() * 100); - - const numberToString = (i: number) => i.toString().padStart(2, '0'); - const month = index === 0 ? 1 : getRandomIntFromInterval(1, 11); - const day = index === 0 ? 1 : getRandomIntFromInterval(1, 28); - const year = index === 0 ? '2000' : '2022'; - - return { - registryLookupStatus, - startDate: `${ year }-${ numberToString(month) }-${ numberToString(day) }T12:34:12`, - endDate: `${ year }-${ numberToString(month + 1) }-${ numberToString(day) }T12:34:12`, - - successShellDescriptorsFetchCount: failedCount, - failedShellDescriptorsFetchCount: successCount, - shellDescriptorsFetchDelta: failedCount + successCount, - }; - }); export const getBpnConfig = (): BpnConfigResponse[] => [ { diff --git a/frontend/src/app/modules/core/api/api.service.ts b/frontend/src/app/modules/core/api/api.service.ts index 4c942a38af..1d263e581f 100644 --- a/frontend/src/app/modules/core/api/api.service.ts +++ b/frontend/src/app/modules/core/api/api.service.ts @@ -66,6 +66,15 @@ export class ApiService { }); } + public postFile( + url: string, + file: FormData, + ): Observable { + return this.httpClient.post(url, file, { + headers: this.buildHeadersForFile(), + }); + } + public put( url: string, body?: Record | unknown, @@ -109,4 +118,11 @@ export class ApiService { Authorization: this.authService.getBearerToken(), }); } + + + private buildHeadersForFile(): HttpHeaders { + return new HttpHeaders({ + Authorization: this.authService.getBearerToken(), + }); + } } diff --git a/frontend/src/app/modules/page/admin/admin.module.ts b/frontend/src/app/modules/page/admin/admin.module.ts index ce0858df63..b23b01f174 100644 --- a/frontend/src/app/modules/page/admin/admin.module.ts +++ b/frontend/src/app/modules/page/admin/admin.module.ts @@ -24,20 +24,19 @@ import { NgModule } from '@angular/core'; import { getI18nPageProvider } from '@core/i18n'; import { AdminFacade } from '@page/admin/core/admin.facade'; import { AdminService } from '@page/admin/core/admin.service'; -import { AdminState } from '@page/admin/core/admin.state'; import { SharedModule } from '@shared/shared.module'; import { TemplateModule } from '@shared/template.module'; import { AdminRoutingModule } from './admin.routing'; import { AdminComponent } from './presentation/admin.component'; -import { ScheduledRegistryProcessesComponent } from './presentation/scheduled-registry-processes/scheduled-registry-processes.component'; import { BpnConfigurationComponent } from './presentation/bpn-configuration/bpn-configuration.component'; import { SaveBpnConfigModal } from './presentation/bpn-configuration/save-modal/save-modal.component'; import { ModalModule } from '@shared/modules/modal/modal.module'; +import { ImportJsonComponent } from './presentation/import-json/import-json.component'; @NgModule({ - declarations: [ AdminComponent, ScheduledRegistryProcessesComponent, BpnConfigurationComponent, SaveBpnConfigModal ], + declarations: [ AdminComponent, BpnConfigurationComponent, SaveBpnConfigModal, ImportJsonComponent ], imports: [ CommonModule, TemplateModule, SharedModule, AdminRoutingModule, ModalModule ], - providers: [ ...getI18nPageProvider('page.admin'), AdminService, AdminFacade, AdminState ], + providers: [ ...getI18nPageProvider('page.admin'), AdminService, AdminFacade ], }) export class AdminModule { } diff --git a/frontend/src/app/modules/page/admin/admin.routing.ts b/frontend/src/app/modules/page/admin/admin.routing.ts index acaa53660a..f42a40af93 100644 --- a/frontend/src/app/modules/page/admin/admin.routing.ts +++ b/frontend/src/app/modules/page/admin/admin.routing.ts @@ -22,9 +22,9 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { I18NEXT_NAMESPACE_RESOLVER } from 'angular-i18next'; -import { ScheduledRegistryProcessesComponent } from '@page/admin/presentation/scheduled-registry-processes/scheduled-registry-processes.component'; -import { KnownAdminRouts } from '@page/admin/core/admin.model'; +import { KnownAdminRoutes } from '@page/admin/core/admin.model'; import { BpnConfigurationComponent } from '@page/admin/presentation/bpn-configuration/bpn-configuration.component'; +import { ImportJsonComponent } from '@page/admin/presentation/import-json/import-json.component'; import { RoleGuard } from '@core/user/role.guard'; export /** @type {*} */ @@ -32,22 +32,22 @@ const ADMIN_ROUTING: Routes = [ { path: '', pathMatch: 'full', - redirectTo: KnownAdminRouts.REGISTRY, + redirectTo: KnownAdminRoutes.BPN, }, { - path: KnownAdminRouts.REGISTRY, + path: KnownAdminRoutes.BPN, pathMatch: 'full', - component: ScheduledRegistryProcessesComponent, + component: BpnConfigurationComponent, data: { i18nextNamespaces: [ 'page.admin' ] }, resolve: { i18next: I18NEXT_NAMESPACE_RESOLVER }, + canActivate: [ RoleGuard ], }, { - path: KnownAdminRouts.BPN, + path: KnownAdminRoutes.IMPORT, pathMatch: 'full', - component: BpnConfigurationComponent, + component: ImportJsonComponent, data: { i18nextNamespaces: [ 'page.admin' ] }, resolve: { i18next: I18NEXT_NAMESPACE_RESOLVER }, - canActivate: [ RoleGuard ], }, ]; diff --git a/frontend/src/app/modules/page/admin/core/admin.assembler.ts b/frontend/src/app/modules/page/admin/core/admin.assembler.ts index f361668470..d540021d3a 100644 --- a/frontend/src/app/modules/page/admin/core/admin.assembler.ts +++ b/frontend/src/app/modules/page/admin/core/admin.assembler.ts @@ -19,24 +19,13 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { CalendarDateModel } from '@core/model/calendar-date.model'; -import { Pagination, PaginationResponse } from '@core/model/pagination.model'; -import { PaginationAssembler } from '@core/pagination/pagination.assembler'; -import { BpnConfig, BpnConfigResponse, RegistryProcess, RegistryProcessResponse } from '@page/admin/core/admin.model'; -import _deepClone from 'lodash-es/cloneDeep'; + +import { BpnConfig, BpnConfigResponse} from '@page/admin/core/admin.model'; + export class AdminAssembler { - public static AssembleRegistryProcess(registryProcess: RegistryProcessResponse): RegistryProcess { - const clonedProcess = _deepClone(registryProcess); - const { startDate, endDate } = clonedProcess; - return { ...clonedProcess, startDate: new CalendarDateModel(startDate), endDate: new CalendarDateModel(endDate) }; - } - public static assemblePaginationRegistryProcess( - data: PaginationResponse, - ): Pagination { - return PaginationAssembler.assemblePagination(AdminAssembler.AssembleRegistryProcess, data); - } + public static assembleBpnConfig(data: BpnConfigResponse[]): BpnConfig[] { return data.map(({ bpn, url }) => ({ bpn, url })); diff --git a/frontend/src/app/modules/page/admin/core/admin.facade.ts b/frontend/src/app/modules/page/admin/core/admin.facade.ts index c53092611b..639df85220 100644 --- a/frontend/src/app/modules/page/admin/core/admin.facade.ts +++ b/frontend/src/app/modules/page/admin/core/admin.facade.ts @@ -20,38 +20,13 @@ ********************************************************************************/ import { Injectable } from '@angular/core'; -import { Pagination } from '@core/model/pagination.model'; -import { BpnConfig, RegistryProcess } from '@page/admin/core/admin.model'; +import { BpnConfig } from '@page/admin/core/admin.model'; import { AdminService } from '@page/admin/core/admin.service'; -import { AdminState } from '@page/admin/core/admin.state'; -import { TableHeaderSort } from '@shared/components/table/table.model'; -import { View } from '@shared/model/view.model'; -import _deepClone from 'lodash-es/cloneDeep'; -import { Observable, Subscription } from 'rxjs'; +import { Observable} from 'rxjs'; @Injectable() export class AdminFacade { - private scheduledRegistryProcessesSubscription: Subscription; - - constructor(private readonly adminState: AdminState, private readonly adminService: AdminService) { - } - - public get scheduledRegistryProcesses$(): Observable>> { - return this.adminState.scheduledRegistryProcesses$; - } - - public set scheduledRegistryProcesses(view: View>) { - this.adminState.scheduledRegistryProcesses = _deepClone(view); - } - - public setScheduledRegistryProcesses(page = 0, pageSize = 50, sorting: TableHeaderSort = null) { - this.scheduledRegistryProcessesSubscription?.unsubscribe(); - this.scheduledRegistryProcessesSubscription = this.adminService - .getScheduledRegistryProcesses(page, pageSize, sorting) - .subscribe({ - next: data => (this.adminState.scheduledRegistryProcesses = { data }), - error: error => (this.adminState.scheduledRegistryProcesses = { error }), - }); + constructor( private readonly adminService: AdminService) { } public createBpnFallbackConfig(bpnConfig: BpnConfig[]): Observable { @@ -69,4 +44,8 @@ export class AdminFacade { public deleteBpnFallbackConfig(bpnId: string): Observable { return this.adminService.deleteBpnFallbackConfig(bpnId); } + + public postJsonImport(file: File): Observable{ + return this.adminService.postJsonFile(file); + } } diff --git a/frontend/src/app/modules/page/admin/core/admin.model.ts b/frontend/src/app/modules/page/admin/core/admin.model.ts index bc6cce4489..b59466db84 100644 --- a/frontend/src/app/modules/page/admin/core/admin.model.ts +++ b/frontend/src/app/modules/page/admin/core/admin.model.ts @@ -19,37 +19,15 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { CalendarDateModel } from '@core/model/calendar-date.model'; + import { FormArray, FormControl, FormGroup } from '@angular/forms'; -export enum KnownAdminRouts { - REGISTRY = 'registry-lookups', +export enum KnownAdminRoutes { BPN = 'configure-bpn', + IMPORT = 'configure-import' } -export interface RegistryProcess { - startDate: CalendarDateModel; - registryLookupStatus: RegistryLookupStatus; - successShellDescriptorsFetchCount: number; - failedShellDescriptorsFetchCount: number; - shellDescriptorsFetchDelta: number; - endDate: CalendarDateModel; -} -export interface RegistryProcessResponse { - startDate: string; // ISO8601 - registryLookupStatus: RegistryLookupStatus; - successShellDescriptorsFetchCount: number; - failedShellDescriptorsFetchCount: number; - shellDescriptorsFetchDelta: number; - endDate: string; // ISO8601 -} - -export enum RegistryLookupStatus { - SUCCESSFUL = 'SUCCESSFUL', - PARTIALLY_SUCCESS = 'PARTIALLY_SUCCESS', - ERROR = 'ERROR', -} export interface BpnConfigResponse { organization?: string; diff --git a/frontend/src/app/modules/page/admin/core/admin.service.ts b/frontend/src/app/modules/page/admin/core/admin.service.ts index 0b3e3f2d09..53b16b00a8 100644 --- a/frontend/src/app/modules/page/admin/core/admin.service.ts +++ b/frontend/src/app/modules/page/admin/core/admin.service.ts @@ -19,14 +19,11 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { HttpParams } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { ApiService } from '@core/api/api.service'; -import { Pagination } from '@core/model/pagination.model'; import { environment } from '@env'; import { AdminAssembler } from '@page/admin/core/admin.assembler'; -import { BpnConfig, BpnConfigResponse, RegistryProcess, RegistryProcessResponse } from '@page/admin/core/admin.model'; -import { TableHeaderSort } from '@shared/components/table/table.model'; +import { BpnConfig, BpnConfigResponse} from '@page/admin/core/admin.model'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; @@ -37,18 +34,6 @@ export class AdminService { constructor(private readonly apiService: ApiService) { } - public getScheduledRegistryProcesses( - page: number, - pageSize: number, - sorting: TableHeaderSort, - ): Observable> { - const sort = sorting ? `${ sorting[0] },${ sorting[1] }` : ''; - const params = new HttpParams().set('page', page).set('size', pageSize).set('sort', sort); - - return this.apiService - .getBy>(`${ this.url }/metrics/registry-lookup`, params) - .pipe(map(data => AdminAssembler.assemblePaginationRegistryProcess(data))); - } public createBpnFallbackConfig(bpnConfig: BpnConfig[]): Observable { return this.apiService.post(`${ this.url }/bpn-config`, bpnConfig); @@ -67,4 +52,10 @@ export class AdminService { public deleteBpnFallbackConfig(bpn: string): Observable { return this.apiService.delete(`${ this.url }/bpn-config/${ bpn }`); } + + public postJsonFile(file: File): Observable{ + const formData = new FormData(); + formData.append('file', file); + return this.apiService.postFile(`${ this.url }/assets/import`, formData); + } } diff --git a/frontend/src/app/modules/page/admin/core/admin.state.ts b/frontend/src/app/modules/page/admin/core/admin.state.ts deleted file mode 100644 index ffcd1ce8a8..0000000000 --- a/frontend/src/app/modules/page/admin/core/admin.state.ts +++ /dev/null @@ -1,40 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2022, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * Copyright (c) 2022, 2023 ZF Friedrichshafen AG - * Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation - * - * See the NOTICE file(s) distributed with this work for additional - * information regarding copyright ownership. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://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. - * - * SPDX-License-Identifier: Apache-2.0 - ********************************************************************************/ - -import { Injectable } from '@angular/core'; -import { Pagination } from '@core/model/pagination.model'; -import { RegistryProcess } from '@page/admin/core/admin.model'; -import { State } from '@shared/model/state'; -import { View } from '@shared/model/view.model'; -import { Observable } from 'rxjs'; - -@Injectable() -export class AdminState { - private readonly _scheduledRegistryProcesses$ = new State>>({ loader: true }); - - public get scheduledRegistryProcesses$(): Observable>> { - return this._scheduledRegistryProcesses$.observable; - } - - public set scheduledRegistryProcesses(view: View>) { - this._scheduledRegistryProcesses$.update(view); - } -} diff --git a/frontend/src/app/modules/page/admin/presentation/admin.component.ts b/frontend/src/app/modules/page/admin/presentation/admin.component.ts index 670f5cd818..1ddd34edc4 100644 --- a/frontend/src/app/modules/page/admin/presentation/admin.component.ts +++ b/frontend/src/app/modules/page/admin/presentation/admin.component.ts @@ -37,16 +37,16 @@ export class AdminComponent { link: string; role?: Role; }[] = [ - { - name: 'routing.adminRegistry', - icon: 'storage', - link: '/admin/registry-lookups', - }, { name: 'routing.adminBpn', icon: 'edit', link: '/admin/configure-bpn', }, + { + name: 'routing.adminImport', + icon: 'upload', + link: '/admin/configure-import', + }, ]; constructor(router: Router) { diff --git a/frontend/src/app/modules/page/admin/presentation/import-json/import-json.component.html b/frontend/src/app/modules/page/admin/presentation/import-json/import-json.component.html new file mode 100644 index 0000000000..8a00d84a8e --- /dev/null +++ b/frontend/src/app/modules/page/admin/presentation/import-json/import-json.component.html @@ -0,0 +1,47 @@ + + + + +

{{ 'pageAdmin.importJson.title' | i18n }}

+
+ +
+
+ upload + +

{{ 'pageAdmin.importJson.Drag_and_Drop' | i18n }}

+

{{ 'pageAdmin.importJson.or' | i18n }}

+
+

{{ 'pageAdmin.importJson.browseFiles' | i18n }}

+
+

{{ 'pageAdmin.importJson.error' | i18n }}

+
+ +
+ upload_file +

{{file.name}}

+ {{ 'pageAdmin.importJson.clear_file' | i18n }} + {{ 'pageAdmin.importJson.upload_file' | i18n }} +
+
+
+
diff --git a/frontend/src/app/modules/page/admin/presentation/import-json/import-json.component.scss b/frontend/src/app/modules/page/admin/presentation/import-json/import-json.component.scss new file mode 100644 index 0000000000..4ab9dbd114 --- /dev/null +++ b/frontend/src/app/modules/page/admin/presentation/import-json/import-json.component.scss @@ -0,0 +1,149 @@ +/******************************************************************************** + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://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. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +.import-json { + .file-container_drag_and_drop { + width: 300px; + height: 200px; + padding: 2rem; + text-align: center; + border: dashed 2px #979797; + position: relative; + margin-left: 10px; + margin-top: 15px; + + input { + opacity: 0; + position: absolute; + z-index: 2; + width: 100%; + height: 100%; + top: 0; + left: 0; + } + + .file { + opacity: 0; + padding: 5rem; + width: auto; + text-align: center; + height: 5rem; + } + + h4 { + font-family: "Roboto", sans-serif; + font-size: 18px; + color: #5f6982; + } + + .or { + font-family: "Roboto", sans-serif; + font-size: 13px; + color: dimgrey; + position: relative; + } + + .or::before, + .or::after { + content: ""; + display: inline-block; + width: 25%; + height: 0.7px; + background-color: lightgray; + position: absolute; + top: 50%; + transform: translateY(-50%); + } + + .or::before { + left: +19%; + } + + .or::after { + right: +19%; + } + + .text-box { + width: 110px; + padding: 8px; + display: inline-block; + font-family: "Roboto", sans-serif; + border: 1px solid #454cad; + background-color: #ffffff; + border-radius: 20px; + margin-top: 5px; + + .text-box-p { + font-family: "Roboto", sans-serif; + font-size: 14px; + color: #454cad; + border-radius: 15px; + } + + } + + .error-message { + font-family: "Roboto", sans-serif; + color: red; + margin-top: 5px; + } + } + + .file-container_upload_file { + width: 300px; + height: 200px; + padding: 2rem; + text-align: center; + border: dashed 2px #979797; + margin-left: 10px; + margin-top: 15px; + position: relative; + + .custom-button_upload, + .custom-button_clear { + flex-grow: 1; + padding: 8px; + margin: 0 5px; + position: absolute; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + box-sizing: border-box; + font-size: 100%; + max-width: 145px; + } + + .custom-button_upload { + left: 0; + } + + .custom-button_clear { + right: 0; + } + + .icon_uploadFile { + font-size: 25px; + margin-bottom: 8px; + } + + .file-name { + margin-bottom: 10px; + } + } +} diff --git a/frontend/src/app/modules/page/admin/presentation/import-json/import-json.component.spec.ts b/frontend/src/app/modules/page/admin/presentation/import-json/import-json.component.spec.ts new file mode 100644 index 0000000000..7416b3dd66 --- /dev/null +++ b/frontend/src/app/modules/page/admin/presentation/import-json/import-json.component.spec.ts @@ -0,0 +1,117 @@ +/******************************************************************************** + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://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. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + + +import { AdminModule } from '@page/admin/admin.module'; +import { ImportJsonComponent } from '@page/admin/presentation/import-json/import-json.component'; +import { screen, waitFor } from '@testing-library/angular'; +import { renderComponent } from '@tests/test-render.utils'; + +fdescribe('ImportJsonComponent', () => { + const jsonFileContent = { + key1: 'value1', + key2: 'value2', + key3: { + nestedKey: 'nestedValue', + nestedArray: [1, 2, 3], + }, + }; + + const jsonString = JSON.stringify(jsonFileContent, null, 2); + + + const createJsonFile = (fileName: string, fileType: string) => { + const jsonBlob = new Blob([jsonString], { type: fileType }); + return new File([jsonBlob], fileName, { type: fileType }); + }; + const jsonFile = createJsonFile('example.json', 'application/json'); + const renderComponentWithJsonFile = async (jsonFile: File, showError: boolean = false) => { + return renderComponent(ImportJsonComponent, { + imports: [AdminModule], + }); + }; + + + + it('should get the json-file', async () => { + const jsonFile = createJsonFile('example.json', 'application/json'); + const { fixture } = await renderComponentWithJsonFile(jsonFile, false); + + const { componentInstance } = fixture; + const event = { target: { files: [jsonFile] } }; + + // Act + componentInstance.getFile(event); + + // Assert + expect(componentInstance.showError).toBe(false); + expect(componentInstance.file).toBeTruthy(); + }); + + it('should show error Message', async () => { + const File = createJsonFile('example.pdf', 'application/pdf'); + const { fixture } = await renderComponentWithJsonFile(File, false); + + const { componentInstance } = fixture; + const event = { target: { files: [File] } }; + + // Act + componentInstance.getFile(event); + + // Assert + expect(componentInstance.showError).toBe(true); + expect(componentInstance.file).toBeTruthy(); + expect(await waitFor(() => screen.getByText('pageAdmin.importJson.error'))).toBeInTheDocument(); + }); + + it('should clear the json-file', async () => { + const { fixture } = await renderComponentWithJsonFile(jsonFile, false); + + const { componentInstance } = fixture; + const event = { target: { files: [jsonFile] } }; + + // Arrange + componentInstance.getFile(event); + + // Act + componentInstance.clearFile(); + + // Assert + expect(componentInstance.showError).toBe(false); + expect(componentInstance.file).toBeFalsy(); + }); + + it('should show FileContainer_upload_file', async () => { + + const { fixture } = await renderComponentWithJsonFile(jsonFile, false); + + const { componentInstance } = fixture; + const event = { target: { files: [jsonFile] } }; + + // Arrange + componentInstance.getFile(event); + + // Assert + expect(componentInstance.showError).toBe(false); + expect(componentInstance.file).toBeTruthy(); + expect(componentInstance.shouldShowFileContainer_upload_file(jsonFile)).toBe(true); + expect(componentInstance.getFileExtension(jsonFile)).toEqual('json') + + }) +}); diff --git a/frontend/src/app/modules/page/admin/presentation/import-json/import-json.component.ts b/frontend/src/app/modules/page/admin/presentation/import-json/import-json.component.ts new file mode 100644 index 0000000000..b9216c3871 --- /dev/null +++ b/frontend/src/app/modules/page/admin/presentation/import-json/import-json.component.ts @@ -0,0 +1,68 @@ +/******************************************************************************** + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://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. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +import { Component, Input } from '@angular/core'; +import { AdminFacade } from '@page/admin/core/admin.facade'; +import { ToastService } from '@shared/components/toasts/toast.service'; + +@Component({ + selector: 'app-import-json', + templateUrl: 'import-json.component.html', + styleUrls: [ './import-json.component.scss' ], +}) +export class ImportJsonComponent { + @Input() showError = false; + @Input() file: File; + + constructor(private readonly adminFacade: AdminFacade, private readonly toastService: ToastService) { + } + + public getFile(event: any) { + this.file = event.target.files[0]; + + if ('json' !== this.getFileExtension(this.file)) { + this.showError = true; + return; + } + this.showError = false; + } + public uploadFile(file: File) { + this.adminFacade.postJsonImport(file).subscribe(response => { + this.toastService.success('pageAdmin.importJson.success'); + }); + } + + public clearFile(): void { + this.file = undefined; + this.showError = false; + } + + public shouldShowFileContainer_upload_file(file: File): boolean { + return this.file && 'json' === this.getFileExtension(file); + } + + public getFileExtension(file: File): string { + if (file) { + const fileNameParts = file?.name?.split('.'); + return fileNameParts[fileNameParts.length - 1].toLowerCase(); + } + return null; + } + +} diff --git a/frontend/src/app/modules/page/admin/presentation/scheduled-registry-processes/scheduled-registry-processes.component.html b/frontend/src/app/modules/page/admin/presentation/scheduled-registry-processes/scheduled-registry-processes.component.html deleted file mode 100644 index 79d47807cc..0000000000 --- a/frontend/src/app/modules/page/admin/presentation/scheduled-registry-processes/scheduled-registry-processes.component.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - -

{{ 'pageAdmin.scheduledRegistryProcesses.title' | i18n }}

-
- - - - - - - - - - - - - -
diff --git a/frontend/src/app/modules/page/admin/presentation/scheduled-registry-processes/scheduled-registry-processes.component.spec.ts b/frontend/src/app/modules/page/admin/presentation/scheduled-registry-processes/scheduled-registry-processes.component.spec.ts deleted file mode 100644 index 20194173a0..0000000000 --- a/frontend/src/app/modules/page/admin/presentation/scheduled-registry-processes/scheduled-registry-processes.component.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2022, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * Copyright (c) 2022, 2023 ZF Friedrichshafen AG - * Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation - * - * See the NOTICE file(s) distributed with this work for additional - * information regarding copyright ownership. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://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. - * - * SPDX-License-Identifier: Apache-2.0 - ********************************************************************************/ - -import { AdminModule } from '@page/admin/admin.module'; -import { screen, waitFor } from '@testing-library/angular'; -import { renderComponent } from '@tests/test-render.utils'; -import { ScheduledRegistryProcessesComponent } from './scheduled-registry-processes.component'; - -describe('ScheduledRegistryProcessesComponent', () => { - const renderRegistryProcessesComponent = () => - renderComponent(ScheduledRegistryProcessesComponent, { imports: [ AdminModule ] }); - - it('should create', async () => { - await renderRegistryProcessesComponent(); - - expect(await screen.getByText('pageAdmin.scheduledRegistryProcesses.title')).toBeInTheDocument(); - }); - - it('should render data', async () => { - await renderRegistryProcessesComponent(); - await waitFor(() => expect(screen.getByText('1/1/00')).toBeInTheDocument()); - await waitFor(() => expect(screen.getByText('2/1/00')).toBeInTheDocument()); - }); -}); diff --git a/frontend/src/app/modules/page/admin/presentation/scheduled-registry-processes/scheduled-registry-processes.component.ts b/frontend/src/app/modules/page/admin/presentation/scheduled-registry-processes/scheduled-registry-processes.component.ts deleted file mode 100644 index f1b3a9f8bb..0000000000 --- a/frontend/src/app/modules/page/admin/presentation/scheduled-registry-processes/scheduled-registry-processes.component.ts +++ /dev/null @@ -1,78 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2022, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * Copyright (c) 2022, 2023 ZF Friedrichshafen AG - * Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation - * - * See the NOTICE file(s) distributed with this work for additional - * information regarding copyright ownership. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://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. - * - * SPDX-License-Identifier: Apache-2.0 - ********************************************************************************/ - -import { AfterViewInit, Component, OnInit } from '@angular/core'; -import { Pagination } from '@core/model/pagination.model'; -import { AdminFacade } from '@page/admin/core/admin.facade'; -import { RegistryProcess } from '@page/admin/core/admin.model'; -import { CreateHeaderFromColumns, TableConfig, TableEventConfig } from '@shared/components/table/table.model'; -import { View } from '@shared/model/view.model'; -import { StaticIdService } from '@shared/service/staticId.service'; -import { Observable } from 'rxjs'; - -@Component({ - selector: 'app-scheduled-registry-processes', - templateUrl: './scheduled-registry-processes.component.html', -}) -export class ScheduledRegistryProcessesComponent implements OnInit, AfterViewInit { - public readonly titleId = this.staticIdService.generateId('AdminComponent.title'); - public tableConfig: TableConfig; - - public readonly scheduledRegistryProcesses$: Observable>>; - - constructor(private readonly adminFacade: AdminFacade, private readonly staticIdService: StaticIdService) { - this.scheduledRegistryProcesses$ = this.adminFacade.scheduledRegistryProcesses$; - } - - public ngOnInit(): void { - this.adminFacade.setScheduledRegistryProcesses(); - } - - public ngAfterViewInit(): void { - const displayedColumns = [ - 'startDate', - 'endDate', - 'registryLookupStatus', - 'successShellDescriptorsFetchCount', - 'failedShellDescriptorsFetchCount', - 'shellDescriptorsFetchDelta', - ]; - - const sortableColumns = { - startDate: true, - endDate: true, - registryLookupStatus: true, - successShellDescriptorsFetchCount: true, - failedShellDescriptorsFetchCount: true, - shellDescriptorsFetchDelta: true, - }; - - this.tableConfig = { - displayedColumns, - sortableColumns, - header: CreateHeaderFromColumns(displayedColumns, 'table.adminColumn'), - }; - } - - public onTableConfigChange({ page, pageSize, sorting }: TableEventConfig): void { - this.adminFacade.setScheduledRegistryProcesses(page, pageSize, sorting); - } -} diff --git a/frontend/src/assets/locales/de/common.json b/frontend/src/assets/locales/de/common.json index 3e653274c5..20bec30612 100644 --- a/frontend/src/assets/locales/de/common.json +++ b/frontend/src/assets/locales/de/common.json @@ -10,7 +10,6 @@ "admin": "Verwaltung", "investigations": "Qualitätsuntersuchung", "alerts": "Qualitätswarnung", - "adminRegistry": "Registry-Abfragen", "adminBpn": "BPN - EDC Konfiguration" }, "pageTitle": { @@ -69,14 +68,6 @@ "alert": "Qualitätswarnung", "investigation": "Qualitätsuntersuchung" }, - "adminColumn": { - "startDate": "Startdatum", - "registryLookupStatus": "Status", - "successShellDescriptorsFetchCount": "Erfolgreiche Abrufe", - "failedShellDescriptorsFetchCount": "Fehlgeschlagene Abrufe", - "shellDescriptorsFetchDelta": "Abruf-Delta", - "endDate": "Enddatum" - }, "column": { "id": "ID", "idShort": "Kurz-ID", diff --git a/frontend/src/assets/locales/de/page.admin.json b/frontend/src/assets/locales/de/page.admin.json index ccdfba466b..4a1c4ecc21 100644 --- a/frontend/src/assets/locales/de/page.admin.json +++ b/frontend/src/assets/locales/de/page.admin.json @@ -1,8 +1,5 @@ { "pageAdmin": { - "scheduledRegistryProcesses": { - "title": "Registry-Abfragen" - }, "bpnConfig": { "title": "BPN - EDC Konfiguration", "intro": "Das BPN zu EDC URL Mapping wird als weitere Quelle für den Versand von Notifications verwendet. Erste Quelle ist der Discovery Service, zweite Quelle das hier hinterlegte Mapping. Zum Hinterlegen der weiteren Quelle bitte eine BPN und die dazugehörige EDC URL, die für das Versenden von Notifications an den Partner verwendet werden soll, einfügen.", @@ -20,6 +17,16 @@ "successfullySaved": "Ihre Änderungen wurden erfolgreich gespeichert.", "failedSave": "Beim Speichern ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut." } + }, + "importJson": { + "title": "Importieren - Json Datei", + "clear_file": "Datei löschen", + "upload_file": "Datei hochladen", + "error": "Warnung: Bitte benutzen Sie eine Json Datei", + "Drag_and_Drop": "Datei hineinziehen", + "or": "oder", + "browseFiles": "Dateien durchsuchen", + "success": "Erfolgreich hochgeladen." } } } diff --git a/frontend/src/assets/locales/en/common.json b/frontend/src/assets/locales/en/common.json index ffb0caa425..8f138fd440 100644 --- a/frontend/src/assets/locales/en/common.json +++ b/frontend/src/assets/locales/en/common.json @@ -10,7 +10,6 @@ "admin": "Administration", "investigations": "Quality investigations", "alerts": "Quality alerts", - "adminRegistry": "Registry lookups", "adminBpn": "BPN - EDC configuration" }, "pageTitle": { @@ -69,14 +68,6 @@ "alert": "Quality Alert", "investigation": "Quality Investigation" }, - "adminColumn": { - "startDate": "Start date", - "registryLookupStatus": "Status", - "successShellDescriptorsFetchCount": "Successful fetches", - "failedShellDescriptorsFetchCount": "Failed fetches", - "shellDescriptorsFetchDelta": "Fetch Delta", - "endDate": "End date" - }, "column": { "id": "ID", "idShort": "ID Short", diff --git a/frontend/src/assets/locales/en/page.admin.json b/frontend/src/assets/locales/en/page.admin.json index 27e1ea842b..89f28e1fc0 100644 --- a/frontend/src/assets/locales/en/page.admin.json +++ b/frontend/src/assets/locales/en/page.admin.json @@ -1,8 +1,5 @@ { "pageAdmin": { - "scheduledRegistryProcesses": { - "title": "Registry lookups" - }, "bpnConfig": { "title": "BPN - EDC configuration", "intro": "The BPN to EDC URL mapping is used as another source for sending notifications. The first source is the discovery service, the second source is the mapping stored here. To store the additional source, please insert a BPN and the corresponding EDC URL to be used for sending notifications to the partner.", @@ -20,6 +17,16 @@ "successfullySaved": "Changes saved successfully.", "failedSave": "Error while saving the changes. Please try again later." } + }, + "importJson": { + "title": "Import - Json File", + "clear_file": "clear file", + "upload_file": "upload file", + "error": "Error: Please select a JSON file.", + "Drag_and_Drop": "Drag and drop", + "or": "or", + "browseFiles": "Browse files", + "success": "Successfully uploaded." } } } diff --git a/pom.xml b/pom.xml index 6fc7e429c7..21f22588ae 100644 --- a/pom.xml +++ b/pom.xml @@ -134,6 +134,12 @@ SPDX-License-Identifier: Apache-2.0 snakeyaml ${org-snakeyaml.version} + + + org.apache.commons + commons-collections4 + 4.4 + diff --git a/tx-backend/openapi/traceability-foss-backend.json b/tx-backend/openapi/traceability-foss-backend.json index d25409b137..33bfae39c5 100644 --- a/tx-backend/openapi/traceability-foss-backend.json +++ b/tx-backend/openapi/traceability-foss-backend.json @@ -1,6657 +1 @@ -{ - "openapi": "3.0.1", - "info": { - "title": "Trace-FOSS - OpenAPI Documentation", - "description": "Trace-FOSS is a system for tracking parts along the supply chain. A high level of transparency across the supplier network enables faster intervention based on a recorded event in the supply chain. This saves costs by seamlessly tracking parts and creates trust through clearly defined and secure data access by the companies and persons involved in the process.", - "license": { - "name": "License: Apache 2.0" - }, - "version": "1.0.0" - }, - "servers": [ - { - "url": "http://localhost:9998/api", - "description": "Generated server url" - } - ], - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ], - "tags": [ - { - "name": "ShellDescriptorController", - "description": "Shell Descriptor Controller" - }, - { - "name": "Investigations", - "description": "Operations on Investigation Notification" - } - ], - "paths": { - "/bpn-config": { - "get": { - "tags": [ - "BpnEdcMapping" - ], - "summary": "Get BPN EDC URL mappings", - "description": "The endpoint returns a result of BPN EDC URL mappings.", - "operationId": "getBpnEdcs", - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Returns the paged result found", - "content": { - "application/json": { - "schema": { - "maxItems": 2147483647, - "minItems": 0, - "type": "array" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - }, - "put": { - "tags": [ - "BpnEdcMapping" - ], - "summary": "Updates BPN EDC URL mappings", - "description": "The endpoint updates BPN EDC URL mappings", - "operationId": "updateBpnEdcMappings", - "requestBody": { - "content": { - "application/json": { - "schema": { - "maxItems": 1000, - "minItems": 0, - "type": "array", - "items": { - "$ref": "#/components/schemas/BpnMappingRequest" - } - } - } - }, - "required": true - }, - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Returns the paged result found for BpnEdcMapping", - "content": { - "application/json": { - "schema": { - "maxItems": 2147483647, - "minItems": 0, - "type": "array" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - }, - "post": { - "tags": [ - "BpnEdcMapping" - ], - "summary": "Creates BPN EDC URL mappings", - "description": "The endpoint creates BPN EDC URL mappings", - "operationId": "createBpnEdcUrlMappings", - "requestBody": { - "content": { - "application/json": { - "schema": { - "maxItems": 1000, - "minItems": 0, - "type": "array", - "items": { - "$ref": "#/components/schemas/BpnMappingRequest" - } - } - } - }, - "required": true - }, - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Returns the paged result found for BpnEdcMapping", - "content": { - "application/json": { - "schema": { - "maxItems": 2147483647, - "minItems": 0, - "type": "array" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/submodel/data/{submodelId}": { - "get": { - "tags": [ - "Submodel" - ], - "summary": "Gets Submodel by its id", - "description": "The endpoint returns Submodel for given id. Used for data providing functionality", - "operationId": "getSubmodelById", - "parameters": [ - { - "name": "submodelId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Returns the paged result found", - "content": { - "application/json": {} - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - }, - "post": { - "tags": [ - "Submodel" - ], - "summary": "Save Submodel", - "description": "This endpoint allows you to save a Submodel identified by its ID.", - "operationId": "saveSubmodel", - "parameters": [ - { - "name": "submodelId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - }, - "required": true - }, - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Ok." - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "204": { - "description": "No Content." - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/investigations": { - "get": { - "tags": [ - "Investigations" - ], - "summary": "Gets investigations", - "description": "The endpoint returns investigations as paged result.", - "operationId": "getInvestigations", - "parameters": [ - { - "name": "pageable", - "in": "query", - "required": true, - "schema": { - "$ref": "#/components/schemas/OwnPageable" - } - }, - { - "name": "filter", - "in": "query", - "required": true, - "schema": { - "$ref": "#/components/schemas/SearchCriteriaRequestParam" - } - } - ], - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Returns the paged result found for Asset", - "content": { - "application/json": { - "schema": { - "maxItems": 2147483647, - "minItems": 0, - "type": "array" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - }, - "post": { - "tags": [ - "Investigations" - ], - "summary": "Start investigations by part ids", - "description": "The endpoint starts investigations based on part ids provided.", - "operationId": "investigateAssets", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StartQualityNotificationRequest" - } - } - }, - "required": true - }, - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "201": { - "description": "Created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QualityNotificationIdResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/investigations/{investigationId}/update": { - "post": { - "tags": [ - "Investigations" - ], - "summary": "Update investigations by id", - "description": "The endpoint updates investigations by their id.", - "operationId": "updateInvestigation", - "parameters": [ - { - "name": "investigationId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateQualityNotificationRequest" - } - } - }, - "required": true - }, - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Ok." - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "204": { - "description": "No content." - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/investigations/{investigationId}/close": { - "post": { - "tags": [ - "Investigations" - ], - "summary": "Close investigations by id", - "description": "The endpoint closes investigations by their id.", - "operationId": "closeInvestigation", - "parameters": [ - { - "name": "investigationId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CloseQualityNotificationRequest" - } - } - }, - "required": true - }, - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Ok." - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "204": { - "description": "No content." - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/investigations/{investigationId}/cancel": { - "post": { - "tags": [ - "Investigations" - ], - "summary": "Cancles investigations by id", - "description": "The endpoint cancles investigations by their id.", - "operationId": "cancelInvestigation", - "parameters": [ - { - "name": "investigationId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Ok." - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "204": { - "description": "No content." - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/investigations/{investigationId}/approve": { - "post": { - "tags": [ - "Investigations" - ], - "summary": "Approves investigations by id", - "description": "The endpoint approves investigations by their id.", - "operationId": "approveInvestigation", - "parameters": [ - { - "name": "investigationId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Ok." - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "204": { - "description": "No content." - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/edc/notification/contract": { - "post": { - "tags": [ - "Notifications" - ], - "summary": "Triggers EDC notification contract", - "description": "The endpoint Triggers EDC notification contract based on notification type and method", - "operationId": "createNotificationContract", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateNotificationContractRequest" - } - } - }, - "required": true - }, - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "201": { - "description": "Created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateNotificationContractResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/assets/as-planned/sync": { - "post": { - "tags": [ - "AssetsAsPlanned" - ], - "summary": "Synchronizes assets from IRS", - "description": "The endpoint synchronizes the assets from irs.", - "operationId": "sync", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyncAssetsRequest" - } - } - }, - "required": true - }, - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "201": { - "description": "Created." - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/assets/as-planned/detail-information": { - "post": { - "tags": [ - "AssetsAsPlanned" - ], - "summary": "Searches for assets by ids.", - "description": "The endpoint searchs for assets by id and returns a list of them.", - "operationId": "getDetailInformation", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetDetailInformationRequest" - } - } - }, - "required": true - }, - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Returns the paged result found for Asset", - "content": { - "application/json": { - "schema": { - "maxItems": 2147483647, - "minItems": 0, - "type": "array" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/assets/as-built/sync": { - "post": { - "tags": [ - "AssetsAsBuilt" - ], - "summary": "Synchronizes assets from IRS", - "description": "The endpoint synchronizes the assets from irs.", - "operationId": "sync_1", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyncAssetsRequest" - } - } - }, - "required": true - }, - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "201": { - "description": "Created." - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/assets/as-built/detail-information": { - "post": { - "tags": [ - "AssetsAsBuilt" - ], - "summary": "Searches for assets by ids.", - "description": "The endpoint searchs for assets by id and returns a list of them.", - "operationId": "getDetailInformation_1", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetDetailInformationRequest" - } - } - }, - "required": true - }, - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Returns the paged result found for Asset", - "content": { - "application/json": { - "schema": { - "maxItems": 2147483647, - "minItems": 0, - "type": "array" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/alerts": { - "get": { - "tags": [ - "Alerts" - ], - "summary": "Gets alerts", - "description": "The endpoint returns alerts as paged result.", - "operationId": "getAlerts", - "parameters": [ - { - "name": "pageable", - "in": "query", - "required": true, - "schema": { - "$ref": "#/components/schemas/OwnPageable" - } - }, - { - "name": "filter", - "in": "query", - "required": true, - "schema": { - "$ref": "#/components/schemas/SearchCriteriaRequestParam" - } - } - ], - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Returns the paged result found for Asset", - "content": { - "application/json": { - "schema": { - "maxItems": 2147483647, - "type": "array" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - }, - "post": { - "tags": [ - "Alerts" - ], - "summary": "Start alert by part ids", - "description": "The endpoint starts alert based on part ids provided.", - "operationId": "alertAssets", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StartQualityNotificationRequest" - } - } - }, - "required": true - }, - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "201": { - "description": "Created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QualityNotificationIdResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/alerts/{alertId}/update": { - "post": { - "tags": [ - "Alerts" - ], - "summary": "Update alert by id", - "description": "The endpoint updates alert by their id.", - "operationId": "updateAlert", - "parameters": [ - { - "name": "alertId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateQualityNotificationRequest" - } - } - }, - "required": true - }, - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "204": { - "description": "No content." - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/alerts/{alertId}/close": { - "post": { - "tags": [ - "Alerts" - ], - "summary": "Close alert by id", - "description": "The endpoint closes alert by id.", - "operationId": "closeAlert", - "parameters": [ - { - "name": "alertId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CloseQualityNotificationRequest" - } - } - }, - "required": true - }, - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Ok." - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "204": { - "description": "No content." - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/alerts/{alertId}/cancel": { - "post": { - "tags": [ - "Alerts" - ], - "summary": "Cancels alert by id", - "description": "The endpoint cancels alert by id.", - "operationId": "cancelAlert", - "parameters": [ - { - "name": "alertId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Ok." - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "204": { - "description": "No content." - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/alerts/{alertId}/approve": { - "post": { - "tags": [ - "Alerts" - ], - "summary": "Approves alert by id", - "description": "The endpoint approves alert by id.", - "operationId": "approveAlert", - "parameters": [ - { - "name": "alertId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Ok." - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "204": { - "description": "No content." - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/assets/as-planned/{assetId}": { - "get": { - "tags": [ - "AssetsAsPlanned" - ], - "summary": "Get asset by id", - "description": "The endpoint returns an asset filtered by id .", - "operationId": "assetById", - "parameters": [ - { - "name": "assetId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Returns the assets found", - "content": { - "application/json": { - "schema": { - "maxItems": 2147483647, - "type": "array", - "description": "Assets", - "items": { - "type": "object", - "properties": { - "id": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "idShort": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "semanticModelId": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "businessPartner": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "manufacturerName": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "nameAtManufacturer": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "manufacturerPartId": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "owner": { - "type": "string", - "enum": [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations": { - "maxItems": 2147483647, - "type": "array", - "description": "Child relationships", - "items": { - "$ref": "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations": { - "maxItems": 2147483647, - "type": "array", - "description": "Parent relationships", - "items": { - "$ref": "#/components/schemas/DescriptionsResponse" - } - }, - "activeAlert": { - "type": "boolean" - }, - "underInvestigation": { - "type": "boolean" - }, - "qualityType": { - "type": "string", - "enum": [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "semanticDataModel": { - "type": "string", - "enum": [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE" - ] - }, - "classification": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "detailAspectModels": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "receivedQualityAlertIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "sentQualityInvestigationIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "receivedQualityInvestigationIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - } - } - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - }, - "patch": { - "tags": [ - "AssetsAsPlanned" - ], - "summary": "Updates asset", - "description": "The endpoint updates asset by provided quality type.", - "operationId": "updateAsset", - "parameters": [ - { - "name": "assetId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateAssetRequest" - } - } - }, - "required": true - }, - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Returns the updated asset", - "content": { - "application/json": { - "schema": { - "maxItems": 2147483647, - "type": "array", - "description": "Assets", - "items": { - "type": "object", - "properties": { - "id": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "idShort": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "semanticModelId": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "businessPartner": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "manufacturerName": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "nameAtManufacturer": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "manufacturerPartId": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "owner": { - "type": "string", - "enum": [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations": { - "maxItems": 2147483647, - "type": "array", - "description": "Child relationships", - "items": { - "$ref": "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations": { - "maxItems": 2147483647, - "type": "array", - "description": "Parent relationships", - "items": { - "$ref": "#/components/schemas/DescriptionsResponse" - } - }, - "activeAlert": { - "type": "boolean" - }, - "underInvestigation": { - "type": "boolean" - }, - "qualityType": { - "type": "string", - "enum": [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "semanticDataModel": { - "type": "string", - "enum": [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE" - ] - }, - "classification": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "detailAspectModels": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "receivedQualityAlertIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "sentQualityInvestigationIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "receivedQualityInvestigationIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - } - } - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/assets/as-built/{assetId}": { - "get": { - "tags": [ - "AssetsAsBuilt" - ], - "summary": "Get asset by id", - "description": "The endpoint returns an asset filtered by id .", - "operationId": "assetById_1", - "parameters": [ - { - "name": "assetId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Returns the assets found", - "content": { - "application/json": { - "schema": { - "maxItems": 2147483647, - "type": "array", - "description": "Assets", - "items": { - "type": "object", - "properties": { - "id": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "idShort": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "semanticModelId": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "businessPartner": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "manufacturerName": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "nameAtManufacturer": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "manufacturerPartId": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "owner": { - "type": "string", - "enum": [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations": { - "maxItems": 2147483647, - "type": "array", - "description": "Child relationships", - "items": { - "$ref": "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations": { - "maxItems": 2147483647, - "type": "array", - "description": "Parent relationships", - "items": { - "$ref": "#/components/schemas/DescriptionsResponse" - } - }, - "activeAlert": { - "type": "boolean" - }, - "underInvestigation": { - "type": "boolean" - }, - "qualityType": { - "type": "string", - "enum": [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "semanticDataModel": { - "type": "string", - "enum": [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE" - ] - }, - "classification": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "detailAspectModels": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "receivedQualityAlertIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "sentQualityInvestigationIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "receivedQualityInvestigationIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - } - } - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - }, - "patch": { - "tags": [ - "AssetsAsBuilt" - ], - "summary": "Updates asset", - "description": "The endpoint updates asset by provided quality type.", - "operationId": "updateAsset_1", - "parameters": [ - { - "name": "assetId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateAssetRequest" - } - } - }, - "required": true - }, - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Returns the updated asset", - "content": { - "application/json": { - "schema": { - "maxItems": 2147483647, - "type": "array", - "description": "Assets", - "items": { - "type": "object", - "properties": { - "id": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "idShort": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "semanticModelId": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "businessPartner": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "manufacturerName": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "nameAtManufacturer": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "manufacturerPartId": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "owner": { - "type": "string", - "enum": [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations": { - "maxItems": 2147483647, - "type": "array", - "description": "Child relationships", - "items": { - "$ref": "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations": { - "maxItems": 2147483647, - "type": "array", - "description": "Parent relationships", - "items": { - "$ref": "#/components/schemas/DescriptionsResponse" - } - }, - "activeAlert": { - "type": "boolean" - }, - "underInvestigation": { - "type": "boolean" - }, - "qualityType": { - "type": "string", - "enum": [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "semanticDataModel": { - "type": "string", - "enum": [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE" - ] - }, - "classification": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "detailAspectModels": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "receivedQualityAlertIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "sentQualityInvestigationIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "receivedQualityInvestigationIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - } - } - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/shelldescriptors": { - "get": { - "tags": [ - "ShellDescriptorController" - ], - "summary": "FindAll shell descriptors", - "description": "The endpoint returns all shell descriptors.", - "operationId": "findAll", - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "ShellDescriptors found.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ShellDescriptorResponse" - } - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - }, - "delete": { - "tags": [ - "Registry", - "ShellDescriptorController" - ], - "summary": "Triggers deleteAll of shell descriptors list", - "description": "The endpoint deletes all shell descriptors.", - "operationId": "deleteAll", - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "204": { - "description": "Deleted." - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/registry/reload": { - "get": { - "tags": [ - "Registry" - ], - "summary": "Triggers reload of shell descriptors", - "description": "The endpoint Triggers reload of shell descriptors.", - "operationId": "reload", - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "202": { - "description": "Created registry reload job." - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/investigations/{investigationId}": { - "get": { - "tags": [ - "Investigations" - ], - "summary": "Gets investigations by id", - "description": "The endpoint returns investigations as paged result by their id.", - "operationId": "getInvestigation", - "parameters": [ - { - "name": "investigationId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "OK.", - "content": { - "application/json": { - "schema": { - "maxItems": 2147483647, - "minItems": -2147483648, - "type": "array", - "description": "Investigations", - "items": { - "$ref": "#/components/schemas/InvestigationResponse" - } - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/investigations/distinctFilterValues": { - "get": { - "tags": [ - "Assets", - "Investigations" - ], - "summary": "getDistinctFilterValues", - "description": "The endpoint returns a distinct filter values for given fieldName.", - "operationId": "distinctFilterValues", - "parameters": [ - { - "name": "fieldName", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "size", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "startWith", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "channel", - "in": "query", - "required": true, - "schema": { - "type": "string", - "enum": [ - "SENDER", - "RECEIVER" - ] - } - } - ], - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Returns a distinct filter values for given fieldName.", - "content": { - "application/json": { - "schema": { - "maxItems": 2147483647, - "minItems": 0, - "type": "array" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/dashboard": { - "get": { - "tags": [ - "Dashboard" - ], - "summary": "Returns dashboard related data", - "description": "The endpoint can return limited data based on the user role", - "operationId": "dashboard", - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Returns dashboard data", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DashboardResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/assets/as-planned": { - "get": { - "tags": [ - "AssetsAsPlanned" - ], - "summary": "Get assets by pagination", - "description": "The endpoint returns a paged result of assets.", - "operationId": "AssetsAsPlanned", - "parameters": [ - { - "name": "pageable", - "in": "query", - "required": true, - "schema": { - "$ref": "#/components/schemas/OwnPageable" - } - }, - { - "name": "filter", - "in": "query", - "required": true, - "schema": { - "$ref": "#/components/schemas/SearchCriteriaRequestParam" - } - } - ], - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Returns the paged result found for Asset", - "content": { - "application/json": { - "schema": { - "maxItems": 2147483647, - "minItems": 0, - "type": "array", - "items": { - "maxItems": 2147483647, - "type": "array", - "description": "Assets", - "items": { - "type": "object", - "properties": { - "id": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "idShort": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "semanticModelId": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "businessPartner": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "manufacturerName": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "nameAtManufacturer": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "manufacturerPartId": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "owner": { - "type": "string", - "enum": [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations": { - "maxItems": 2147483647, - "type": "array", - "description": "Child relationships", - "items": { - "$ref": "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations": { - "maxItems": 2147483647, - "type": "array", - "description": "Parent relationships", - "items": { - "$ref": "#/components/schemas/DescriptionsResponse" - } - }, - "activeAlert": { - "type": "boolean" - }, - "underInvestigation": { - "type": "boolean" - }, - "qualityType": { - "type": "string", - "enum": [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "semanticDataModel": { - "type": "string", - "enum": [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE" - ] - }, - "classification": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "detailAspectModels": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "receivedQualityAlertIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "sentQualityInvestigationIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "receivedQualityInvestigationIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - } - } - } - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/assets/as-planned/{assetId}/children/{childId}": { - "get": { - "tags": [ - "AssetsAsPlanned" - ], - "summary": "Get asset by child id", - "description": "The endpoint returns an asset filtered by child id.", - "operationId": "assetByChildId", - "parameters": [ - { - "name": "assetId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "childId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Returns the asset by childId", - "content": { - "application/json": { - "schema": { - "maxItems": 2147483647, - "type": "array", - "description": "Assets", - "items": { - "type": "object", - "properties": { - "id": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "idShort": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "semanticModelId": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "businessPartner": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "manufacturerName": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "nameAtManufacturer": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "manufacturerPartId": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "owner": { - "type": "string", - "enum": [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations": { - "maxItems": 2147483647, - "type": "array", - "description": "Child relationships", - "items": { - "$ref": "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations": { - "maxItems": 2147483647, - "type": "array", - "description": "Parent relationships", - "items": { - "$ref": "#/components/schemas/DescriptionsResponse" - } - }, - "activeAlert": { - "type": "boolean" - }, - "underInvestigation": { - "type": "boolean" - }, - "qualityType": { - "type": "string", - "enum": [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "semanticDataModel": { - "type": "string", - "enum": [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE" - ] - }, - "classification": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "detailAspectModels": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "receivedQualityAlertIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "sentQualityInvestigationIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "receivedQualityInvestigationIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - } - } - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/assets/as-planned/distinctFilterValues": { - "get": { - "tags": [ - "Assets", - "AssetsAsPlanned" - ], - "summary": "getDistinctFilterValues", - "description": "The endpoint returns a distinct filter values for given fieldName.", - "operationId": "distinctFilterValues_1", - "parameters": [ - { - "name": "fieldName", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "size", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "startWith", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "owner", - "in": "query", - "required": true, - "schema": { - "type": "string", - "enum": [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - } - } - ], - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Returns a distinct filter values for given fieldName.", - "content": { - "application/json": { - "schema": { - "maxItems": 2147483647, - "minItems": 0, - "type": "array" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/assets/as-built": { - "get": { - "tags": [ - "AssetsAsBuilt" - ], - "summary": "Get assets by pagination", - "description": "The endpoint returns a paged result of assets.", - "operationId": "assets", - "parameters": [ - { - "name": "pageable", - "in": "query", - "required": true, - "schema": { - "$ref": "#/components/schemas/OwnPageable" - } - }, - { - "name": "searchCriteriaRequestParam", - "in": "query", - "required": true, - "schema": { - "$ref": "#/components/schemas/SearchCriteriaRequestParam" - } - } - ], - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Returns the paged result found for Asset", - "content": { - "application/json": { - "schema": { - "maxItems": 2147483647, - "minItems": 0, - "type": "array", - "items": { - "maxItems": 2147483647, - "type": "array", - "description": "Assets", - "items": { - "type": "object", - "properties": { - "id": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "idShort": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "semanticModelId": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "businessPartner": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "manufacturerName": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "nameAtManufacturer": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "manufacturerPartId": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "owner": { - "type": "string", - "enum": [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations": { - "maxItems": 2147483647, - "type": "array", - "description": "Child relationships", - "items": { - "$ref": "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations": { - "maxItems": 2147483647, - "type": "array", - "description": "Parent relationships", - "items": { - "$ref": "#/components/schemas/DescriptionsResponse" - } - }, - "activeAlert": { - "type": "boolean" - }, - "underInvestigation": { - "type": "boolean" - }, - "qualityType": { - "type": "string", - "enum": [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "semanticDataModel": { - "type": "string", - "enum": [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE" - ] - }, - "classification": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "detailAspectModels": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "receivedQualityAlertIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "sentQualityInvestigationIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "receivedQualityInvestigationIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - } - } - } - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/assets/as-built/{assetId}/children/{childId}": { - "get": { - "tags": [ - "AssetsAsBuilt" - ], - "summary": "Get asset by child id", - "description": "The endpoint returns an asset filtered by child id.", - "operationId": "assetByChildId_1", - "parameters": [ - { - "name": "assetId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "childId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Returns the asset by childId", - "content": { - "application/json": { - "schema": { - "maxItems": 2147483647, - "type": "array", - "description": "Assets", - "items": { - "type": "object", - "properties": { - "id": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "idShort": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "semanticModelId": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "businessPartner": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "manufacturerName": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "nameAtManufacturer": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "manufacturerPartId": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "owner": { - "type": "string", - "enum": [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations": { - "maxItems": 2147483647, - "type": "array", - "description": "Child relationships", - "items": { - "$ref": "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations": { - "maxItems": 2147483647, - "type": "array", - "description": "Parent relationships", - "items": { - "$ref": "#/components/schemas/DescriptionsResponse" - } - }, - "activeAlert": { - "type": "boolean" - }, - "underInvestigation": { - "type": "boolean" - }, - "qualityType": { - "type": "string", - "enum": [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "semanticDataModel": { - "type": "string", - "enum": [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE" - ] - }, - "classification": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "detailAspectModels": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "receivedQualityAlertIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "sentQualityInvestigationIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "receivedQualityInvestigationIdsInStatusActive": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - } - } - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/assets/as-built/distinctFilterValues": { - "get": { - "tags": [ - "AssetsAsBuilt", - "Assets" - ], - "summary": "getDistinctFilterValues", - "description": "The endpoint returns a distinct filter values for given fieldName.", - "operationId": "distinctFilterValues_2", - "parameters": [ - { - "name": "fieldName", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "size", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "startWith", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "owner", - "in": "query", - "required": true, - "schema": { - "type": "string", - "enum": [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - } - } - ], - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Returns a distinct filter values for given fieldName.", - "content": { - "application/json": { - "schema": { - "maxItems": 2147483647, - "minItems": 0, - "type": "array" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/assets/as-built/countries": { - "get": { - "tags": [ - "AssetsAsBuilt" - ], - "summary": "Get map of assets", - "description": "The endpoint returns a map for assets consumed by the map.", - "operationId": "assetsCountryMap", - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Returns the assets found", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "int64" - } - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/alerts/{alertId}": { - "get": { - "tags": [ - "Alerts" - ], - "summary": "Gets Alert by id", - "description": "The endpoint returns alert by id.", - "operationId": "getAlert", - "parameters": [ - { - "name": "alertId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "OK.", - "content": { - "application/json": { - "schema": { - "maxItems": 2147483647, - "type": "array", - "description": "Alerts", - "items": { - "$ref": "#/components/schemas/AlertResponse" - } - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/alerts/distinctFilterValues": { - "get": { - "tags": [ - "Assets", - "Alerts" - ], - "summary": "getDistinctFilterValues", - "description": "The endpoint returns a distinct filter values for given fieldName.", - "operationId": "distinctFilterValues_3", - "parameters": [ - { - "name": "fieldName", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "size", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "startWith", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "channel", - "in": "query", - "required": true, - "schema": { - "type": "string", - "enum": [ - "SENDER", - "RECEIVER" - ] - } - } - ], - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Returns a distinct filter values for given fieldName.", - "content": { - "application/json": { - "schema": { - "maxItems": 2147483647, - "minItems": 0, - "type": "array" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/submodel/data": { - "delete": { - "tags": [ - "Submodel" - ], - "summary": "Delete All Submodels", - "description": "Deletes all submodels from the system.", - "operationId": "deleteSubmodels", - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Ok." - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "204": { - "description": "No Content." - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - }, - "/bpn-config/{bpn}": { - "delete": { - "tags": [ - "BpnEdcMapping" - ], - "summary": "Deletes BPN EDC URL mappings", - "description": "The endpoint deletes BPN EDC URL mappings", - "operationId": "deleteBpnEdcUrlMappings", - "parameters": [ - { - "name": "bpn", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Authorization failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "429": { - "description": "Too many requests.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "200": { - "description": "Okay" - }, - "403": { - "description": "Forbidden.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "204": { - "description": "Deleted." - }, - "415": { - "description": "Unsupported media type", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "oAuth2": [ - "profile email" - ] - } - ] - } - } - }, - "components": { - "schemas": { - "BpnMappingRequest": { - "required": [ - "bpn", - "url" - ], - "type": "object", - "properties": { - "bpn": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "url": { - "maxLength": 255, - "minLength": 0, - "type": "string" - } - } - }, - "ErrorResponse": { - "type": "object", - "properties": { - "message": { - "maxLength": 1000, - "minLength": 0, - "pattern": "^.*$", - "type": "string" - } - } - }, - "StartQualityNotificationRequest": { - "required": [ - "severity" - ], - "type": "object", - "properties": { - "partIds": { - "maxItems": 100, - "minItems": 1, - "type": "array", - "items": { - "type": "string" - } - }, - "description": { - "maxLength": 1000, - "minLength": 15, - "type": "string" - }, - "targetDate": { - "type": "string", - "format": "date-time" - }, - "severity": { - "type": "string", - "enum": [ - "MINOR", - "MAJOR", - "CRITICAL", - "LIFE_THREATENING" - ] - }, - "receiverBpn": { - "type": "string" - }, - "asBuilt": { - "type": "boolean" - } - } - }, - "QualityNotificationIdResponse": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - } - } - }, - "UpdateQualityNotificationRequest": { - "required": [ - "status" - ], - "type": "object", - "properties": { - "status": { - "type": "string", - "description": "The UpdateInvestigationStatus", - "enum": [ - "ACKNOWLEDGED", - "ACCEPTED", - "DECLINED" - ] - }, - "reason": { - "type": "string" - } - } - }, - "CloseQualityNotificationRequest": { - "type": "object", - "properties": { - "reason": { - "maxLength": 1000, - "minLength": 15, - "type": "string" - } - } - }, - "CreateNotificationContractRequest": { - "required": [ - "notificationMethod", - "notificationType" - ], - "type": "object", - "properties": { - "notificationType": { - "type": "string", - "enum": [ - "QUALITY_INVESTIGATION", - "QUALITY_ALERT" - ] - }, - "notificationMethod": { - "type": "string", - "enum": [ - "RECEIVE", - "UPDATE", - "RESOLVE" - ] - } - } - }, - "CreateNotificationContractResponse": { - "type": "object", - "properties": { - "notificationAssetId": { - "type": "string" - }, - "accessPolicyId": { - "type": "string" - }, - "contractDefinitionId": { - "type": "string" - } - } - }, - "SyncAssetsRequest": { - "type": "object", - "properties": { - "globalAssetIds": { - "maxItems": 100, - "minItems": 1, - "type": "array", - "description": "Assets", - "items": { - "type": "string" - } - } - } - }, - "GetDetailInformationRequest": { - "type": "object", - "properties": { - "assetIds": { - "maxItems": 50, - "minItems": 1, - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "UpdateAssetRequest": { - "required": [ - "qualityType" - ], - "type": "object", - "properties": { - "qualityType": { - "type": "string", - "enum": [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - } - } - }, - "DescriptionsResponse": { - "type": "object", - "properties": { - "id": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "idShort": { - "maxLength": 255, - "minLength": 0, - "type": "string" - } - } - }, - "DetailAspectDataAsBuiltResponse": { - "type": "object", - "properties": { - "partId": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "customerPartId": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "nameAtCustomer": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "manufacturingCountry": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "manufacturingDate": { - "maxLength": 255, - "minLength": 0, - "type": "string" - } - } - }, - "DetailAspectDataAsPlannedResponse": { - "type": "object", - "properties": { - "validityPeriodFrom": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "validityPeriodTo": { - "maxLength": 255, - "minLength": 0, - "type": "string" - } - } - }, - "DetailAspectDataResponse": { - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/DetailAspectDataAsBuiltResponse" - }, - { - "$ref": "#/components/schemas/DetailAspectDataAsPlannedResponse" - }, - { - "$ref": "#/components/schemas/PartSiteInformationAsPlannedResponse" - }, - { - "$ref": "#/components/schemas/DetailAspectDataTractionBatteryCodeResponse" - } - ] - }, - "DetailAspectDataTractionBatteryCodeResponse": { - "type": "object", - "properties": { - "productType": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "tractionBatteryCode": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "subcomponents": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DetailAspectDataTractionBatteryCodeSubcomponentResponse" - } - } - } - }, - "DetailAspectDataTractionBatteryCodeSubcomponentResponse": { - "type": "object", - "properties": { - "productType": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "tractionBatteryCode": { - "maxLength": 255, - "minLength": 0, - "type": "string" - } - } - }, - "DetailAspectModelResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "AS_BUILT", - "AS_PLANNED", - "TRACTION_BATTERY_CODE", - "SINGLE_LEVEL_BOM_AS_BUILT", - "SINGLE_LEVEL_USAGE_AS_BUILT", - "SINGLE_LEVEL_BOM_AS_PLANNED", - "PART_SITE_INFORMATION_AS_PLANNED" - ] - }, - "data": { - "$ref": "#/components/schemas/DetailAspectDataResponse" - } - } - }, - "PartSiteInformationAsPlannedResponse": { - "type": "object", - "properties": { - "functionValidUntil": { - "type": "string" - }, - "function": { - "type": "string" - }, - "functionValidFrom": { - "type": "string" - }, - "catenaXSiteId": { - "type": "string" - } - } - }, - "ShellDescriptorResponse": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "globalAssetId": { - "type": "string" - } - } - }, - "OwnPageable": { - "type": "object", - "properties": { - "page": { - "type": "integer", - "format": "int32" - }, - "size": { - "type": "integer", - "format": "int32" - }, - "sort": { - "maxItems": 2147483647, - "type": "array", - "description": "Content of Assets PageResults", - "example": "manufacturerPartId,desc", - "items": { - "type": "string" - } - } - } - }, - "SearchCriteriaRequestParam": { - "type": "object", - "properties": { - "filter": { - "maxItems": 2147483647, - "type": "array", - "description": "Filter Criteria", - "example": "owner,EQUAL,OWN", - "items": { - "type": "string" - } - } - } - }, - "InvestigationResponse": { - "type": "object", - "properties": { - "id": { - "maximum": 255, - "minimum": 0, - "type": "integer", - "format": "int64" - }, - "status": { - "maxLength": 255, - "minLength": 0, - "type": "string", - "enum": [ - "CREATED", - "SENT", - "RECEIVED", - "ACKNOWLEDGED", - "ACCEPTED", - "DECLINED", - "CANCELED", - "CLOSED" - ] - }, - "description": { - "maxLength": 1000, - "minLength": 0, - "type": "string" - }, - "createdBy": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "createdByName": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "createdDate": { - "maxLength": 50, - "minLength": 0, - "type": "string" - }, - "assetIds": { - "maxItems": 1000, - "minItems": 0, - "type": "array", - "description": "assetIds", - "items": { - "type": "string" - } - }, - "channel": { - "maxLength": 255, - "minLength": 0, - "type": "string", - "enum": [ - "SENDER", - "RECEIVER" - ] - }, - "reason": { - "$ref": "#/components/schemas/QualityNotificationReasonResponse" - }, - "sendTo": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "sendToName": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "severity": { - "maxLength": 255, - "minLength": 0, - "type": "string", - "enum": [ - "MINOR", - "MAJOR", - "CRITICAL", - "LIFE-THREATENING" - ] - }, - "targetDate": { - "maxLength": 50, - "minLength": 0, - "type": "string" - }, - "errorMessage": { - "maxLength": 255, - "minLength": 0, - "type": "string" - } - } - }, - "QualityNotificationReasonResponse": { - "type": "object", - "properties": { - "close": { - "maxLength": 1000, - "minLength": 0, - "type": "string" - }, - "accept": { - "maxLength": 1000, - "minLength": 0, - "type": "string" - }, - "decline": { - "maxLength": 1000, - "minLength": 0, - "type": "string" - } - } - }, - "DashboardResponse": { - "type": "object", - "properties": { - "asBuiltCustomerParts": { - "type": "integer", - "format": "int64" - }, - "asPlannedCustomerParts": { - "type": "integer", - "format": "int64" - }, - "asBuiltSupplierParts": { - "type": "integer", - "format": "int64" - }, - "asPlannedSupplierParts": { - "type": "integer", - "format": "int64" - }, - "asBuiltOwnParts": { - "type": "integer", - "format": "int64" - }, - "asPlannedOwnParts": { - "type": "integer", - "format": "int64" - }, - "myPartsWithOpenAlerts": { - "type": "integer", - "format": "int64" - }, - "myPartsWithOpenInvestigations": { - "type": "integer", - "format": "int64" - }, - "supplierPartsWithOpenAlerts": { - "type": "integer", - "format": "int64" - }, - "customerPartsWithOpenAlerts": { - "type": "integer", - "format": "int64" - }, - "supplierPartsWithOpenInvestigations": { - "type": "integer", - "format": "int64" - }, - "customerPartsWithOpenInvestigations": { - "type": "integer", - "format": "int64" - }, - "receivedActiveAlerts": { - "type": "integer", - "format": "int64" - }, - "receivedActiveInvestigations": { - "type": "integer", - "format": "int64" - }, - "sentActiveAlerts": { - "type": "integer", - "format": "int64" - }, - "sentActiveInvestigations": { - "type": "integer", - "format": "int64" - } - } - }, - "AlertResponse": { - "type": "object", - "properties": { - "id": { - "maximum": 255, - "minimum": 0, - "type": "integer", - "format": "int64" - }, - "status": { - "maxLength": 255, - "minLength": 0, - "type": "string", - "enum": [ - "CREATED", - "SENT", - "RECEIVED", - "ACKNOWLEDGED", - "ACCEPTED", - "DECLINED", - "CANCELED", - "CLOSED" - ] - }, - "description": { - "maxLength": 1000, - "minLength": 0, - "type": "string" - }, - "createdBy": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "createdByName": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "createdDate": { - "maxLength": 50, - "minLength": 0, - "type": "string" - }, - "assetIds": { - "maxItems": 1000, - "minItems": 0, - "type": "array", - "description": "assetIds", - "items": { - "type": "string" - } - }, - "channel": { - "maxLength": 255, - "minLength": 0, - "type": "string", - "enum": [ - "SENDER", - "RECEIVER" - ] - }, - "reason": { - "$ref": "#/components/schemas/QualityNotificationReasonResponse" - }, - "sendTo": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "sendToName": { - "maxLength": 255, - "minLength": 0, - "type": "string" - }, - "severity": { - "maxLength": 255, - "minLength": 0, - "type": "string", - "enum": [ - "MINOR", - "MAJOR", - "CRITICAL", - "LIFE-THREATENING" - ] - }, - "targetDate": { - "maxLength": 50, - "minLength": 0, - "type": "string" - }, - "errorMessage": { - "maxLength": 255, - "minLength": 0, - "type": "string" - } - } - } - }, - "securitySchemes": { - "oAuth2": { - "type": "oauth2", - "flows": { - "clientCredentials": { - "scopes": { - "profile email": "" - } - } - } - } - } - } -} +{"openapi":"3.0.1","info":{"title":"Trace-FOSS - OpenAPI Documentation","description":"Trace-FOSS is a system for tracking parts along the supply chain. A high level of transparency across the supplier network enables faster intervention based on a recorded event in the supply chain. This saves costs by seamlessly tracking parts and creates trust through clearly defined and secure data access by the companies and persons involved in the process.","license":{"name":"License: Apache 2.0"},"version":"1.0.0"},"servers":[{"url":"http://localhost:9998/api","description":"Generated server url"}],"security":[{"oAuth2":["profile email"]}],"tags":[{"name":"ShellDescriptorController","description":"Shell Descriptor Controller"},{"name":"Investigations","description":"Operations on Investigation Notification"}],"paths":{"/bpn-config":{"get":{"tags":["BpnEdcMapping"],"summary":"Get BPN EDC URL mappings","description":"The endpoint returns a result of BPN EDC URL mappings.","operationId":"getBpnEdcs","responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]},"put":{"tags":["BpnEdcMapping"],"summary":"Updates BPN EDC URL mappings","description":"The endpoint updates BPN EDC URL mappings","operationId":"updateBpnEdcMappings","requestBody":{"content":{"application/json":{"schema":{"maxItems":1000,"minItems":0,"type":"array","items":{"$ref":"#/components/schemas/BpnMappingRequest"}}}},"required":true},"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for BpnEdcMapping","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]},"post":{"tags":["BpnEdcMapping"],"summary":"Creates BPN EDC URL mappings","description":"The endpoint creates BPN EDC URL mappings","operationId":"createBpnEdcUrlMappings","requestBody":{"content":{"application/json":{"schema":{"maxItems":1000,"minItems":0,"type":"array","items":{"$ref":"#/components/schemas/BpnMappingRequest"}}}},"required":true},"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for BpnEdcMapping","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/submodel/data/{submodelId}":{"get":{"tags":["Submodel"],"summary":"Gets Submodel by its id","description":"The endpoint returns Submodel for given id. Used for data providing functionality","operationId":"getSubmodelById","parameters":[{"name":"submodelId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found","content":{"application/json":{}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]},"post":{"tags":["Submodel"],"summary":"Save Submodel","description":"This endpoint allows you to save a Submodel identified by its ID.","operationId":"saveSubmodel","parameters":[{"name":"submodelId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string"}}},"required":true},"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"204":{"description":"No Content."},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations":{"get":{"tags":["Investigations"],"summary":"Gets investigations","description":"The endpoint returns investigations as paged result.","operationId":"getInvestigations","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/OwnPageable"}},{"name":"filter","in":"query","required":true,"schema":{"$ref":"#/components/schemas/SearchCriteriaRequestParam"}}],"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]},"post":{"tags":["Investigations"],"summary":"Start investigations by part ids","description":"The endpoint starts investigations based on part ids provided.","operationId":"investigateAssets","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartQualityNotificationRequest"}}},"required":true},"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityNotificationIdResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/{investigationId}/update":{"post":{"tags":["Investigations"],"summary":"Update investigations by id","description":"The endpoint updates investigations by their id.","operationId":"updateInvestigation","parameters":[{"name":"investigationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQualityNotificationRequest"}}},"required":true},"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No content."},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/{investigationId}/close":{"post":{"tags":["Investigations"],"summary":"Close investigations by id","description":"The endpoint closes investigations by their id.","operationId":"closeInvestigation","parameters":[{"name":"investigationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloseQualityNotificationRequest"}}},"required":true},"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No content."},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/{investigationId}/cancel":{"post":{"tags":["Investigations"],"summary":"Cancles investigations by id","description":"The endpoint cancles investigations by their id.","operationId":"cancelInvestigation","parameters":[{"name":"investigationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"204":{"description":"No content."},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/{investigationId}/approve":{"post":{"tags":["Investigations"],"summary":"Approves investigations by id","description":"The endpoint approves investigations by their id.","operationId":"approveInvestigation","parameters":[{"name":"investigationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"204":{"description":"No content."},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/edc/notification/contract":{"post":{"tags":["Notifications"],"summary":"Triggers EDC notification contract","description":"The endpoint Triggers EDC notification contract based on notification type and method","operationId":"createNotificationContract","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNotificationContractRequest"}}},"required":true},"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNotificationContractResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/import":{"post":{"tags":["AssetsImport"],"summary":"asset upload","description":"This endpoint stores assets in the application. Those can be later published in the Catena-X network.","operationId":"importJson","requestBody":{"content":{"multipart/form-data":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK.","content":{"application/json":{}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No Content."},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned/sync":{"post":{"tags":["AssetsAsPlanned"],"summary":"Synchronizes assets from IRS","description":"The endpoint synchronizes the assets from irs.","operationId":"sync","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncAssetsRequest"}}},"required":true},"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created."},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned/detail-information":{"post":{"tags":["AssetsAsPlanned"],"summary":"Searches for assets by ids.","description":"The endpoint searchs for assets by id and returns a list of them.","operationId":"getDetailInformation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDetailInformationRequest"}}},"required":true},"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/sync":{"post":{"tags":["AssetsAsBuilt"],"summary":"Synchronizes assets from IRS","description":"The endpoint synchronizes the assets from irs.","operationId":"sync_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncAssetsRequest"}}},"required":true},"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created."},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/detail-information":{"post":{"tags":["AssetsAsBuilt"],"summary":"Searches for assets by ids.","description":"The endpoint searchs for assets by id and returns a list of them.","operationId":"getDetailInformation_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDetailInformationRequest"}}},"required":true},"responses":{"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts":{"get":{"tags":["Alerts"],"summary":"Gets alerts","description":"The endpoint returns alerts as paged result.","operationId":"getAlerts","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/OwnPageable"}},{"name":"filter","in":"query","required":true,"schema":{"$ref":"#/components/schemas/SearchCriteriaRequestParam"}}],"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]},"post":{"tags":["Alerts"],"summary":"Start alert by part ids","description":"The endpoint starts alert based on part ids provided.","operationId":"alertAssets","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartQualityNotificationRequest"}}},"required":true},"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityNotificationIdResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/{alertId}/update":{"post":{"tags":["Alerts"],"summary":"Update alert by id","description":"The endpoint updates alert by their id.","operationId":"updateAlert","parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQualityNotificationRequest"}}},"required":true},"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No content."},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/{alertId}/close":{"post":{"tags":["Alerts"],"summary":"Close alert by id","description":"The endpoint closes alert by id.","operationId":"closeAlert","parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloseQualityNotificationRequest"}}},"required":true},"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No content."},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/{alertId}/cancel":{"post":{"tags":["Alerts"],"summary":"Cancels alert by id","description":"The endpoint cancels alert by id.","operationId":"cancelAlert","parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"204":{"description":"No content."},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/{alertId}/approve":{"post":{"tags":["Alerts"],"summary":"Approves alert by id","description":"The endpoint approves alert by id.","operationId":"approveAlert","parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"204":{"description":"No content."},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned/{assetId}":{"get":{"tags":["AssetsAsPlanned"],"summary":"Get asset by id","description":"The endpoint returns an asset filtered by id .","operationId":"assetById","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns the assets found","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string"},"idShort":{"maxLength":255,"minLength":0,"type":"string"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string"},"owner":{"type":"string","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"activeAlert":{"type":"boolean"},"underInvestigation":{"type":"boolean"},"qualityType":{"type":"string","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string"},"semanticDataModel":{"type":"string","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE"]},"classification":{"maxLength":255,"minLength":0,"type":"string"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"receivedQualityAlertIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"importState":{"type":"string","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","UNSET"]},"importNote":{"type":"string"}}}}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]},"patch":{"tags":["AssetsAsPlanned"],"summary":"Updates asset","description":"The endpoint updates asset by provided quality type.","operationId":"updateAsset","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAssetRequest"}}},"required":true},"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the updated asset","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string"},"idShort":{"maxLength":255,"minLength":0,"type":"string"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string"},"owner":{"type":"string","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"activeAlert":{"type":"boolean"},"underInvestigation":{"type":"boolean"},"qualityType":{"type":"string","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string"},"semanticDataModel":{"type":"string","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE"]},"classification":{"maxLength":255,"minLength":0,"type":"string"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"receivedQualityAlertIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"importState":{"type":"string","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","UNSET"]},"importNote":{"type":"string"}}}}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/{assetId}":{"get":{"tags":["AssetsAsBuilt"],"summary":"Get asset by id","description":"The endpoint returns an asset filtered by id .","operationId":"assetById_1","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the assets found","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string"},"idShort":{"maxLength":255,"minLength":0,"type":"string"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string"},"owner":{"type":"string","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"activeAlert":{"type":"boolean"},"underInvestigation":{"type":"boolean"},"qualityType":{"type":"string","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string"},"semanticDataModel":{"type":"string","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE"]},"classification":{"maxLength":255,"minLength":0,"type":"string"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"receivedQualityAlertIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"importState":{"type":"string","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","UNSET"]},"importNote":{"type":"string"}}}}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]},"patch":{"tags":["AssetsAsBuilt"],"summary":"Updates asset","description":"The endpoint updates asset by provided quality type.","operationId":"updateAsset_1","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAssetRequest"}}},"required":true},"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the updated asset","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string"},"idShort":{"maxLength":255,"minLength":0,"type":"string"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string"},"owner":{"type":"string","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"activeAlert":{"type":"boolean"},"underInvestigation":{"type":"boolean"},"qualityType":{"type":"string","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string"},"semanticDataModel":{"type":"string","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE"]},"classification":{"maxLength":255,"minLength":0,"type":"string"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"receivedQualityAlertIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"importState":{"type":"string","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","UNSET"]},"importNote":{"type":"string"}}}}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/shelldescriptors":{"get":{"tags":["ShellDescriptorController"],"summary":"FindAll shell descriptors","description":"The endpoint returns all shell descriptors.","operationId":"findAll","responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"ShellDescriptors found.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ShellDescriptorResponse"}}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]},"delete":{"tags":["Registry","ShellDescriptorController"],"summary":"Triggers deleteAll of shell descriptors list","description":"The endpoint deletes all shell descriptors.","operationId":"deleteAll","responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"Deleted."},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/registry/reload":{"get":{"tags":["Registry"],"summary":"Triggers reload of shell descriptors","description":"The endpoint Triggers reload of shell descriptors.","operationId":"reload","responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"202":{"description":"Created registry reload job."},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/{investigationId}":{"get":{"tags":["Investigations"],"summary":"Gets investigations by id","description":"The endpoint returns investigations as paged result by their id.","operationId":"getInvestigation","parameters":[{"name":"investigationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":-2147483648,"type":"array","description":"Investigations","items":{"$ref":"#/components/schemas/InvestigationResponse"}}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/distinctFilterValues":{"get":{"tags":["Assets","Investigations"],"summary":"getDistinctFilterValues","description":"The endpoint returns a distinct filter values for given fieldName.","operationId":"distinctFilterValues","parameters":[{"name":"fieldName","in":"query","required":true,"schema":{"type":"string"}},{"name":"size","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"startWith","in":"query","required":true,"schema":{"type":"string"}},{"name":"channel","in":"query","required":true,"schema":{"type":"string","enum":["SENDER","RECEIVER"]}}],"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns a distinct filter values for given fieldName.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/dashboard":{"get":{"tags":["Dashboard"],"summary":"Returns dashboard related data","description":"The endpoint can return limited data based on the user role","operationId":"dashboard","responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns dashboard data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned":{"get":{"tags":["AssetsAsPlanned"],"summary":"Get assets by pagination","description":"The endpoint returns a paged result of assets.","operationId":"AssetsAsPlanned","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/OwnPageable"}},{"name":"filter","in":"query","required":true,"schema":{"$ref":"#/components/schemas/SearchCriteriaRequestParam"}}],"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string"},"idShort":{"maxLength":255,"minLength":0,"type":"string"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string"},"owner":{"type":"string","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"activeAlert":{"type":"boolean"},"underInvestigation":{"type":"boolean"},"qualityType":{"type":"string","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string"},"semanticDataModel":{"type":"string","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE"]},"classification":{"maxLength":255,"minLength":0,"type":"string"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"receivedQualityAlertIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"importState":{"type":"string","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","UNSET"]},"importNote":{"type":"string"}}}}}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned/{assetId}/children/{childId}":{"get":{"tags":["AssetsAsPlanned"],"summary":"Get asset by child id","description":"The endpoint returns an asset filtered by child id.","operationId":"assetByChildId","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}},{"name":"childId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the asset by childId","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string"},"idShort":{"maxLength":255,"minLength":0,"type":"string"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string"},"owner":{"type":"string","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"activeAlert":{"type":"boolean"},"underInvestigation":{"type":"boolean"},"qualityType":{"type":"string","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string"},"semanticDataModel":{"type":"string","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE"]},"classification":{"maxLength":255,"minLength":0,"type":"string"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"receivedQualityAlertIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"importState":{"type":"string","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","UNSET"]},"importNote":{"type":"string"}}}}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned/distinctFilterValues":{"get":{"tags":["Assets","AssetsAsPlanned"],"summary":"getDistinctFilterValues","description":"The endpoint returns a distinct filter values for given fieldName.","operationId":"distinctFilterValues_1","parameters":[{"name":"fieldName","in":"query","required":true,"schema":{"type":"string"}},{"name":"size","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"startWith","in":"query","required":true,"schema":{"type":"string"}},{"name":"owner","in":"query","required":true,"schema":{"type":"string","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]}}],"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns a distinct filter values for given fieldName.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built":{"get":{"tags":["AssetsAsBuilt"],"summary":"Get assets by pagination","description":"The endpoint returns a paged result of assets.","operationId":"assets","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/OwnPageable"}},{"name":"searchCriteriaRequestParam","in":"query","required":true,"schema":{"$ref":"#/components/schemas/SearchCriteriaRequestParam"}}],"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string"},"idShort":{"maxLength":255,"minLength":0,"type":"string"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string"},"owner":{"type":"string","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"activeAlert":{"type":"boolean"},"underInvestigation":{"type":"boolean"},"qualityType":{"type":"string","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string"},"semanticDataModel":{"type":"string","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE"]},"classification":{"maxLength":255,"minLength":0,"type":"string"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"receivedQualityAlertIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"importState":{"type":"string","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","UNSET"]},"importNote":{"type":"string"}}}}}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/{assetId}/children/{childId}":{"get":{"tags":["AssetsAsBuilt"],"summary":"Get asset by child id","description":"The endpoint returns an asset filtered by child id.","operationId":"assetByChildId_1","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}},{"name":"childId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the asset by childId","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string"},"idShort":{"maxLength":255,"minLength":0,"type":"string"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string"},"owner":{"type":"string","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"activeAlert":{"type":"boolean"},"underInvestigation":{"type":"boolean"},"qualityType":{"type":"string","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string"},"semanticDataModel":{"type":"string","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE"]},"classification":{"maxLength":255,"minLength":0,"type":"string"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"receivedQualityAlertIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","items":{"type":"integer","format":"int64"}},"importState":{"type":"string","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","UNSET"]},"importNote":{"type":"string"}}}}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/distinctFilterValues":{"get":{"tags":["AssetsAsBuilt","Assets"],"summary":"getDistinctFilterValues","description":"The endpoint returns a distinct filter values for given fieldName.","operationId":"distinctFilterValues_2","parameters":[{"name":"fieldName","in":"query","required":true,"schema":{"type":"string"}},{"name":"size","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"startWith","in":"query","required":true,"schema":{"type":"string"}},{"name":"owner","in":"query","required":true,"schema":{"type":"string","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]}}],"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns a distinct filter values for given fieldName.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/countries":{"get":{"tags":["AssetsAsBuilt"],"summary":"Get map of assets","description":"The endpoint returns a map for assets consumed by the map.","operationId":"assetsCountryMap","responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the assets found","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"integer","format":"int64"}}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/{alertId}":{"get":{"tags":["Alerts"],"summary":"Gets Alert by id","description":"The endpoint returns alert by id.","operationId":"getAlert","parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK.","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Alerts","items":{"$ref":"#/components/schemas/AlertResponse"}}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/distinctFilterValues":{"get":{"tags":["Assets","Alerts"],"summary":"getDistinctFilterValues","description":"The endpoint returns a distinct filter values for given fieldName.","operationId":"distinctFilterValues_3","parameters":[{"name":"fieldName","in":"query","required":true,"schema":{"type":"string"}},{"name":"size","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"startWith","in":"query","required":true,"schema":{"type":"string"}},{"name":"channel","in":"query","required":true,"schema":{"type":"string","enum":["SENDER","RECEIVER"]}}],"responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns a distinct filter values for given fieldName.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/submodel/data":{"delete":{"tags":["Submodel"],"summary":"Delete All Submodels","description":"Deletes all submodels from the system.","operationId":"deleteSubmodels","responses":{"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"204":{"description":"No Content."},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/bpn-config/{bpn}":{"delete":{"tags":["BpnEdcMapping"],"summary":"Deletes BPN EDC URL mappings","description":"The endpoint deletes BPN EDC URL mappings","operationId":"deleteBpnEdcUrlMappings","parameters":[{"name":"bpn","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Okay"},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"Deleted."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}}},"components":{"schemas":{"BpnMappingRequest":{"required":["bpn","url"],"type":"object","properties":{"bpn":{"maxLength":255,"minLength":0,"type":"string"},"url":{"maxLength":255,"minLength":0,"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"message":{"maxLength":1000,"minLength":0,"pattern":"^.*$","type":"string"}}},"StartQualityNotificationRequest":{"required":["severity"],"type":"object","properties":{"partIds":{"maxItems":100,"minItems":1,"type":"array","items":{"type":"string"}},"description":{"maxLength":1000,"minLength":15,"type":"string"},"targetDate":{"type":"string","format":"date-time"},"severity":{"type":"string","enum":["MINOR","MAJOR","CRITICAL","LIFE_THREATENING"]},"receiverBpn":{"type":"string"},"asBuilt":{"type":"boolean"}}},"QualityNotificationIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"}}},"UpdateQualityNotificationRequest":{"required":["status"],"type":"object","properties":{"status":{"type":"string","description":"The UpdateInvestigationStatus","enum":["ACKNOWLEDGED","ACCEPTED","DECLINED"]},"reason":{"type":"string"}}},"CloseQualityNotificationRequest":{"type":"object","properties":{"reason":{"maxLength":1000,"minLength":15,"type":"string"}}},"CreateNotificationContractRequest":{"required":["notificationMethod","notificationType"],"type":"object","properties":{"notificationType":{"type":"string","enum":["QUALITY_INVESTIGATION","QUALITY_ALERT"]},"notificationMethod":{"type":"string","enum":["RECEIVE","UPDATE","RESOLVE"]}}},"CreateNotificationContractResponse":{"type":"object","properties":{"notificationAssetId":{"type":"string"},"accessPolicyId":{"type":"string"},"contractDefinitionId":{"type":"string"}}},"SyncAssetsRequest":{"type":"object","properties":{"globalAssetIds":{"maxItems":100,"minItems":1,"type":"array","description":"Assets","items":{"type":"string"}}}},"GetDetailInformationRequest":{"type":"object","properties":{"assetIds":{"maxItems":50,"minItems":1,"type":"array","items":{"type":"string"}}}},"UpdateAssetRequest":{"required":["qualityType"],"type":"object","properties":{"qualityType":{"type":"string","enum":["Ok","Minor","Major","Critical","LifeThreatening"]}}},"DescriptionsResponse":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string"},"idShort":{"maxLength":255,"minLength":0,"type":"string"}}},"DetailAspectDataAsBuiltResponse":{"type":"object","properties":{"partId":{"maxLength":255,"minLength":0,"type":"string"},"customerPartId":{"maxLength":255,"minLength":0,"type":"string"},"nameAtCustomer":{"maxLength":255,"minLength":0,"type":"string"},"manufacturingCountry":{"maxLength":255,"minLength":0,"type":"string"},"manufacturingDate":{"maxLength":255,"minLength":0,"type":"string"}}},"DetailAspectDataAsPlannedResponse":{"type":"object","properties":{"validityPeriodFrom":{"maxLength":255,"minLength":0,"type":"string"},"validityPeriodTo":{"maxLength":255,"minLength":0,"type":"string"}}},"DetailAspectDataResponse":{"type":"object","oneOf":[{"$ref":"#/components/schemas/DetailAspectDataAsBuiltResponse"},{"$ref":"#/components/schemas/DetailAspectDataAsPlannedResponse"},{"$ref":"#/components/schemas/PartSiteInformationAsPlannedResponse"},{"$ref":"#/components/schemas/DetailAspectDataTractionBatteryCodeResponse"}]},"DetailAspectDataTractionBatteryCodeResponse":{"type":"object","properties":{"productType":{"maxLength":255,"minLength":0,"type":"string"},"tractionBatteryCode":{"maxLength":255,"minLength":0,"type":"string"},"subcomponents":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectDataTractionBatteryCodeSubcomponentResponse"}}}},"DetailAspectDataTractionBatteryCodeSubcomponentResponse":{"type":"object","properties":{"productType":{"maxLength":255,"minLength":0,"type":"string"},"tractionBatteryCode":{"maxLength":255,"minLength":0,"type":"string"}}},"DetailAspectModelResponse":{"type":"object","properties":{"type":{"type":"string","enum":["AS_BUILT","AS_PLANNED","TRACTION_BATTERY_CODE","SINGLE_LEVEL_BOM_AS_BUILT","SINGLE_LEVEL_USAGE_AS_BUILT","SINGLE_LEVEL_BOM_AS_PLANNED","PART_SITE_INFORMATION_AS_PLANNED"]},"data":{"$ref":"#/components/schemas/DetailAspectDataResponse"}}},"PartSiteInformationAsPlannedResponse":{"type":"object","properties":{"functionValidUntil":{"type":"string"},"function":{"type":"string"},"functionValidFrom":{"type":"string"},"catenaXSiteId":{"type":"string"}}},"ShellDescriptorResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"globalAssetId":{"type":"string"}}},"OwnPageable":{"type":"object","properties":{"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"sort":{"maxItems":2147483647,"type":"array","description":"Content of Assets PageResults","example":"manufacturerPartId,desc","items":{"type":"string"}}}},"SearchCriteriaRequestParam":{"type":"object","properties":{"filter":{"maxItems":2147483647,"type":"array","description":"Filter Criteria","example":"owner,EQUAL,OWN","items":{"type":"string"}}}},"InvestigationResponse":{"type":"object","properties":{"id":{"maximum":255,"minimum":0,"type":"integer","format":"int64"},"status":{"maxLength":255,"minLength":0,"type":"string","enum":["CREATED","SENT","RECEIVED","ACKNOWLEDGED","ACCEPTED","DECLINED","CANCELED","CLOSED"]},"description":{"maxLength":1000,"minLength":0,"type":"string"},"createdBy":{"maxLength":255,"minLength":0,"type":"string"},"createdByName":{"maxLength":255,"minLength":0,"type":"string"},"createdDate":{"maxLength":50,"minLength":0,"type":"string"},"assetIds":{"maxItems":1000,"minItems":0,"type":"array","description":"assetIds","items":{"type":"string"}},"channel":{"maxLength":255,"minLength":0,"type":"string","enum":["SENDER","RECEIVER"]},"reason":{"$ref":"#/components/schemas/QualityNotificationReasonResponse"},"sendTo":{"maxLength":255,"minLength":0,"type":"string"},"sendToName":{"maxLength":255,"minLength":0,"type":"string"},"severity":{"maxLength":255,"minLength":0,"type":"string","enum":["MINOR","MAJOR","CRITICAL","LIFE-THREATENING"]},"targetDate":{"maxLength":50,"minLength":0,"type":"string"},"errorMessage":{"maxLength":255,"minLength":0,"type":"string"}}},"QualityNotificationReasonResponse":{"type":"object","properties":{"close":{"maxLength":1000,"minLength":0,"type":"string"},"accept":{"maxLength":1000,"minLength":0,"type":"string"},"decline":{"maxLength":1000,"minLength":0,"type":"string"}}},"DashboardResponse":{"type":"object","properties":{"asBuiltCustomerParts":{"type":"integer","format":"int64"},"asPlannedCustomerParts":{"type":"integer","format":"int64"},"asBuiltSupplierParts":{"type":"integer","format":"int64"},"asPlannedSupplierParts":{"type":"integer","format":"int64"},"asBuiltOwnParts":{"type":"integer","format":"int64"},"asPlannedOwnParts":{"type":"integer","format":"int64"},"myPartsWithOpenAlerts":{"type":"integer","format":"int64"},"myPartsWithOpenInvestigations":{"type":"integer","format":"int64"},"supplierPartsWithOpenAlerts":{"type":"integer","format":"int64"},"customerPartsWithOpenAlerts":{"type":"integer","format":"int64"},"supplierPartsWithOpenInvestigations":{"type":"integer","format":"int64"},"customerPartsWithOpenInvestigations":{"type":"integer","format":"int64"},"receivedActiveAlerts":{"type":"integer","format":"int64"},"receivedActiveInvestigations":{"type":"integer","format":"int64"},"sentActiveAlerts":{"type":"integer","format":"int64"},"sentActiveInvestigations":{"type":"integer","format":"int64"}}},"AlertResponse":{"type":"object","properties":{"id":{"maximum":255,"minimum":0,"type":"integer","format":"int64"},"status":{"maxLength":255,"minLength":0,"type":"string","enum":["CREATED","SENT","RECEIVED","ACKNOWLEDGED","ACCEPTED","DECLINED","CANCELED","CLOSED"]},"description":{"maxLength":1000,"minLength":0,"type":"string"},"createdBy":{"maxLength":255,"minLength":0,"type":"string"},"createdByName":{"maxLength":255,"minLength":0,"type":"string"},"createdDate":{"maxLength":50,"minLength":0,"type":"string"},"assetIds":{"maxItems":1000,"minItems":0,"type":"array","description":"assetIds","items":{"type":"string"}},"channel":{"maxLength":255,"minLength":0,"type":"string","enum":["SENDER","RECEIVER"]},"reason":{"$ref":"#/components/schemas/QualityNotificationReasonResponse"},"sendTo":{"maxLength":255,"minLength":0,"type":"string"},"sendToName":{"maxLength":255,"minLength":0,"type":"string"},"severity":{"maxLength":255,"minLength":0,"type":"string","enum":["MINOR","MAJOR","CRITICAL","LIFE-THREATENING"]},"targetDate":{"maxLength":50,"minLength":0,"type":"string"},"errorMessage":{"maxLength":255,"minLength":0,"type":"string"}}}},"securitySchemes":{"oAuth2":{"type":"oauth2","flows":{"clientCredentials":{"scopes":{"profile email":""}}}}}}} \ No newline at end of file diff --git a/tx-backend/pom.xml b/tx-backend/pom.xml index 33b7ff305e..101b4786bb 100644 --- a/tx-backend/pom.xml +++ b/tx-backend/pom.xml @@ -326,7 +326,6 @@ SPDX-License-Identifier: Apache-2.0 org.apache.commons commons-collections4 - 4.4 diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/ImportController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/ImportController.java new file mode 100644 index 0000000000..c424550ca0 --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/ImportController.java @@ -0,0 +1,118 @@ +/******************************************************************************** + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://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. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +package org.eclipse.tractusx.traceability.assets.application; + + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.eclipse.tractusx.traceability.assets.application.importpoc.ImportService; +import org.eclipse.tractusx.traceability.assets.application.importpoc.validation.ValidJsonFile; +import org.eclipse.tractusx.traceability.common.response.ErrorResponse; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +@Slf4j +@RequiredArgsConstructor +@RestController +@PreAuthorize("hasAnyRole('ROLE_ADMIN', 'ROLE_SUPERVISOR')") +@Tag(name = "AssetsImport") +@RequestMapping(path = "/assets") +public class ImportController { + + private final ImportService importService; + + @Operation(operationId = "importJson", + summary = "asset upload", + tags = {"AssetsImport"}, + description = "This endpoint stores assets in the application. Those can be later published in the Catena-X network.", + security = @SecurityRequirement(name = "oAuth2", scopes = "profile email")) + @ApiResponses(value = { + @ApiResponse( + responseCode = "200", + description = "OK.", + content = @Content( + mediaType = "application/json", + schema = @Schema())), + @ApiResponse( + responseCode = "204", + description = "No Content.", + content = @Content()), + @ApiResponse( + responseCode = "400", + description = "Bad request.", + content = @Content( + mediaType = "application/json", + schema = @Schema(implementation = ErrorResponse.class))), + @ApiResponse( + responseCode = "401", + description = "Authorization failed.", + content = @Content( + mediaType = "application/json", + schema = @Schema(implementation = ErrorResponse.class))), + + @ApiResponse( + responseCode = "403", + description = "Forbidden.", + content = @Content( + mediaType = "application/json", + schema = @Schema(implementation = ErrorResponse.class))), + @ApiResponse( + responseCode = "404", + description = "Not found.", + content = @Content( + mediaType = "application/json", + schema = @Schema(implementation = ErrorResponse.class))), + @ApiResponse( + responseCode = "415", + description = "Unsupported media type", + content = @Content( + mediaType = "application/json", + schema = @Schema(implementation = ErrorResponse.class))), + @ApiResponse( + responseCode = "429", + description = "Too many requests.", + content = @Content( + mediaType = "application/json", + schema = @Schema(implementation = ErrorResponse.class))), + @ApiResponse( + responseCode = "500", + description = "Internal server error.", + content = @Content( + mediaType = "application/json", + schema = @Schema(implementation = ErrorResponse.class)))}) + @PostMapping(value = "/import", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) + public ResponseEntity importJson(@ValidJsonFile @RequestParam("file") MultipartFile file) { + importService.importAssets(file); + return ResponseEntity.noContent().build(); + } +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/asbuilt/mapper/AssetAsBuiltResponseMapper.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/asbuilt/mapper/AssetAsBuiltResponseMapper.java index 1e898bfdb4..7d69ba48a7 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/asbuilt/mapper/AssetAsBuiltResponseMapper.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/asbuilt/mapper/AssetAsBuiltResponseMapper.java @@ -58,6 +58,8 @@ public static AssetAsBuiltResponse from(final AssetBase asset) { .receivedQualityAlertIdsInStatusActive(getNotificationIdsInActiveState(asset.getReceivedQualityAlerts())) .sentQualityInvestigationIdsInStatusActive(getNotificationIdsInActiveState(asset.getSentQualityInvestigations())) .receivedQualityInvestigationIdsInStatusActive(getNotificationIdsInActiveState(asset.getReceivedQualityInvestigations())) + .importState(toImportStateResponse(asset.getImportState())) + .importNote(asset.getImportNote()) .build(); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/asplanned/mapper/AssetAsPlannedResponseMapper.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/asplanned/mapper/AssetAsPlannedResponseMapper.java index 3e5ceebd03..c19f14a479 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/asplanned/mapper/AssetAsPlannedResponseMapper.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/asplanned/mapper/AssetAsPlannedResponseMapper.java @@ -59,6 +59,8 @@ public static AssetAsPlannedResponse from(final AssetBase asset) { .receivedQualityAlertIdsInStatusActive(getNotificationIdsInActiveState(asset.getReceivedQualityAlerts())) .sentQualityInvestigationIdsInStatusActive(getNotificationIdsInActiveState(asset.getSentQualityInvestigations())) .receivedQualityInvestigationIdsInStatusActive(getNotificationIdsInActiveState(asset.getReceivedQualityInvestigations())) + .importState(toImportStateResponse(asset.getImportState())) + .importNote(asset.getImportNote()) .build(); } @@ -79,4 +81,5 @@ public static List from(final List assets) { .map(AssetAsPlannedResponseMapper::from) .toList(); } + } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/base/mapper/AssetBaseResponseMapper.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/base/mapper/AssetBaseResponseMapper.java index e69056bdf9..d912911630 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/base/mapper/AssetBaseResponseMapper.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/base/mapper/AssetBaseResponseMapper.java @@ -27,6 +27,7 @@ import assets.response.base.DetailAspectDataResponse; import assets.response.base.DetailAspectModelResponse; import assets.response.base.DetailAspectTypeResponse; +import assets.response.base.ImportStateResponse; import assets.response.base.OwnerResponse; import assets.response.base.QualityTypeResponse; import assets.response.base.SemanticDataModelResponse; @@ -39,6 +40,7 @@ import org.eclipse.tractusx.traceability.assets.domain.asplanned.model.aspect.DetailAspectDataAsPlanned; import org.eclipse.tractusx.traceability.assets.domain.asplanned.model.aspect.DetailAspectDataPartSiteInformationAsPlanned; import org.eclipse.tractusx.traceability.assets.domain.base.model.Descriptions; +import org.eclipse.tractusx.traceability.assets.domain.base.model.ImportState; import org.eclipse.tractusx.traceability.assets.domain.base.model.Owner; import org.eclipse.tractusx.traceability.assets.domain.base.model.QualityType; import org.eclipse.tractusx.traceability.assets.domain.base.model.SemanticDataModel; @@ -47,6 +49,7 @@ import org.eclipse.tractusx.traceability.assets.domain.base.model.aspect.DetailAspectType; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationId; +import org.springframework.context.annotation.Import; import java.util.List; @@ -147,4 +150,12 @@ private static List fro return subcomponents.stream().map(entry -> DetailAspectDataTractionBatteryCodeSubcomponentResponse.builder().tractionBatteryCode(entry.getTractionBatteryCode()) .productType(entry.getProductType()).build()).toList(); } + + public static ImportStateResponse toImportStateResponse(ImportState importState) { + if (importState == null) { + return ImportStateResponse.UNSET; + } else { + return ImportStateResponse.valueOf(importState.name()); + } + } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/ImportService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/ImportService.java new file mode 100644 index 0000000000..876df7a2ea --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/ImportService.java @@ -0,0 +1,27 @@ +/******************************************************************************** + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://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. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +package org.eclipse.tractusx.traceability.assets.application.importpoc; + +import org.springframework.web.multipart.MultipartFile; + +import java.io.IOException; + +public interface ImportService { + void importAssets(MultipartFile file); +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/validation/JsonFileValidator.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/validation/JsonFileValidator.java new file mode 100644 index 0000000000..573197d1ae --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/validation/JsonFileValidator.java @@ -0,0 +1,43 @@ +/******************************************************************************** + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://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. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +package org.eclipse.tractusx.traceability.assets.application.importpoc.validation; + +import jakarta.validation.ConstraintValidator; +import jakarta.validation.ConstraintValidatorContext; +import org.eclipse.tractusx.traceability.assets.domain.importpoc.exception.ImportException; +import org.springframework.http.MediaType; +import org.springframework.web.multipart.MultipartFile; + +public class JsonFileValidator implements ConstraintValidator { + + @Override + public boolean isValid(MultipartFile file, ConstraintValidatorContext context) { + if (file == null || file.isEmpty()) { + return true; + } + + if (MediaType.APPLICATION_JSON_VALUE.equals(file.getContentType())) { + return true; + } else { + throw new ImportException("File format not supported " + file.getContentType()); + } + + + } +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/validation/ValidJsonFile.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/validation/ValidJsonFile.java new file mode 100644 index 0000000000..c964c8d91e --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/validation/ValidJsonFile.java @@ -0,0 +1,30 @@ +/******************************************************************************** + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://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. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +package org.eclipse.tractusx.traceability.assets.application.importpoc.validation; + +import jakarta.validation.Payload; + +public @interface ValidJsonFile { + + String message() default "File must be a valid JSON file"; + + Class[] groups() default {}; + + Class[] payload() default {}; +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/AssetBase.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/AssetBase.java index c955b6ea79..27096aa98d 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/AssetBase.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/AssetBase.java @@ -59,4 +59,6 @@ public class AssetBase { private List receivedQualityAlerts; private List sentQualityInvestigations; private List receivedQualityInvestigations; + private ImportState importState; + private String importNote; } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportNote.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportNote.java new file mode 100644 index 0000000000..e764d24f44 --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportNote.java @@ -0,0 +1,27 @@ +/******************************************************************************** + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://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. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +package org.eclipse.tractusx.traceability.assets.domain.base.model; + +public class ImportNote { + public static String TRANSIENT_CREATED = "Asset created successfully in transient state."; + public static String TRANSIENT_UPDATED = "Asset updated successfully in transient state."; + public static String PERSISTENT_NO_UPDATE = "Asset in sync with digital twin registry. Twin will not be updated."; + public static String PERSISTED = "Asset created/updated successfully in persistant state."; + +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportState.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportState.java new file mode 100644 index 0000000000..fb0e1b9e6d --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportState.java @@ -0,0 +1,24 @@ +/******************************************************************************** + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://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. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +package org.eclipse.tractusx.traceability.assets.domain.base.model; + + +public enum ImportState { + TRANSIENT, PERSISTENT, ERROR, IN_SYNCHRONIZATION, UNSET; +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/AssetMetaInfoRequest.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/AssetMetaInfoRequest.java new file mode 100644 index 0000000000..2a9e9c7344 --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/AssetMetaInfoRequest.java @@ -0,0 +1,22 @@ +/******************************************************************************** + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://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. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +package org.eclipse.tractusx.traceability.assets.domain.importpoc; + +public record AssetMetaInfoRequest(String catenaXId) { +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/AssetWrapperRequest.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/AssetWrapperRequest.java new file mode 100644 index 0000000000..ab972c251d --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/AssetWrapperRequest.java @@ -0,0 +1,28 @@ +/******************************************************************************** + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://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. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +package org.eclipse.tractusx.traceability.assets.domain.importpoc; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.eclipse.tractusx.traceability.assets.infrastructure.base.irs.model.response.Submodel; + +import java.util.List; + +public record AssetWrapperRequest(@JsonProperty("assetMetaInfo") AssetMetaInfoRequest assetMetaInfoRequest, + @JsonProperty("submodels") List submodels) { +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/ImportRequest.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/ImportRequest.java new file mode 100644 index 0000000000..6161829e6d --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/ImportRequest.java @@ -0,0 +1,29 @@ +/******************************************************************************** + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://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. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +package org.eclipse.tractusx.traceability.assets.domain.importpoc; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.util.List; + + +public record ImportRequest(@JsonProperty("assets") List assetRawRequestList) { +} + + diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/exception/ImportException.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/exception/ImportException.java new file mode 100644 index 0000000000..74914b972e --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/exception/ImportException.java @@ -0,0 +1,25 @@ +/******************************************************************************** + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://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. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +package org.eclipse.tractusx.traceability.assets.domain.importpoc.exception; + +public class ImportException extends RuntimeException{ + public ImportException(String message) { + super(message); + } +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/ImportServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/ImportServiceImpl.java new file mode 100644 index 0000000000..222769d6df --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/ImportServiceImpl.java @@ -0,0 +1,55 @@ +/******************************************************************************** + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://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. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +package org.eclipse.tractusx.traceability.assets.domain.importpoc.service; + +import com.fasterxml.jackson.databind.ObjectMapper; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.eclipse.tractusx.traceability.assets.domain.importpoc.ImportRequest; +import org.eclipse.tractusx.traceability.assets.domain.importpoc.exception.ImportException; + +import org.eclipse.tractusx.traceability.assets.application.importpoc.ImportService; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +@Slf4j +@RequiredArgsConstructor +@Service +public class ImportServiceImpl implements ImportService { + private final ObjectMapper objectMapper; + + @Override + public void importAssets(MultipartFile file) { + try { + // TODO - build a json schema construct which consists of the assetmetainfo and the submodels. + // The submodels needs to be pulled by (example for serialpart) https://github.com/eclipse-tractusx/sldt-semantic-models/blob/main/io.catenax.serial_part/2.0.0/gen/SerialPart-schema.json + // It is okay to download the schemas and put them in a folder as we need to have control over the schemas + // For the validation see: https://github.com/eclipse-tractusx/item-relationship-service/blob/main/irs-api/src/main/java/org/eclipse/tractusx/irs/services/validation/JsonValidatorService.java#L43 + + String fileContent = new String(file.getBytes()); + log.info("Imported file: " + fileContent); + ImportRequest importRequest = objectMapper.readValue(fileContent, ImportRequest.class); + //Submodels per assetId + // importRequest.assetRawRequestList().get(0).assetMetaInfoRequest().catenaXId(); + // importRequest.assetRawRequestList().get(0).submodels(); + } catch (Exception e) { + throw new ImportException(e.getMessage()); + } + } +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/model/AssetAsBuiltEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/model/AssetAsBuiltEntity.java index 34ec0bacd2..ab5c5beab5 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/model/AssetAsBuiltEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/model/AssetAsBuiltEntity.java @@ -117,6 +117,8 @@ public static AssetAsBuiltEntity from(AssetBase asset) { .productType(tractionBatteryCodeObj.getProductType()) .tractionBatteryCode(tractionBatteryCodeObj.getTractionBatteryCode()) .subcomponents(tractionBatteryCodeObj.getSubcomponents()) + .importState(asset.getImportState()) + .importNote(asset.getImportNote()) .build(); } @@ -147,6 +149,8 @@ public AssetBase toDomain() { .receivedQualityAlerts(emptyIfNull(this.alerts).stream().filter(alert -> NotificationSideBaseEntity.RECEIVER.equals(alert.getSide())).map(AlertEntity::toDomain).toList()) .sentQualityInvestigations(emptyIfNull(this.investigations).stream().filter(alert -> NotificationSideBaseEntity.SENDER.equals(alert.getSide())).map(InvestigationEntity::toDomain).toList()) .receivedQualityInvestigations(emptyIfNull(this.investigations).stream().filter(alert -> NotificationSideBaseEntity.RECEIVER.equals(alert.getSide())).map(InvestigationEntity::toDomain).toList()) + .importState(this.getImportState()) + .importNote(this.getImportNote()) .build(); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/model/AssetAsPlannedEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/model/AssetAsPlannedEntity.java index 3f1f7f81e3..07333cafc6 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/model/AssetAsPlannedEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/model/AssetAsPlannedEntity.java @@ -110,6 +110,8 @@ public static AssetAsPlannedEntity from(AssetBase asset) { .inInvestigation(asset.isInInvestigation()) .semanticDataModel(SemanticDataModelEntity.from(asset.getSemanticDataModel())) .catenaxSiteId(asPlannedInfo.getCatenaxSiteId()) + .importState(asset.getImportState()) + .importNote(asset.getImportNote()) .build(); } @@ -137,7 +139,8 @@ public static AssetBase toDomain(AssetAsPlannedEntity entity) { .receivedQualityAlerts(emptyIfNull(entity.alerts).stream().filter(alert -> NotificationSideBaseEntity.RECEIVER.equals(alert.getSide())).map(AlertEntity::toDomain).toList()) .sentQualityInvestigations(emptyIfNull(entity.investigations).stream().filter(alert -> NotificationSideBaseEntity.SENDER.equals(alert.getSide())).map(InvestigationEntity::toDomain).toList()) .receivedQualityInvestigations(emptyIfNull(entity.investigations).stream().filter(alert -> NotificationSideBaseEntity.RECEIVER.equals(alert.getSide())).map(InvestigationEntity::toDomain).toList()) - + .importState(entity.getImportState()) + .importNote(entity.getImportNote()) .build(); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/JobDetailResponse.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/JobDetailResponse.java index 8e528e32df..2f936e8eb0 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/JobDetailResponse.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/JobDetailResponse.java @@ -28,6 +28,7 @@ import lombok.extern.slf4j.Slf4j; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.model.aspect.DetailAspectDataTractionBatteryCode; import org.eclipse.tractusx.traceability.assets.domain.base.model.AssetBase; +import org.eclipse.tractusx.traceability.assets.domain.base.model.ImportState; import org.eclipse.tractusx.traceability.assets.domain.base.model.Descriptions; import org.eclipse.tractusx.traceability.assets.domain.base.model.Owner; import org.eclipse.tractusx.traceability.assets.infrastructure.base.irs.model.request.BomLifecycle; @@ -165,7 +166,7 @@ private List mapToOtherPartsAsBuilt(Map shortIds, Own .stream() .map(semanticDataModel -> semanticDataModel.toDomainAsBuilt(semanticDataModel.localIdentifiers(), shortIds, owner, bpnMapping, Collections.emptyList(), - Collections.emptyList(), Optional.empty())) + Collections.emptyList(), Optional.empty(), ImportState.PERSISTENT)) .toList(); log.info(":: mapped assets: {}", assets); return assets; @@ -192,7 +193,7 @@ private List mapToOtherPartsAsPlanned(Map shortIds, O bpnMapping, Collections.emptyList(), Collections.emptyList(), - ownerBpn)) + ownerBpn, ImportState.PERSISTENT)) .toList(); log.info(":: mapped assets: {}", assets); return assets; @@ -229,7 +230,9 @@ private List mapToOwnPartsAsPlanned(Map shortIds, Map bpnMapping, Collections.emptyList(), getChildParts(singleLevelBomRelationship, shortIds, semanticDataModel.catenaXId()), - ownerBpn)) + ownerBpn, + ImportState.PERSISTENT + )) .toList(); log.info(":: mapped assets: {}", assets); return assets; @@ -273,7 +276,7 @@ private List mapToOwnPartsAsBuilt(Map shortIds, Map semanticDataModel.toDomainAsBuilt(semanticDataModel.localIdentifiers(), shortIds, Owner.OWN, bpnMapping, getParentParts(customerPartsMap, shortIds, semanticDataModel.catenaXId()), getChildParts(supplierPartsMap, shortIds, semanticDataModel.catenaXId()), - tractionBatteryCodeOptional)) + tractionBatteryCodeOptional, ImportState.PERSISTENT)) .toList(); log.info(":: mapped assets: {}", assets); return assets; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/Submodel.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/Submodel.java index 8f65b87761..3571f9991b 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/Submodel.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/Submodel.java @@ -29,7 +29,7 @@ import org.eclipse.tractusx.traceability.assets.domain.asbuilt.model.aspect.DetailAspectDataTractionBatteryCode; import org.eclipse.tractusx.traceability.assets.infrastructure.base.irs.model.response.semanticdatamodel.SemanticDataModel; -class Submodel { +public class Submodel { @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXTERNAL_PROPERTY, diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/semanticdatamodel/ManufacturingInformation.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/semanticdatamodel/ManufacturingInformation.java index f8519a51d7..f0fb5446e1 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/semanticdatamodel/ManufacturingInformation.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/semanticdatamodel/ManufacturingInformation.java @@ -22,6 +22,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.eclipse.tractusx.traceability.common.date.CustomOffSetDateTimeNullOnException; + import java.time.OffsetDateTime; public record ManufacturingInformation( diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/semanticdatamodel/SemanticDataModel.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/semanticdatamodel/SemanticDataModel.java index 45e2c37d77..ac25dc709a 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/semanticdatamodel/SemanticDataModel.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/semanticdatamodel/SemanticDataModel.java @@ -27,6 +27,8 @@ import lombok.extern.slf4j.Slf4j; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.model.aspect.DetailAspectDataTractionBatteryCode; import org.eclipse.tractusx.traceability.assets.domain.base.model.AssetBase; +import org.eclipse.tractusx.traceability.assets.domain.base.model.ImportNote; +import org.eclipse.tractusx.traceability.assets.domain.base.model.ImportState; import org.eclipse.tractusx.traceability.assets.domain.base.model.Descriptions; import org.eclipse.tractusx.traceability.assets.domain.base.model.Owner; import org.eclipse.tractusx.traceability.assets.domain.base.model.QualityType; @@ -96,7 +98,7 @@ public Optional getLocalIdByInput(LocalIdKey key, List localIds public AssetBase toDomainAsBuilt(List localIds, Map shortIds, Owner owner, Map bpns, List parentRelations, List childRelations, - Optional tractionBatteryCodeOptional) { + Optional tractionBatteryCodeOptional, ImportState assetImportState) { final String manufacturerName = bpns.get(manufacturerId()); ArrayList detailAspectModels = new ArrayList<>(); @@ -119,7 +121,6 @@ public AssetBase toDomainAsBuilt(List localIds, Map sho semanticDataModel.set(org.eclipse.tractusx.traceability.assets.domain.base.model.SemanticDataModel.JUSTINSEQUENCE); }); - if (semanticDataModel.get() == null) { semanticDataModel.set(org.eclipse.tractusx.traceability.assets.domain.base.model.SemanticDataModel.UNKNOWN); } @@ -144,6 +145,8 @@ public AssetBase toDomainAsBuilt(List localIds, Map sho .qualityType(QualityType.OK) .semanticDataModel(semanticDataModel.get()) .van(van()) + .importState(assetImportState) + .importNote(ImportNote.PERSISTED) .build(); } @@ -154,7 +157,8 @@ public AssetBase toDomainAsPlanned( Map bpns, List parentRelations, List childRelations, - String ownerBpn) { + String ownerBpn, + ImportState assetImportState) { final String manufacturerName = bpns.get(ownerBpn); List partSiteInfoAsPlanned = extractDetailAspectModelsPartSiteInformationAsPlanned(sites()); @@ -180,6 +184,8 @@ public AssetBase toDomainAsPlanned( .qualityType(QualityType.OK) .semanticDataModel(org.eclipse.tractusx.traceability.assets.domain.base.model.SemanticDataModel.PARTASPLANNED) .van(van()) + .importState(assetImportState) + .importNote(ImportNote.PERSISTED) .build(); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/semanticdatamodel/Site.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/semanticdatamodel/Site.java index 14c371ea3d..09ee75b457 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/semanticdatamodel/Site.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/semanticdatamodel/Site.java @@ -22,6 +22,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.eclipse.tractusx.traceability.common.date.CustomOffSetDateTimeNullOnException; + import java.time.OffsetDateTime; public record Site( diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/semanticdatamodel/ValidityPeriod.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/semanticdatamodel/ValidityPeriod.java index 66603d2acd..d89a1439ba 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/semanticdatamodel/ValidityPeriod.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/semanticdatamodel/ValidityPeriod.java @@ -21,6 +21,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.eclipse.tractusx.traceability.common.date.CustomOffSetDateTimeNullOnException; + import java.time.OffsetDateTime; public record ValidityPeriod( diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/model/AssetBaseEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/model/AssetBaseEntity.java index 04923992a9..1c98aafc7d 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/model/AssetBaseEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/model/AssetBaseEntity.java @@ -26,6 +26,7 @@ import lombok.NoArgsConstructor; import lombok.Setter; import lombok.experimental.SuperBuilder; +import org.eclipse.tractusx.traceability.assets.domain.base.model.ImportState; import org.eclipse.tractusx.traceability.assets.domain.base.model.Owner; import org.eclipse.tractusx.traceability.assets.domain.base.model.QualityType; @@ -55,4 +56,7 @@ public class AssetBaseEntity { private SemanticDataModelEntity semanticDataModel; private String semanticModelId; private String van; + @Enumerated(EnumType.STRING) + private ImportState importState; + private String importNote; } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ErrorHandlingConfig.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ErrorHandlingConfig.java index 8720cd5222..6335cae1cc 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ErrorHandlingConfig.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ErrorHandlingConfig.java @@ -28,6 +28,7 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.exception.ExceptionUtils; +import org.eclipse.tractusx.traceability.assets.domain.importpoc.exception.ImportException; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.exception.AssetNotFoundException; import org.eclipse.tractusx.traceability.bpn.domain.model.BpnNotFoundException; import org.eclipse.tractusx.traceability.common.domain.ParseLocalDateException; @@ -108,6 +109,13 @@ ResponseEntity handleAssetNotFoundException(AssetNotFoundExceptio .body(new ErrorResponse(exception.getMessage())); } + @ExceptionHandler(ImportException.class) + ResponseEntity handleImportException(ImportException exception) { + log.warn("handleImportException", exception); + return ResponseEntity.status(HttpStatus.BAD_REQUEST) + .body(new ErrorResponse(exception.getMessage())); + } + @ExceptionHandler(InvestigationNotFoundException.class) ResponseEntity handleInvestigationNotFoundException(InvestigationNotFoundException exception) { log.warn("handleInvestigationNotFoundException", exception); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/domain/model/SubmodelPayload.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/domain/model/SubmodelPayload.java new file mode 100644 index 0000000000..284f48bb83 --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/domain/model/SubmodelPayload.java @@ -0,0 +1,33 @@ +/******************************************************************************** + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://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. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +package org.eclipse.tractusx.traceability.submodel.domain.model; + + + + +import lombok.Builder; +import lombok.Data; + +@Data +@Builder +public class SubmodelPayload { + private String id; + private String json; +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/infrastructure/model/SubmodelPayloadEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/infrastructure/model/SubmodelPayloadEntity.java new file mode 100644 index 0000000000..b83f119370 --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/infrastructure/model/SubmodelPayloadEntity.java @@ -0,0 +1,65 @@ +/******************************************************************************** + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://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. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +package org.eclipse.tractusx.traceability.submodel.infrastructure.model; + +import jakarta.persistence.CascadeType; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.Table; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import org.eclipse.tractusx.traceability.assets.infrastructure.asbuilt.model.AssetAsBuiltEntity; +import org.eclipse.tractusx.traceability.assets.infrastructure.asplanned.model.AssetAsPlannedEntity; + +import java.util.List; + +@Entity +@Table(name = "submodel_payload") +@Getter +@NoArgsConstructor +@AllArgsConstructor +@Builder +public class SubmodelPayloadEntity { + @Id + private String id; + + private String json; + + + @ManyToMany(cascade = CascadeType.ALL) + @JoinTable( + name = "assets_as_built_submodel_payload", + joinColumns = @JoinColumn(name = "submodel_payload_id"), + inverseJoinColumns = @JoinColumn(name = "asset_id") + ) + public List assets; + + @ManyToMany(cascade = CascadeType.ALL) + @JoinTable( + name = "assets_as_planned_submodel_payload", + joinColumns = @JoinColumn(name = "submodel_payload_id"), + inverseJoinColumns = @JoinColumn(name = "asset_id") + ) + private List assetsAsPlanned; +} diff --git a/tx-backend/src/main/resources/db/migration/V5__add_assetState_to_assets.sql b/tx-backend/src/main/resources/db/migration/V5__add_assetState_to_assets.sql new file mode 100644 index 0000000000..6ff10a0dfe --- /dev/null +++ b/tx-backend/src/main/resources/db/migration/V5__add_assetState_to_assets.sql @@ -0,0 +1,4 @@ +ALTER TABLE assets_as_planned ADD COLUMN "import_state" varchar(25) NOT NULL; +ALTER TABLE assets_as_built ADD COLUMN "import_state" varchar(25) NOT NULL; +ALTER TABLE assets_as_planned ADD COLUMN "import_note" varchar(100); +ALTER TABLE assets_as_built ADD COLUMN "import_note" varchar(100); diff --git a/tx-backend/src/main/resources/db/migration/V6__create_submodelPayload_table.sql b/tx-backend/src/main/resources/db/migration/V6__create_submodelPayload_table.sql new file mode 100644 index 0000000000..a2113bebca --- /dev/null +++ b/tx-backend/src/main/resources/db/migration/V6__create_submodelPayload_table.sql @@ -0,0 +1,41 @@ +-- public.submodel_payload definition + +-- Drop table + +-- Drop TABLE public.submodel_payload + +CREATE TABLE public.submodel_payload +( + id varchar(255) NOT NULL, + json varchar NULL, + CONSTRAINT submodel_payload_pkey PRIMARY KEY (id) +); + + +-- public.assets_as_built_submodel_payload definition + +-- Drop table + +-- DROP TABLE public.assets_as_built_submodel_payload; + +CREATE TABLE public.assets_as_built_submodel_payload +( + submodel_payload_id varchar(255) NOT NULL, + asset_id varchar(255) NOT NULL, + CONSTRAINT fk_submodel_payload FOREIGN KEY (submodel_payload_id) REFERENCES public.submodel_payload (id), + CONSTRAINT fk_asset_entity FOREIGN KEY (asset_id) REFERENCES public.assets_as_built (id) +); + +-- public.assets_as_planned_submodel_payload definition + +-- Drop table + +-- DROP TABLE public.assets_as_planned_submodel_payload; + +CREATE TABLE public.assets_as_planned_submodel_payload +( + submodel_payload_id varchar(255) NOT NULL, + asset_id varchar(255) NOT NULL, + CONSTRAINT fk_submodel_payload FOREIGN KEY (submodel_payload_id) REFERENCES public.submodel_payload (id), + CONSTRAINT fk_asset_entity FOREIGN KEY (asset_id) REFERENCES public.assets_as_planned (id) +); diff --git a/tx-backend/src/main/resources/db/migration/V5__add_view_for_as_built_assets.sql b/tx-backend/src/main/resources/db/migration/V7__add_view_for_as_built_assets.sql similarity index 100% rename from tx-backend/src/main/resources/db/migration/V5__add_view_for_as_built_assets.sql rename to tx-backend/src/main/resources/db/migration/V7__add_view_for_as_built_assets.sql diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/assets/infrastructure/repository/rest/irs/IrsServiceTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/assets/infrastructure/repository/rest/irs/IrsServiceTest.java index dbeb1016e7..fe32a928d2 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/assets/infrastructure/repository/rest/irs/IrsServiceTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/assets/infrastructure/repository/rest/irs/IrsServiceTest.java @@ -36,6 +36,7 @@ import org.eclipse.tractusx.traceability.assets.infrastructure.base.irs.model.response.relationship.Aspect; import org.eclipse.tractusx.traceability.assets.infrastructure.base.irs.model.response.relationship.LinkedItem; import org.eclipse.tractusx.traceability.assets.infrastructure.base.irs.model.response.relationship.Relationship; + import org.eclipse.tractusx.traceability.assets.infrastructure.base.irs.model.response.semanticdatamodel.ManufacturingInformation; import org.eclipse.tractusx.traceability.assets.infrastructure.base.irs.model.response.semanticdatamodel.MeasurementUnit; import org.eclipse.tractusx.traceability.assets.infrastructure.base.irs.model.response.semanticdatamodel.PartTypeInformation; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsBuiltControllerAllIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsBuiltControllerAllIT.java index 3e85d96ea7..f8c530a493 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsBuiltControllerAllIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsBuiltControllerAllIT.java @@ -122,6 +122,7 @@ void shouldReturnAllAssets() throws JoseException { .when() .get("/api/assets/as-built") .then() + .log().body() // T .statusCode(200) .body("totalItems", equalTo(13)) .body("content[0]", hasEntry("id", "urn:uuid:d387fa8e-603c-42bd-98c3-4d87fef8d2bb")) diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsBuiltControllerByIdIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsBuiltControllerByIdIT.java index d126c6c675..022429b324 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsBuiltControllerByIdIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsBuiltControllerByIdIT.java @@ -199,6 +199,7 @@ void shouldGetChildrenAsset() throws JoseException { .when() .get("/api/assets/as-built/urn:uuid:d387fa8e-603c-42bd-98c3-4d87fef8d2bb/children/urn:uuid:587cfb38-7149-4f06-b1e0-0e9b6e98be2a") .then() + .log().body() .statusCode(200) .body("id", Matchers.is("urn:uuid:587cfb38-7149-4f06-b1e0-0e9b6e98be2a")); } diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsPlannedControllerByIdIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsPlannedControllerByIdIT.java index 6f6e477531..82621e2a55 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsPlannedControllerByIdIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsPlannedControllerByIdIT.java @@ -27,6 +27,7 @@ import org.eclipse.tractusx.traceability.integration.common.support.InvestigationsSupport; import org.hamcrest.Matchers; import org.jose4j.lang.JoseException; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; diff --git a/tx-models/pom.xml b/tx-models/pom.xml index 6fd890e71e..db74e7db81 100644 --- a/tx-models/pom.xml +++ b/tx-models/pom.xml @@ -55,6 +55,10 @@ SPDX-License-Identifier: Apache-2.0 + + org.apache.commons + commons-collections4 + com.fasterxml.jackson.core @@ -83,7 +87,6 @@ SPDX-License-Identifier: Apache-2.0 logback-core 1.4.14 - diff --git a/tx-models/src/main/java/assets/response/asbuilt/AssetAsBuiltResponse.java b/tx-models/src/main/java/assets/response/asbuilt/AssetAsBuiltResponse.java index c6763abe65..68072144e0 100644 --- a/tx-models/src/main/java/assets/response/asbuilt/AssetAsBuiltResponse.java +++ b/tx-models/src/main/java/assets/response/asbuilt/AssetAsBuiltResponse.java @@ -20,13 +20,10 @@ package assets.response.asbuilt; import assets.response.base.AssetBaseResponse; -import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Schema; import lombok.experimental.SuperBuilder; -import java.util.List; - @SuperBuilder @ArraySchema(arraySchema = @Schema(description = "Assets", additionalProperties = Schema.AdditionalPropertiesValue.FALSE), maxItems = Integer.MAX_VALUE) public class AssetAsBuiltResponse extends AssetBaseResponse { diff --git a/tx-models/src/main/java/assets/response/base/AssetBaseResponse.java b/tx-models/src/main/java/assets/response/base/AssetBaseResponse.java index 7c1f8b8821..3e64292060 100644 --- a/tx-models/src/main/java/assets/response/base/AssetBaseResponse.java +++ b/tx-models/src/main/java/assets/response/base/AssetBaseResponse.java @@ -59,7 +59,6 @@ public class AssetBaseResponse { private List childRelations; @ArraySchema(arraySchema = @Schema(description = "Parent relationships", additionalProperties = Schema.AdditionalPropertiesValue.FALSE), maxItems = Integer.MAX_VALUE) private List parentRelations; - @ApiModelProperty(example = "false") private boolean activeAlert; @ApiModelProperty(example = "false") @@ -83,4 +82,8 @@ public class AssetBaseResponse { private List sentQualityInvestigationIdsInStatusActive; @ApiModelProperty(dataType = "List", example = "2") private List receivedQualityInvestigationIdsInStatusActive; + @ApiModelProperty(example = "TRANSIENT") + private ImportStateResponse importState; + @ApiModelProperty(example = "Asset created successfully in transient state") + private String importNote; } diff --git a/tx-models/src/main/java/assets/response/base/ImportStateResponse.java b/tx-models/src/main/java/assets/response/base/ImportStateResponse.java new file mode 100644 index 0000000000..2d571c3ba9 --- /dev/null +++ b/tx-models/src/main/java/assets/response/base/ImportStateResponse.java @@ -0,0 +1,24 @@ +/******************************************************************************** + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://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. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +package assets.response.base; + +public enum ImportStateResponse { + TRANSIENT, PERSISTENT, ERROR, IN_SYNCHRONIZATION, UNSET; + +}