diff --git a/server/application-server/openapi.yaml b/server/application-server/openapi.yaml index d9199b89..f76b3029 100644 --- a/server/application-server/openapi.yaml +++ b/server/application-server/openapi.yaml @@ -262,6 +262,30 @@ paths: application/json: schema: $ref: "#/components/schemas/AdminConfig" + /admin/users/teamremove/{login}/{teamId}: + delete: + tags: + - admin + operationId: removeTeamFromUser + parameters: + - name: login + in: path + required: true + schema: + type: string + - name: teamId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/UserDTO" components: schemas: IssueCommentDTO: diff --git a/webapp/src/app/core/modules/openapi/api/admin.service.ts b/webapp/src/app/core/modules/openapi/api/admin.service.ts index 7467d34f..2432e9eb 100644 --- a/webapp/src/app/core/modules/openapi/api/admin.service.ts +++ b/webapp/src/app/core/modules/openapi/api/admin.service.ts @@ -404,6 +404,73 @@ export class AdminService implements AdminServiceInterface { ); } + /** + * @param login + * @param teamId + * @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 removeTeamFromUser(login: string, teamId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public removeTeamFromUser(login: string, teamId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public removeTeamFromUser(login: string, teamId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public removeTeamFromUser(login: string, teamId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (login === null || login === undefined) { + throw new Error('Required parameter login was null or undefined when calling removeTeamFromUser.'); + } + if (teamId === null || teamId === undefined) { + throw new Error('Required parameter teamId was null or undefined when calling removeTeamFromUser.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/admin/users/teamremove/${this.configuration.encodeParam({name: "login", value: login, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/${this.configuration.encodeParam({name: "teamId", value: teamId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + /** * @param requestBody * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. diff --git a/webapp/src/app/core/modules/openapi/api/admin.serviceInterface.ts b/webapp/src/app/core/modules/openapi/api/admin.serviceInterface.ts index 7c446b46..d04a99c1 100644 --- a/webapp/src/app/core/modules/openapi/api/admin.serviceInterface.ts +++ b/webapp/src/app/core/modules/openapi/api/admin.serviceInterface.ts @@ -59,6 +59,14 @@ export interface AdminServiceInterface { */ getUsersAsAdmin(extraHttpRequestParams?: any): Observable>; + /** + * + * + * @param login + * @param teamId + */ + removeTeamFromUser(login: string, teamId: number, extraHttpRequestParams?: any): Observable; + /** * *