Add new model definitions for various APIs in generated Swagger files

This commit is contained in:
Lorenz Hilpert
2025-01-29 17:16:58 +01:00
parent 9efbfab253
commit c6a174d93f
978 changed files with 29960 additions and 11 deletions

View File

@@ -4,7 +4,7 @@
"sourceRoot": "generated/swagger/isa-api/src",
"prefix": "lib",
"projectType": "library",
"tags": [],
"tags": ["generated","swagger", "isa", "api"],
"targets": {
"generate": {
"command": "ng-swagger-gen --config {projectRoot}/ng-swagger-gen.json --output {projectRoot}/src",

View File

@@ -0,0 +1,62 @@
/* tslint:disable */
import { HttpClient, HttpParameterCodec, HttpParams } from '@angular/common/http';
import { IsaConfiguration } from './isa-configuration';
/**
* Custom parameter codec to correctly handle the plus sign in parameter
* values. See https://github.com/angular/angular/issues/18261
*/
class ParameterCodec implements HttpParameterCodec {
encodeKey(key: string): string {
return encodeURIComponent(key);
}
encodeValue(value: string): string {
return encodeURIComponent(value);
}
decodeKey(key: string): string {
return decodeURIComponent(key);
}
decodeValue(value: string): string {
return decodeURIComponent(value);
}
}
const PARAMETER_CODEC = new ParameterCodec();
/**
* Base class for API services
*/
export class BaseService {
constructor(
protected config: IsaConfiguration,
protected http: HttpClient,
) {}
private _rootUrl: string = '';
/**
* Returns the root url for API operations. If not set directly in this
* service, will fallback to ApiConfiguration.rootUrl.
*/
get rootUrl(): string {
return this._rootUrl || this.config.rootUrl;
}
/**
* Sets the root URL for API operations in this service.
*/
set rootUrl(rootUrl: string) {
this._rootUrl = rootUrl;
}
/**
* Creates a new `HttpParams` with the correct codec
*/
protected newParams(): HttpParams {
return new HttpParams({
encoder: PARAMETER_CODEC,
});
}
}

View File

@@ -0,0 +1,16 @@
/* tslint:disable */
import { Injectable } from '@angular/core';
/**
* Global configuration for Isa services
*/
@Injectable({
providedIn: 'root',
})
export class IsaConfiguration {
rootUrl: string = 'https://isa-test.paragon-data.net';
}
export interface IsaConfigurationInterface {
rootUrl?: string;
}

View File

@@ -0,0 +1,18 @@
export { LoginResponse } from './models/login-response';
export { ProblemDetails } from './models/problem-details';
export { KeyCardValues } from './models/key-card-values';
export { ListResponseArgsOfFeedDTO } from './models/list-response-args-of-feed-dto';
export { ResponseArgsOfIEnumerableOfFeedDTO } from './models/response-args-of-ienumerable-of-feed-dto';
export { FeedDTO } from './models/feed-dto';
export { ResponseArgs } from './models/response-args';
export { DialogOfString } from './models/dialog-of-string';
export { DialogSettings } from './models/dialog-settings';
export { DialogContentType } from './models/dialog-content-type';
export { KeyValueDTOOfStringAndString } from './models/key-value-dtoof-string-and-string';
export { IPublicUserInfo } from './models/ipublic-user-info';
export { UserState } from './models/user-state';
export { ResponseArgsOfUserState } from './models/response-args-of-user-state';
export { Log } from './models/log';
export { LogLevel } from './models/log-level';
export { ResponseArgsOfIEnumerableOfLogEntry } from './models/response-args-of-ienumerable-of-log-entry';
export { LogEntry } from './models/log-entry';

View File

@@ -0,0 +1,2 @@
/* tslint:disable */
export type DialogContentType = 0 | 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128;

View File

@@ -0,0 +1,16 @@
/* tslint:disable */
import { KeyValueDTOOfStringAndString } from './key-value-dtoof-string-and-string';
import { DialogContentType } from './dialog-content-type';
import { DialogSettings } from './dialog-settings';
export interface DialogOfString {
actions?: Array<KeyValueDTOOfStringAndString>;
actionsRequired?: number;
area?: string;
content?: string;
contentType: DialogContentType;
description?: string;
displayTimeout?: number;
settings: DialogSettings;
subtitle?: string;
title?: string;
}

View File

@@ -0,0 +1,2 @@
/* tslint:disable */
export type DialogSettings = 0 | 1 | 2 | 4;

View File

@@ -0,0 +1,16 @@
/* tslint:disable */
/**
* Feed
*/
export interface FeedDTO {
desc?: string;
emphasize?: number;
headline?: string;
id?: string;
image?: string;
label?: string;
timestamp?: string;
type?: string;
validUntil?: string;
}

View File

@@ -0,0 +1,7 @@
/* tslint:disable */
export interface IPublicUserInfo {
alias?: string;
displayName?: string;
isAuthenticated: boolean;
username?: string;
}

View File

@@ -0,0 +1,21 @@
/* tslint:disable */
/**
* KeyCard Werte
*/
export interface KeyCardValues {
/**
* Applikation
*/
application?: string;
/**
* KeyCard Code
*/
code?: string;
/**
* Host
*/
hostname?: string;
}

View File

@@ -0,0 +1,12 @@
/* tslint:disable */
export interface KeyValueDTOOfStringAndString {
command?: string;
description?: string;
enabled?: boolean;
group?: string;
key?: string;
label?: string;
selected?: boolean;
sort?: number;
value?: string;
}

View File

@@ -0,0 +1,8 @@
/* tslint:disable */
import { ResponseArgsOfIEnumerableOfFeedDTO } from './response-args-of-ienumerable-of-feed-dto';
export interface ListResponseArgsOfFeedDTO extends ResponseArgsOfIEnumerableOfFeedDTO {
completed?: boolean;
hits?: number;
skip?: number;
take?: number;
}

View File

@@ -0,0 +1,10 @@
/* tslint:disable */
import { LogLevel } from './log-level';
export interface LogEntry {
clientIP?: string;
content?: string;
logType: LogLevel;
message?: string;
timestamp: string;
user?: string;
}

View File

@@ -0,0 +1,2 @@
/* tslint:disable */
export type LogLevel = 0 | 1 | 2 | 3 | 4 | 5 | 6;

View File

@@ -0,0 +1,22 @@
/* tslint:disable */
import { LogLevel } from './log-level';
/**
* Log entry
*/
export interface Log {
/**
* Content
*/
content?: string;
/**
* LogType
*/
logType: LogLevel;
/**
* Message
*/
message?: string;
}

View File

@@ -0,0 +1,26 @@
/* tslint:disable */
/**
* Antwortdaten
*/
export interface LoginResponse {
/**
* Filialkürzel
*/
branchKey?: string;
/**
* Name des angemeldeten Benutzers
*/
friendlyname?: string;
/**
* Token
*/
token?: string;
/**
* Benutzername
*/
username?: string;
}

View File

@@ -0,0 +1,10 @@
/* tslint:disable */
export interface ProblemDetails {
detail?: string;
extensions: { [key: string]: any };
instance?: string;
status?: number;
title?: string;
type?: string;
[prop: string]: any;
}

View File

@@ -0,0 +1,6 @@
/* tslint:disable */
import { ResponseArgs } from './response-args';
import { FeedDTO } from './feed-dto';
export interface ResponseArgsOfIEnumerableOfFeedDTO extends ResponseArgs {
result?: Array<FeedDTO>;
}

View File

@@ -0,0 +1,6 @@
/* tslint:disable */
import { ResponseArgs } from './response-args';
import { LogEntry } from './log-entry';
export interface ResponseArgsOfIEnumerableOfLogEntry extends ResponseArgs {
result?: Array<LogEntry>;
}

View File

@@ -0,0 +1,6 @@
/* tslint:disable */
import { ResponseArgs } from './response-args';
import { UserState } from './user-state';
export interface ResponseArgsOfUserState extends ResponseArgs {
result?: UserState;
}

View File

@@ -0,0 +1,11 @@
/* tslint:disable */
import { DialogOfString } from './dialog-of-string';
import { IPublicUserInfo } from './ipublic-user-info';
export interface ResponseArgs {
dialog?: DialogOfString;
error: boolean;
invalidProperties?: { [key: string]: string };
message?: string;
requestId?: number;
userInfo?: IPublicUserInfo;
}

View File

@@ -0,0 +1,11 @@
/* tslint:disable */
/**
* Benutzerdaten
*/
export interface UserState {
/**
* Daten
*/
content?: string;
}

View File

@@ -0,0 +1,3 @@
export { AuthService } from './services/auth.service';
export { InfoService } from './services/info.service';
export { UserStateService } from './services/user-state.service';

View File

@@ -0,0 +1,55 @@
/* tslint:disable */
import { Injectable } from '@angular/core';
import { HttpClient, HttpRequest, HttpResponse, HttpHeaders } from '@angular/common/http';
import { BaseService as __BaseService } from '../base-service';
import { IsaConfiguration as __Configuration } from '../isa-configuration';
import { StrictHttpResponse as __StrictHttpResponse } from '../strict-http-response';
import { Observable as __Observable } from 'rxjs';
import { map as __map, filter as __filter } from 'rxjs/operators';
import { LoginResponse } from '../models/login-response';
import { KeyCardValues } from '../models/key-card-values';
@Injectable({
providedIn: 'root',
})
class AuthService extends __BaseService {
static readonly AuthLoginPath = '/auth/keycard';
constructor(config: __Configuration, http: HttpClient) {
super(config, http);
}
/**
* Login mit KeyCard
* @param values KeyCard Daten
*/
AuthLoginResponse(values: KeyCardValues): __Observable<__StrictHttpResponse<LoginResponse>> {
let __params = this.newParams();
let __headers = new HttpHeaders();
let __body: any = null;
__body = values;
let req = new HttpRequest<any>('POST', this.rootUrl + `/auth/keycard`, __body, {
headers: __headers,
params: __params,
responseType: 'json',
});
return this.http.request<any>(req).pipe(
__filter((_r) => _r instanceof HttpResponse),
__map((_r) => {
return _r as __StrictHttpResponse<LoginResponse>;
}),
);
}
/**
* Login mit KeyCard
* @param values KeyCard Daten
*/
AuthLogin(values: KeyCardValues): __Observable<LoginResponse> {
return this.AuthLoginResponse(values).pipe(__map((_r) => _r.body as LoginResponse));
}
}
module AuthService {}
export { AuthService };

View File

@@ -0,0 +1,71 @@
/* tslint:disable */
import { Injectable } from '@angular/core';
import { HttpClient, HttpRequest, HttpResponse, HttpHeaders } from '@angular/common/http';
import { BaseService as __BaseService } from '../base-service';
import { IsaConfiguration as __Configuration } from '../isa-configuration';
import { StrictHttpResponse as __StrictHttpResponse } from '../strict-http-response';
import { Observable as __Observable } from 'rxjs';
import { map as __map, filter as __filter } from 'rxjs/operators';
import { ListResponseArgsOfFeedDTO } from '../models/list-response-args-of-feed-dto';
@Injectable({
providedIn: 'root',
})
class InfoService extends __BaseService {
static readonly InfoInfoPath = '/isa/info';
constructor(config: __Configuration, http: HttpClient) {
super(config, http);
}
/**
* Info / Dashboard
* @param params The `InfoService.InfoInfoParams` containing the following parameters:
*
* - `take`:
*
* - `skip`:
*/
InfoInfoResponse(params: InfoService.InfoInfoParams): __Observable<__StrictHttpResponse<ListResponseArgsOfFeedDTO>> {
let __params = this.newParams();
let __headers = new HttpHeaders();
let __body: any = null;
if (params.take != null) __params = __params.set('take', params.take.toString());
if (params.skip != null) __params = __params.set('skip', params.skip.toString());
let req = new HttpRequest<any>('GET', this.rootUrl + `/isa/info`, __body, {
headers: __headers,
params: __params,
responseType: 'json',
});
return this.http.request<any>(req).pipe(
__filter((_r) => _r instanceof HttpResponse),
__map((_r) => {
return _r as __StrictHttpResponse<ListResponseArgsOfFeedDTO>;
}),
);
}
/**
* Info / Dashboard
* @param params The `InfoService.InfoInfoParams` containing the following parameters:
*
* - `take`:
*
* - `skip`:
*/
InfoInfo(params: InfoService.InfoInfoParams): __Observable<ListResponseArgsOfFeedDTO> {
return this.InfoInfoResponse(params).pipe(__map((_r) => _r.body as ListResponseArgsOfFeedDTO));
}
}
module InfoService {
/**
* Parameters for InfoInfo
*/
export interface InfoInfoParams {
take?: null | number;
skip?: null | number;
}
}
export { InfoService };

View File

@@ -0,0 +1,229 @@
/* tslint:disable */
import { Injectable } from '@angular/core';
import { HttpClient, HttpRequest, HttpResponse, HttpHeaders } from '@angular/common/http';
import { BaseService as __BaseService } from '../base-service';
import { IsaConfiguration as __Configuration } from '../isa-configuration';
import { StrictHttpResponse as __StrictHttpResponse } from '../strict-http-response';
import { Observable as __Observable } from 'rxjs';
import { map as __map, filter as __filter } from 'rxjs/operators';
import { ResponseArgs } from '../models/response-args';
import { UserState } from '../models/user-state';
import { ResponseArgsOfUserState } from '../models/response-args-of-user-state';
import { Log } from '../models/log';
import { ResponseArgsOfIEnumerableOfLogEntry } from '../models/response-args-of-ienumerable-of-log-entry';
@Injectable({
providedIn: 'root',
})
class UserStateService extends __BaseService {
static readonly UserStateSetUserStatePath = '/isa/userstate';
static readonly UserStateResetUserStatePath = '/isa/userstate';
static readonly UserStateGetUserStatePath = '/isa/userstate';
static readonly UserStateGetActiveWSPath = '/isa/activews';
static readonly UserStateSaveLogPath = '/isa/logging';
static readonly UserStateGetLogPath = '/isa/logging';
constructor(config: __Configuration, http: HttpClient) {
super(config, http);
}
/**
* Benutzerdaten speichern
* @param userState Content
*/
UserStateSetUserStateResponse(userState: UserState): __Observable<__StrictHttpResponse<ResponseArgs>> {
let __params = this.newParams();
let __headers = new HttpHeaders();
let __body: any = null;
__body = userState;
let req = new HttpRequest<any>('POST', this.rootUrl + `/isa/userstate`, __body, {
headers: __headers,
params: __params,
responseType: 'json',
});
return this.http.request<any>(req).pipe(
__filter((_r) => _r instanceof HttpResponse),
__map((_r) => {
return _r as __StrictHttpResponse<ResponseArgs>;
}),
);
}
/**
* Benutzerdaten speichern
* @param userState Content
*/
UserStateSetUserState(userState: UserState): __Observable<ResponseArgs> {
return this.UserStateSetUserStateResponse(userState).pipe(__map((_r) => _r.body as ResponseArgs));
}
/**
* Benutzerdaten löschen
*/
UserStateResetUserStateResponse(): __Observable<__StrictHttpResponse<ResponseArgs>> {
let __params = this.newParams();
let __headers = new HttpHeaders();
let __body: any = null;
let req = new HttpRequest<any>('DELETE', this.rootUrl + `/isa/userstate`, __body, {
headers: __headers,
params: __params,
responseType: 'json',
});
return this.http.request<any>(req).pipe(
__filter((_r) => _r instanceof HttpResponse),
__map((_r) => {
return _r as __StrictHttpResponse<ResponseArgs>;
}),
);
}
/**
* Benutzerdaten löschen
*/
UserStateResetUserState(): __Observable<ResponseArgs> {
return this.UserStateResetUserStateResponse().pipe(__map((_r) => _r.body as ResponseArgs));
}
/**
* Benutzerdaten auslesen
* @return Benutzerdaten
*/
UserStateGetUserStateResponse(): __Observable<__StrictHttpResponse<ResponseArgsOfUserState>> {
let __params = this.newParams();
let __headers = new HttpHeaders();
let __body: any = null;
let req = new HttpRequest<any>('GET', this.rootUrl + `/isa/userstate`, __body, {
headers: __headers,
params: __params,
responseType: 'json',
});
return this.http.request<any>(req).pipe(
__filter((_r) => _r instanceof HttpResponse),
__map((_r) => {
return _r as __StrictHttpResponse<ResponseArgsOfUserState>;
}),
);
}
/**
* Benutzerdaten auslesen
* @return Benutzerdaten
*/
UserStateGetUserState(): __Observable<ResponseArgsOfUserState> {
return this.UserStateGetUserStateResponse().pipe(__map((_r) => _r.body as ResponseArgsOfUserState));
}
/**
* Aktive WebSockets
*/
UserStateGetActiveWSResponse(): __Observable<__StrictHttpResponse<ResponseArgsOfUserState>> {
let __params = this.newParams();
let __headers = new HttpHeaders();
let __body: any = null;
let req = new HttpRequest<any>('GET', this.rootUrl + `/isa/activews`, __body, {
headers: __headers,
params: __params,
responseType: 'json',
});
return this.http.request<any>(req).pipe(
__filter((_r) => _r instanceof HttpResponse),
__map((_r) => {
return _r as __StrictHttpResponse<ResponseArgsOfUserState>;
}),
);
}
/**
* Aktive WebSockets
*/
UserStateGetActiveWS(): __Observable<ResponseArgsOfUserState> {
return this.UserStateGetActiveWSResponse().pipe(__map((_r) => _r.body as ResponseArgsOfUserState));
}
/**
* Logdaten speichern
* @param log Logdaten
*/
UserStateSaveLogResponse(log: Log): __Observable<__StrictHttpResponse<null>> {
let __params = this.newParams();
let __headers = new HttpHeaders();
let __body: any = null;
__body = log;
let req = new HttpRequest<any>('POST', this.rootUrl + `/isa/logging`, __body, {
headers: __headers,
params: __params,
responseType: 'json',
});
return this.http.request<any>(req).pipe(
__filter((_r) => _r instanceof HttpResponse),
__map((_r) => {
return _r as __StrictHttpResponse<null>;
}),
);
}
/**
* Logdaten speichern
* @param log Logdaten
*/
UserStateSaveLog(log: Log): __Observable<null> {
return this.UserStateSaveLogResponse(log).pipe(__map((_r) => _r.body as null));
}
/**
* Benutzerdaten auslesen
* @param params The `UserStateService.UserStateGetLogParams` containing the following parameters:
*
* - `stop`:
*
* - `start`:
*
* @return Benutzerdaten
*/
UserStateGetLogResponse(
params: UserStateService.UserStateGetLogParams,
): __Observable<__StrictHttpResponse<ResponseArgsOfIEnumerableOfLogEntry>> {
let __params = this.newParams();
let __headers = new HttpHeaders();
let __body: any = null;
if (params.stop != null) __params = __params.set('stop', params.stop.toString());
if (params.start != null) __params = __params.set('start', params.start.toString());
let req = new HttpRequest<any>('GET', this.rootUrl + `/isa/logging`, __body, {
headers: __headers,
params: __params,
responseType: 'json',
});
return this.http.request<any>(req).pipe(
__filter((_r) => _r instanceof HttpResponse),
__map((_r) => {
return _r as __StrictHttpResponse<ResponseArgsOfIEnumerableOfLogEntry>;
}),
);
}
/**
* Benutzerdaten auslesen
* @param params The `UserStateService.UserStateGetLogParams` containing the following parameters:
*
* - `stop`:
*
* - `start`:
*
* @return Benutzerdaten
*/
UserStateGetLog(params: UserStateService.UserStateGetLogParams): __Observable<ResponseArgsOfIEnumerableOfLogEntry> {
return this.UserStateGetLogResponse(params).pipe(__map((_r) => _r.body as ResponseArgsOfIEnumerableOfLogEntry));
}
}
module UserStateService {
/**
* Parameters for UserStateGetLog
*/
export interface UserStateGetLogParams {
stop?: string;
start?: string;
}
}
export { UserStateService };

View File

@@ -0,0 +1,9 @@
/* tslint:disable */
import { HttpResponse } from '@angular/common/http';
/**
* Constrains the http to not expand the response type with `| null`
*/
export type StrictHttpResponse<T> = HttpResponse<T> & {
readonly body: T;
};