From 8caa7056dcf74d4e568a852e94caecc5f3ca5087 Mon Sep 17 00:00:00 2001 From: dominik003 Date: Mon, 9 Sep 2024 15:09:59 +0200 Subject: [PATCH] chore: Update openapi client --- .../src/app/openapi/.openapi-generator/FILES | 3 ++- .../api/projects-models-diagrams.service.ts | 18 +++++++++++++---- .../api/projects-models-git.service.ts | 20 +++++++++---------- .../openapi/model/diagram-cache-metadata.ts | 2 ++ frontend/src/app/openapi/model/git-model.ts | 2 +- frontend/src/app/openapi/model/job-id.ts | 16 +++++++++++++++ frontend/src/app/openapi/model/models.ts | 3 ++- .../{patch-git-model.ts => put-git-model.ts} | 2 +- frontend/src/storybook/git.ts | 2 +- 9 files changed, 49 insertions(+), 19 deletions(-) create mode 100644 frontend/src/app/openapi/model/job-id.ts rename frontend/src/app/openapi/model/{patch-git-model.ts => put-git-model.ts} (93%) diff --git a/frontend/src/app/openapi/.openapi-generator/FILES b/frontend/src/app/openapi/.openapi-generator/FILES index bf02952da7..f2ff949dc5 100644 --- a/frontend/src/app/openapi/.openapi-generator/FILES +++ b/frontend/src/app/openapi/.openapi-generator/FILES @@ -72,6 +72,7 @@ model/http-connection-method-output.ts model/http-ports-input.ts model/http-ports-output.ts model/http-validation-error.ts +model/job-id.ts model/memory-resources-input.ts model/memory-resources-output.ts model/message.ts @@ -87,7 +88,6 @@ model/notice-level.ts model/notice-response.ts model/page-history-event.ts model/page-pipeline-run.ts -model/patch-git-model.ts model/patch-project-user.ts model/patch-project.ts model/patch-t4-c-instance.ts @@ -121,6 +121,7 @@ model/prometheus-configuration-output.ts model/protocol.ts model/pure-variants-licenses-input.ts model/pure-variants-licenses-output.ts +model/put-git-model.ts model/rdp-ports-input.ts model/rdp-ports-output.ts model/resources-input.ts diff --git a/frontend/src/app/openapi/api/projects-models-diagrams.service.ts b/frontend/src/app/openapi/api/projects-models-diagrams.service.ts index ac18cd4c82..02eef95ce4 100644 --- a/frontend/src/app/openapi/api/projects-models-diagrams.service.ts +++ b/frontend/src/app/openapi/api/projects-models-diagrams.service.ts @@ -22,6 +22,8 @@ import { Observable } from 'rxjs'; import { DiagramCacheMetadata } from '../model/diagram-cache-metadata'; // @ts-ignore import { HTTPValidationError } from '../model/http-validation-error'; +// @ts-ignore +import { JobId } from '../model/job-id'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; @@ -99,13 +101,14 @@ export class ProjectsModelsDiagramsService { * @param diagramUuidOrFilename * @param projectSlug * @param modelSlug + * @param jobId * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getDiagram(diagramUuidOrFilename: string, projectSlug: string, modelSlug: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'image/svg+xml' | 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDiagram(diagramUuidOrFilename: string, projectSlug: string, modelSlug: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'image/svg+xml' | 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDiagram(diagramUuidOrFilename: string, projectSlug: string, modelSlug: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'image/svg+xml' | 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDiagram(diagramUuidOrFilename: string, projectSlug: string, modelSlug: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'image/svg+xml' | 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public getDiagram(diagramUuidOrFilename: string, projectSlug: string, modelSlug: string, jobId?: JobId, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'image/svg+xml' | 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDiagram(diagramUuidOrFilename: string, projectSlug: string, modelSlug: string, jobId?: JobId, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'image/svg+xml' | 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDiagram(diagramUuidOrFilename: string, projectSlug: string, modelSlug: string, jobId?: JobId, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'image/svg+xml' | 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDiagram(diagramUuidOrFilename: string, projectSlug: string, modelSlug: string, jobId?: JobId, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'image/svg+xml' | 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { if (diagramUuidOrFilename === null || diagramUuidOrFilename === undefined) { throw new Error('Required parameter diagramUuidOrFilename was null or undefined when calling getDiagram.'); } @@ -116,6 +119,12 @@ export class ProjectsModelsDiagramsService { throw new Error('Required parameter modelSlug was null or undefined when calling getDiagram.'); } + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (jobId !== undefined && jobId !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + jobId, 'job_id'); + } + let localVarHeaders = this.defaultHeaders; let localVarCredential: string | undefined; @@ -153,6 +162,7 @@ export class ProjectsModelsDiagramsService { return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + params: localVarQueryParameters, responseType: "blob", withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/frontend/src/app/openapi/api/projects-models-git.service.ts b/frontend/src/app/openapi/api/projects-models-git.service.ts index 9a74a5bebf..56752f25e8 100644 --- a/frontend/src/app/openapi/api/projects-models-git.service.ts +++ b/frontend/src/app/openapi/api/projects-models-git.service.ts @@ -25,9 +25,9 @@ import { GitModel } from '../model/git-model'; // @ts-ignore import { HTTPValidationError } from '../model/http-validation-error'; // @ts-ignore -import { PatchGitModel } from '../model/patch-git-model'; -// @ts-ignore import { PostGitModel } from '../model/post-git-model'; +// @ts-ignore +import { PutGitModel } from '../model/put-git-model'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; @@ -595,14 +595,14 @@ export class ProjectsModelsGitService { * @param projectSlug * @param gitModelId * @param modelSlug - * @param patchGitModel + * @param putGitModel * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public updateGitModelById(projectSlug: string, gitModelId: number, modelSlug: string, patchGitModel: PatchGitModel, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public updateGitModelById(projectSlug: string, gitModelId: number, modelSlug: string, patchGitModel: PatchGitModel, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public updateGitModelById(projectSlug: string, gitModelId: number, modelSlug: string, patchGitModel: PatchGitModel, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public updateGitModelById(projectSlug: string, gitModelId: number, modelSlug: string, patchGitModel: PatchGitModel, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public updateGitModelById(projectSlug: string, gitModelId: number, modelSlug: string, putGitModel: PutGitModel, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public updateGitModelById(projectSlug: string, gitModelId: number, modelSlug: string, putGitModel: PutGitModel, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public updateGitModelById(projectSlug: string, gitModelId: number, modelSlug: string, putGitModel: PutGitModel, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public updateGitModelById(projectSlug: string, gitModelId: number, modelSlug: string, putGitModel: PutGitModel, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { if (projectSlug === null || projectSlug === undefined) { throw new Error('Required parameter projectSlug was null or undefined when calling updateGitModelById.'); } @@ -612,8 +612,8 @@ export class ProjectsModelsGitService { if (modelSlug === null || modelSlug === undefined) { throw new Error('Required parameter modelSlug was null or undefined when calling updateGitModelById.'); } - if (patchGitModel === null || patchGitModel === undefined) { - throw new Error('Required parameter patchGitModel was null or undefined when calling updateGitModelById.'); + if (putGitModel === null || putGitModel === undefined) { + throw new Error('Required parameter putGitModel was null or undefined when calling updateGitModelById.'); } let localVarHeaders = this.defaultHeaders; @@ -672,7 +672,7 @@ export class ProjectsModelsGitService { return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, - body: patchGitModel, + body: putGitModel, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/frontend/src/app/openapi/model/diagram-cache-metadata.ts b/frontend/src/app/openapi/model/diagram-cache-metadata.ts index 1e3894ed52..e9b818946f 100644 --- a/frontend/src/app/openapi/model/diagram-cache-metadata.ts +++ b/frontend/src/app/openapi/model/diagram-cache-metadata.ts @@ -10,10 +10,12 @@ */ import { DiagramMetadata } from './diagram-metadata'; +import { JobId } from './job-id'; export interface DiagramCacheMetadata { diagrams: Array; last_updated: string; + job_id: JobId | null; } diff --git a/frontend/src/app/openapi/model/git-model.ts b/frontend/src/app/openapi/model/git-model.ts index 8d3b1307cf..c5a49c868f 100644 --- a/frontend/src/app/openapi/model/git-model.ts +++ b/frontend/src/app/openapi/model/git-model.ts @@ -18,7 +18,7 @@ export interface GitModel { username: string; password: boolean; id: number; - name: string; primary: boolean; + repository_id: string | null; } diff --git a/frontend/src/app/openapi/model/job-id.ts b/frontend/src/app/openapi/model/job-id.ts new file mode 100644 index 0000000000..980833b04e --- /dev/null +++ b/frontend/src/app/openapi/model/job-id.ts @@ -0,0 +1,16 @@ +/* + * SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors + * SPDX-License-Identifier: Apache-2.0 + * + * Capella Collaboration + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit the class manually. + + To generate a new version, run `make openapi` in the root directory of this repository. + */ + + + +export interface JobId { +} + diff --git a/frontend/src/app/openapi/model/models.ts b/frontend/src/app/openapi/model/models.ts index 7585cc8939..af05cdd9b1 100644 --- a/frontend/src/app/openapi/model/models.ts +++ b/frontend/src/app/openapi/model/models.ts @@ -53,6 +53,7 @@ export * from './http-ports-input'; export * from './http-ports-output'; export * from './http-validation-error'; export * from './history-event'; +export * from './job-id'; export * from './memory-resources-input'; export * from './memory-resources-output'; export * from './message'; @@ -67,7 +68,6 @@ export * from './notice-level'; export * from './notice-response'; export * from './page-history-event'; export * from './page-pipeline-run'; -export * from './patch-git-model'; export * from './patch-project'; export * from './patch-project-user'; export * from './patch-t4-c-instance'; @@ -101,6 +101,7 @@ export * from './prometheus-configuration-output'; export * from './protocol'; export * from './pure-variants-licenses-input'; export * from './pure-variants-licenses-output'; +export * from './put-git-model'; export * from './rdp-ports-input'; export * from './rdp-ports-output'; export * from './resources-input'; diff --git a/frontend/src/app/openapi/model/patch-git-model.ts b/frontend/src/app/openapi/model/put-git-model.ts similarity index 93% rename from frontend/src/app/openapi/model/patch-git-model.ts rename to frontend/src/app/openapi/model/put-git-model.ts index 743aed476e..777c1004ec 100644 --- a/frontend/src/app/openapi/model/patch-git-model.ts +++ b/frontend/src/app/openapi/model/put-git-model.ts @@ -11,7 +11,7 @@ -export interface PatchGitModel { +export interface PutGitModel { path: string; entrypoint: string; revision: string; diff --git a/frontend/src/storybook/git.ts b/frontend/src/storybook/git.ts index 6724036c5d..33efa6383e 100644 --- a/frontend/src/storybook/git.ts +++ b/frontend/src/storybook/git.ts @@ -6,11 +6,11 @@ import { GitModel } from 'src/app/openapi'; export const mockPrimaryGitModel: Readonly = { id: 1, - name: 'fakeGitModelName', primary: true, path: 'fakePath', revision: 'fakeRevision', entrypoint: 'fakeEntrypoint', password: false, username: 'fakeUsername', + repository_id: null, };