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] authored and iam-flo committed Mar 7, 2025
1 parent 56062d0 commit 116445c
Show file tree
Hide file tree
Showing 6 changed files with 201 additions and 0 deletions.
34 changes: 34 additions & 0 deletions server/application-server/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,35 @@ paths:
responses:
"200":
description: OK
/user/settings:
get:
tags:
- user
operationId: getUserSettings
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/UserSettings"
post:
tags:
- user
operationId: updateUserSettings
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/UserSettings"
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/UserSettings"
/mentor/sessions:
get:
tags:
Expand Down Expand Up @@ -696,6 +725,11 @@ components:
- id
- name
- nameWithOwner
UserSettings:
type: object
properties:
receiveNotifications:
type: boolean
UserTeams:
type: object
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ model/session.ts
model/team-info.ts
model/user-info.ts
model/user-profile.ts
model/user-settings.ts
model/user-teams.ts
param.ts
variables.ts
134 changes: 134 additions & 0 deletions webapp/src/app/core/modules/openapi/api/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import { Observable } from 'rxjs';

// @ts-ignore
import { UserProfile } from '../model/user-profile';
// @ts-ignore
import { UserSettings } from '../model/user-settings';

// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
Expand Down Expand Up @@ -216,4 +218,136 @@ export class UserService implements UserServiceInterface {
);
}

/**
* @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 getUserSettings(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<UserSettings>;
public getUserSettings(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<UserSettings>>;
public getUserSettings(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<UserSettings>>;
public getUserSettings(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {

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 = `/user/settings`;
return this.httpClient.request<UserSettings>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* @param userSettings
* @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 updateUserSettings(userSettings: UserSettings, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<UserSettings>;
public updateUserSettings(userSettings: UserSettings, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<UserSettings>>;
public updateUserSettings(userSettings: UserSettings, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<UserSettings>>;
public updateUserSettings(userSettings: UserSettings, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (userSettings === null || userSettings === undefined) {
throw new Error('Required parameter userSettings was null or undefined when calling updateUserSettings.');
}

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;
}


// to determine the Content-Type header
const consumes: string[] = [
'application/json'
];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}

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 = `/user/settings`;
return this.httpClient.request<UserSettings>('post', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: userSettings,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

}
14 changes: 14 additions & 0 deletions webapp/src/app/core/modules/openapi/api/user.serviceInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { HttpHeaders } from '@angular/comm
import { Observable } from 'rxjs';

import { UserProfile } from '../model/models';
import { UserSettings } from '../model/models';


import { Configuration } from '../configuration';
Expand All @@ -37,4 +38,17 @@ export interface UserServiceInterface {
*/
getUserProfile(login: string, extraHttpRequestParams?: any): Observable<UserProfile>;

/**
*
*
*/
getUserSettings(extraHttpRequestParams?: any): Observable<UserSettings>;

/**
*
*
* @param userSettings
*/
updateUserSettings(userSettings: UserSettings, extraHttpRequestParams?: any): Observable<UserSettings>;

}
1 change: 1 addition & 0 deletions webapp/src/app/core/modules/openapi/model/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ export * from './session';
export * from './team-info';
export * from './user-info';
export * from './user-profile';
export * from './user-settings';
export * from './user-teams';
17 changes: 17 additions & 0 deletions webapp/src/app/core/modules/openapi/model/user-settings.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Hephaestus API
* API documentation for the Hephaestus application server.
*
* The version of the OpenAPI document: 0.0.1
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


export interface UserSettings {
receiveNotifications?: boolean;
}

0 comments on commit 116445c

Please sign in to comment.