Skip to content

Commit

Permalink
chore: update API specs and client
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 22, 2024
1 parent 9a73a4f commit 2b07310
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 0 deletions.
24 changes: 24 additions & 0 deletions server/application-server/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
67 changes: 67 additions & 0 deletions webapp/src/app/core/modules/openapi/api/admin.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<UserDTO>;
public removeTeamFromUser(login: string, teamId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<UserDTO>>;
public removeTeamFromUser(login: string, teamId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<UserDTO>>;
public removeTeamFromUser(login: string, teamId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
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<UserDTO>('delete', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ export interface AdminServiceInterface {
*/
getUsersAsAdmin(extraHttpRequestParams?: any): Observable<Array<UserTeamsDTO>>;

/**
*
*
* @param login
* @param teamId
*/
removeTeamFromUser(login: string, teamId: number, extraHttpRequestParams?: any): Observable<UserDTO>;

/**
*
*
Expand Down

0 comments on commit 2b07310

Please sign in to comment.