projects work in progress
This commit is contained in:
parent
676f0551e5
commit
5caea6e34f
35
apps/red-ui/src/app/app-config/app-config.service.ts
Normal file
35
apps/red-ui/src/app/app-config/app-config.service.ts
Normal file
@ -0,0 +1,35 @@
|
||||
import {Injectable} from "@angular/core";
|
||||
import {HttpClient} from "@angular/common/http";
|
||||
import {tap} from "rxjs/operators";
|
||||
import {Observable} from "rxjs";
|
||||
|
||||
|
||||
export enum AppConfigKey {
|
||||
KEYCLOAK_URL = "KEYCLOAK_URL",
|
||||
KEYCLOAK_REALM = "KEYCLOAK_REALM",
|
||||
KEYCLOAK_CLIENT_ID = "KEYCLOAK_CLIENT_ID",
|
||||
API_URL = "API_URL",
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class AppConfigService {
|
||||
|
||||
private _config: { [key in AppConfigKey]?: any } = {};
|
||||
|
||||
constructor(private readonly _httpClient: HttpClient) {
|
||||
}
|
||||
|
||||
loadAppConfig(): Observable<any> {
|
||||
return this._httpClient.get<any>("/assets/config/config.json").pipe(tap(config => {
|
||||
this._config = config;
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
getConfig(key: AppConfigKey, defaultValue?: any) {
|
||||
return this._config[key] ? this._config[key] : defaultValue;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,120 +1 @@
|
||||
<header class="flex">
|
||||
<img
|
||||
alt="Nx logo"
|
||||
width="75"
|
||||
src="https://nx.dev/assets/images/nx-logo-white.svg"
|
||||
/>
|
||||
<h1>Welcome to {{ title }}!</h1>
|
||||
</header>
|
||||
<main>
|
||||
<h2>Resources & Tools</h2>
|
||||
<p>
|
||||
Thank you for using and showing some ♥ for Nx.
|
||||
</p>
|
||||
<div class="flex github-star-container">
|
||||
<a
|
||||
href="https://github.com/nrwl/nx"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
If you like Nx, please give it a star:
|
||||
<div class="github-star-badge">
|
||||
<svg
|
||||
class="material-icons"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path d="M0 0h24v24H0z" fill="none" />
|
||||
<path
|
||||
d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"
|
||||
/>
|
||||
</svg>
|
||||
Star
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<p>
|
||||
Here are some links to help you get started.
|
||||
</p>
|
||||
<ul class="resources">
|
||||
<li class="col-span-2">
|
||||
<a
|
||||
class="resource flex"
|
||||
href="https://connect.nrwl.io/app/courses/nx-workspaces/intro"
|
||||
>
|
||||
Nx video course
|
||||
</a>
|
||||
</li>
|
||||
<li class="col-span-2">
|
||||
<a
|
||||
class="resource flex"
|
||||
href="https://nx.dev/angular/getting-started/what-is-nx"
|
||||
>
|
||||
Nx video tutorial
|
||||
</a>
|
||||
</li>
|
||||
<li class="col-span-2">
|
||||
<a
|
||||
class="resource flex"
|
||||
href="https://nx.dev/angular/tutorial/01-create-application"
|
||||
>
|
||||
Interactive tutorial
|
||||
</a>
|
||||
</li>
|
||||
<li class="col-span-2">
|
||||
<a class="resource flex" href="https://nx.app/">
|
||||
<svg
|
||||
width="36"
|
||||
height="36"
|
||||
viewBox="0 0 120 120"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M120 15V30C103.44 30 90 43.44 90 60C90 76.56 76.56 90 60 90C43.44 90 30 103.44 30 120H15C6.72 120 0 113.28 0 105V15C0 6.72 6.72 0 15 0H105C113.28 0 120 6.72 120 15Z"
|
||||
fill="#0E2039"
|
||||
/>
|
||||
<path
|
||||
d="M120 30V105C120 113.28 113.28 120 105 120H30C30 103.44 43.44 90 60 90C76.56 90 90 76.56 90 60C90 43.44 103.44 30 120 30Z"
|
||||
fill="white"
|
||||
/>
|
||||
</svg>
|
||||
<span class="gutter-left">Nx Cloud</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Next Steps</h2>
|
||||
<p>Here are some things you can do with Nx.</p>
|
||||
<details open>
|
||||
<summary>Add UI library</summary>
|
||||
<pre>
|
||||
# Generate UI lib
|
||||
ng g @nrwl/angular:lib ui
|
||||
|
||||
# Add a component
|
||||
ng g @nrwl/angular:component xyz --project ui</pre
|
||||
>
|
||||
</details>
|
||||
<details>
|
||||
<summary>View dependency graph</summary>
|
||||
<pre>nx dep-graph</pre>
|
||||
</details>
|
||||
<details>
|
||||
<summary>Run affected commands</summary>
|
||||
<pre>
|
||||
# see what's been affected by changes
|
||||
ng affected:dep-graph
|
||||
|
||||
# run tests for current changes
|
||||
ng affected:test
|
||||
|
||||
# run e2e tests for current changes
|
||||
ng affected:e2e
|
||||
</pre
|
||||
>
|
||||
</details>
|
||||
</main>
|
||||
|
||||
<router-outlet></router-outlet>
|
||||
|
||||
@ -1,133 +0,0 @@
|
||||
/*
|
||||
* Remove template code below
|
||||
*/
|
||||
:host {
|
||||
display: block;
|
||||
font-family: sans-serif;
|
||||
min-width: 300px;
|
||||
max-width: 600px;
|
||||
margin: 50px auto;
|
||||
}
|
||||
|
||||
.gutter-left {
|
||||
margin-left: 9px;
|
||||
}
|
||||
|
||||
.col-span-2 {
|
||||
grid-column: span 2;
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
header {
|
||||
background-color: #143055;
|
||||
color: white;
|
||||
padding: 5px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
main {
|
||||
padding: 0 36px;
|
||||
}
|
||||
|
||||
p {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
margin-left: 18px;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
margin: 40px 0 10px 0;
|
||||
}
|
||||
|
||||
.resources {
|
||||
text-align: center;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
display: grid;
|
||||
grid-gap: 9px;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
|
||||
.resource {
|
||||
color: #0094ba;
|
||||
height: 36px;
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
border: 1px solid rgba(0, 0, 0, 0.12);
|
||||
border-radius: 4px;
|
||||
padding: 3px 9px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.resource:hover {
|
||||
background-color: rgba(68, 138, 255, 0.04);
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 9px;
|
||||
border-radius: 4px;
|
||||
background-color: black;
|
||||
color: #eee;
|
||||
}
|
||||
|
||||
details {
|
||||
border-radius: 4px;
|
||||
color: #333;
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
border: 1px solid rgba(0, 0, 0, 0.12);
|
||||
padding: 3px 9px;
|
||||
margin-bottom: 9px;
|
||||
}
|
||||
|
||||
summary {
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
.github-star-container {
|
||||
margin-top: 12px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.github-star-container a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-decoration: none;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.github-star-badge {
|
||||
color: #24292e;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
padding: 3px 10px;
|
||||
border: 1px solid rgba(27, 31, 35, 0.2);
|
||||
border-radius: 3px;
|
||||
background-image: linear-gradient(-180deg, #fafbfc, #eff3f6 90%);
|
||||
margin-left: 4px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.github-star-badge:hover {
|
||||
background-image: linear-gradient(-180deg, #f0f3f6, #e6ebf1 90%);
|
||||
border-color: rgba(27, 31, 35, 0.35);
|
||||
background-position: -0.5em;
|
||||
}
|
||||
.github-star-badge .material-icons {
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
@ -1,33 +0,0 @@
|
||||
import { TestBed, async } from '@angular/core/testing';
|
||||
import { AppComponent } from './app.component';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
|
||||
describe('AppComponent', () => {
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [RouterTestingModule],
|
||||
declarations: [AppComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
it('should create the app', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.componentInstance;
|
||||
expect(app).toBeTruthy();
|
||||
});
|
||||
|
||||
it(`should have as title 'red-ui'`, () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.componentInstance;
|
||||
expect(app.title).toEqual('red-ui');
|
||||
});
|
||||
|
||||
it('should render title', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
fixture.detectChanges();
|
||||
const compiled = fixture.nativeElement;
|
||||
expect(compiled.querySelector('h1').textContent).toContain(
|
||||
'Welcome to red-ui!'
|
||||
);
|
||||
});
|
||||
});
|
||||
@ -1,16 +1,99 @@
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { NgModule } from '@angular/core';
|
||||
import {BrowserModule} from '@angular/platform-browser';
|
||||
import {APP_INITIALIZER, NgModule} from '@angular/core';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import {AppComponent} from './app.component';
|
||||
import {RouterModule} from '@angular/router';
|
||||
import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
|
||||
import {ReactiveFormsModule} from "@angular/forms";
|
||||
import {HTTP_INTERCEPTORS, HttpClient, HttpClientModule} from "@angular/common/http";
|
||||
import {KeycloakAuthModule} from "./keycloak-auth/keycloak-auth.module";
|
||||
import {BaseScreenComponent} from './screens/base-screen/base-screen.component';
|
||||
import {ProjectListingScreenComponent} from './screens/project-listing-screen/project-listing-screen.component';
|
||||
import {ProjectOverviewScreenComponent} from './screens/project-overview-screen/project-overview-screen.component';
|
||||
import {MatToolbarModule} from "@angular/material/toolbar";
|
||||
import {RedKeycloakAuthGuard} from "./keycloak-auth/red-keycloak-auth.guard";
|
||||
import {KeycloakService} from "keycloak-angular";
|
||||
import {ApiModule} from "@redaction/red-ui-http";
|
||||
import {ApiPathInterceptorService} from "./interceptor/api-path-interceptor.service";
|
||||
import {MatButtonModule} from "@angular/material/button";
|
||||
import {TranslateModule, TranslateLoader} from '@ngx-translate/core';
|
||||
import {TranslateHttpLoader} from '@ngx-translate/http-loader';
|
||||
import {MatMenuModule} from "@angular/material/menu";
|
||||
import {languageInitializer} from "./i18n/language.initializer";
|
||||
import {LanguageService} from "./i18n/language.service";
|
||||
import {MatIconModule} from "@angular/material/icon";
|
||||
import {IconsModule} from "./icons/icons.module";
|
||||
import {AddEditProjectDialogComponent} from './screens/project-listing-screen/add-edit-project-dialog/add-edit-project-dialog.component';
|
||||
import {MatDialogModule} from '@angular/material/dialog';
|
||||
import {MatSnackBarModule} from "@angular/material/snack-bar";
|
||||
import {MatTooltipModule} from "@angular/material/tooltip";
|
||||
|
||||
export function HttpLoaderFactory(httpClient: HttpClient) {
|
||||
return new TranslateHttpLoader(httpClient, '/assets/i18n/', '.json');
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
declarations: [AppComponent],
|
||||
declarations: [AppComponent, BaseScreenComponent, ProjectListingScreenComponent, ProjectOverviewScreenComponent, AddEditProjectDialogComponent],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
RouterModule.forRoot([], { initialNavigation: 'enabled' }),
|
||||
BrowserAnimationsModule,
|
||||
ReactiveFormsModule,
|
||||
HttpClientModule,
|
||||
KeycloakAuthModule,
|
||||
IconsModule,
|
||||
ApiModule,
|
||||
MatDialogModule,
|
||||
TranslateModule.forRoot({
|
||||
loader: {
|
||||
provide: TranslateLoader,
|
||||
useFactory: HttpLoaderFactory,
|
||||
deps: [HttpClient]
|
||||
}
|
||||
}),
|
||||
RouterModule.forRoot([
|
||||
{
|
||||
path: '',
|
||||
redirectTo: 'ui/projects',
|
||||
pathMatch: 'full',
|
||||
},
|
||||
{
|
||||
path: 'ui',
|
||||
component: BaseScreenComponent,
|
||||
children: [
|
||||
{
|
||||
path: 'projects',
|
||||
component: ProjectListingScreenComponent,
|
||||
canActivate: [RedKeycloakAuthGuard]
|
||||
},
|
||||
{
|
||||
path: 'projects/:id',
|
||||
component: ProjectOverviewScreenComponent,
|
||||
canActivate: [RedKeycloakAuthGuard]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
]),
|
||||
MatToolbarModule,
|
||||
MatButtonModule,
|
||||
MatMenuModule,
|
||||
MatIconModule,
|
||||
MatTooltipModule,
|
||||
MatSnackBarModule
|
||||
],
|
||||
providers: [],
|
||||
providers: [{
|
||||
provide: KeycloakService,
|
||||
}, {
|
||||
provide: HTTP_INTERCEPTORS,
|
||||
multi: true,
|
||||
useClass: ApiPathInterceptorService,
|
||||
}, {
|
||||
provide: APP_INITIALIZER,
|
||||
multi: true,
|
||||
useFactory: languageInitializer,
|
||||
deps: [LanguageService]
|
||||
}],
|
||||
bootstrap: [AppComponent],
|
||||
})
|
||||
export class AppModule {}
|
||||
export class AppModule {
|
||||
}
|
||||
|
||||
5
apps/red-ui/src/app/i18n/language.initializer.ts
Normal file
5
apps/red-ui/src/app/i18n/language.initializer.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import {LanguageService} from "./language.service";
|
||||
|
||||
export function languageInitializer(languageService: LanguageService) {
|
||||
return () => languageService.chooseAndSetInitialLanguage();
|
||||
}
|
||||
36
apps/red-ui/src/app/i18n/language.service.ts
Normal file
36
apps/red-ui/src/app/i18n/language.service.ts
Normal file
@ -0,0 +1,36 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
import {TranslateService} from '@ngx-translate/core';
|
||||
|
||||
@Injectable({
|
||||
providedIn: "root"
|
||||
})
|
||||
export class LanguageService {
|
||||
constructor(
|
||||
private translateService: TranslateService
|
||||
) {
|
||||
translateService.addLangs(['en', 'de']);
|
||||
}
|
||||
|
||||
chooseAndSetInitialLanguage() {
|
||||
let defaultLang: string;
|
||||
const localStorageLang = localStorage.getItem('redaction.language');
|
||||
const browserLang = this.translateService.getBrowserLang();
|
||||
// @ts-ignore
|
||||
if (this.translateService.getLangs().includes(localStorageLang)) {
|
||||
defaultLang = localStorageLang;
|
||||
// @ts-ignore
|
||||
} else if (this.translateService.getLangs().includes(browserLang)) {
|
||||
defaultLang = browserLang;
|
||||
} else {
|
||||
defaultLang = 'en';
|
||||
}
|
||||
document.documentElement.lang = defaultLang;
|
||||
this.translateService.setDefaultLang(defaultLang);
|
||||
this.translateService.use(defaultLang).subscribe(() => {
|
||||
});
|
||||
}
|
||||
|
||||
get currentLanguage() {
|
||||
return this.translateService.currentLang;
|
||||
}
|
||||
}
|
||||
30
apps/red-ui/src/app/icons/icons.module.ts
Normal file
30
apps/red-ui/src/app/icons/icons.module.ts
Normal file
@ -0,0 +1,30 @@
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {MatIconModule, MatIconRegistry} from '@angular/material/icon';
|
||||
import {DomSanitizer} from '@angular/platform-browser';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, MatIconModule],
|
||||
declarations: [],
|
||||
exports: [MatIconModule]
|
||||
})
|
||||
export class IconsModule {
|
||||
constructor(
|
||||
private iconRegistry: MatIconRegistry,
|
||||
private sanitizer: DomSanitizer
|
||||
) {
|
||||
iconRegistry.addSvgIconInNamespace(
|
||||
'red',
|
||||
'plus',
|
||||
sanitizer.bypassSecurityTrustResourceUrl('/assets/icons/general/plus_icon.svg')
|
||||
);
|
||||
iconRegistry.addSvgIconInNamespace(
|
||||
'red',
|
||||
'close',
|
||||
sanitizer.bypassSecurityTrustResourceUrl('/assets/icons/general/close_icon.svg')
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
import {HttpEvent, HttpHandler, HttpInterceptor, HttpRequest} from '@angular/common/http';
|
||||
import {Injectable} from '@angular/core';
|
||||
import {Observable} from 'rxjs';
|
||||
import {AppConfigKey, AppConfigService} from "../app-config/app-config.service";
|
||||
|
||||
@Injectable()
|
||||
export class ApiPathInterceptorService implements HttpInterceptor {
|
||||
|
||||
constructor(private readonly _appConfigService: AppConfigService) {
|
||||
}
|
||||
|
||||
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
||||
|
||||
if (req.url.startsWith('/redaction-gateway-v1')) {
|
||||
const updatedRequest = req.clone({
|
||||
url: this._appConfigService.getConfig(AppConfigKey.API_URL) + req.url
|
||||
})
|
||||
|
||||
return next.handle(updatedRequest);
|
||||
} else {
|
||||
return next.handle(req);
|
||||
}
|
||||
}
|
||||
}
|
||||
25
apps/red-ui/src/app/keycloak-auth/keycloak-auth.module.ts
Normal file
25
apps/red-ui/src/app/keycloak-auth/keycloak-auth.module.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import {APP_INITIALIZER, NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {KeycloakAngularModule, KeycloakService} from "keycloak-angular";
|
||||
import {keycloakInitializer} from "./keycloak.initializer";
|
||||
import {AppConfigService} from "../app-config/app-config.service";
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [],
|
||||
imports: [
|
||||
CommonModule,
|
||||
KeycloakAngularModule
|
||||
],
|
||||
providers: [
|
||||
AppConfigService,
|
||||
{
|
||||
provide: APP_INITIALIZER,
|
||||
useFactory: keycloakInitializer,
|
||||
multi: true,
|
||||
deps: [KeycloakService, AppConfigService],
|
||||
},
|
||||
],
|
||||
})
|
||||
export class KeycloakAuthModule {
|
||||
}
|
||||
25
apps/red-ui/src/app/keycloak-auth/keycloak.initializer.ts
Normal file
25
apps/red-ui/src/app/keycloak-auth/keycloak.initializer.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import {KeycloakService} from "keycloak-angular";
|
||||
import {AppConfigKey, AppConfigService} from "../app-config/app-config.service";
|
||||
|
||||
|
||||
export function keycloakInitializer(keycloak: KeycloakService, appConfigService: AppConfigService) {
|
||||
return () => {
|
||||
return appConfigService.loadAppConfig().toPromise().then(() => {
|
||||
return keycloak.init({
|
||||
config: {
|
||||
url: appConfigService.getConfig(AppConfigKey.KEYCLOAK_URL),
|
||||
realm: appConfigService.getConfig(AppConfigKey.KEYCLOAK_REALM),
|
||||
clientId: appConfigService.getConfig(AppConfigKey.KEYCLOAK_CLIENT_ID)
|
||||
},
|
||||
initOptions: {
|
||||
checkLoginIframe: false,
|
||||
onLoad: 'check-sso',
|
||||
silentCheckSsoRedirectUri:
|
||||
window.location.origin + '/assets/keycloak/silent-check-sso.html',
|
||||
flow: 'standard'
|
||||
},
|
||||
enableBearerInterceptor: true,
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
31
apps/red-ui/src/app/keycloak-auth/red-keycloak-auth.guard.ts
Normal file
31
apps/red-ui/src/app/keycloak-auth/red-keycloak-auth.guard.ts
Normal file
@ -0,0 +1,31 @@
|
||||
import {KeycloakAuthGuard, KeycloakService} from "keycloak-angular";
|
||||
import {Injectable} from "@angular/core";
|
||||
import {ActivatedRouteSnapshot, Router, RouterStateSnapshot} from "@angular/router";
|
||||
import {of} from "rxjs";
|
||||
import {delay} from "rxjs/operators";
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class RedKeycloakAuthGuard extends KeycloakAuthGuard {
|
||||
constructor(
|
||||
protected readonly _router: Router,
|
||||
protected readonly _keycloak: KeycloakService
|
||||
) {
|
||||
super(_router, _keycloak);
|
||||
}
|
||||
|
||||
public async isAccessAllowed(
|
||||
route: ActivatedRouteSnapshot,
|
||||
state: RouterStateSnapshot
|
||||
) {
|
||||
|
||||
if (!this.authenticated) {
|
||||
await this._keycloak.login({
|
||||
redirectUri: window.location.origin + state.url,
|
||||
});
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
18
apps/red-ui/src/app/notification/notification.service.ts
Normal file
18
apps/red-ui/src/app/notification/notification.service.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import {Injectable} from "@angular/core";
|
||||
import {MatSnackBar} from "@angular/material/snack-bar";
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class NotificationService {
|
||||
constructor(private readonly _snackBar: MatSnackBar) {
|
||||
}
|
||||
|
||||
showToastNotification(message: string) {
|
||||
this._snackBar.open(message, null, {
|
||||
duration: 5000
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
<div class="red-top-bar">
|
||||
<div class="top-bar-row">
|
||||
<div class="menu left">
|
||||
<button mat-flat-button color="primary" translate="top-bar.navigation-items.projects.label"
|
||||
routerLink="/ui/projects"></button>
|
||||
</div>
|
||||
<div class="menu right">
|
||||
<button mat-button [matMenuTriggerFor]="menu" translate="top-bar.navigation-items.my-account.label"></button>
|
||||
<mat-menu #menu="matMenu">
|
||||
<button mat-menu-item translate="top-bar.navigation-items.my-account.children.logout.label"></button>
|
||||
</mat-menu>
|
||||
</div>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
</div>
|
||||
<div class="red-content">
|
||||
<div class="red-content-inner">
|
||||
<router-outlet></router-outlet>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,40 @@
|
||||
@import "../../../../../../assets/styles/red-variables";
|
||||
|
||||
.red-top-bar {
|
||||
height: 61px;
|
||||
width: 100%;
|
||||
max-height: 61px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.top-bar-row {
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-left: 60px;
|
||||
padding-right: 60px;
|
||||
|
||||
.menu {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.divider {
|
||||
height: 1px;
|
||||
opacity: 0.15;
|
||||
background-color: $grey-1;
|
||||
}
|
||||
}
|
||||
|
||||
.red-content {
|
||||
width: 100vw;
|
||||
height: calc(100vh - 61px);
|
||||
overflow: auto;
|
||||
max-width: 1100px;
|
||||
margin: 0 auto;
|
||||
|
||||
.red-content-inner {
|
||||
padding: 40px 40px;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import {UserService} from "../../user/user.service";
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-base-screen',
|
||||
templateUrl: './base-screen.component.html',
|
||||
styleUrls: ['./base-screen.component.scss']
|
||||
})
|
||||
export class BaseScreenComponent implements OnInit {
|
||||
|
||||
constructor(private readonly _userService: UserService) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
async logout() {
|
||||
await this._userService.logout();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
<section class="dialog">
|
||||
|
||||
<form [formGroup]="projectForm">
|
||||
<button mat-icon-button class="dialog-close" (click)="dialogRef.close()">
|
||||
<mat-icon svgIcon="red:close"></mat-icon>
|
||||
</button>
|
||||
<div class="dialog-header heading-l"
|
||||
[translate]="project?.projectId ? 'projects.add-edit-dialog.header-new.label': 'projects.add-edit-dialog.header-edit.label'">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="dialog-content">
|
||||
<div class="red-input-group">
|
||||
<label translate="projects.add-edit-dialog.form.name.label"></label>
|
||||
<input type="text" formControlName="projectName" name="projectName">
|
||||
</div>
|
||||
<div class="red-input-group">
|
||||
<label translate="projects.add-edit-dialog.form.description.label"></label>
|
||||
<input type="text" formControlName="description" name="description">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dialog-actions">
|
||||
|
||||
<button mat-flat-button color="primary" translate="projects.add-edit-dialog.actions.save.label"
|
||||
[disabled]="projectForm.invalid"
|
||||
(click)="saveProject()"></button>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
@ -0,0 +1,57 @@
|
||||
import {Component, Inject, OnInit} from '@angular/core';
|
||||
import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog";
|
||||
import {Project, ProjectControllerService} from "@redaction/red-ui-http";
|
||||
import {FormBuilder, FormGroup, Validators} from "@angular/forms";
|
||||
import {NotificationService} from "../../../notification/notification.service";
|
||||
import {TranslateService} from "@ngx-translate/core";
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-add-edit-project-dialog',
|
||||
templateUrl: './add-edit-project-dialog.component.html',
|
||||
styleUrls: ['./add-edit-project-dialog.component.scss']
|
||||
})
|
||||
export class AddEditProjectDialogComponent implements OnInit {
|
||||
|
||||
projectForm: FormGroup;
|
||||
|
||||
constructor(
|
||||
private readonly _projectControllerService: ProjectControllerService,
|
||||
private readonly _translateService: TranslateService,
|
||||
private readonly _notificationService: NotificationService,
|
||||
private readonly _formBuilder: FormBuilder,
|
||||
public dialogRef: MatDialogRef<AddEditProjectDialogComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public project: Project) {
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.projectForm = this._formBuilder.group({
|
||||
projectName: [this.project?.projectName, Validators.required],
|
||||
description: [this.project?.description]
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
saveProject() {
|
||||
const project: Project = this._formToObject();
|
||||
if (this.project?.projectId) {
|
||||
this._projectControllerService.updateProject(project, this.project.projectId).subscribe(() => {
|
||||
this.dialogRef.close();
|
||||
}, () => {
|
||||
this._notificationService.showToastNotification(this._translateService.instant('projects.add-edit-dialog.errors.save'));
|
||||
})
|
||||
} else {
|
||||
this._projectControllerService.createProject(project).subscribe(() => {
|
||||
this.dialogRef.close();
|
||||
}, () => {
|
||||
this._notificationService.showToastNotification(this._translateService.instant('projects.add-edit-dialog.errors.save'));
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
private _formToObject(): Project {
|
||||
return {
|
||||
projectName: this.projectForm.get('projectName').value,
|
||||
description: this.projectForm.get('description').value,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
|
||||
<div class="page-header">
|
||||
<div translate="projects.header.label" class="heading-xl"></div>
|
||||
<button mat-flat-button color="accent" translate="projects.add-new.label" (click)="openAddProjectDialog()"></button>
|
||||
</div>
|
||||
|
||||
<div class="text" translate="projects.no-projects.label" *ngIf="(projects$ | async )?.length ===0"></div>
|
||||
<div class="project-listing">
|
||||
<div *ngFor="let project of projects$ | async" class="project" [routerLink]="'/ui/projects/'+project.projectId">
|
||||
<div class="project-name">
|
||||
{{project.projectName}}
|
||||
</div>
|
||||
<div class="project-description">
|
||||
{{project.description}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,57 @@
|
||||
@import "../../../../../../assets/styles/red-mixins";
|
||||
|
||||
|
||||
.project-listing {
|
||||
display: inline-flex;
|
||||
|
||||
flex-wrap: wrap;
|
||||
|
||||
.project {
|
||||
box-sizing: border-box;
|
||||
height: 122px;
|
||||
width: 260px;
|
||||
border: 1px solid $grey-1;
|
||||
border-radius: 2px;
|
||||
background-color: $white;
|
||||
padding: 24px;
|
||||
margin-right: 22px;
|
||||
margin-bottom: 22px;
|
||||
|
||||
transition: background-color 0.35s ease-in-out;
|
||||
|
||||
&:hover {
|
||||
background-color: $grey-1;
|
||||
cursor: pointer;
|
||||
* {
|
||||
color: $white !important;
|
||||
}
|
||||
}
|
||||
|
||||
.project-name {
|
||||
height: 44px;
|
||||
color: #283241;
|
||||
font-family: Inter, sans-serf, serif;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0;
|
||||
margin-bottom: 17px;
|
||||
line-height: 22px;
|
||||
@include line-clamp(2);
|
||||
transition: color 0.35s ease-in-out;
|
||||
|
||||
}
|
||||
|
||||
.project-description {
|
||||
height: 12px;
|
||||
opacity: 0.7;
|
||||
color: #283241;
|
||||
font-family: Inconsolata, monospace, monospace;
|
||||
font-size: 12px;
|
||||
letter-spacing: 0;
|
||||
line-height: 12px;
|
||||
@include line-clamp(1);
|
||||
transition: color 0.35s ease-in-out;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {Project, ProjectControllerService} from "@redaction/red-ui-http";
|
||||
import {Observable} from "rxjs";
|
||||
import {MatDialog} from "@angular/material/dialog";
|
||||
import {AddEditProjectDialogComponent} from "./add-edit-project-dialog/add-edit-project-dialog.component";
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-project-listing-screen',
|
||||
templateUrl: './project-listing-screen.component.html',
|
||||
styleUrls: ['./project-listing-screen.component.scss']
|
||||
})
|
||||
export class ProjectListingScreenComponent implements OnInit {
|
||||
|
||||
projects$: Observable<Project[]>;
|
||||
|
||||
constructor(private readonly _projectControllerService: ProjectControllerService, private readonly _dialog: MatDialog) {
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this._reloadProjects();
|
||||
}
|
||||
|
||||
openAddProjectDialog(): void {
|
||||
const dialogRef = this._dialog.open(AddEditProjectDialogComponent, {
|
||||
width: '400px',
|
||||
maxWidth: '90vw',
|
||||
autoFocus: false
|
||||
});
|
||||
|
||||
dialogRef.afterClosed().subscribe(result => {
|
||||
this._reloadProjects();
|
||||
});
|
||||
}
|
||||
|
||||
private _reloadProjects() {
|
||||
this.projects$ = this._projectControllerService.getProjects();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
<p>project-overview-screen works!</p>
|
||||
@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-project-overview-screen',
|
||||
templateUrl: './project-overview-screen.component.html',
|
||||
styleUrls: ['./project-overview-screen.component.scss']
|
||||
})
|
||||
export class ProjectOverviewScreenComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
||||
17
apps/red-ui/src/app/user/user.service.ts
Normal file
17
apps/red-ui/src/app/user/user.service.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import {Injectable} from "@angular/core";
|
||||
import {KeycloakService} from "keycloak-angular";
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class UserService {
|
||||
|
||||
constructor(private _keycloakService: KeycloakService) {
|
||||
}
|
||||
|
||||
async logout() {
|
||||
await this._keycloakService.logout();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
6
apps/red-ui/src/assets/config/config.json
Normal file
6
apps/red-ui/src/assets/config/config.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"KEYCLOAK_URL": "https://keycloak-dev.iqser.cloud/auth",
|
||||
"KEYCLOAK_REALM": "dev",
|
||||
"KEYCLOAK_CLIENT_ID": "gin-client",
|
||||
"API_URL": "http://ingress.redaction-timo.178.63.47.73.xip.io"
|
||||
}
|
||||
0
apps/red-ui/src/assets/i18n/de.json
Normal file
0
apps/red-ui/src/assets/i18n/de.json
Normal file
49
apps/red-ui/src/assets/i18n/en.json
Normal file
49
apps/red-ui/src/assets/i18n/en.json
Normal file
@ -0,0 +1,49 @@
|
||||
{
|
||||
"top-bar": {
|
||||
"navigation-items": {
|
||||
"projects": {
|
||||
"label": "Projects"
|
||||
},
|
||||
"my-account": {
|
||||
"label": "My Account",
|
||||
"children": {
|
||||
"logout": {
|
||||
"label": "Logout"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"projects": {
|
||||
"add-edit-dialog": {
|
||||
"header-new": {
|
||||
"label": "New Project"
|
||||
},
|
||||
"header-edit": {
|
||||
"label": "New Project"
|
||||
},
|
||||
"form": {
|
||||
"description": {
|
||||
"label": "Description"
|
||||
},
|
||||
"name": {
|
||||
"label": "Name"
|
||||
}
|
||||
},
|
||||
"actions": {
|
||||
"save": {
|
||||
"label": "Save Project"
|
||||
}
|
||||
}
|
||||
},
|
||||
"header": {
|
||||
"label": "Projects"
|
||||
},
|
||||
"add-new": {
|
||||
"label": "New Project"
|
||||
},
|
||||
"no-projects": {
|
||||
"label": "You currently have no projects. You can start your work by creating a new one!"
|
||||
}
|
||||
}
|
||||
}
|
||||
10
apps/red-ui/src/assets/icons/general/close_icon.svg
Executable file
10
apps/red-ui/src/assets/icons/general/close_icon.svg
Executable file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 48.2 (47327) - http://www.bohemiancoding.com/sketch -->
|
||||
<defs></defs>
|
||||
<g id="Artboard" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" transform="translate(-125.000000, -2943.000000)">
|
||||
<g id="Group-3" transform="translate(125.000000, 2941.000000)" fill="currentColor" fill-rule="nonzero">
|
||||
<path d="M0.214065204,20.7905764 L8.99613075,12.0085125 L0.214414005,3.20847714 C-0.0687971994,2.92529436 -0.0687971994,2.49561043 0.214403514,2.21240971 C0.497586287,1.92919851 0.927270223,1.92919851 1.21047618,2.21240447 L9.99219817,10.9941265 L18.7922336,2.21240971 C19.0754163,1.92919851 19.5051003,1.92919851 19.788301,2.21239922 C20.0715122,2.495582 20.0715122,2.92526593 19.7883062,3.20847189 L11.0065843,11.9901939 L19.788301,20.7902293 C20.0715122,21.0734121 20.0715122,21.503096 19.7883062,21.786302 C19.6615861,21.9130221 19.4563549,22 19.2902593,22 C19.1241636,22 18.9189324,21.9130221 18.7922123,21.786302 L10.0104903,13.00458 L1.21044964,21.786302 C1.08372954,21.9130221 0.878498298,22 0.712402662,22 C0.54632641,22 0.341278436,21.9130692 0.214305668,21.7862005 C-0.0714409748,21.5029802 -0.0713493013,21.0732218 0.214065204,20.7905764 Z" id="close_icon"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
14
apps/red-ui/src/assets/icons/general/plus_icon.svg
Normal file
14
apps/red-ui/src/assets/icons/general/plus_icon.svg
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 49 (51002) - http://www.bohemiancoding.com/sketch -->
|
||||
<defs></defs>
|
||||
<g id="Settings" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Data-Sources" transform="translate(-564.000000, -592.000000)" fill="currentColor">
|
||||
<g id="Group-17" transform="translate(554.000000, 582.000000)">
|
||||
<g id="Group-7-Copy">
|
||||
<path d="M25.3793879,17.3793879 L18.6206121,17.3793879 L18.6206121,10.6206121 C18.6206121,10.2775688 18.343034,10 18,10 C17.656966,10 17.3793879,10.2775781 17.3793879,10.6206121 L17.3793879,17.3793879 L10.6206121,17.3793879 C10.2775688,17.3793879 10,17.656966 10,18 C10,18.343034 10.2775781,18.6206121 10.6206121,18.6206121 L17.3793879,18.6206121 L17.3793879,25.3793879 C17.3793879,25.7224312 17.656966,26 18,26 C18.343034,26 18.6206121,25.7224219 18.6206121,25.3793879 L18.6206121,18.6206121 L25.3793879,18.6206121 C25.7224312,18.6206121 26,18.343034 26,18 C26,17.6581669 25.7224219,17.3793879 25.3793879,17.3793879 Z" id="plus_icon"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
7
apps/red-ui/src/assets/keycloak/silent-check-sso.html
Normal file
7
apps/red-ui/src/assets/keycloak/silent-check-sso.html
Normal file
@ -0,0 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<script>
|
||||
parent.postMessage(location.href, location.origin);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>RedUiApp</title>
|
||||
<title>Redaction</title>
|
||||
<base href="/" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico" />
|
||||
|
||||
@ -1 +1,2 @@
|
||||
/* You can add global styles to this file, and also import other style files */
|
||||
@import "../../../assets/styles/red-theme";
|
||||
|
||||
13
assets/styles/page-layout.scss
Normal file
13
assets/styles/page-layout.scss
Normal file
@ -0,0 +1,13 @@
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 100vh;
|
||||
font-family: 'Inter', sans-serif;
|
||||
}
|
||||
|
||||
.page-header{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
28
assets/styles/red-dialog.scss
Normal file
28
assets/styles/red-dialog.scss
Normal file
@ -0,0 +1,28 @@
|
||||
.dialog {
|
||||
position: relative;
|
||||
min-height: 80px;
|
||||
|
||||
.dialog-close {
|
||||
position: absolute;
|
||||
top: -15px;
|
||||
right: -10px;
|
||||
|
||||
mat-icon {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.dialog-header {
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
|
||||
.dialog-content {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
|
||||
.dialog-actions {
|
||||
padding-top: 12px;
|
||||
}
|
||||
}
|
||||
37
assets/styles/red-input.scss
Normal file
37
assets/styles/red-input.scss
Normal file
@ -0,0 +1,37 @@
|
||||
@import "red-variables";
|
||||
|
||||
.red-input-group {
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 8px;
|
||||
|
||||
label {
|
||||
height: 14px;
|
||||
opacity: 0.6;
|
||||
color: $grey-1;
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0;
|
||||
line-height: 14px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
input {
|
||||
box-sizing: border-box;
|
||||
padding-left: 11px;
|
||||
padding-right: 11px;
|
||||
height: 34px;
|
||||
width: 300px;
|
||||
border: 1px solid $grey-3;
|
||||
opacity: 0.4;
|
||||
border-radius: 2px;
|
||||
background-color: #FFFFFF;
|
||||
outline: none;
|
||||
|
||||
:focus {
|
||||
border-color: $grey-1;
|
||||
}
|
||||
}
|
||||
}
|
||||
54
assets/styles/red-material-theme.scss
Normal file
54
assets/styles/red-material-theme.scss
Normal file
@ -0,0 +1,54 @@
|
||||
@import '~@angular/material/theming';
|
||||
@import 'red-variables';
|
||||
|
||||
@include mat-core();
|
||||
|
||||
$grey-1-palette: (
|
||||
default: $grey-1,
|
||||
lighter: lighten($grey-1, 15%),
|
||||
darker: darken($grey-1, 15%),
|
||||
text: $grey-1,
|
||||
contrast: (
|
||||
default: $white,
|
||||
lighter: $white,
|
||||
darker: $white
|
||||
)
|
||||
);
|
||||
|
||||
$grey-2-palette: (
|
||||
default: $grey-2,
|
||||
lighter: lighten($grey-2, 15%),
|
||||
darker: darken($grey-2, 15%),
|
||||
text: $grey-2,
|
||||
contrast: (
|
||||
default: $grey-1,
|
||||
lighter: $grey-1,
|
||||
darker: $grey-1
|
||||
)
|
||||
);
|
||||
|
||||
$red-palette: (
|
||||
default: $red-1,
|
||||
lighter: lighten($red-1, 15%),
|
||||
darker: darken($red-1, 15%),
|
||||
text: $red-1,
|
||||
contrast: (
|
||||
default: $white,
|
||||
lighter: $white,
|
||||
darker: $white
|
||||
)
|
||||
);
|
||||
|
||||
$gn-next-primary: mat-palette($grey-1-palette, default, lighter, darker, text);
|
||||
$gn-next-secondary: mat-palette($grey-2-palette, default, lighter, darker, text);
|
||||
$gn-next-warning: mat-palette($red-palette, default, lighter, darker, text);
|
||||
|
||||
$gn-next-mat-theme: mat-light-theme((
|
||||
color: (
|
||||
primary: $gn-next-primary,
|
||||
accent: $gn-next-secondary,
|
||||
warn: $gn-next-warning,
|
||||
)
|
||||
));
|
||||
|
||||
@include angular-material-theme($gn-next-mat-theme);
|
||||
9
assets/styles/red-mixins.scss
Normal file
9
assets/styles/red-mixins.scss
Normal file
@ -0,0 +1,9 @@
|
||||
@import 'red-variables';
|
||||
|
||||
@mixin line-clamp($lines) {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: $lines;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
27
assets/styles/red-text-styles.scss
Normal file
27
assets/styles/red-text-styles.scss
Normal file
@ -0,0 +1,27 @@
|
||||
@import "red-variables";
|
||||
|
||||
button {
|
||||
font-family: Inconsolata, monospace !important;
|
||||
font-weight: 700 !important;
|
||||
}
|
||||
|
||||
.heading-xl {
|
||||
height: 39px;
|
||||
width: 130px;
|
||||
color: $grey-1;
|
||||
font-family: Inter, sans-serf;
|
||||
font-size: 32px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0;
|
||||
line-height: 39px;
|
||||
}
|
||||
|
||||
.heading-l{
|
||||
height: 22px;
|
||||
color: #283241;
|
||||
font-family: Inter, sans-serf;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0;
|
||||
line-height: 22px;
|
||||
}
|
||||
7
assets/styles/red-theme.scss
Normal file
7
assets/styles/red-theme.scss
Normal file
@ -0,0 +1,7 @@
|
||||
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&display=swap');
|
||||
@import url('https://fonts.googleapis.com/css2?family=Inconsolata:wght@300;400;500;700&display=swap');
|
||||
@import "red-material-theme";
|
||||
@import "page-layout";
|
||||
@import "red-text-styles";
|
||||
@import "red-dialog";
|
||||
@import "red-input";
|
||||
12
assets/styles/red-variables.scss
Normal file
12
assets/styles/red-variables.scss
Normal file
@ -0,0 +1,12 @@
|
||||
$white: #FFF;
|
||||
$black: #000;
|
||||
|
||||
$grey-1: #283241;
|
||||
$grey-2: #ECECEE;
|
||||
$grey-3: #aaacb3;
|
||||
|
||||
$blue-1: #4875F7;
|
||||
$red-1: #F65757;
|
||||
$yellow-1: #FFB83B;
|
||||
$green-1: #46CE7D;
|
||||
|
||||
7
libs/red-ui-http/README.md
Normal file
7
libs/red-ui-http/README.md
Normal file
@ -0,0 +1,7 @@
|
||||
# red-ui-http
|
||||
|
||||
This library was generated with [Nx](https://nx.dev).
|
||||
|
||||
## Running unit tests
|
||||
|
||||
Run `nx test red-ui-http` to execute the unit tests.
|
||||
1
libs/red-ui-http/src/index.ts
Normal file
1
libs/red-ui-http/src/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from './lib/index';
|
||||
53
libs/red-ui-http/src/lib/api.module.ts
Normal file
53
libs/red-ui-http/src/lib/api.module.ts
Normal file
@ -0,0 +1,53 @@
|
||||
import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core';
|
||||
import { Configuration } from './configuration';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
|
||||
|
||||
import { DebugControllerService } from './api/debugController.service';
|
||||
import { DictionaryControllerService } from './api/dictionaryController.service';
|
||||
import { FileUploadControllerService } from './api/fileUploadController.service';
|
||||
import { LicenseReportControllerService } from './api/licenseReportController.service';
|
||||
import { ManualRedactionControllerService } from './api/manualRedactionController.service';
|
||||
import { PdfMetaDataConfigurationControllerService } from './api/pdfMetaDataConfigurationController.service';
|
||||
import { ProjectControllerService } from './api/projectController.service';
|
||||
import { ReanalysisControllerService } from './api/reanalysisController.service';
|
||||
import { RedactionLogControllerService } from './api/redactionLogController.service';
|
||||
import { RulesControllerService } from './api/rulesController.service';
|
||||
import { StatusControllerService } from './api/statusController.service';
|
||||
|
||||
@NgModule({
|
||||
imports: [],
|
||||
declarations: [],
|
||||
exports: [],
|
||||
providers: [
|
||||
DebugControllerService,
|
||||
DictionaryControllerService,
|
||||
FileUploadControllerService,
|
||||
LicenseReportControllerService,
|
||||
ManualRedactionControllerService,
|
||||
PdfMetaDataConfigurationControllerService,
|
||||
ProjectControllerService,
|
||||
ReanalysisControllerService,
|
||||
RedactionLogControllerService,
|
||||
RulesControllerService,
|
||||
StatusControllerService ]
|
||||
})
|
||||
export class ApiModule {
|
||||
public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders<ApiModule> {
|
||||
return {
|
||||
ngModule: ApiModule,
|
||||
providers: [ { provide: Configuration, useFactory: configurationFactory } ]
|
||||
};
|
||||
}
|
||||
|
||||
constructor( @Optional() @SkipSelf() parentModule: ApiModule,
|
||||
@Optional() http: HttpClient) {
|
||||
if (parentModule) {
|
||||
throw new Error('ApiModule is already loaded. Import in your base AppModule only.');
|
||||
}
|
||||
if (!http) {
|
||||
throw new Error('You need to import the HttpClientModule in your AppModule! \n' +
|
||||
'See also https://github.com/angular/angular/issues/20575');
|
||||
}
|
||||
}
|
||||
}
|
||||
23
libs/red-ui-http/src/lib/api/api.ts
Normal file
23
libs/red-ui-http/src/lib/api/api.ts
Normal file
@ -0,0 +1,23 @@
|
||||
export * from './debugController.service';
|
||||
import { DebugControllerService } from './debugController.service';
|
||||
export * from './dictionaryController.service';
|
||||
import { DictionaryControllerService } from './dictionaryController.service';
|
||||
export * from './fileUploadController.service';
|
||||
import { FileUploadControllerService } from './fileUploadController.service';
|
||||
export * from './licenseReportController.service';
|
||||
import { LicenseReportControllerService } from './licenseReportController.service';
|
||||
export * from './manualRedactionController.service';
|
||||
import { ManualRedactionControllerService } from './manualRedactionController.service';
|
||||
export * from './pdfMetaDataConfigurationController.service';
|
||||
import { PdfMetaDataConfigurationControllerService } from './pdfMetaDataConfigurationController.service';
|
||||
export * from './projectController.service';
|
||||
import { ProjectControllerService } from './projectController.service';
|
||||
export * from './reanalysisController.service';
|
||||
import { ReanalysisControllerService } from './reanalysisController.service';
|
||||
export * from './redactionLogController.service';
|
||||
import { RedactionLogControllerService } from './redactionLogController.service';
|
||||
export * from './rulesController.service';
|
||||
import { RulesControllerService } from './rulesController.service';
|
||||
export * from './statusController.service';
|
||||
import { StatusControllerService } from './statusController.service';
|
||||
export const APIS = [DebugControllerService, DictionaryControllerService, FileUploadControllerService, LicenseReportControllerService, ManualRedactionControllerService, PdfMetaDataConfigurationControllerService, ProjectControllerService, ReanalysisControllerService, RedactionLogControllerService, RulesControllerService, StatusControllerService];
|
||||
370
libs/red-ui-http/src/lib/api/debugController.service.ts
Normal file
370
libs/red-ui-http/src/lib/api/debugController.service.ts
Normal file
@ -0,0 +1,370 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*//* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams,
|
||||
HttpResponse, HttpEvent } from '@angular/common/http';
|
||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class DebugControllerService {
|
||||
|
||||
protected basePath = '';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
|
||||
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param consumes string[] mime-types
|
||||
* @return true: consumes contains 'multipart/form-data', false: otherwise
|
||||
*/
|
||||
private canConsumeForm(consumes: string[]): boolean {
|
||||
const form = 'multipart/form-data';
|
||||
for (const consume of consumes) {
|
||||
if (form === consume) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Receives an uploaded file and returns it with its classified elements visualized for debugging.
|
||||
* None
|
||||
* @param file
|
||||
* @param inline inline
|
||||
* @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 debugClassificationsForm(file: Blob, inline?: boolean, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public debugClassificationsForm(file: Blob, inline?: boolean, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public debugClassificationsForm(file: Blob, inline?: boolean, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public debugClassificationsForm(file: Blob, inline?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (file === null || file === undefined) {
|
||||
throw new Error('Required parameter file was null or undefined when calling debugClassifications.');
|
||||
}
|
||||
|
||||
|
||||
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
||||
if (inline !== undefined && inline !== null) {
|
||||
queryParameters = queryParameters.set('inline', <any>inline);
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
'application/octet-stream'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
'multipart/form-data'
|
||||
];
|
||||
|
||||
const canConsumeForm = this.canConsumeForm(consumes);
|
||||
|
||||
let formParams: { append(param: string, value: any): void; };
|
||||
let useForm = false;
|
||||
let convertFormParamsToString = false;
|
||||
// use FormData to transmit files using content-type "multipart/form-data"
|
||||
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
|
||||
useForm = canConsumeForm;
|
||||
if (useForm) {
|
||||
formParams = new FormData();
|
||||
} else {
|
||||
formParams = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
||||
}
|
||||
|
||||
if (file !== undefined) {
|
||||
formParams = formParams.append('file', <any>file) as any || formParams;
|
||||
}
|
||||
|
||||
return this.httpClient.request<any>('post',`${this.basePath}/redaction-gateway-v1/debug/classification`,
|
||||
{
|
||||
body: convertFormParamsToString ? formParams.toString() : formParams,
|
||||
params: queryParameters,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Receives an uploaded file and returns a html file with its extracted tables for debugging.
|
||||
* None
|
||||
* @param file
|
||||
* @param inline inline
|
||||
* @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 debugHtmlTablesForm(file: Blob, inline?: boolean, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public debugHtmlTablesForm(file: Blob, inline?: boolean, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public debugHtmlTablesForm(file: Blob, inline?: boolean, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public debugHtmlTablesForm(file: Blob, inline?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (file === null || file === undefined) {
|
||||
throw new Error('Required parameter file was null or undefined when calling debugHtmlTables.');
|
||||
}
|
||||
|
||||
|
||||
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
||||
if (inline !== undefined && inline !== null) {
|
||||
queryParameters = queryParameters.set('inline', <any>inline);
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
'application/octet-stream'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
'multipart/form-data'
|
||||
];
|
||||
|
||||
const canConsumeForm = this.canConsumeForm(consumes);
|
||||
|
||||
let formParams: { append(param: string, value: any): void; };
|
||||
let useForm = false;
|
||||
let convertFormParamsToString = false;
|
||||
// use FormData to transmit files using content-type "multipart/form-data"
|
||||
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
|
||||
useForm = canConsumeForm;
|
||||
if (useForm) {
|
||||
formParams = new FormData();
|
||||
} else {
|
||||
formParams = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
||||
}
|
||||
|
||||
if (file !== undefined) {
|
||||
formParams = formParams.append('file', <any>file) as any || formParams;
|
||||
}
|
||||
|
||||
return this.httpClient.request<any>('post',`${this.basePath}/redaction-gateway-v1/debug/htmlTables`,
|
||||
{
|
||||
body: convertFormParamsToString ? formParams.toString() : formParams,
|
||||
params: queryParameters,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Receives an uploaded file and returns it with its sections visualized for debugging.
|
||||
* None
|
||||
* @param file
|
||||
* @param inline inline
|
||||
* @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 debugSectionsForm(file: Blob, inline?: boolean, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public debugSectionsForm(file: Blob, inline?: boolean, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public debugSectionsForm(file: Blob, inline?: boolean, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public debugSectionsForm(file: Blob, inline?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (file === null || file === undefined) {
|
||||
throw new Error('Required parameter file was null or undefined when calling debugSections.');
|
||||
}
|
||||
|
||||
|
||||
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
||||
if (inline !== undefined && inline !== null) {
|
||||
queryParameters = queryParameters.set('inline', <any>inline);
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
'application/octet-stream'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
'multipart/form-data'
|
||||
];
|
||||
|
||||
const canConsumeForm = this.canConsumeForm(consumes);
|
||||
|
||||
let formParams: { append(param: string, value: any): void; };
|
||||
let useForm = false;
|
||||
let convertFormParamsToString = false;
|
||||
// use FormData to transmit files using content-type "multipart/form-data"
|
||||
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
|
||||
useForm = canConsumeForm;
|
||||
if (useForm) {
|
||||
formParams = new FormData();
|
||||
} else {
|
||||
formParams = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
||||
}
|
||||
|
||||
if (file !== undefined) {
|
||||
formParams = formParams.append('file', <any>file) as any || formParams;
|
||||
}
|
||||
|
||||
return this.httpClient.request<any>('post',`${this.basePath}/redaction-gateway-v1/debug/sections`,
|
||||
{
|
||||
body: convertFormParamsToString ? formParams.toString() : formParams,
|
||||
params: queryParameters,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Receives an uploaded file and returns it redacted.
|
||||
* None
|
||||
* @param file
|
||||
* @param inline inline
|
||||
* @param flatRedaction flatRedaction
|
||||
* @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 redactionForm(file: Blob, inline?: boolean, flatRedaction?: boolean, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public redactionForm(file: Blob, inline?: boolean, flatRedaction?: boolean, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public redactionForm(file: Blob, inline?: boolean, flatRedaction?: boolean, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public redactionForm(file: Blob, inline?: boolean, flatRedaction?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (file === null || file === undefined) {
|
||||
throw new Error('Required parameter file was null or undefined when calling redaction.');
|
||||
}
|
||||
|
||||
|
||||
|
||||
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
||||
if (inline !== undefined && inline !== null) {
|
||||
queryParameters = queryParameters.set('inline', <any>inline);
|
||||
}
|
||||
if (flatRedaction !== undefined && flatRedaction !== null) {
|
||||
queryParameters = queryParameters.set('flatRedaction', <any>flatRedaction);
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
'application/octet-stream'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
'multipart/form-data'
|
||||
];
|
||||
|
||||
const canConsumeForm = this.canConsumeForm(consumes);
|
||||
|
||||
let formParams: { append(param: string, value: any): void; };
|
||||
let useForm = false;
|
||||
let convertFormParamsToString = false;
|
||||
// use FormData to transmit files using content-type "multipart/form-data"
|
||||
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
|
||||
useForm = canConsumeForm;
|
||||
if (useForm) {
|
||||
formParams = new FormData();
|
||||
} else {
|
||||
formParams = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
||||
}
|
||||
|
||||
if (file !== undefined) {
|
||||
formParams = formParams.append('file', <any>file) as any || formParams;
|
||||
}
|
||||
|
||||
return this.httpClient.request<any>('post',`${this.basePath}/redaction-gateway-v1/debug/redaction`,
|
||||
{
|
||||
body: convertFormParamsToString ? formParams.toString() : formParams,
|
||||
params: queryParameters,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
653
libs/red-ui-http/src/lib/api/dictionaryController.service.ts
Normal file
653
libs/red-ui-http/src/lib/api/dictionaryController.service.ts
Normal file
@ -0,0 +1,653 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*//* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams,
|
||||
HttpResponse, HttpEvent } from '@angular/common/http';
|
||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { DefaultColor } from '../model/defaultColor';
|
||||
import { Dictionary } from '../model/dictionary';
|
||||
import { TypeResponse } from '../model/typeResponse';
|
||||
import { TypeValue } from '../model/typeValue';
|
||||
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class DictionaryControllerService {
|
||||
|
||||
protected basePath = '';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
|
||||
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param consumes string[] mime-types
|
||||
* @return true: consumes contains 'multipart/form-data', false: otherwise
|
||||
*/
|
||||
private canConsumeForm(consumes: string[]): boolean {
|
||||
const form = 'multipart/form-data';
|
||||
for (const consume of consumes) {
|
||||
if (form === consume) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add dictionary entries with entry type.
|
||||
* None
|
||||
* @param body entries
|
||||
* @param type type
|
||||
* @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 addEntry(body: Array<string>, type: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public addEntry(body: Array<string>, type: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public addEntry(body: Array<string>, type: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public addEntry(body: Array<string>, type: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling addEntry.');
|
||||
}
|
||||
|
||||
if (type === null || type === undefined) {
|
||||
throw new Error('Required parameter type was null or undefined when calling addEntry.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.httpClient.request<any>('post',`${this.basePath}/redaction-gateway-v1/dictionary/${encodeURIComponent(String(type))}`,
|
||||
{
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates entry type with colors, hint and caseInsensitive
|
||||
* None
|
||||
* @param body typeValue
|
||||
* @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 addType(body: TypeValue, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public addType(body: TypeValue, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public addType(body: TypeValue, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public addType(body: TypeValue, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling addType.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.httpClient.request<any>('post',`${this.basePath}/redaction-gateway-v1/dictionary/type`,
|
||||
{
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete dictionary entries with entry type.
|
||||
* None
|
||||
* @param body entries
|
||||
* @param type type
|
||||
* @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 deleteEntry(body: Array<string>, type: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public deleteEntry(body: Array<string>, type: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public deleteEntry(body: Array<string>, type: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public deleteEntry(body: Array<string>, type: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling deleteEntry.');
|
||||
}
|
||||
|
||||
if (type === null || type === undefined) {
|
||||
throw new Error('Required parameter type was null or undefined when calling deleteEntry.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
'*/*'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.httpClient.request<any>('delete',`${this.basePath}/redaction-gateway-v1/dictionary/${encodeURIComponent(String(type))}`,
|
||||
{
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes entry type
|
||||
* None
|
||||
* @param type type
|
||||
* @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 deleteType(type: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public deleteType(type: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public deleteType(type: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public deleteType(type: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (type === null || type === undefined) {
|
||||
throw new Error('Required parameter type was null or undefined when calling deleteType.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
|
||||
return this.httpClient.request<any>('delete',`${this.basePath}/redaction-gateway-v1/dictionary/type/${encodeURIComponent(String(type))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns file containing the the dictionary entries for given type..
|
||||
*
|
||||
* @param type type
|
||||
* @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 downloadDictionaryFile(type: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public downloadDictionaryFile(type: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public downloadDictionaryFile(type: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public downloadDictionaryFile(type: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (type === null || type === undefined) {
|
||||
throw new Error('Required parameter type was null or undefined when calling downloadDictionaryFile.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
'application/octet-stream'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
|
||||
return this.httpClient.request<any>('get',`${this.basePath}/redaction-gateway-v1/dictionary/download/${encodeURIComponent(String(type))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve all entry types
|
||||
* None
|
||||
* @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 getAllTypes(observe?: 'body', reportProgress?: boolean): Observable<TypeResponse>;
|
||||
public getAllTypes(observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<TypeResponse>>;
|
||||
public getAllTypes(observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<TypeResponse>>;
|
||||
public getAllTypes(observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
|
||||
return this.httpClient.request<TypeResponse>('get',`${this.basePath}/redaction-gateway-v1/dictionary/type`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves default color for redaction.
|
||||
* None
|
||||
* @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 getDefaultColor(observe?: 'body', reportProgress?: boolean): Observable<DefaultColor>;
|
||||
public getDefaultColor(observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<DefaultColor>>;
|
||||
public getDefaultColor(observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<DefaultColor>>;
|
||||
public getDefaultColor(observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
|
||||
return this.httpClient.request<DefaultColor>('get',`${this.basePath}/redaction-gateway-v1/color`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves all dictionary entries of an entry type
|
||||
* None
|
||||
* @param type type
|
||||
* @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 getDictionaryForType(type: string, observe?: 'body', reportProgress?: boolean): Observable<Dictionary>;
|
||||
public getDictionaryForType(type: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Dictionary>>;
|
||||
public getDictionaryForType(type: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Dictionary>>;
|
||||
public getDictionaryForType(type: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (type === null || type === undefined) {
|
||||
throw new Error('Required parameter type was null or undefined when calling getDictionaryForType.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
|
||||
return this.httpClient.request<Dictionary>('get',`${this.basePath}/redaction-gateway-v1/dictionary/${encodeURIComponent(String(type))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set system default color for redaction
|
||||
*
|
||||
* @param body defaultColor
|
||||
* @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 setDefaultColor(body: DefaultColor, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public setDefaultColor(body: DefaultColor, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public setDefaultColor(body: DefaultColor, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public setDefaultColor(body: DefaultColor, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling setDefaultColor.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.httpClient.request<any>('post',`${this.basePath}/redaction-gateway-v1/color`,
|
||||
{
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates colors, hint and caseInsensitive of an entry type.
|
||||
* None
|
||||
* @param body typeValue
|
||||
* @param type type
|
||||
* @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 updateType(body: TypeValue, type: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public updateType(body: TypeValue, type: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public updateType(body: TypeValue, type: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public updateType(body: TypeValue, type: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling updateType.');
|
||||
}
|
||||
|
||||
if (type === null || type === undefined) {
|
||||
throw new Error('Required parameter type was null or undefined when calling updateType.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.httpClient.request<any>('post',`${this.basePath}/redaction-gateway-v1/dictionary/type/${encodeURIComponent(String(type))}`,
|
||||
{
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Takes object containing string or rules as argument, which will be used by the redaction service.
|
||||
*
|
||||
* @param file
|
||||
* @param type type
|
||||
* @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 uploadDictionaryFileForm(file: Blob, type: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public uploadDictionaryFileForm(file: Blob, type: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public uploadDictionaryFileForm(file: Blob, type: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public uploadDictionaryFileForm(file: Blob, type: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (file === null || file === undefined) {
|
||||
throw new Error('Required parameter file was null or undefined when calling uploadDictionaryFile.');
|
||||
}
|
||||
|
||||
if (type === null || type === undefined) {
|
||||
throw new Error('Required parameter type was null or undefined when calling uploadDictionaryFile.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
'multipart/form-data'
|
||||
];
|
||||
|
||||
const canConsumeForm = this.canConsumeForm(consumes);
|
||||
|
||||
let formParams: { append(param: string, value: any): void; };
|
||||
let useForm = false;
|
||||
let convertFormParamsToString = false;
|
||||
// use FormData to transmit files using content-type "multipart/form-data"
|
||||
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
|
||||
useForm = canConsumeForm;
|
||||
if (useForm) {
|
||||
formParams = new FormData();
|
||||
} else {
|
||||
formParams = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
||||
}
|
||||
|
||||
if (file !== undefined) {
|
||||
formParams = formParams.append('file', <any>file) as any || formParams;
|
||||
}
|
||||
|
||||
return this.httpClient.request<any>('post',`${this.basePath}/redaction-gateway-v1/dictionary/upload/${encodeURIComponent(String(type))}`,
|
||||
{
|
||||
body: convertFormParamsToString ? formParams.toString() : formParams,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
476
libs/red-ui-http/src/lib/api/fileUploadController.service.ts
Normal file
476
libs/red-ui-http/src/lib/api/fileUploadController.service.ts
Normal file
@ -0,0 +1,476 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*//* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams,
|
||||
HttpResponse, HttpEvent } from '@angular/common/http';
|
||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { FileIds } from '../model/fileIds';
|
||||
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class FileUploadControllerService {
|
||||
|
||||
protected basePath = '';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
|
||||
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param consumes string[] mime-types
|
||||
* @return true: consumes contains 'multipart/form-data', false: otherwise
|
||||
*/
|
||||
private canConsumeForm(consumes: string[]): boolean {
|
||||
const form = 'multipart/form-data';
|
||||
for (const consume of consumes) {
|
||||
if (form === consume) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deletes a file for a given projectId and FileId
|
||||
* None
|
||||
* @param projectId projectId
|
||||
* @param fileId fileId
|
||||
* @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 deleteFile(projectId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public deleteFile(projectId: string, fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public deleteFile(projectId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public deleteFile(projectId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error('Required parameter projectId was null or undefined when calling deleteFile.');
|
||||
}
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error('Required parameter fileId was null or undefined when calling deleteFile.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
|
||||
return this.httpClient.request<any>('delete',`${this.basePath}/redaction-gateway-v1/delete/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a downloadable byte stream of the annotated file with the specified fileId
|
||||
* Use the optional \"inline\" request parameter to select, if this downloadAnnotated will be opened in the browser.
|
||||
* @param fileId fileId
|
||||
* @param inline inline
|
||||
* @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 downloadAnnotatedFile(fileId: string, inline?: boolean, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public downloadAnnotatedFile(fileId: string, inline?: boolean, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public downloadAnnotatedFile(fileId: string, inline?: boolean, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public downloadAnnotatedFile(fileId: string, inline?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error('Required parameter fileId was null or undefined when calling downloadAnnotatedFile.');
|
||||
}
|
||||
|
||||
|
||||
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
||||
if (inline !== undefined && inline !== null) {
|
||||
queryParameters = queryParameters.set('inline', <any>inline);
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
'application/octet-stream'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
|
||||
return this.httpClient.request<any>('get',`${this.basePath}/redaction-gateway-v1/download/annotated/${encodeURIComponent(String(fileId))}`,
|
||||
{
|
||||
params: queryParameters,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a downloadable byte stream of the original file with the specified fileId
|
||||
* Use the optional \"inline\" request parameter to select, if this downloadAnnotated will be opened in the browser.
|
||||
* @param fileId fileId
|
||||
* @param inline inline
|
||||
* @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 downloadOriginalFile(fileId: string, inline?: boolean, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public downloadOriginalFile(fileId: string, inline?: boolean, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public downloadOriginalFile(fileId: string, inline?: boolean, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public downloadOriginalFile(fileId: string, inline?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error('Required parameter fileId was null or undefined when calling downloadOriginalFile.');
|
||||
}
|
||||
|
||||
|
||||
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
||||
if (inline !== undefined && inline !== null) {
|
||||
queryParameters = queryParameters.set('inline', <any>inline);
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
'application/octet-stream'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
|
||||
return this.httpClient.request<any>('get',`${this.basePath}/redaction-gateway-v1/download/original/${encodeURIComponent(String(fileId))}`,
|
||||
{
|
||||
params: queryParameters,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a downloadable byte stream of the redacted file with the specified fileId
|
||||
* Use the optional \"inline\" request parameter to select, if this downloadAnnotated will be opened in the browser.
|
||||
* @param fileId fileId
|
||||
* @param inline inline
|
||||
* @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 downloadRedactedFile(fileId: string, inline?: boolean, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public downloadRedactedFile(fileId: string, inline?: boolean, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public downloadRedactedFile(fileId: string, inline?: boolean, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public downloadRedactedFile(fileId: string, inline?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error('Required parameter fileId was null or undefined when calling downloadRedactedFile.');
|
||||
}
|
||||
|
||||
|
||||
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
||||
if (inline !== undefined && inline !== null) {
|
||||
queryParameters = queryParameters.set('inline', <any>inline);
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
'application/octet-stream'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
|
||||
return this.httpClient.request<any>('get',`${this.basePath}/redaction-gateway-v1/download/redacted/${encodeURIComponent(String(fileId))}`,
|
||||
{
|
||||
params: queryParameters,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a downloadable byte stream of the redaction report file for the specified fileIds
|
||||
* Use the optional \"inline\" request parameter to select, if this report will be opened in the browser.
|
||||
* @param body fileIds
|
||||
* @param inline inline
|
||||
* @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 downloadRedactionReport(body: FileIds, inline?: boolean, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public downloadRedactionReport(body: FileIds, inline?: boolean, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public downloadRedactionReport(body: FileIds, inline?: boolean, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public downloadRedactionReport(body: FileIds, inline?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling downloadRedactionReport.');
|
||||
}
|
||||
|
||||
|
||||
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
||||
if (inline !== undefined && inline !== null) {
|
||||
queryParameters = queryParameters.set('inline', <any>inline);
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
'application/octet-stream'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.httpClient.request<any>('post',`${this.basePath}/redaction-gateway-v1/download/report`,
|
||||
{
|
||||
body: body,
|
||||
params: queryParameters,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a downloadable byte stream of the redaction report file for the specified project
|
||||
* Use the optional \"inline\" request parameter to select, if this report will be opened in the browser.
|
||||
* @param projectId The projectId
|
||||
* @param inline inline
|
||||
* @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 downloadRedactionReportForProject(projectId: string, inline?: boolean, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public downloadRedactionReportForProject(projectId: string, inline?: boolean, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public downloadRedactionReportForProject(projectId: string, inline?: boolean, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public downloadRedactionReportForProject(projectId: string, inline?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error('Required parameter projectId was null or undefined when calling downloadRedactionReportForProject.');
|
||||
}
|
||||
|
||||
|
||||
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
||||
if (inline !== undefined && inline !== null) {
|
||||
queryParameters = queryParameters.set('inline', <any>inline);
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
'application/octet-stream'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
|
||||
return this.httpClient.request<any>('get',`${this.basePath}/redaction-gateway-v1/download/report/${encodeURIComponent(String(projectId))}`,
|
||||
{
|
||||
params: queryParameters,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Receives an uploaded file and returns its fileId.
|
||||
* None
|
||||
* @param file
|
||||
* @param projectId The projectId, the file belongs to
|
||||
* @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 uploadFileForm(file: Blob, projectId: string, observe?: 'body', reportProgress?: boolean): Observable<string>;
|
||||
public uploadFileForm(file: Blob, projectId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<string>>;
|
||||
public uploadFileForm(file: Blob, projectId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<string>>;
|
||||
public uploadFileForm(file: Blob, projectId: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (file === null || file === undefined) {
|
||||
throw new Error('Required parameter file was null or undefined when calling uploadFile.');
|
||||
}
|
||||
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error('Required parameter projectId was null or undefined when calling uploadFile.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
'*/*'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
'multipart/form-data'
|
||||
];
|
||||
|
||||
const canConsumeForm = this.canConsumeForm(consumes);
|
||||
|
||||
let formParams: { append(param: string, value: any): void; };
|
||||
let useForm = false;
|
||||
let convertFormParamsToString = false;
|
||||
// use FormData to transmit files using content-type "multipart/form-data"
|
||||
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
|
||||
useForm = canConsumeForm;
|
||||
if (useForm) {
|
||||
formParams = new FormData();
|
||||
} else {
|
||||
formParams = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
||||
}
|
||||
|
||||
if (file !== undefined) {
|
||||
formParams = formParams.append('file', <any>file) as any || formParams;
|
||||
}
|
||||
|
||||
return this.httpClient.request<string>('post',`${this.basePath}/redaction-gateway-v1/upload/${encodeURIComponent(String(projectId))}`,
|
||||
{
|
||||
body: convertFormParamsToString ? formParams.toString() : formParams,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
127
libs/red-ui-http/src/lib/api/licenseReportController.service.ts
Normal file
127
libs/red-ui-http/src/lib/api/licenseReportController.service.ts
Normal file
@ -0,0 +1,127 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*//* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams,
|
||||
HttpResponse, HttpEvent } from '@angular/common/http';
|
||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { LicenseReport } from '../model/licenseReport';
|
||||
import { LicenseReportRequest } from '../model/licenseReportRequest';
|
||||
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class LicenseReportControllerService {
|
||||
|
||||
protected basePath = '';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
|
||||
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param consumes string[] mime-types
|
||||
* @return true: consumes contains 'multipart/form-data', false: otherwise
|
||||
*/
|
||||
private canConsumeForm(consumes: string[]): boolean {
|
||||
const form = 'multipart/form-data';
|
||||
for (const consume of consumes) {
|
||||
if (form === consume) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates and serves license report.
|
||||
* None
|
||||
* @param body reportRequest
|
||||
* @param offset offset
|
||||
* @param limit limit
|
||||
* @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 licenseReport(body: LicenseReportRequest, offset?: number, limit?: number, observe?: 'body', reportProgress?: boolean): Observable<LicenseReport>;
|
||||
public licenseReport(body: LicenseReportRequest, offset?: number, limit?: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<LicenseReport>>;
|
||||
public licenseReport(body: LicenseReportRequest, offset?: number, limit?: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<LicenseReport>>;
|
||||
public licenseReport(body: LicenseReportRequest, offset?: number, limit?: number, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling licenseReport.');
|
||||
}
|
||||
|
||||
|
||||
|
||||
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
||||
if (offset !== undefined && offset !== null) {
|
||||
queryParameters = queryParameters.set('offset', <any>offset);
|
||||
}
|
||||
if (limit !== undefined && limit !== null) {
|
||||
queryParameters = queryParameters.set('limit', <any>limit);
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.httpClient.request<LicenseReport>('post',`${this.basePath}/redaction-gateway-v1/report/license`,
|
||||
{
|
||||
body: body,
|
||||
params: queryParameters,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,176 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*//* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams,
|
||||
HttpResponse, HttpEvent } from '@angular/common/http';
|
||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { ManualRedactions } from '../model/manualRedactions';
|
||||
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class ManualRedactionControllerService {
|
||||
|
||||
protected basePath = '';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
|
||||
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param consumes string[] mime-types
|
||||
* @return true: consumes contains 'multipart/form-data', false: otherwise
|
||||
*/
|
||||
private canConsumeForm(consumes: string[]): boolean {
|
||||
const form = 'multipart/form-data';
|
||||
for (const consume of consumes) {
|
||||
if (form === consume) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the manual redactions
|
||||
* None
|
||||
* @param projectId projectId
|
||||
* @param fileId fileId
|
||||
* @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 getManualRedaction(projectId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable<ManualRedactions>;
|
||||
public getManualRedaction(projectId: string, fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<ManualRedactions>>;
|
||||
public getManualRedaction(projectId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<ManualRedactions>>;
|
||||
public getManualRedaction(projectId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error('Required parameter projectId was null or undefined when calling getManualRedaction.');
|
||||
}
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error('Required parameter fileId was null or undefined when calling getManualRedaction.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
|
||||
return this.httpClient.request<ManualRedactions>('get',`${this.basePath}/redaction-gateway-v1/manualRedaction/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the manual redactions
|
||||
* None
|
||||
* @param body manualRedactions
|
||||
* @param projectId projectId
|
||||
* @param fileId fileId
|
||||
* @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 updateManualRedaction(body: ManualRedactions, projectId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public updateManualRedaction(body: ManualRedactions, projectId: string, fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public updateManualRedaction(body: ManualRedactions, projectId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public updateManualRedaction(body: ManualRedactions, projectId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling updateManualRedaction.');
|
||||
}
|
||||
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error('Required parameter projectId was null or undefined when calling updateManualRedaction.');
|
||||
}
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error('Required parameter fileId was null or undefined when calling updateManualRedaction.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.httpClient.request<any>('post',`${this.basePath}/redaction-gateway-v1/manualRedaction/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
|
||||
{
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,156 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*//* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams,
|
||||
HttpResponse, HttpEvent } from '@angular/common/http';
|
||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { PdfMetaData } from '../model/pdfMetaData';
|
||||
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class PdfMetaDataConfigurationControllerService {
|
||||
|
||||
protected basePath = '';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
|
||||
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param consumes string[] mime-types
|
||||
* @return true: consumes contains 'multipart/form-data', false: otherwise
|
||||
*/
|
||||
private canConsumeForm(consumes: string[]): boolean {
|
||||
const form = 'multipart/form-data';
|
||||
for (const consume of consumes) {
|
||||
if (form === consume) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the currently configured meta data that will be included in the redacted pdf.
|
||||
* None
|
||||
* @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 getPdfMetaData(observe?: 'body', reportProgress?: boolean): Observable<PdfMetaData>;
|
||||
public getPdfMetaData(observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<PdfMetaData>>;
|
||||
public getPdfMetaData(observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<PdfMetaData>>;
|
||||
public getPdfMetaData(observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
|
||||
return this.httpClient.request<PdfMetaData>('get',`${this.basePath}/redaction-gateway-v1/metaData`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Configured which meta data will be included in the redacted pdf.
|
||||
* None
|
||||
* @param body pdfMetaData
|
||||
* @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 setPdfMetaData(body: PdfMetaData, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public setPdfMetaData(body: PdfMetaData, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public setPdfMetaData(body: PdfMetaData, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public setPdfMetaData(body: PdfMetaData, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling setPdfMetaData.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.httpClient.request<any>('post',`${this.basePath}/redaction-gateway-v1/metaData`,
|
||||
{
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
315
libs/red-ui-http/src/lib/api/projectController.service.ts
Normal file
315
libs/red-ui-http/src/lib/api/projectController.service.ts
Normal file
@ -0,0 +1,315 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*//* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams,
|
||||
HttpResponse, HttpEvent } from '@angular/common/http';
|
||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { Project } from '../model/project';
|
||||
import { ProjectRequest } from '../model/projectRequest';
|
||||
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class ProjectControllerService {
|
||||
|
||||
protected basePath = '';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
|
||||
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param consumes string[] mime-types
|
||||
* @return true: consumes contains 'multipart/form-data', false: otherwise
|
||||
*/
|
||||
private canConsumeForm(consumes: string[]): boolean {
|
||||
const form = 'multipart/form-data';
|
||||
for (const consume of consumes) {
|
||||
if (form === consume) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new project.
|
||||
* None
|
||||
* @param body projectRequest
|
||||
* @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 createProject(body: ProjectRequest, observe?: 'body', reportProgress?: boolean): Observable<Project>;
|
||||
public createProject(body: ProjectRequest, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Project>>;
|
||||
public createProject(body: ProjectRequest, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Project>>;
|
||||
public createProject(body: ProjectRequest, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling createProject.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.httpClient.request<Project>('post',`${this.basePath}/redaction-gateway-v1/project`,
|
||||
{
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an existing project.
|
||||
* None
|
||||
* @param projectId projectId
|
||||
* @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 deleteProject(projectId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public deleteProject(projectId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public deleteProject(projectId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public deleteProject(projectId: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error('Required parameter projectId was null or undefined when calling deleteProject.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
|
||||
return this.httpClient.request<any>('delete',`${this.basePath}/redaction-gateway-v1/project/${encodeURIComponent(String(projectId))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an existing project.
|
||||
* None
|
||||
* @param projectId projectId
|
||||
* @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 getProject(projectId: string, observe?: 'body', reportProgress?: boolean): Observable<Project>;
|
||||
public getProject(projectId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Project>>;
|
||||
public getProject(projectId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Project>>;
|
||||
public getProject(projectId: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error('Required parameter projectId was null or undefined when calling getProject.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
|
||||
return this.httpClient.request<Project>('get',`${this.basePath}/redaction-gateway-v1/project/${encodeURIComponent(String(projectId))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all existing projects.
|
||||
* None
|
||||
* @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 getProjects(observe?: 'body', reportProgress?: boolean): Observable<Array<Project>>;
|
||||
public getProjects(observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<Project>>>;
|
||||
public getProjects(observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<Project>>>;
|
||||
public getProjects(observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
|
||||
return this.httpClient.request<Array<Project>>('get',`${this.basePath}/redaction-gateway-v1/project`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates an existing project.
|
||||
* None
|
||||
* @param body projectRequest
|
||||
* @param projectId projectId
|
||||
* @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 updateProject(body: ProjectRequest, projectId: string, observe?: 'body', reportProgress?: boolean): Observable<Project>;
|
||||
public updateProject(body: ProjectRequest, projectId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Project>>;
|
||||
public updateProject(body: ProjectRequest, projectId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Project>>;
|
||||
public updateProject(body: ProjectRequest, projectId: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling updateProject.');
|
||||
}
|
||||
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error('Required parameter projectId was null or undefined when calling updateProject.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.httpClient.request<Project>('post',`${this.basePath}/redaction-gateway-v1/project/${encodeURIComponent(String(projectId))}`,
|
||||
{
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
158
libs/red-ui-http/src/lib/api/reanalysisController.service.ts
Normal file
158
libs/red-ui-http/src/lib/api/reanalysisController.service.ts
Normal file
@ -0,0 +1,158 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*//* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams,
|
||||
HttpResponse, HttpEvent } from '@angular/common/http';
|
||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class ReanalysisControllerService {
|
||||
|
||||
protected basePath = '';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
|
||||
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param consumes string[] mime-types
|
||||
* @return true: consumes contains 'multipart/form-data', false: otherwise
|
||||
*/
|
||||
private canConsumeForm(consumes: string[]): boolean {
|
||||
const form = 'multipart/form-data';
|
||||
for (const consume of consumes) {
|
||||
if (form === consume) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reanalyse a file
|
||||
* None
|
||||
* @param projectId projectId
|
||||
* @param fileId fileId
|
||||
* @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 reanalyseFile(projectId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public reanalyseFile(projectId: string, fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public reanalyseFile(projectId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public reanalyseFile(projectId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error('Required parameter projectId was null or undefined when calling reanalyseFile.');
|
||||
}
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error('Required parameter fileId was null or undefined when calling reanalyseFile.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
|
||||
return this.httpClient.request<any>('post',`${this.basePath}/redaction-gateway-v1/reanalyse/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reanalyse all files of the project.
|
||||
* None
|
||||
* @param projectId projectId
|
||||
* @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 reanalyseProject(projectId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public reanalyseProject(projectId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public reanalyseProject(projectId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public reanalyseProject(projectId: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error('Required parameter projectId was null or undefined when calling reanalyseProject.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
|
||||
return this.httpClient.request<any>('post',`${this.basePath}/redaction-gateway-v1/reanalyse/${encodeURIComponent(String(projectId))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
107
libs/red-ui-http/src/lib/api/redactionLogController.service.ts
Normal file
107
libs/red-ui-http/src/lib/api/redactionLogController.service.ts
Normal file
@ -0,0 +1,107 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*//* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams,
|
||||
HttpResponse, HttpEvent } from '@angular/common/http';
|
||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { RedactionLog } from '../model/redactionLog';
|
||||
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class RedactionLogControllerService {
|
||||
|
||||
protected basePath = '';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
|
||||
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param consumes string[] mime-types
|
||||
* @return true: consumes contains 'multipart/form-data', false: otherwise
|
||||
*/
|
||||
private canConsumeForm(consumes: string[]): boolean {
|
||||
const form = 'multipart/form-data';
|
||||
for (const consume of consumes) {
|
||||
if (form === consume) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the redaction log for a fileId
|
||||
* None
|
||||
* @param fileId fileId
|
||||
* @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 getRedactionLog(fileId: string, observe?: 'body', reportProgress?: boolean): Observable<RedactionLog>;
|
||||
public getRedactionLog(fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<RedactionLog>>;
|
||||
public getRedactionLog(fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<RedactionLog>>;
|
||||
public getRedactionLog(fileId: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error('Required parameter fileId was null or undefined when calling getRedactionLog.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
|
||||
return this.httpClient.request<RedactionLog>('get',`${this.basePath}/redaction-gateway-v1/redactionLog/${encodeURIComponent(String(fileId))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
268
libs/red-ui-http/src/lib/api/rulesController.service.ts
Normal file
268
libs/red-ui-http/src/lib/api/rulesController.service.ts
Normal file
@ -0,0 +1,268 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*//* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams,
|
||||
HttpResponse, HttpEvent } from '@angular/common/http';
|
||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { Rules } from '../model/rules';
|
||||
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class RulesControllerService {
|
||||
|
||||
protected basePath = '';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
|
||||
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param consumes string[] mime-types
|
||||
* @return true: consumes contains 'multipart/form-data', false: otherwise
|
||||
*/
|
||||
private canConsumeForm(consumes: string[]): boolean {
|
||||
const form = 'multipart/form-data';
|
||||
for (const consume of consumes) {
|
||||
if (form === consume) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns object containing the currently used Drools rules.
|
||||
*
|
||||
* @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 downloadRules(observe?: 'body', reportProgress?: boolean): Observable<Rules>;
|
||||
public downloadRules(observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Rules>>;
|
||||
public downloadRules(observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Rules>>;
|
||||
public downloadRules(observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
|
||||
return this.httpClient.request<Rules>('get',`${this.basePath}/redaction-gateway-v1/rules`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns file containing the currently used Drools rules.
|
||||
*
|
||||
* @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 downloadRulesFile(observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public downloadRulesFile(observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public downloadRulesFile(observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public downloadRulesFile(observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
'application/octet-stream'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
|
||||
return this.httpClient.request<any>('get',`${this.basePath}/redaction-gateway-v1/rules/download`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Takes object containing string or rules as argument, which will be used by the redaction service.
|
||||
*
|
||||
* @param body rules
|
||||
* @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 uploadRules(body: Rules, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public uploadRules(body: Rules, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public uploadRules(body: Rules, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public uploadRules(body: Rules, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling uploadRules.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.httpClient.request<any>('post',`${this.basePath}/redaction-gateway-v1/rules`,
|
||||
{
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Takes object containing string or rules as argument, which will be used by the redaction service.
|
||||
*
|
||||
* @param file
|
||||
* @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 uploadRulesFileForm(file: Blob, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public uploadRulesFileForm(file: Blob, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public uploadRulesFileForm(file: Blob, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public uploadRulesFileForm(file: Blob, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (file === null || file === undefined) {
|
||||
throw new Error('Required parameter file was null or undefined when calling uploadRulesFile.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
'multipart/form-data'
|
||||
];
|
||||
|
||||
const canConsumeForm = this.canConsumeForm(consumes);
|
||||
|
||||
let formParams: { append(param: string, value: any): void; };
|
||||
let useForm = false;
|
||||
let convertFormParamsToString = false;
|
||||
// use FormData to transmit files using content-type "multipart/form-data"
|
||||
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
|
||||
useForm = canConsumeForm;
|
||||
if (useForm) {
|
||||
formParams = new FormData();
|
||||
} else {
|
||||
formParams = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
||||
}
|
||||
|
||||
if (file !== undefined) {
|
||||
formParams = formParams.append('file', <any>file) as any || formParams;
|
||||
}
|
||||
|
||||
return this.httpClient.request<any>('post',`${this.basePath}/redaction-gateway-v1/rules/upload`,
|
||||
{
|
||||
body: convertFormParamsToString ? formParams.toString() : formParams,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
107
libs/red-ui-http/src/lib/api/statusController.service.ts
Normal file
107
libs/red-ui-http/src/lib/api/statusController.service.ts
Normal file
@ -0,0 +1,107 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*//* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams,
|
||||
HttpResponse, HttpEvent } from '@angular/common/http';
|
||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { FileStatus } from '../model/fileStatus';
|
||||
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class StatusControllerService {
|
||||
|
||||
protected basePath = '';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
|
||||
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param consumes string[] mime-types
|
||||
* @return true: consumes contains 'multipart/form-data', false: otherwise
|
||||
*/
|
||||
private canConsumeForm(consumes: string[]): boolean {
|
||||
const form = 'multipart/form-data';
|
||||
for (const consume of consumes) {
|
||||
if (form === consume) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the status for all files in a project.
|
||||
* None
|
||||
* @param projectId The id of the project you want the status for.
|
||||
* @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 getProjectStatus(projectId: string, observe?: 'body', reportProgress?: boolean): Observable<Array<FileStatus>>;
|
||||
public getProjectStatus(projectId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<FileStatus>>>;
|
||||
public getProjectStatus(projectId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<FileStatus>>>;
|
||||
public getProjectStatus(projectId: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error('Required parameter projectId was null or undefined when calling getProjectStatus.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (GIN-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
let httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
|
||||
return this.httpClient.request<Array<FileStatus>>('get',`${this.basePath}/redaction-gateway-v1/status/${encodeURIComponent(String(projectId))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
79
libs/red-ui-http/src/lib/configuration.ts
Normal file
79
libs/red-ui-http/src/lib/configuration.ts
Normal file
@ -0,0 +1,79 @@
|
||||
export interface ConfigurationParameters {
|
||||
apiKeys?: {[ key: string ]: string};
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string | (() => string);
|
||||
basePath?: string;
|
||||
withCredentials?: boolean;
|
||||
}
|
||||
|
||||
export class Configuration {
|
||||
apiKeys?: {[ key: string ]: string};
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string | (() => string);
|
||||
basePath?: string;
|
||||
withCredentials?: boolean;
|
||||
|
||||
constructor(configurationParameters: ConfigurationParameters = {}) {
|
||||
this.apiKeys = configurationParameters.apiKeys;
|
||||
this.username = configurationParameters.username;
|
||||
this.password = configurationParameters.password;
|
||||
this.accessToken = configurationParameters.accessToken;
|
||||
this.basePath = configurationParameters.basePath;
|
||||
this.withCredentials = configurationParameters.withCredentials;
|
||||
}
|
||||
|
||||
/**
|
||||
* Select the correct content-type to use for a request.
|
||||
* Uses {@link Configuration#isJsonMime} to determine the correct content-type.
|
||||
* If no content type is found return the first found type if the contentTypes is not empty
|
||||
* @param contentTypes - the array of content types that are available for selection
|
||||
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
||||
*/
|
||||
public selectHeaderContentType (contentTypes: string[]): string | undefined {
|
||||
if (contentTypes.length == 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
let type = contentTypes.find(x => this.isJsonMime(x));
|
||||
if (type === undefined) {
|
||||
return contentTypes[0];
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Select the correct accept content-type to use for a request.
|
||||
* Uses {@link Configuration#isJsonMime} to determine the correct accept content-type.
|
||||
* If no content type is found return the first found type if the contentTypes is not empty
|
||||
* @param accepts - the array of content types that are available for selection.
|
||||
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
||||
*/
|
||||
public selectHeaderAccept(accepts: string[]): string | undefined {
|
||||
if (accepts.length == 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
let type = accepts.find(x => this.isJsonMime(x));
|
||||
if (type === undefined) {
|
||||
return accepts[0];
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the given MIME is a JSON MIME.
|
||||
* JSON MIME examples:
|
||||
* application/json
|
||||
* application/json; charset=UTF8
|
||||
* APPLICATION/JSON
|
||||
* application/vnd.company+json
|
||||
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
||||
* @return True if the given MIME is JSON, false otherwise.
|
||||
*/
|
||||
public isJsonMime(mime: string): boolean {
|
||||
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
||||
return mime != null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
||||
}
|
||||
}
|
||||
18
libs/red-ui-http/src/lib/encoder.ts
Normal file
18
libs/red-ui-http/src/lib/encoder.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { HttpUrlEncodingCodec } from '@angular/common/http';
|
||||
|
||||
/**
|
||||
* CustomHttpUrlEncodingCodec
|
||||
* Fix plus sign (+) not encoding, so sent as blank space
|
||||
* See: https://github.com/angular/angular/issues/11058#issuecomment-247367318
|
||||
*/
|
||||
export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec {
|
||||
encodeKey(k: string): string {
|
||||
k = super.encodeKey(k);
|
||||
return k.replace(/\+/gi, '%2B');
|
||||
}
|
||||
encodeValue(v: string): string {
|
||||
v = super.encodeValue(v);
|
||||
return v.replace(/\+/gi, '%2B');
|
||||
}
|
||||
}
|
||||
|
||||
5
libs/red-ui-http/src/lib/index.ts
Normal file
5
libs/red-ui-http/src/lib/index.ts
Normal file
@ -0,0 +1,5 @@
|
||||
export * from './api/api';
|
||||
export * from './model/models';
|
||||
export * from './variables';
|
||||
export * from './configuration';
|
||||
export * from './api.module';
|
||||
18
libs/red-ui-http/src/lib/model/body.ts
Normal file
18
libs/red-ui-http/src/lib/model/body.ts
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface Body {
|
||||
/**
|
||||
* file
|
||||
*/
|
||||
file: Blob;
|
||||
}
|
||||
18
libs/red-ui-http/src/lib/model/body1.ts
Normal file
18
libs/red-ui-http/src/lib/model/body1.ts
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface Body1 {
|
||||
/**
|
||||
* file
|
||||
*/
|
||||
file: Blob;
|
||||
}
|
||||
18
libs/red-ui-http/src/lib/model/body2.ts
Normal file
18
libs/red-ui-http/src/lib/model/body2.ts
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface Body2 {
|
||||
/**
|
||||
* file
|
||||
*/
|
||||
file: Blob;
|
||||
}
|
||||
18
libs/red-ui-http/src/lib/model/body3.ts
Normal file
18
libs/red-ui-http/src/lib/model/body3.ts
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface Body3 {
|
||||
/**
|
||||
* file
|
||||
*/
|
||||
file: Blob;
|
||||
}
|
||||
18
libs/red-ui-http/src/lib/model/body4.ts
Normal file
18
libs/red-ui-http/src/lib/model/body4.ts
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface Body4 {
|
||||
/**
|
||||
* file
|
||||
*/
|
||||
file: Blob;
|
||||
}
|
||||
18
libs/red-ui-http/src/lib/model/body5.ts
Normal file
18
libs/red-ui-http/src/lib/model/body5.ts
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface Body5 {
|
||||
/**
|
||||
* file
|
||||
*/
|
||||
file: Blob;
|
||||
}
|
||||
18
libs/red-ui-http/src/lib/model/body6.ts
Normal file
18
libs/red-ui-http/src/lib/model/body6.ts
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface Body6 {
|
||||
/**
|
||||
* file
|
||||
*/
|
||||
file: Blob;
|
||||
}
|
||||
15
libs/red-ui-http/src/lib/model/defaultColor.ts
Normal file
15
libs/red-ui-http/src/lib/model/defaultColor.ts
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface DefaultColor {
|
||||
color?: Array<number>;
|
||||
}
|
||||
33
libs/red-ui-http/src/lib/model/dictionary.ts
Normal file
33
libs/red-ui-http/src/lib/model/dictionary.ts
Normal file
@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Object containing a list of dictionary entries and colors of an entry type.
|
||||
*/
|
||||
export interface Dictionary {
|
||||
/**
|
||||
* True if the entries in this type should be matched case insensitively, default is false.
|
||||
*/
|
||||
caseInsensitive?: boolean;
|
||||
/**
|
||||
* The value of color should be in range of [0, 1].
|
||||
*/
|
||||
color?: Array<number>;
|
||||
/**
|
||||
* The list of dictionary entries of an entry type.
|
||||
*/
|
||||
entries?: Array<string>;
|
||||
/**
|
||||
* True if the type just for hint, not for redaction, default is false.
|
||||
*/
|
||||
hint?: boolean;
|
||||
}
|
||||
15
libs/red-ui-http/src/lib/model/fileIds.ts
Normal file
15
libs/red-ui-http/src/lib/model/fileIds.ts
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface FileIds {
|
||||
fileIds?: Array<string>;
|
||||
}
|
||||
35
libs/red-ui-http/src/lib/model/fileStatus.ts
Normal file
35
libs/red-ui-http/src/lib/model/fileStatus.ts
Normal file
@ -0,0 +1,35 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface FileStatus {
|
||||
added?: string;
|
||||
deleted?: string;
|
||||
fileId?: string;
|
||||
filename?: string;
|
||||
lastUpdated?: string;
|
||||
numberOfAnalyses?: number;
|
||||
numberOfPages?: number;
|
||||
projectId?: string;
|
||||
status?: FileStatus.StatusEnum;
|
||||
}
|
||||
export namespace FileStatus {
|
||||
export type StatusEnum = 'PROCESSING' | 'PROCESSED' | 'ERROR' | 'UNPROCESSED' | 'REPROCESS' | 'REVIEWED' | 'DELETED';
|
||||
export const StatusEnum = {
|
||||
PROCESSING: 'PROCESSING' as StatusEnum,
|
||||
PROCESSED: 'PROCESSED' as StatusEnum,
|
||||
ERROR: 'ERROR' as StatusEnum,
|
||||
UNPROCESSED: 'UNPROCESSED' as StatusEnum,
|
||||
REPROCESS: 'REPROCESS' as StatusEnum,
|
||||
REVIEWED: 'REVIEWED' as StatusEnum,
|
||||
DELETED: 'DELETED' as StatusEnum
|
||||
};
|
||||
}
|
||||
14
libs/red-ui-http/src/lib/model/inputStream.ts
Normal file
14
libs/red-ui-http/src/lib/model/inputStream.ts
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface InputStream {
|
||||
}
|
||||
25
libs/red-ui-http/src/lib/model/licenseReport.ts
Normal file
25
libs/red-ui-http/src/lib/model/licenseReport.ts
Normal file
@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { ReportData } from './reportData';
|
||||
|
||||
export interface LicenseReport {
|
||||
data?: Array<ReportData>;
|
||||
endDate?: Date;
|
||||
limit?: number;
|
||||
numberOfAnalyses?: number;
|
||||
numberOfAnalyzedFiles?: number;
|
||||
numberOfAnalyzedPages?: number;
|
||||
numberOfProjects?: number;
|
||||
offset?: number;
|
||||
requestId?: string;
|
||||
startDate?: Date;
|
||||
}
|
||||
18
libs/red-ui-http/src/lib/model/licenseReportRequest.ts
Normal file
18
libs/red-ui-http/src/lib/model/licenseReportRequest.ts
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface LicenseReportRequest {
|
||||
endDate?: Date;
|
||||
projectIds?: Array<string>;
|
||||
requestId?: string;
|
||||
startDate?: Date;
|
||||
}
|
||||
19
libs/red-ui-http/src/lib/model/manualRedactionEntry.ts
Normal file
19
libs/red-ui-http/src/lib/model/manualRedactionEntry.ts
Normal file
@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { Rectangle } from './rectangle';
|
||||
|
||||
export interface ManualRedactionEntry {
|
||||
positions?: Array<Rectangle>;
|
||||
reason?: string;
|
||||
type?: string;
|
||||
value?: string;
|
||||
}
|
||||
17
libs/red-ui-http/src/lib/model/manualRedactions.ts
Normal file
17
libs/red-ui-http/src/lib/model/manualRedactions.ts
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { ManualRedactionEntry } from './manualRedactionEntry';
|
||||
|
||||
export interface ManualRedactions {
|
||||
entriesToAdd?: Array<ManualRedactionEntry>;
|
||||
idsToRemove?: Array<string>;
|
||||
}
|
||||
33
libs/red-ui-http/src/lib/model/modelFile.ts
Normal file
33
libs/red-ui-http/src/lib/model/modelFile.ts
Normal file
@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface ModelFile {
|
||||
absolute?: boolean;
|
||||
absoluteFile?: any;
|
||||
absolutePath?: string;
|
||||
canonicalFile?: any;
|
||||
canonicalPath?: string;
|
||||
directory?: boolean;
|
||||
executable?: boolean;
|
||||
file?: boolean;
|
||||
freeSpace?: number;
|
||||
hidden?: boolean;
|
||||
lastModified?: number;
|
||||
name?: string;
|
||||
parent?: string;
|
||||
parentFile?: any;
|
||||
path?: string;
|
||||
readable?: boolean;
|
||||
totalSpace?: number;
|
||||
usableSpace?: number;
|
||||
writable?: boolean;
|
||||
}
|
||||
32
libs/red-ui-http/src/lib/model/models.ts
Normal file
32
libs/red-ui-http/src/lib/model/models.ts
Normal file
@ -0,0 +1,32 @@
|
||||
export * from './body';
|
||||
export * from './body1';
|
||||
export * from './body2';
|
||||
export * from './body3';
|
||||
export * from './body4';
|
||||
export * from './body5';
|
||||
export * from './body6';
|
||||
export * from './defaultColor';
|
||||
export * from './dictionary';
|
||||
export * from './fileIds';
|
||||
export * from './fileStatus';
|
||||
export * from './inputStream';
|
||||
export * from './licenseReport';
|
||||
export * from './licenseReportRequest';
|
||||
export * from './manualRedactionEntry';
|
||||
export * from './manualRedactions';
|
||||
export * from './modelFile';
|
||||
export * from './pdfMetaData';
|
||||
export * from './point';
|
||||
export * from './project';
|
||||
export * from './projectRequest';
|
||||
export * from './rectangle';
|
||||
export * from './redactionLog';
|
||||
export * from './redactionLogEntry';
|
||||
export * from './reportData';
|
||||
export * from './resource';
|
||||
export * from './rules';
|
||||
export * from './typeResponse';
|
||||
export * from './typeValue';
|
||||
export * from './uRI';
|
||||
export * from './uRL';
|
||||
export * from './uRLStreamHandler';
|
||||
22
libs/red-ui-http/src/lib/model/pdfMetaData.ts
Normal file
22
libs/red-ui-http/src/lib/model/pdfMetaData.ts
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface PdfMetaData {
|
||||
author?: boolean;
|
||||
creationDate?: boolean;
|
||||
creator?: boolean;
|
||||
keywords?: boolean;
|
||||
modDate?: boolean;
|
||||
producer?: boolean;
|
||||
subject?: boolean;
|
||||
title?: boolean;
|
||||
}
|
||||
16
libs/red-ui-http/src/lib/model/point.ts
Normal file
16
libs/red-ui-http/src/lib/model/point.ts
Normal file
@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface Point {
|
||||
x?: number;
|
||||
y?: number;
|
||||
}
|
||||
26
libs/red-ui-http/src/lib/model/project.ts
Normal file
26
libs/red-ui-http/src/lib/model/project.ts
Normal file
@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface Project {
|
||||
date?: string;
|
||||
description?: string;
|
||||
projectId?: string;
|
||||
projectName?: string;
|
||||
status?: Project.StatusEnum;
|
||||
}
|
||||
export namespace Project {
|
||||
export type StatusEnum = 'ACTIVE' | 'DELETED';
|
||||
export const StatusEnum = {
|
||||
ACTIVE: 'ACTIVE' as StatusEnum,
|
||||
DELETED: 'DELETED' as StatusEnum
|
||||
};
|
||||
}
|
||||
16
libs/red-ui-http/src/lib/model/projectRequest.ts
Normal file
16
libs/red-ui-http/src/lib/model/projectRequest.ts
Normal file
@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface ProjectRequest {
|
||||
description?: string;
|
||||
projectName?: string;
|
||||
}
|
||||
19
libs/red-ui-http/src/lib/model/rectangle.ts
Normal file
19
libs/red-ui-http/src/lib/model/rectangle.ts
Normal file
@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { Point } from './point';
|
||||
|
||||
export interface Rectangle {
|
||||
height?: number;
|
||||
page?: number;
|
||||
topLeft?: Point;
|
||||
width?: number;
|
||||
}
|
||||
19
libs/red-ui-http/src/lib/model/redactionLog.ts
Normal file
19
libs/red-ui-http/src/lib/model/redactionLog.ts
Normal file
@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { RedactionLogEntry } from './redactionLogEntry';
|
||||
|
||||
export interface RedactionLog {
|
||||
dictionaryVersion?: number;
|
||||
filename?: string;
|
||||
redactionLogEntry?: Array<RedactionLogEntry>;
|
||||
rulesVersion?: number;
|
||||
}
|
||||
26
libs/red-ui-http/src/lib/model/redactionLogEntry.ts
Normal file
26
libs/red-ui-http/src/lib/model/redactionLogEntry.ts
Normal file
@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { Rectangle } from './rectangle';
|
||||
|
||||
export interface RedactionLogEntry {
|
||||
color?: Array<number>;
|
||||
hint?: boolean;
|
||||
id?: string;
|
||||
manual?: boolean;
|
||||
positions?: Array<Rectangle>;
|
||||
reason?: string;
|
||||
redacted?: boolean;
|
||||
section?: string;
|
||||
sectionNumber?: number;
|
||||
type?: string;
|
||||
value?: string;
|
||||
}
|
||||
34
libs/red-ui-http/src/lib/model/reportData.ts
Normal file
34
libs/red-ui-http/src/lib/model/reportData.ts
Normal file
@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface ReportData {
|
||||
addedDate?: Date;
|
||||
analysisCount?: number;
|
||||
deletedDate?: Date;
|
||||
fileName?: string;
|
||||
lastUpdatedDate?: Date;
|
||||
numberOfAnalyzedPages?: number;
|
||||
project?: string;
|
||||
status?: ReportData.StatusEnum;
|
||||
}
|
||||
export namespace ReportData {
|
||||
export type StatusEnum = 'PROCESSING' | 'PROCESSED' | 'ERROR' | 'UNPROCESSED' | 'REPROCESS' | 'REVIEWED' | 'DELETED';
|
||||
export const StatusEnum = {
|
||||
PROCESSING: 'PROCESSING' as StatusEnum,
|
||||
PROCESSED: 'PROCESSED' as StatusEnum,
|
||||
ERROR: 'ERROR' as StatusEnum,
|
||||
UNPROCESSED: 'UNPROCESSED' as StatusEnum,
|
||||
REPROCESS: 'REPROCESS' as StatusEnum,
|
||||
REVIEWED: 'REVIEWED' as StatusEnum,
|
||||
DELETED: 'DELETED' as StatusEnum
|
||||
};
|
||||
}
|
||||
25
libs/red-ui-http/src/lib/model/resource.ts
Normal file
25
libs/red-ui-http/src/lib/model/resource.ts
Normal file
@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { InputStream } from './inputStream';
|
||||
import { URI } from './uRI';
|
||||
import { URL } from './uRL';
|
||||
|
||||
export interface Resource {
|
||||
description?: string;
|
||||
file?: any;
|
||||
filename?: string;
|
||||
inputStream?: InputStream;
|
||||
open?: boolean;
|
||||
readable?: boolean;
|
||||
uri?: URI;
|
||||
url?: URL;
|
||||
}
|
||||
21
libs/red-ui-http/src/lib/model/rules.ts
Normal file
21
libs/red-ui-http/src/lib/model/rules.ts
Normal file
@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Object containing a string of Drools rules.
|
||||
*/
|
||||
export interface Rules {
|
||||
/**
|
||||
* The actual string of rules.
|
||||
*/
|
||||
rules?: string;
|
||||
}
|
||||
22
libs/red-ui-http/src/lib/model/typeResponse.ts
Normal file
22
libs/red-ui-http/src/lib/model/typeResponse.ts
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { TypeValue } from './typeValue';
|
||||
|
||||
/**
|
||||
* Object containing a list of values of an entry type.
|
||||
*/
|
||||
export interface TypeResponse {
|
||||
/**
|
||||
* The list of values of an entry type, which include colors, hint and caseInsensitive.
|
||||
*/
|
||||
types?: Array<TypeValue>;
|
||||
}
|
||||
33
libs/red-ui-http/src/lib/model/typeValue.ts
Normal file
33
libs/red-ui-http/src/lib/model/typeValue.ts
Normal file
@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Object containing entry type with an array of r-g-b colors.
|
||||
*/
|
||||
export interface TypeValue {
|
||||
/**
|
||||
* True if the entries in this type should be matched case insensitively, default is false.
|
||||
*/
|
||||
caseInsensitive?: boolean;
|
||||
/**
|
||||
* The value of color should be in range of [0, 1].
|
||||
*/
|
||||
color?: Array<number>;
|
||||
/**
|
||||
* True if the type just for hint, not for redaction, default is false.
|
||||
*/
|
||||
hint?: boolean;
|
||||
/**
|
||||
* The nonnull entry type.
|
||||
*/
|
||||
type?: string;
|
||||
}
|
||||
31
libs/red-ui-http/src/lib/model/uRI.ts
Normal file
31
libs/red-ui-http/src/lib/model/uRI.ts
Normal file
@ -0,0 +1,31 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface URI {
|
||||
absolute?: boolean;
|
||||
authority?: string;
|
||||
fragment?: string;
|
||||
host?: string;
|
||||
opaque?: boolean;
|
||||
path?: string;
|
||||
port?: number;
|
||||
query?: string;
|
||||
rawAuthority?: string;
|
||||
rawFragment?: string;
|
||||
rawPath?: string;
|
||||
rawQuery?: string;
|
||||
rawSchemeSpecificPart?: string;
|
||||
rawUserInfo?: string;
|
||||
scheme?: string;
|
||||
schemeSpecificPart?: string;
|
||||
userInfo?: string;
|
||||
}
|
||||
28
libs/red-ui-http/src/lib/model/uRL.ts
Normal file
28
libs/red-ui-http/src/lib/model/uRL.ts
Normal file
@ -0,0 +1,28 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { URLStreamHandler } from './uRLStreamHandler';
|
||||
|
||||
export interface URL {
|
||||
authority?: string;
|
||||
content?: any;
|
||||
defaultPort?: number;
|
||||
deserializedFields?: URLStreamHandler;
|
||||
file?: string;
|
||||
host?: string;
|
||||
path?: string;
|
||||
port?: number;
|
||||
protocol?: string;
|
||||
query?: string;
|
||||
ref?: string;
|
||||
serializedHashCode?: number;
|
||||
userInfo?: string;
|
||||
}
|
||||
14
libs/red-ui-http/src/lib/model/uRLStreamHandler.ts
Normal file
14
libs/red-ui-http/src/lib/model/uRLStreamHandler.ts
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Api Documentation
|
||||
* Api Documentation
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface URLStreamHandler {
|
||||
}
|
||||
9
libs/red-ui-http/src/lib/variables.ts
Normal file
9
libs/red-ui-http/src/lib/variables.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import { InjectionToken } from '@angular/core';
|
||||
|
||||
export const BASE_PATH = new InjectionToken<string>('basePath');
|
||||
export const COLLECTION_FORMATS = {
|
||||
'csv': ',',
|
||||
'tsv': ' ',
|
||||
'ssv': ' ',
|
||||
'pipes': '|'
|
||||
}
|
||||
13
libs/red-ui-http/tsconfig.json
Normal file
13
libs/red-ui-http/tsconfig.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.lib.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.spec.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
18
libs/red-ui-http/tsconfig.lib.json
Normal file
18
libs/red-ui-http/tsconfig.lib.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"target": "es2015",
|
||||
"declaration": true,
|
||||
"inlineSources": true,
|
||||
"types": [],
|
||||
"lib": ["dom", "es2018"]
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"skipTemplateCodegen": true,
|
||||
"strictMetadataEmit": true,
|
||||
"enableResourceInlining": true
|
||||
},
|
||||
"exclude": ["src/test-setup.ts", "**/*.spec.ts"],
|
||||
"include": ["**/*.ts"]
|
||||
}
|
||||
10
libs/red-ui-http/tslint.json
Normal file
10
libs/red-ui-http/tslint.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "../../tslint.json",
|
||||
"rules": {
|
||||
"directive-selector": [true, "attribute", "redaction", "camelCase"],
|
||||
"component-selector": [true, "element", "redaction", "kebab-case"]
|
||||
},
|
||||
"linterOptions": {
|
||||
"exclude": ["!**/*"]
|
||||
}
|
||||
}
|
||||
3
nx.json
3
nx.json
@ -24,6 +24,9 @@
|
||||
"projects": {
|
||||
"red-ui": {
|
||||
"tags": []
|
||||
},
|
||||
"red-ui-http": {
|
||||
"tags": []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
37
package.json
37
package.json
@ -28,37 +28,44 @@
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@nrwl/angular": "^10.2.0",
|
||||
"@angular/animations": "^10.0.0",
|
||||
"@angular/cdk": "^10.2.1",
|
||||
"@angular/common": "^10.0.0",
|
||||
"@angular/compiler": "^10.0.0",
|
||||
"@angular/core": "^10.0.0",
|
||||
"@angular/forms": "^10.0.0",
|
||||
"@angular/material": "^10.2.1",
|
||||
"@angular/platform-browser": "^10.0.0",
|
||||
"@angular/platform-browser-dynamic": "^10.0.0",
|
||||
"@angular/router": "^10.0.0",
|
||||
"@ngx-translate/core": "^13.0.0",
|
||||
"@ngx-translate/http-loader": "^6.0.0",
|
||||
"@nrwl/angular": "^10.2.0",
|
||||
"@pdftron/webviewer": "^7.0.1",
|
||||
"keycloak-angular": "^8.0.1",
|
||||
"keycloak-js": "10.0.2",
|
||||
"rxjs": "~6.5.5",
|
||||
"zone.js": "^0.10.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nrwl/workspace": "10.2.0",
|
||||
"@types/node": "~8.9.4",
|
||||
"dotenv": "6.2.0",
|
||||
"eslint": "6.8.0",
|
||||
"prettier": "2.0.4",
|
||||
"ts-node": "~7.0.0",
|
||||
"tslint": "~6.0.0",
|
||||
"typescript": "~3.9.3",
|
||||
"@angular-devkit/build-angular": "~0.1000.0",
|
||||
"@angular/compiler-cli": "^10.0.0",
|
||||
"@angular/language-service": "^10.0.0",
|
||||
"@angular-devkit/build-angular": "~0.1000.0",
|
||||
"codelyzer": "~5.0.1",
|
||||
"jest-preset-angular": "8.2.1",
|
||||
"@nrwl/cypress": "10.2.0",
|
||||
"@nrwl/jest": "10.2.0",
|
||||
"jest": "26.2.2",
|
||||
"@nrwl/workspace": "10.2.0",
|
||||
"@types/jest": "26.0.8",
|
||||
"ts-jest": "26.1.4",
|
||||
"@types/node": "~8.9.4",
|
||||
"codelyzer": "~5.0.1",
|
||||
"cypress": "^4.1.0",
|
||||
"@nrwl/cypress": "10.2.0"
|
||||
"dotenv": "6.2.0",
|
||||
"eslint": "6.8.0",
|
||||
"jest": "26.2.2",
|
||||
"jest-preset-angular": "8.2.1",
|
||||
"prettier": "2.0.4",
|
||||
"ts-jest": "26.1.4",
|
||||
"ts-node": "~7.0.0",
|
||||
"tslint": "~6.0.0",
|
||||
"typescript": "~3.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,7 +15,9 @@
|
||||
"skipLibCheck": true,
|
||||
"skipDefaultLibCheck": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {}
|
||||
"paths": {
|
||||
"@redaction/red-ui-http": ["libs/red-ui-http/src/index.ts"]
|
||||
}
|
||||
},
|
||||
"exclude": ["node_modules", "tmp"]
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user