Daniel hace 1 año
padre
commit
eb94e17c88
Se han modificado 100 ficheros con 6697 adiciones y 4348 borrados
  1. +1
    -1
      angular/openapi.json
  2. +1292
    -3599
      angular/openapi.yaml
  3. +17
    -17
      angular/src/app/_components/filter-bar/filter-bar.component.html
  4. +43
    -28
      angular/src/app/_components/filter-bar/filter-bar.component.ts
  5. +7
    -0
      angular/src/app/_components/layout/two-column/two-column.component.html
  6. +2
    -0
      angular/src/app/_components/list/list.component.html
  7. +7
    -1
      angular/src/app/_components/list/list.component.ts
  8. +4
    -1
      angular/src/app/_components/paging/paging.component.html
  9. +7
    -0
      angular/src/app/_components/paging/paging.component.ts
  10. +116
    -575
      angular/src/app/_forms/apiForms.ts
  11. +19
    -0
      angular/src/app/_interfaces/AbstractCreateDataComponent.ts
  12. +12
    -0
      angular/src/app/_interfaces/CreateDataComponentInterface.ts
  13. +0
    -4
      angular/src/app/_models/priceError.ts
  14. +0
    -11
      angular/src/app/_models/snipingResponse.ts
  15. +19
    -0
      angular/src/app/_views/base-data/base-data.component.html
  16. +0
    -0
      angular/src/app/_views/base-data/base-data.component.scss
  17. +23
    -0
      angular/src/app/_views/base-data/base-data.component.spec.ts
  18. +10
    -0
      angular/src/app/_views/base-data/base-data.component.ts
  19. +1
    -8
      angular/src/app/_views/dashboard/dashboard.component.html
  20. +0
    -1
      angular/src/app/_views/dashboard/dashboard.component.ts
  21. +9
    -0
      angular/src/app/_views/location/location-list/location-list.component.html
  22. +0
    -0
      angular/src/app/_views/location/location-list/location-list.component.scss
  23. +23
    -0
      angular/src/app/_views/location/location-list/location-list.component.spec.ts
  24. +88
    -0
      angular/src/app/_views/location/location-list/location-list.component.ts
  25. +1
    -0
      angular/src/app/_views/location/location.component.html
  26. +0
    -0
      angular/src/app/_views/location/location.component.scss
  27. +23
    -0
      angular/src/app/_views/location/location.component.spec.ts
  28. +10
    -0
      angular/src/app/_views/location/location.component.ts
  29. +9
    -0
      angular/src/app/_views/shipping-company/shipping-company-list/shipping-company-list.component.html
  30. +0
    -0
      angular/src/app/_views/shipping-company/shipping-company-list/shipping-company-list.component.scss
  31. +23
    -0
      angular/src/app/_views/shipping-company/shipping-company-list/shipping-company-list.component.spec.ts
  32. +80
    -0
      angular/src/app/_views/shipping-company/shipping-company-list/shipping-company-list.component.ts
  33. +1
    -0
      angular/src/app/_views/shipping-company/shipping-company.component.html
  34. +0
    -0
      angular/src/app/_views/shipping-company/shipping-company.component.scss
  35. +23
    -0
      angular/src/app/_views/shipping-company/shipping-company.component.spec.ts
  36. +10
    -0
      angular/src/app/_views/shipping-company/shipping-company.component.ts
  37. +1
    -0
      angular/src/app/_views/trip-location/trip-location.component.html
  38. +0
    -0
      angular/src/app/_views/trip-location/trip-location.component.scss
  39. +23
    -0
      angular/src/app/_views/trip-location/trip-location.component.spec.ts
  40. +10
    -0
      angular/src/app/_views/trip-location/trip-location.component.ts
  41. +1
    -0
      angular/src/app/_views/trip-work-log/trip-work-log.component.html
  42. +0
    -0
      angular/src/app/_views/trip-work-log/trip-work-log.component.scss
  43. +23
    -0
      angular/src/app/_views/trip-work-log/trip-work-log.component.spec.ts
  44. +10
    -0
      angular/src/app/_views/trip-work-log/trip-work-log.component.ts
  45. +1
    -0
      angular/src/app/_views/trip/trip.component.html
  46. +0
    -0
      angular/src/app/_views/trip/trip.component.scss
  47. +23
    -0
      angular/src/app/_views/trip/trip.component.spec.ts
  48. +10
    -0
      angular/src/app/_views/trip/trip.component.ts
  49. +9
    -0
      angular/src/app/_views/vessel/vessel-list/vessel-list.component.html
  50. +0
    -0
      angular/src/app/_views/vessel/vessel-list/vessel-list.component.scss
  51. +23
    -0
      angular/src/app/_views/vessel/vessel-list/vessel-list.component.spec.ts
  52. +77
    -0
      angular/src/app/_views/vessel/vessel-list/vessel-list.component.ts
  53. +1
    -0
      angular/src/app/_views/vessel/vessel.component.html
  54. +0
    -0
      angular/src/app/_views/vessel/vessel.component.scss
  55. +23
    -0
      angular/src/app/_views/vessel/vessel.component.spec.ts
  56. +10
    -0
      angular/src/app/_views/vessel/vessel.component.ts
  57. +10
    -0
      angular/src/app/_views/zone/zone-list/zone-list.component.html
  58. +0
    -0
      angular/src/app/_views/zone/zone-list/zone-list.component.scss
  59. +23
    -0
      angular/src/app/_views/zone/zone-list/zone-list.component.spec.ts
  60. +79
    -0
      angular/src/app/_views/zone/zone-list/zone-list.component.ts
  61. +1
    -0
      angular/src/app/_views/zone/zone-new/zone-new.component.html
  62. +0
    -0
      angular/src/app/_views/zone/zone-new/zone-new.component.scss
  63. +23
    -0
      angular/src/app/_views/zone/zone-new/zone-new.component.spec.ts
  64. +43
    -0
      angular/src/app/_views/zone/zone-new/zone-new.component.ts
  65. +1
    -0
      angular/src/app/_views/zone/zone.component.html
  66. +0
    -0
      angular/src/app/_views/zone/zone.component.scss
  67. +23
    -0
      angular/src/app/_views/zone/zone.component.spec.ts
  68. +10
    -0
      angular/src/app/_views/zone/zone.component.ts
  69. +15
    -0
      angular/src/app/app-routing.module.ts
  70. +26
    -0
      angular/src/app/app.module.ts
  71. +42
    -54
      angular/src/app/core/api/v1/.openapi-generator/FILES
  72. +19
    -31
      angular/src/app/core/api/v1/api/api.ts
  73. +434
    -0
      angular/src/app/core/api/v1/api/location.service.ts
  74. +1
    -1
      angular/src/app/core/api/v1/api/loginCheck.service.ts
  75. +1
    -1
      angular/src/app/core/api/v1/api/mediaObject.service.ts
  76. +434
    -0
      angular/src/app/core/api/v1/api/shippingCompany.service.ts
  77. +419
    -0
      angular/src/app/core/api/v1/api/trip.service.ts
  78. +419
    -0
      angular/src/app/core/api/v1/api/tripLocation.service.ts
  79. +89
    -1
      angular/src/app/core/api/v1/api/user.service.ts
  80. +419
    -0
      angular/src/app/core/api/v1/api/userTrip.service.ts
  81. +419
    -0
      angular/src/app/core/api/v1/api/userTripLocation.service.ts
  82. +419
    -0
      angular/src/app/core/api/v1/api/userTripWorkLog.service.ts
  83. +434
    -0
      angular/src/app/core/api/v1/api/vessel.service.ts
  84. +434
    -0
      angular/src/app/core/api/v1/api/zone.service.ts
  85. +23
    -0
      angular/src/app/core/api/v1/model/apiLocationsGetCollection200Response.ts
  86. +21
    -0
      angular/src/app/core/api/v1/model/apiLocationsGetCollection200ResponseSearch.ts
  87. +20
    -0
      angular/src/app/core/api/v1/model/apiLocationsGetCollection200ResponseSearchMappingInner.ts
  88. +22
    -0
      angular/src/app/core/api/v1/model/apiLocationsGetCollection200ResponseView.ts
  89. +7
    -7
      angular/src/app/core/api/v1/model/apiMediaObjectsGetCollection200Response.ts
  90. +23
    -0
      angular/src/app/core/api/v1/model/apiShippingCompaniesGetCollection200Response.ts
  91. +23
    -0
      angular/src/app/core/api/v1/model/apiTripLocationsGetCollection200Response.ts
  92. +23
    -0
      angular/src/app/core/api/v1/model/apiTripsGetCollection200Response.ts
  93. +23
    -0
      angular/src/app/core/api/v1/model/apiUserTripLocationsGetCollection200Response.ts
  94. +23
    -0
      angular/src/app/core/api/v1/model/apiUserTripWorkLogsGetCollection200Response.ts
  95. +23
    -0
      angular/src/app/core/api/v1/model/apiUserTripsGetCollection200Response.ts
  96. +7
    -7
      angular/src/app/core/api/v1/model/apiUsersGetCollection200Response.ts
  97. +23
    -0
      angular/src/app/core/api/v1/model/apiVesselsGetCollection200Response.ts
  98. +23
    -0
      angular/src/app/core/api/v1/model/apiZonesGetCollection200Response.ts
  99. +23
    -0
      angular/src/app/core/api/v1/model/location.ts
  100. +28
    -0
      angular/src/app/core/api/v1/model/locationJsonld.ts

+ 1
- 1
angular/openapi.json
La diferencia del archivo ha sido suprimido porque es demasiado grande
Ver fichero


+ 1292
- 3599
angular/openapi.yaml
La diferencia del archivo ha sido suprimido porque es demasiado grande
Ver fichero


+ 17
- 17
angular/src/app/_components/filter-bar/filter-bar.component.html Ver fichero

@@ -9,13 +9,13 @@
<input type="checkbox"
class="mini-check"
[checked]="filter.active"
(change)="onFilterActiveChanged(filter.field, $event, filter.subResource)">
<p class="form-label">{{ getColumnText(filter.field) | translate }}</p>
(change)="onFilterActiveChanged(filter.name, $event)">
<p class="form-label">{{ getColumnText(filter.name) | translate }}</p>
</div>
<label class="switch">
<input type="checkbox"
[checked]="filter.value"
(change)="onBooleanFilterChanged(filter.field, $event, filter.subResource)">
(change)="onBooleanFilterChanged(filter.name, $event)">
<span class="slider round"></span>
</label>
</div>
@@ -28,13 +28,13 @@
<input type="checkbox"
class="mini-check"
[checked]="filter.active"
(change)="onFilterActiveChanged(filter.field, $event, filter.subResource)">
<label class="form-label">{{ getColumnText(filter.field) | translate }}</label>
(change)="onFilterActiveChanged(filter.name, $event)">
<label class="form-label">{{ getColumnText(filter.name) | translate }}</label>
</div>
<input type="text"
class="form-control"
[value]="filter.value"
(input)="onTextFilterChanged(filter.field, $event, filter.subResource)">
(input)="onTextFilterChanged(filter.name, $event)">
</div>
</ng-container>

@@ -45,21 +45,21 @@
<input type="checkbox"
class="mini-check"
[checked]="filter.active"
(change)="onFilterActiveChanged(filter.field, $event, filter.subResource)">
<label class="form-label">{{ getColumnText(filter.field) | translate }}</label>
(change)="onFilterActiveChanged(filter.name, $event)">
<label class="form-label">{{ getColumnText(filter.name) | translate }}</label>
</div>
<div class="row">
<div class="col-6">
<input type="date"
class="form-control"
[value]="filter.value.start"
(change)="onDateFilterChanged(filter.field, 'start', $event, filter.subResource)">
(change)="onDateFilterChanged(filter.name, 'start', $event)">
</div>
<div class="col-6">
<input type="date"
class="form-control"
[value]="filter.value.end"
(change)="onDateFilterChanged(filter.field, 'end', $event, filter.subResource)">
(change)="onDateFilterChanged(filter.name, 'end', $event)">
</div>
</div>
</div>
@@ -72,22 +72,22 @@
<input type="checkbox"
class="mini-check"
[checked]="filter.active"
(change)="onFilterActiveChanged(filter.field, $event, filter.subResource)">
<label class="form-label">{{ getColumnText(filter.field) | translate }}</label>
(change)="onFilterActiveChanged(filter.name, $event)">
<label class="form-label">{{ getColumnText(filter.name) | translate }}</label>
</div>
<div class="row">
<div class="col-6">
<input type="number"
class="form-control"
[value]="filter.value.min"
(input)="onNumberFilterChanged(filter.field, 'min', $event, filter.subResource)"
(input)="onNumberFilterChanged(filter.name, 'min', $event)"
placeholder="Min">
</div>
<div class="col-6">
<input type="number"
class="form-control"
[value]="filter.value.max"
(input)="onNumberFilterChanged(filter.field, 'max', $event, filter.subResource)"
(input)="onNumberFilterChanged(filter.name, 'max', $event)"
placeholder="Max">
</div>
</div>
@@ -99,8 +99,8 @@
<input type="checkbox"
class="mini-check"
[checked]="filter.active"
(change)="onFilterActiveChanged(filter.field, $event, filter.subResource)">
<p class="form-label">{{ getColumnText(filter.field) | translate }}</p>
(change)="onFilterActiveChanged(filter.name, $event)">
<p class="form-label">{{ getColumnText(filter.name) | translate }}</p>
</div>
<div class="row">
<div *ngFor="let option of filter.options" class="col-12 col-sm-6 col-md-3 col-lg-2 mb-3">
@@ -110,7 +110,7 @@
<label class="switch">
<input type="checkbox"
[id]="filter.field + '_' + option"
(change)="onCheckboxesFilterChanged(filter.field, option, $event, filter.subResource)"
(change)="onCheckboxesFilterChanged(filter.name, option, $event)"
[checked]="filter.value[option]"
class="form-check-input">
<span class="slider round"></span>


+ 43
- 28
angular/src/app/_components/filter-bar/filter-bar.component.ts Ver fichero

@@ -4,6 +4,7 @@ import { Subject, debounceTime, takeUntil } from 'rxjs';
import {filter} from "rxjs/operators";

interface FilterState {
name: string;
field: string;
type: string;
value: any;
@@ -13,6 +14,7 @@ interface FilterState {
}

interface NumberInput {
name: string;
field: string;
boundType: 'min' | 'max';
value: number | null;
@@ -40,7 +42,7 @@ export class FilterBarComponent implements OnInit, OnDestroy {
public filterStates: FilterState[] = [];

private numberInputSubject = new Subject<NumberInput>();
private textInputSubject = new Subject<{field: string, value: string, subResource?: string}>();
private textInputSubject = new Subject<{name: string, field: string, value: string, subResource?: string}>();
private destroy$ = new Subject<void>();

ngOnInit(): void {
@@ -73,6 +75,7 @@ export class FilterBarComponent implements OnInit, OnDestroy {
active = true;
}
const filterState: FilterState = {
name: col.name,
field: col.field || '',
type: col.filterType || '',
value: value,
@@ -92,7 +95,7 @@ export class FilterBarComponent implements OnInit, OnDestroy {
debounceTime(300),
takeUntil(this.destroy$)
).subscribe(input => {
this.updateNumberFilter(input.field, input.boundType, input.value, input.subResource);
this.updateNumberFilter(input.name, input.boundType, input.value);
});
}

@@ -128,79 +131,91 @@ export class FilterBarComponent implements OnInit, OnDestroy {
}
}

private findFilterState(field: string, subResource?: string): FilterState | undefined {
return this.filterStates.find(state =>
state.field === field && state.subResource === subResource
);
private findFilterState(colName: string): FilterState | undefined {
return this.filterStates.find(state => state.name === colName);
}

onBooleanFilterChanged(field: string, event: Event, subResource?: string): void {
onBooleanFilterChanged(colName: string, event: Event): void {
const target = event.target as HTMLInputElement;
this.onFilterChanged(field, target.checked, subResource);
this.onFilterChanged(colName, target.checked);
}

onTextFilterChanged(field: string, event: Event, subResource?: string): void {
onTextFilterChanged(colName: string, event: Event): void {
const target = event.target as HTMLInputElement;
this.textInputSubject.next({ field, value: target.value, subResource });
const filterState = this.findFilterState(colName);
if (filterState) {
this.textInputSubject.next({
name: colName,
value: target.value,
field: filterState.field,
subResource: filterState.subResource
});
}
}

private updateTextFilter(field: string, value: string, subResource?: string): void {
const filterState = this.findFilterState(field, subResource);
const filterState = this.findFilterState(field);
if (filterState && filterState.type === FilterBarComponent.FILTER_TYPE_TEXT) {
filterState.value = value;
this.emitActiveFilters();
}
}

onDateFilterChanged(field: string, dateType: 'start' | 'end', event: Event, subResource?: string): void {
onDateFilterChanged(colName: string, dateType: 'start' | 'end', event: Event): void {
const target = event.target as HTMLInputElement;
const filterState = this.findFilterState(field, subResource);
const filterState = this.findFilterState(colName);
if (filterState && filterState.type === FilterBarComponent.FILTER_TYPE_DATE) {
filterState.value = { ...filterState.value, [dateType]: target.value };
this.emitActiveFilters();
}
}

onNumberFilterChanged(field: string, boundType: 'min' | 'max', event: Event, subResource?: string): void {
onNumberFilterChanged(colName: string, boundType: 'min' | 'max', event: Event): void {
const target = event.target as HTMLInputElement;
const numValue = target.value === '' ? null : Number(target.value);
this.numberInputSubject.next({ field, boundType, value: numValue, subResource });
const filterState = this.findFilterState(colName);
if (filterState) {
this.numberInputSubject.next({
name: colName,
boundType: boundType,
value: numValue,
field: filterState.field,
subResource: filterState.subResource
});
}
}

onCheckboxesFilterChanged(field: string, option: string, event: Event, subResource?: string): void {
onCheckboxesFilterChanged(colName: string, option: string, event: Event): void {
const target = event.target as HTMLInputElement;
const filterState = this.findFilterState(field, subResource);
console.log(filterState);
const filterState = this.findFilterState(colName);
if (filterState && filterState.type === FilterBarComponent.FILTER_TYPE_CHECKBOXES) {
filterState.value[option] = target.checked;
console.log('jojoj');
this.emitActiveFilters();
}
}

private updateNumberFilter(field: string, boundType: 'min' | 'max', value: number | null, subResource?: string): void {
const filterState = this.findFilterState(field, subResource);
private updateNumberFilter(colName: string, boundType: 'min' | 'max', value: number | null): void {
const filterState = this.findFilterState(colName);
if (filterState && filterState.type === FilterBarComponent.FILTER_TYPE_NUMBER) {
filterState.value = { ...filterState.value, [boundType]: value };
this.emitActiveFilters();
}
}

onFilterChanged(field: string, value: any, subResource?: string): void {
const filterState = this.findFilterState(field, subResource);
onFilterChanged(colName: string, value: any): void {
const filterState = this.findFilterState(colName);
if (filterState) {
filterState.value = value;
this.emitActiveFilters();
}
}

onFilterActiveChanged(field: string, event: Event, subResource?: string): void {
onFilterActiveChanged(colName: string, event: Event): void {
const target = event.target as HTMLInputElement;
const filterState = this.findFilterState(field, subResource);
const filterState = this.findFilterState(colName);
if (filterState) {
filterState.active = target.checked;
if (filterState.type === FilterBarComponent.FILTER_TYPE_CHECKBOXES) {
// Reset all checkbox values when the filter is deactivated
if (!filterState.active) {
for (const option in filterState.value) {
filterState.value[option] = false;
@@ -274,8 +289,8 @@ export class FilterBarComponent implements OnInit, OnDestroy {
this.filterSave.emit();
}

getColumnText(field: string): string {
const column = this.listColDefinitions.find(col => col.field === field);
getColumnText(colName: string): string {
const column = this.listColDefinitions.find(col => col.name === colName);
return column ? column.text : '';
}



+ 7
- 0
angular/src/app/_components/layout/two-column/two-column.component.html Ver fichero

@@ -9,6 +9,13 @@
</div>
</a>
</li>
<li class="nav-item mb-3">
<a class="card" routerLink="/base-data" routerLinkActive="active">
<div class="card-body position-relative" data-cat="dashboard">
<h3 class="position-absolute m-0">{{'base_data.view' | translate}}</h3>
</div>
</a>
</li>
<li class="nav-item mb-3">
<a class="card" routerLink="/users" routerLinkActive="active">
<div class="card-body position-relative" data-cat="user">


+ 2
- 0
angular/src/app/_components/list/list.component.html Ver fichero

@@ -5,6 +5,8 @@
[hidePageSize]="hidePageSize"
[displayOptions]="displayOptions"
[defaultDisplayOption]="defaultDisplayOption"
[showCreateDataButton]="createDataComponent !== undefined"
(createNewData)="onCreateData()"
(displayOptionChange)="onDisplayOptionChange($event)"
>
<app-toggle *ngIf="showFilterBar && filterExists"


+ 7
- 1
angular/src/app/_components/list/list.component.ts Ver fichero

@@ -1,4 +1,4 @@
import {AfterViewInit, Component, Input, OnDestroy, OnInit, ViewChild} from '@angular/core';
import {AfterViewInit, Component, Input, OnDestroy, OnInit, Type, ViewChild} from '@angular/core';
import {MatSort, Sort} from "@angular/material/sort";
import {PagingComponent} from "@app/_components/paging/paging.component";
import {MatTableDataSource} from "@angular/material/table";
@@ -9,6 +9,7 @@ import {ListUpdateElementFunctionType} from "@app/_components/list/list-update-e
import {FilterBarComponent} from "@app/_components/filter-bar/filter-bar.component";
import { Router } from '@angular/router';
import {interval, Subscription} from "rxjs";
import {AbstractCreateDataComponent} from "@app/_interfaces/AbstractCreateDataComponent";

@Component({
selector: 'app-list',
@@ -26,6 +27,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
@Input() public onDownloadFunction!: Function;
@Input() public onRowSelectedFunction!: Function;
@Input() public onUpdateBooleanStateFunction!: ListUpdateElementFunctionType;
@Input() public createDataComponent!: Type<AbstractCreateDataComponent<any>>;
@Input() public searchable: boolean;
@Input() public showDetailButton: boolean;
@Input() public showPosition: boolean;
@@ -383,6 +385,10 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
}
}

public onCreateData() {
console.log('sddssdssd');
}

public getFilterJsonString(): any
{
return JSON.stringify(this.filterObj);


+ 4
- 1
angular/src/app/_components/paging/paging.component.html Ver fichero

@@ -33,7 +33,10 @@
>
</mat-paginator>
<button type="button" class="btn btn-primary ms-3"
(click)="getData()"><span class="bi bi-arrow-clockwise"> {{ 'basic.refresh' | translate }}</span>
(click)="getData()"><span class="bi bi-arrow-clockwise"></span>
</button>
<button *ngIf="showCreateDataButton" type="button" class="btn btn-primary ms-3"
(click)="onCreateData()"><span class="bi bi-bookmark-plus"></span>
</button>
</div>
</div>


+ 7
- 0
angular/src/app/_components/paging/paging.component.ts Ver fichero

@@ -27,7 +27,9 @@ export class PagingComponent implements OnInit, AfterViewInit {
@Input() public hidePageSize: boolean;
@Input() public displayOptions!: { [key: string]: any };
@Input() public defaultDisplayOption!: string;
@Input() public showCreateDataButton: boolean;
@Output() public displayOptionChange = new EventEmitter<string>();
@Output() public createNewData = new EventEmitter();

@ViewChild(MatPaginator) public paginator!: MatPaginator;

@@ -50,6 +52,7 @@ export class PagingComponent implements OnInit, AfterViewInit {
this.pageIndex = 0;
this.searchable = false;
this.hidePageSize = false;
this.showCreateDataButton = false;
}

ngOnInit() {
@@ -88,6 +91,10 @@ export class PagingComponent implements OnInit, AfterViewInit {
);
}

onCreateData() {
this.createNewData.emit();
}

handlePageEvent(e: PageEvent) {
this.pageEvent = e;
this.dataLength = e.length;


+ 116
- 575
angular/src/app/_forms/apiForms.ts Ver fichero

@@ -1,620 +1,161 @@
import { FormGroup, FormControl, Validators } from '@angular/forms';

export const accountTradePileItemForm = new FormGroup({
dbId: new FormControl(null, []),
account: new FormControl(null, []),
candidateItem: new FormControl(null, []),
eaId: new FormControl(null, []),
eaAssetId: new FormControl(null, []),
eaResourceId: new FormControl(null, []),
rareFlag: new FormControl(null, []),
itemType: new FormControl(null, []),
rating: new FormControl(null, []),
contracts: new FormControl(null, []),
playStyle: new FormControl(null, []),
startingBid: new FormControl(null, []),
binPrice: new FormControl(null, []),
individualPrice: new FormControl(null, []),
minRange: new FormControl(null, []),
maxRange: new FormControl(null, []),
lastSalePrice: new FormControl(null, []),
tradeState: new FormControl(null, []),
eaTradeId: new FormControl(null, []),
rebuy: new FormControl(null, []),
leagueId: new FormControl(null, []),
teamId: new FormControl(null, []),
nationId: new FormControl(null, []),
listCnt: new FormControl(null, []),
openBidCnt: new FormControl(null, []),
snipedItem: new FormControl(null, []),
marketAverage: new FormControl(null, []),
creationDate: new FormControl(null, [])
export const locationForm = new FormGroup({
zone: new FormControl(null, []),
name: new FormControl(null, [Validators.required]),
zoneName: new FormControl(null, []),
createdAt: new FormControl(null, [])
});

export const accountTradePileItemJsonldForm = new FormGroup({
dbId: new FormControl(null, []),
account: new FormControl(null, []),
candidateItem: new FormControl(null, []),
eaId: new FormControl(null, []),
eaAssetId: new FormControl(null, []),
eaResourceId: new FormControl(null, []),
rareFlag: new FormControl(null, []),
itemType: new FormControl(null, []),
rating: new FormControl(null, []),
contracts: new FormControl(null, []),
playStyle: new FormControl(null, []),
startingBid: new FormControl(null, []),
binPrice: new FormControl(null, []),
individualPrice: new FormControl(null, []),
minRange: new FormControl(null, []),
maxRange: new FormControl(null, []),
lastSalePrice: new FormControl(null, []),
tradeState: new FormControl(null, []),
eaTradeId: new FormControl(null, []),
rebuy: new FormControl(null, []),
leagueId: new FormControl(null, []),
teamId: new FormControl(null, []),
nationId: new FormControl(null, []),
listCnt: new FormControl(null, []),
openBidCnt: new FormControl(null, []),
snipedItem: new FormControl(null, []),
marketAverage: new FormControl(null, []),
creationDate: new FormControl(null, [])
export const locationJsonldForm = new FormGroup({
zone: new FormControl(null, []),
name: new FormControl(null, [Validators.required]),
zoneName: new FormControl(null, []),
createdAt: new FormControl(null, [])
});

export const candidateForm = new FormGroup({
dbId: new FormControl(null, []),
rarity: new FormControl(null, []),
candidateStat: new FormControl(null, []),
player: new FormControl(null, []),
firstname: new FormControl(null, []),
lastname: new FormControl(null, []),
nickname: new FormControl(null, []),
fullDisplayInfo: new FormControl(null, []),
eaAssetId: new FormControl(null, [Validators.required]),
eaResourceId: new FormControl(null, [Validators.required]),
rareFlag: new FormControl(null, [Validators.required]),
rarityName: new FormControl(null, []),
image: new FormControl(null, []),
imageUrl: new FormControl(null, []),
cardImageUrl: new FormControl(null, []),
stockCountTotal: new FormControl(null, []),
stockCountReal: new FormControl(null, []),
futBinId: new FormControl(null, []),
futBinName: new FormControl(null, []),
futBinPrice: new FormControl(null, []),
futBinSellingPrice: new FormControl(null, []),
lastFutBinUpdate: new FormControl(null, []),
futWizId: new FormControl(null, []),
futWizPrice: new FormControl(null, []),
futwizName: new FormControl(null, []),
futWizSellingPrice: new FormControl(null, []),
lastFutWizUpdate: new FormControl(null, []),
rating: new FormControl(null, [Validators.required]),
highestBuyBinPrice: new FormControl(null, []),
sellStartingBid: new FormControl(null, []),
sellBinPrice: new FormControl(null, []),
lastFoundMinRange: new FormControl(null, []),
lastFoundMaxRange: new FormControl(null, []),
lastFoundLowestBin: new FormControl(null, []),
lowestBinUpdateDate: new FormControl(null, []),
buy: new FormControl(null, [Validators.required]),
maxBuyPrice: new FormControl(null, []),
buyStyle: new FormControl(null, [Validators.required]),
newBuySelective: new FormControl(null, [Validators.required]),
remove: new FormControl(null, [Validators.required]),
leagueId: new FormControl(null, []),
nationId: new FormControl(null, []),
prio: new FormControl(null, []),
listCnt: new FormControl(null, [Validators.required]),
soldCnt: new FormControl(null, [Validators.required]),
note: new FormControl(null, []),
relevant: new FormControl(null, [Validators.required]),
adjust100: new FormControl(null, [Validators.required]),
directReBuy: new FormControl(null, [Validators.required]),
marketAverage: new FormControl(null, []),
creationDate: new FormControl(null, [Validators.required])
export const mediaObjectJsonldMediaObjectReadForm = new FormGroup({
contentUrl: new FormControl(null, [])
});

export const candidateJsonldForm = new FormGroup({
dbId: new FormControl(null, []),
rarity: new FormControl(null, []),
candidateStat: new FormControl(null, []),
player: new FormControl(null, []),
firstname: new FormControl(null, []),
lastname: new FormControl(null, []),
nickname: new FormControl(null, []),
fullDisplayInfo: new FormControl(null, []),
eaAssetId: new FormControl(null, [Validators.required]),
eaResourceId: new FormControl(null, [Validators.required]),
rareFlag: new FormControl(null, [Validators.required]),
rarityName: new FormControl(null, []),
image: new FormControl(null, []),
imageUrl: new FormControl(null, []),
cardImageUrl: new FormControl(null, []),
stockCountTotal: new FormControl(null, []),
stockCountReal: new FormControl(null, []),
futBinId: new FormControl(null, []),
futBinName: new FormControl(null, []),
futBinPrice: new FormControl(null, []),
futBinSellingPrice: new FormControl(null, []),
lastFutBinUpdate: new FormControl(null, []),
futWizId: new FormControl(null, []),
futWizPrice: new FormControl(null, []),
futwizName: new FormControl(null, []),
futWizSellingPrice: new FormControl(null, []),
lastFutWizUpdate: new FormControl(null, []),
rating: new FormControl(null, [Validators.required]),
highestBuyBinPrice: new FormControl(null, []),
sellStartingBid: new FormControl(null, []),
sellBinPrice: new FormControl(null, []),
lastFoundMinRange: new FormControl(null, []),
lastFoundMaxRange: new FormControl(null, []),
lastFoundLowestBin: new FormControl(null, []),
lowestBinUpdateDate: new FormControl(null, []),
buy: new FormControl(null, [Validators.required]),
maxBuyPrice: new FormControl(null, []),
buyStyle: new FormControl(null, [Validators.required]),
newBuySelective: new FormControl(null, [Validators.required]),
remove: new FormControl(null, [Validators.required]),
leagueId: new FormControl(null, []),
nationId: new FormControl(null, []),
prio: new FormControl(null, []),
listCnt: new FormControl(null, [Validators.required]),
soldCnt: new FormControl(null, [Validators.required]),
note: new FormControl(null, []),
relevant: new FormControl(null, [Validators.required]),
adjust100: new FormControl(null, [Validators.required]),
directReBuy: new FormControl(null, [Validators.required]),
marketAverage: new FormControl(null, []),
creationDate: new FormControl(null, [Validators.required])
export const shippingCompanyForm = new FormGroup({
name: new FormControl(null, [Validators.required]),
createdAt: new FormControl(null, [])
});

export const candidateStatJsonldForm = new FormGroup({
candidateItem: new FormControl(null, []),
revRl6: new FormControl(null, []),
rl6: new FormControl(null, []),
sold6: new FormControl(null, []),
rat6: new FormControl(null, []),
rev6: new FormControl(null, []),
revRl12: new FormControl(null, []),
rl12: new FormControl(null, []),
sold12: new FormControl(null, []),
rat12: new FormControl(null, []),
rev12: new FormControl(null, []),
revRl24: new FormControl(null, []),
rl24: new FormControl(null, []),
sold24: new FormControl(null, []),
rat24: new FormControl(null, []),
rev24: new FormControl(null, []),
revRl3d: new FormControl(null, []),
rl3d: new FormControl(null, []),
sold3d: new FormControl(null, []),
rat3d: new FormControl(null, []),
rev3d: new FormControl(null, []),
revRl1w: new FormControl(null, []),
rl1w: new FormControl(null, []),
sold1w: new FormControl(null, []),
rat1w: new FormControl(null, []),
rev1w: new FormControl(null, []),
revRl2w: new FormControl(null, []),
rl2w: new FormControl(null, []),
sold2w: new FormControl(null, []),
rat2w: new FormControl(null, []),
rev2w: new FormControl(null, []),
revRl3w: new FormControl(null, []),
rl3w: new FormControl(null, []),
sold3w: new FormControl(null, []),
rat3w: new FormControl(null, []),
rev3w: new FormControl(null, []),
revRl4w: new FormControl(null, []),
rl4w: new FormControl(null, []),
sold4w: new FormControl(null, []),
rat4w: new FormControl(null, []),
rev4w: new FormControl(null, []),
revRl: new FormControl(null, []),
rl: new FormControl(null, []),
sold: new FormControl(null, []),
rat: new FormControl(null, []),
rev: new FormControl(null, []),
snipingRev: new FormControl(null, []),
creationDate: new FormControl(null, []),
lastUpdateDate: new FormControl(null, [])
export const shippingCompanyJsonldForm = new FormGroup({
name: new FormControl(null, [Validators.required]),
createdAt: new FormControl(null, [])
});

export const candidateStockAccountsJsonldForm = new FormGroup({
candidatesStockAccounts: new FormControl(null, []),
candidatesMissingAccounts: new FormControl(null, [])
export const tripForm = new FormGroup({
vessel: new FormControl(null, []),
pilotReference: new FormControl(null, [Validators.required]),
captainName: new FormControl(null, []),
startLocation: new FormControl(null, []),
endLocation: new FormControl(null, []),
startDate: new FormControl(null, [Validators.required]),
endDate: new FormControl(null, [Validators.required]),
createdAt: new FormControl(null, [])
});

export const configForm = new FormGroup({
systemActive: new FormControl(null, []),
systemRunning: new FormControl(null, []),
lastUpdateDate: new FormControl(null, []),
lastCheckDate: new FormControl(null, []),
processCnt: new FormControl(null, []),
sleepHourStart: new FormControl(null, [
Validators.min(0),
Validators.max(23)
]),
sleepHourEnd: new FormControl(null, [Validators.min(0), Validators.max(23)]),
checkMaxSales: new FormControl(null, []),
numMaxSales: new FormControl(null, [Validators.min(0), Validators.max(20)])
export const tripJsonldForm = new FormGroup({
vessel: new FormControl(null, []),
pilotReference: new FormControl(null, [Validators.required]),
captainName: new FormControl(null, []),
startLocation: new FormControl(null, []),
endLocation: new FormControl(null, []),
startDate: new FormControl(null, [Validators.required]),
endDate: new FormControl(null, [Validators.required]),
createdAt: new FormControl(null, [])
});

export const configJsonldForm = new FormGroup({
systemActive: new FormControl(null, []),
systemRunning: new FormControl(null, []),
lastUpdateDate: new FormControl(null, []),
lastCheckDate: new FormControl(null, []),
processCnt: new FormControl(null, []),
sleepHourStart: new FormControl(null, [
Validators.min(0),
Validators.max(23)
]),
sleepHourEnd: new FormControl(null, [Validators.min(0), Validators.max(23)]),
checkMaxSales: new FormControl(null, []),
numMaxSales: new FormControl(null, [Validators.min(0), Validators.max(20)])
export const tripLocationForm = new FormGroup({
trip: new FormControl(null, []),
location: new FormControl(null, []),
date: new FormControl(null, [Validators.required]),
createdAt: new FormControl(null, [])
});

export const gameAccountForm = new FormGroup({
dbId: new FormControl(null, []),
email: new FormControl(null, [Validators.required, Validators.email]),
profile: new FormControl(null, [Validators.required]),
password: new FormControl(null, [Validators.required]),
emailPw: new FormControl(null, []),
credits: new FormControl(null, []),
cntItems: new FormControl(null, []),
cntSoldItems: new FormControl(null, []),
cntInactiveItems: new FormControl(null, []),
active: new FormControl(null, [Validators.required]),
running: new FormControl(null, [Validators.required]),
relist: new FormControl(null, [Validators.required]),
relistDate: new FormControl(null, []),
blocked: new FormControl(null, [Validators.required]),
sniping: new FormControl(null, [Validators.required]),
snipingDate: new FormControl(null, []),
tmOpen: new FormControl(null, [Validators.required]),
tmState: new FormControl(null, []),
dead: new FormControl(null, [Validators.required]),
lockedMsg: new FormControl(null, [Validators.required]),
dynPrices: new FormControl(null, [Validators.required]),
newBuy: new FormControl(null, [Validators.required]),
newBuyDate: new FormControl(null, []),
newBuySelective: new FormControl(null, [Validators.required]),
reBuy: new FormControl(null, [Validators.required]),
rebuyDate: new FormControl(null, []),
connectionDate: new FormControl(null, []),
importWatchlist: new FormControl(null, [Validators.required]),
autoReBuy: new FormControl(null, [Validators.required]),
directReBuy: new FormControl(null, [Validators.required]),
itemMaxBuyPrice: new FormControl(null, [
Validators.min(0),
Validators.max(15000000)
]),
revenue: new FormControl(null, []),
futWizValue: new FormControl(null, []),
eaMarketAvgValue: new FormControl(null, []),
mfaCode: new FormControl(null, []),
twoFactorAuthKey: new FormControl(null, []),
login2FaViaApp: new FormControl(null, []),
eaCode1: new FormControl(null, []),
eaCode2: new FormControl(null, []),
eaCode3: new FormControl(null, []),
eaCode4: new FormControl(null, []),
eaCode5: new FormControl(null, []),
eaCode6: new FormControl(null, []),
snipingCnt1h: new FormControl(null, []),
snipingCnt3h: new FormControl(null, []),
snipingCnt6h: new FormControl(null, []),
snipingCnt12h: new FormControl(null, []),
snipingCnt24h: new FormControl(null, []),
snipingCnt3d: new FormControl(null, []),
snipingCnt1w: new FormControl(null, []),
note: new FormControl(null, []),
loopStartDate: new FormControl(null, []),
loopFinishDate: new FormControl(null, []),
creationDate: new FormControl(null, []),
owner: new FormControl(null, [])
export const tripLocationJsonldForm = new FormGroup({
trip: new FormControl(null, []),
location: new FormControl(null, []),
date: new FormControl(null, [Validators.required]),
createdAt: new FormControl(null, [])
});

export const gameAccountJsonldForm = new FormGroup({
dbId: new FormControl(null, []),
export const userForm = new FormGroup({
email: new FormControl(null, [Validators.required, Validators.email]),
profile: new FormControl(null, [Validators.required]),
password: new FormControl(null, [Validators.required]),
emailPw: new FormControl(null, []),
credits: new FormControl(null, []),
cntItems: new FormControl(null, []),
cntSoldItems: new FormControl(null, []),
cntInactiveItems: new FormControl(null, []),
active: new FormControl(null, [Validators.required]),
running: new FormControl(null, [Validators.required]),
relist: new FormControl(null, [Validators.required]),
relistDate: new FormControl(null, []),
blocked: new FormControl(null, [Validators.required]),
sniping: new FormControl(null, [Validators.required]),
snipingDate: new FormControl(null, []),
tmOpen: new FormControl(null, [Validators.required]),
tmState: new FormControl(null, []),
dead: new FormControl(null, [Validators.required]),
lockedMsg: new FormControl(null, [Validators.required]),
dynPrices: new FormControl(null, [Validators.required]),
newBuy: new FormControl(null, [Validators.required]),
newBuyDate: new FormControl(null, []),
newBuySelective: new FormControl(null, [Validators.required]),
reBuy: new FormControl(null, [Validators.required]),
rebuyDate: new FormControl(null, []),
connectionDate: new FormControl(null, []),
importWatchlist: new FormControl(null, [Validators.required]),
autoReBuy: new FormControl(null, [Validators.required]),
directReBuy: new FormControl(null, [Validators.required]),
itemMaxBuyPrice: new FormControl(null, [
Validators.min(0),
Validators.max(15000000)
]),
revenue: new FormControl(null, []),
futWizValue: new FormControl(null, []),
eaMarketAvgValue: new FormControl(null, []),
mfaCode: new FormControl(null, []),
twoFactorAuthKey: new FormControl(null, []),
login2FaViaApp: new FormControl(null, []),
eaCode1: new FormControl(null, []),
eaCode2: new FormControl(null, []),
eaCode3: new FormControl(null, []),
eaCode4: new FormControl(null, []),
eaCode5: new FormControl(null, []),
eaCode6: new FormControl(null, []),
snipingCnt1h: new FormControl(null, []),
snipingCnt3h: new FormControl(null, []),
snipingCnt6h: new FormControl(null, []),
snipingCnt12h: new FormControl(null, []),
snipingCnt24h: new FormControl(null, []),
snipingCnt3d: new FormControl(null, []),
snipingCnt1w: new FormControl(null, []),
note: new FormControl(null, []),
loopStartDate: new FormControl(null, []),
loopFinishDate: new FormControl(null, []),
creationDate: new FormControl(null, []),
owner: new FormControl(null, [])
});

export const logAccountCreditJsonldForm = new FormGroup({
gameAccount: new FormControl(null, []),
credits: new FormControl(null, []),
revenue: new FormControl(null, []),
creationDate: new FormControl(null, [])
});

export const logAccountProfitJsonldForm = new FormGroup({
gameAccount: new FormControl(null, []),
credits: new FormControl(null, []),
revenue: new FormControl(null, []),
tpValue: new FormControl(null, []),
revToday: new FormControl(null, []),
rev3hours: new FormControl(null, []),
rev6hours: new FormControl(null, []),
rev12hours: new FormControl(null, []),
rev24hours: new FormControl(null, []),
rev3days: new FormControl(null, []),
rev1week: new FormControl(null, []),
rev2weeks: new FormControl(null, []),
rev3weeks: new FormControl(null, []),
rev4weeks: new FormControl(null, []),
rev2months: new FormControl(null, []),
rev3months: new FormControl(null, []),
revTotal: new FormControl(null, []),
numSalesToday: new FormControl(null, []),
numSales3hours: new FormControl(null, []),
numSales6hours: new FormControl(null, []),
numSales12hours: new FormControl(null, []),
numSales24hours: new FormControl(null, []),
numSales3days: new FormControl(null, []),
numSales1week: new FormControl(null, []),
numSales2weeks: new FormControl(null, []),
numSales3weeks: new FormControl(null, []),
numSales4weeks: new FormControl(null, []),
numSales2months: new FormControl(null, []),
numSales3months: new FormControl(null, []),
numSalesTotal: new FormControl(null, []),
isDailyProfit: new FormControl(null, []),
creationDate: new FormControl(null, [])
});

export const logAccountSoldItemJsonldForm = new FormGroup({
dbId: new FormControl(null, []),
gameAccount: new FormControl(null, []),
candidateItem: new FormControl(null, []),
eaId: new FormControl(null, []),
contracts: new FormControl(null, []),
playStyle: new FormControl(null, []),
lastSalePrice: new FormControl(null, []),
currentBid: new FormControl(null, []),
startingBid: new FormControl(null, []),
binPrice: new FormControl(null, []),
minRange: new FormControl(null, []),
maxRange: new FormControl(null, []),
tradeState: new FormControl(null, []),
eaTradeId: new FormControl(null, []),
listCnt: new FormControl(null, []),
revenue: new FormControl(null, []),
reBought: new FormControl(null, []),
snipedItem: new FormControl(null, []),
firstListDate: new FormControl(null, []),
creationDate: new FormControl(null, [])
});

export const logGeneralJsonldForm = new FormGroup({
dbId: new FormControl(null, []),
gameAccount: new FormControl(null, []),
candidateItem: new FormControl(null, []),
logType: new FormControl(null, [Validators.required]),
message: new FormControl(null, []),
creationDate: new FormControl(null, [])
firstName: new FormControl(null, [Validators.required]),
lastName: new FormControl(null, [Validators.required]),
image: new FormControl(null, []),
imageUrl: new FormControl(null, []),
fullName: new FormControl(null, []),
password: new FormControl(null, []),
active: new FormControl(null, []),
createdAt: new FormControl(null, [])
});

export const logTotalProfitForm = new FormGroup({
credits: new FormControl(null, []),
revenue: new FormControl(null, []),
tpValueFutwiz: new FormControl(null, []),
tpValueEaAverage: new FormControl(null, []),
revToday: new FormControl(null, []),
rev3hours: new FormControl(null, []),
rev6hours: new FormControl(null, []),
rev12hours: new FormControl(null, []),
rev24hours: new FormControl(null, []),
rev3days: new FormControl(null, []),
rev1week: new FormControl(null, []),
rev2weeks: new FormControl(null, []),
rev3weeks: new FormControl(null, []),
rev4weeks: new FormControl(null, []),
rev2months: new FormControl(null, []),
rev3months: new FormControl(null, []),
revTotal: new FormControl(null, []),
numSalesToday: new FormControl(null, []),
numSales3hours: new FormControl(null, []),
numSales6hours: new FormControl(null, []),
numSales12hours: new FormControl(null, []),
numSales24hours: new FormControl(null, []),
numSales3days: new FormControl(null, []),
numSales1week: new FormControl(null, []),
numSales2weeks: new FormControl(null, []),
numSales3weeks: new FormControl(null, []),
numSales4weeks: new FormControl(null, []),
numSales2months: new FormControl(null, []),
numSales3months: new FormControl(null, []),
numSalesTotal: new FormControl(null, []),
isDailyProfit: new FormControl(null, []),
creationDate: new FormControl(null, [])
export const userJsonldForm = new FormGroup({
email: new FormControl(null, [Validators.required, Validators.email]),
firstName: new FormControl(null, [Validators.required]),
lastName: new FormControl(null, [Validators.required]),
image: new FormControl(null, []),
imageUrl: new FormControl(null, []),
fullName: new FormControl(null, []),
password: new FormControl(null, []),
active: new FormControl(null, []),
createdAt: new FormControl(null, [])
});

export const logTotalProfitJsonldForm = new FormGroup({
credits: new FormControl(null, []),
revenue: new FormControl(null, []),
tpValueFutwiz: new FormControl(null, []),
tpValueEaAverage: new FormControl(null, []),
revToday: new FormControl(null, []),
rev3hours: new FormControl(null, []),
rev6hours: new FormControl(null, []),
rev12hours: new FormControl(null, []),
rev24hours: new FormControl(null, []),
rev3days: new FormControl(null, []),
rev1week: new FormControl(null, []),
rev2weeks: new FormControl(null, []),
rev3weeks: new FormControl(null, []),
rev4weeks: new FormControl(null, []),
rev2months: new FormControl(null, []),
rev3months: new FormControl(null, []),
revTotal: new FormControl(null, []),
numSalesToday: new FormControl(null, []),
numSales3hours: new FormControl(null, []),
numSales6hours: new FormControl(null, []),
numSales12hours: new FormControl(null, []),
numSales24hours: new FormControl(null, []),
numSales3days: new FormControl(null, []),
numSales1week: new FormControl(null, []),
numSales2weeks: new FormControl(null, []),
numSales3weeks: new FormControl(null, []),
numSales4weeks: new FormControl(null, []),
numSales2months: new FormControl(null, []),
numSales3months: new FormControl(null, []),
numSalesTotal: new FormControl(null, []),
isDailyProfit: new FormControl(null, []),
creationDate: new FormControl(null, [])
export const userTripForm = new FormGroup({
trip: new FormControl(null, []),
user: new FormControl(null, []),
captainName: new FormControl(null, [Validators.required]),
startDate: new FormControl(null, [Validators.required]),
endDate: new FormControl(null, [Validators.required]),
createdAt: new FormControl(null, [])
});

export const mediaObjectJsonldMediaObjectReadForm = new FormGroup({
contentUrl: new FormControl(null, [])
export const userTripJsonldForm = new FormGroup({
trip: new FormControl(null, []),
user: new FormControl(null, []),
captainName: new FormControl(null, [Validators.required]),
startDate: new FormControl(null, [Validators.required]),
endDate: new FormControl(null, [Validators.required]),
createdAt: new FormControl(null, [])
});

export const modeConfigForm = new FormGroup({
autoReBuyMinSoldItems: new FormControl(null, [
Validators.min(0),
Validators.max(20)
]),
autoReBuyMinLastHours: new FormControl(null, [
Validators.min(0),
Validators.max(20)
])
export const userTripLocationForm = new FormGroup({
userTrip: new FormControl(null, []),
location: new FormControl(null, []),
plannedDate: new FormControl(null, [Validators.required]),
createdAt: new FormControl(null, [])
});

export const modeConfigJsonldForm = new FormGroup({
autoReBuyMinSoldItems: new FormControl(null, [
Validators.min(0),
Validators.max(20)
]),
autoReBuyMinLastHours: new FormControl(null, [
Validators.min(0),
Validators.max(20)
])
export const userTripLocationJsonldForm = new FormGroup({
userTrip: new FormControl(null, []),
location: new FormControl(null, []),
plannedDate: new FormControl(null, [Validators.required]),
createdAt: new FormControl(null, [])
});

export const playerForm = new FormGroup({
eaAssetId: new FormControl(null, []),
firstname: new FormControl(null, []),
lastname: new FormControl(null, []),
nickname: new FormControl(null, []),
rating: new FormControl(null, []),
creationDate: new FormControl(null, [])
export const userTripWorkLogForm = new FormGroup({
userTrip: new FormControl(null, []),
startLocation: new FormControl(null, []),
endLocation: new FormControl(null, []),
startDate: new FormControl(null, [Validators.required]),
endDate: new FormControl(null, [Validators.required]),
createdAt: new FormControl(null, [])
});

export const playerJsonldForm = new FormGroup({
eaAssetId: new FormControl(null, []),
firstname: new FormControl(null, []),
lastname: new FormControl(null, []),
nickname: new FormControl(null, []),
rating: new FormControl(null, []),
creationDate: new FormControl(null, [])
export const userTripWorkLogJsonldForm = new FormGroup({
userTrip: new FormControl(null, []),
startLocation: new FormControl(null, []),
endLocation: new FormControl(null, []),
startDate: new FormControl(null, [Validators.required]),
endDate: new FormControl(null, [Validators.required]),
createdAt: new FormControl(null, [])
});

export const rarityForm = new FormGroup({
rareFlag: new FormControl(null, []),
name: new FormControl(null, []),
untradable: new FormControl(null, []),
image: new FormControl(null, []),
imageUrl: new FormControl(null, []),
imageBronze: new FormControl(null, [])
export const vesselForm = new FormGroup({
name: new FormControl(null, [Validators.required]),
company: new FormControl(null, []),
createdAt: new FormControl(null, [])
});

export const rarityJsonldForm = new FormGroup({
rareFlag: new FormControl(null, []),
name: new FormControl(null, []),
untradable: new FormControl(null, []),
image: new FormControl(null, []),
imageUrl: new FormControl(null, []),
imageBronze: new FormControl(null, [])
export const vesselJsonldForm = new FormGroup({
name: new FormControl(null, [Validators.required]),
company: new FormControl(null, []),
createdAt: new FormControl(null, [])
});

export const systemStatJsonldForm = new FormGroup({
totalLogProfit: new FormControl(null, []),
config: new FormControl(null, []),
modeConfig: new FormControl(null, []),
numAccounts: new FormControl(null, []),
numDeadAccounts: new FormControl(null, []),
numActiveAccounts: new FormControl(null, []),
numTmOpenAccounts: new FormControl(null, []),
numTmClosedAccounts: new FormControl(null, []),
numBlockedAccounts: new FormControl(null, []),
numRunningAccounts: new FormControl(null, []),
numTradepileItems: new FormControl(null, []),
numSoldTradepileItems: new FormControl(null, []),
numActiveTradepileItems: new FormControl(null, []),
numExpiredTradepileItems: new FormControl(null, []),
numInactiveTradepileItems: new FormControl(null, []),
numCandidates: new FormControl(null, []),
numRelevantCandidates: new FormControl(null, []),
numBuyCandidates: new FormControl(null, []),
totalSnipingRev: new FormControl(null, [])
export const zoneForm = new FormGroup({
name: new FormControl(null, [Validators.required]),
createdAt: new FormControl(null, [])
});

export const userJsonldForm = new FormGroup({
email: new FormControl(null, [Validators.required, Validators.email]),
firstName: new FormControl(null, [Validators.required]),
lastName: new FormControl(null, [Validators.required]),
image: new FormControl(null, []),
imageUrl: new FormControl(null, []),
fullName: new FormControl(null, []),
password: new FormControl(null, []),
active: new FormControl(null, []),
export const zoneJsonldForm = new FormGroup({
name: new FormControl(null, [Validators.required]),
createdAt: new FormControl(null, [])
});

+ 19
- 0
angular/src/app/_interfaces/AbstractCreateDataComponent.ts Ver fichero

@@ -0,0 +1,19 @@
import {ModalStatus} from "@app/_helpers/modal.states";
import {FormGroup} from "@angular/forms";
import {Directive, EventEmitter} from "@angular/core";
import {CreateDataComponentInterface} from "@app/_interfaces/CreateDataComponentInterface";
import {FormGroupInitializer} from "@app/_helpers/formgroup.initializer";

@Directive()
export abstract class AbstractCreateDataComponent<T> implements CreateDataComponentInterface<T> {
data!: T;
submit = new EventEmitter<ModalStatus>();
form!: FormGroup;

ngOnInit(): void {
this.form = FormGroupInitializer.initFormGroup(this.form, this.data);
}

abstract getInitialData(): T;
abstract onSubmit(): void;
}

+ 12
- 0
angular/src/app/_interfaces/CreateDataComponentInterface.ts Ver fichero

@@ -0,0 +1,12 @@
import {ModalStatus} from "@app/_helpers/modal.states";
import {FormGroup} from "@angular/forms";
import {EventEmitter} from "@angular/core";

export interface CreateDataComponentInterface<T> {
data: T;
submit: EventEmitter<ModalStatus>;
form: FormGroup;
onSubmit(): void;
ngOnInit(): void;
getInitialData(): T;
}

+ 0
- 4
angular/src/app/_models/priceError.ts Ver fichero

@@ -1,4 +0,0 @@
export interface PriceError {
message: string;
error: boolean;
}

+ 0
- 11
angular/src/app/_models/snipingResponse.ts Ver fichero

@@ -1,11 +0,0 @@
export interface SnipingResponse {
messages: string[];
excludedAccountIds: number[],
errorAccountIds: number[],
snipingAccountIds: number[],
abortSniping: boolean,
boughtItems: number;
priceCheckFoundItems: number;
priceCheckFoundPrices: number[];
priceCheckMessages: string[];
}

+ 19
- 0
angular/src/app/_views/base-data/base-data.component.html Ver fichero

@@ -0,0 +1,19 @@
<div class="spt-container">
<div class="d-flex justify-content-between align-items-start">
<h2>{{ 'view.base_data' | translate }}</h2>
</div>
<mat-tab-group>
<mat-tab label="{{ 'base_data.locations' | translate }}">
<app-location-list></app-location-list>
</mat-tab>
<mat-tab label="{{ 'base_data.zones' | translate }}">
<app-zone-list></app-zone-list>
</mat-tab>
<mat-tab label="{{ 'base_data.vessels' | translate }}">
<app-vessel-list></app-vessel-list>
</mat-tab>
<mat-tab label="{{ 'base_data.shipping_companies' | translate }}">
<app-shipping-company-list></app-shipping-company-list>
</mat-tab>
</mat-tab-group>
</div>

+ 0
- 0
angular/src/app/_views/base-data/base-data.component.scss Ver fichero


+ 23
- 0
angular/src/app/_views/base-data/base-data.component.spec.ts Ver fichero

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { BaseDataComponent } from './base-data.component';

describe('BaseDataComponent', () => {
let component: BaseDataComponent;
let fixture: ComponentFixture<BaseDataComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [BaseDataComponent]
})
.compileComponents();
fixture = TestBed.createComponent(BaseDataComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 10
- 0
angular/src/app/_views/base-data/base-data.component.ts Ver fichero

@@ -0,0 +1,10 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-base-data',
templateUrl: './base-data.component.html',
styleUrl: './base-data.component.scss'
})
export class BaseDataComponent {

}

+ 1
- 8
angular/src/app/_views/dashboard/dashboard.component.html Ver fichero

@@ -2,12 +2,5 @@
<div class="d-flex justify-content-between align-items-start">
<h2>{{ 'dashboard.view' | translate }}</h2>
</div>
<mat-tab-group>
<mat-tab label="{{ 'dashboard.overview' | translate }}">
OVERVIEW
</mat-tab>
<mat-tab label="{{ 'dashboard.overview' | translate }}">
OVERVIEW 2
</mat-tab>
</mat-tab-group>
Space for important stuff.
</div>

+ 0
- 1
angular/src/app/_views/dashboard/dashboard.component.ts Ver fichero

@@ -1,5 +1,4 @@
import {AfterViewInit, Component, OnInit, ViewChild} from '@angular/core';
import {SystemStatService, SystemStatJsonld} from "@app/core/api/v1";
import {LogService} from "@app/_services/log.service";
import {FormControl} from "@angular/forms";



+ 9
- 0
angular/src/app/_views/location/location-list/location-list.component.html Ver fichero

@@ -0,0 +1,9 @@
<div class="spt-container">
<app-list #listComponent
[listId]="'locationList'"
[getDataFunction]="getData"
[onNavigateToDetailsFunction]="navigateToLocationDetail"
[onSortFunction]="onSortChange"
[listColDefinitions]="listColDefinitions"
></app-list>
</div>

+ 0
- 0
angular/src/app/_views/location/location-list/location-list.component.scss Ver fichero


+ 23
- 0
angular/src/app/_views/location/location-list/location-list.component.spec.ts Ver fichero

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { LocationListComponent } from './location-list.component';

describe('LocationListComponent', () => {
let component: LocationListComponent;
let fixture: ComponentFixture<LocationListComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [LocationListComponent]
})
.compileComponents();
fixture = TestBed.createComponent(LocationListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 88
- 0
angular/src/app/_views/location/location-list/location-list.component.ts Ver fichero

@@ -0,0 +1,88 @@
import {AfterViewInit, Component, OnInit, ViewChild} from '@angular/core';
import {ListColDefinition} from "@app/_components/list/list-col-definition";
import {ListComponent} from "@app/_components/list/list.component";
import {LocationJsonld, LocationService, UserService} from "@app/core/api/v1";
import {Router} from "@angular/router";
import {AppHelperService} from "@app/_helpers/app-helper.service";
import {OrderFilter} from "@app/_models/orderFilter";
import {FilterBarComponent} from "@app/_components/filter-bar/filter-bar.component";
import {ListGetDataFunctionType} from "@app/_components/list/list-get-data-function-type";
import {ROUTE_LOCATIONS} from "@app/app-routing.module";
import {Sort} from "@angular/material/sort";

@Component({
selector: 'app-location-list',
templateUrl: './location-list.component.html',
styleUrl: './location-list.component.scss'
})
export class LocationListComponent implements OnInit, AfterViewInit {

@ViewChild("listComponent", {static: false}) listComponent!: ListComponent;

protected listColDefinitions!: ListColDefinition[];

constructor(
private locationService: LocationService,
private router: Router,
protected appHelperService: AppHelperService,
) {

this.listColDefinitions = [
{
name: 'name',
text: 'common.name',
type: ListComponent.COLUMN_TYPE_TEXT,
field: 'name',
sortable: true,
filterType: FilterBarComponent.FILTER_TYPE_TEXT,
} as ListColDefinition,
{
name: 'zone',
text: 'location.zone',
type: ListComponent.COLUMN_TYPE_TEXT,
field: 'name',
sortable: true,
filterType: FilterBarComponent.FILTER_TYPE_TEXT,
} as ListColDefinition,
{
name: 'creationDate',
text: 'common.creation_date',
type: ListComponent.COLUMN_TYPE_DATE,
field: 'creationDate',
sortable: true,
filterType: FilterBarComponent.FILTER_TYPE_DATE,
} as ListColDefinition,
];
}

ngOnInit() {

}

ngAfterViewInit(): void {
this.listComponent.getData();
}

getData: ListGetDataFunctionType = (
index: number,
pageSize: number,
term?: string,
) => {
return this.locationService.locationsGetCollection(
index,
pageSize,
term,
this.listComponent.getFilterJsonString(),
this.listComponent.getSortingJsonString()
);
}

onSortChange = (sortState: Sort) => {
}

navigateToLocationDetail = (element: any) => {
const location: LocationJsonld = element as LocationJsonld;
this.router.navigate(['/' + ROUTE_LOCATIONS, this.appHelperService.extractId(location.id)]);
}

}

+ 1
- 0
angular/src/app/_views/location/location.component.html Ver fichero

@@ -0,0 +1 @@
<p>location works!</p>

+ 0
- 0
angular/src/app/_views/location/location.component.scss Ver fichero


+ 23
- 0
angular/src/app/_views/location/location.component.spec.ts Ver fichero

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { LocationComponent } from './location.component';

describe('LocationComponent', () => {
let component: LocationComponent;
let fixture: ComponentFixture<LocationComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [LocationComponent]
})
.compileComponents();
fixture = TestBed.createComponent(LocationComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 10
- 0
angular/src/app/_views/location/location.component.ts Ver fichero

@@ -0,0 +1,10 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-location',
templateUrl: './location.component.html',
styleUrl: './location.component.scss'
})
export class LocationComponent {

}

+ 9
- 0
angular/src/app/_views/shipping-company/shipping-company-list/shipping-company-list.component.html Ver fichero

@@ -0,0 +1,9 @@
<div class="spt-container">
<app-list #listComponent
[listId]="'shippingCompanyList'"
[getDataFunction]="getData"
[onNavigateToDetailsFunction]="navigateToZoneDetail"
[onSortFunction]="onSortChange"
[listColDefinitions]="listColDefinitions"
></app-list>
</div>

+ 0
- 0
angular/src/app/_views/shipping-company/shipping-company-list/shipping-company-list.component.scss Ver fichero


+ 23
- 0
angular/src/app/_views/shipping-company/shipping-company-list/shipping-company-list.component.spec.ts Ver fichero

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { ShippingCompanyListComponent } from './shipping-company-list.component';

describe('ShippingCompanyListComponent', () => {
let component: ShippingCompanyListComponent;
let fixture: ComponentFixture<ShippingCompanyListComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ShippingCompanyListComponent]
})
.compileComponents();
fixture = TestBed.createComponent(ShippingCompanyListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 80
- 0
angular/src/app/_views/shipping-company/shipping-company-list/shipping-company-list.component.ts Ver fichero

@@ -0,0 +1,80 @@
import {Component, ViewChild} from '@angular/core';
import {ListComponent} from "@app/_components/list/list.component";
import {ListColDefinition} from "@app/_components/list/list-col-definition";
import {
ShippingCompanyJsonld,
ShippingCompanyService,
} from "@app/core/api/v1";
import {Router} from "@angular/router";
import {AppHelperService} from "@app/_helpers/app-helper.service";
import {FilterBarComponent} from "@app/_components/filter-bar/filter-bar.component";
import {ListGetDataFunctionType} from "@app/_components/list/list-get-data-function-type";
import {Sort} from "@angular/material/sort";
import {ROUTE_SHIPPING_COMPANIES, ROUTE_VESSELS} from "@app/app-routing.module";

@Component({
selector: 'app-shipping-company-list',
templateUrl: './shipping-company-list.component.html',
styleUrl: './shipping-company-list.component.scss'
})
export class ShippingCompanyListComponent {
@ViewChild("listComponent", {static: false}) listComponent!: ListComponent;

protected listColDefinitions!: ListColDefinition[];

constructor(
private shippingCompanyService: ShippingCompanyService,
private router: Router,
protected appHelperService: AppHelperService,
) {

this.listColDefinitions = [
{
name: 'name',
text: 'common.name',
type: ListComponent.COLUMN_TYPE_TEXT,
field: 'name',
sortable: true,
filterType: FilterBarComponent.FILTER_TYPE_TEXT,
} as ListColDefinition,
{
name: 'creationDate',
text: 'common.creation_date',
type: ListComponent.COLUMN_TYPE_DATE,
field: 'creationDate',
sortable: true,
filterType: FilterBarComponent.FILTER_TYPE_DATE,
} as ListColDefinition,
];
}

ngOnInit() {

}

ngAfterViewInit(): void {
this.listComponent.getData();
}

getData: ListGetDataFunctionType = (
index: number,
pageSize: number,
term?: string,
) => {
return this.shippingCompanyService.shippingCompaniesGetCollection(
index,
pageSize,
term,
this.listComponent.getFilterJsonString(),
this.listComponent.getSortingJsonString()
);
}

onSortChange = (sortState: Sort) => {
}

navigateToZoneDetail = (element: any) => {
const shippingCompany: ShippingCompanyJsonld = element as ShippingCompanyJsonld;
this.router.navigate(['/' + ROUTE_SHIPPING_COMPANIES, this.appHelperService.extractId(shippingCompany.id)]);
}
}

+ 1
- 0
angular/src/app/_views/shipping-company/shipping-company.component.html Ver fichero

@@ -0,0 +1 @@
<p>shipping-company works!</p>

+ 0
- 0
angular/src/app/_views/shipping-company/shipping-company.component.scss Ver fichero


+ 23
- 0
angular/src/app/_views/shipping-company/shipping-company.component.spec.ts Ver fichero

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { ShippingCompanyComponent } from './shipping-company.component';

describe('ShippingCompanyComponent', () => {
let component: ShippingCompanyComponent;
let fixture: ComponentFixture<ShippingCompanyComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ShippingCompanyComponent]
})
.compileComponents();
fixture = TestBed.createComponent(ShippingCompanyComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 10
- 0
angular/src/app/_views/shipping-company/shipping-company.component.ts Ver fichero

@@ -0,0 +1,10 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-shipping-company',
templateUrl: './shipping-company.component.html',
styleUrl: './shipping-company.component.scss'
})
export class ShippingCompanyComponent {

}

+ 1
- 0
angular/src/app/_views/trip-location/trip-location.component.html Ver fichero

@@ -0,0 +1 @@
<p>trip-location works!</p>

+ 0
- 0
angular/src/app/_views/trip-location/trip-location.component.scss Ver fichero


+ 23
- 0
angular/src/app/_views/trip-location/trip-location.component.spec.ts Ver fichero

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { TripLocationComponent } from './trip-location.component';

describe('TripLocationComponent', () => {
let component: TripLocationComponent;
let fixture: ComponentFixture<TripLocationComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [TripLocationComponent]
})
.compileComponents();
fixture = TestBed.createComponent(TripLocationComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 10
- 0
angular/src/app/_views/trip-location/trip-location.component.ts Ver fichero

@@ -0,0 +1,10 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-trip-location',
templateUrl: './trip-location.component.html',
styleUrl: './trip-location.component.scss'
})
export class TripLocationComponent {

}

+ 1
- 0
angular/src/app/_views/trip-work-log/trip-work-log.component.html Ver fichero

@@ -0,0 +1 @@
<p>trip-work-log works!</p>

+ 0
- 0
angular/src/app/_views/trip-work-log/trip-work-log.component.scss Ver fichero


+ 23
- 0
angular/src/app/_views/trip-work-log/trip-work-log.component.spec.ts Ver fichero

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { TripWorkLogComponent } from './trip-work-log.component';

describe('TripWorkLogComponent', () => {
let component: TripWorkLogComponent;
let fixture: ComponentFixture<TripWorkLogComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [TripWorkLogComponent]
})
.compileComponents();
fixture = TestBed.createComponent(TripWorkLogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 10
- 0
angular/src/app/_views/trip-work-log/trip-work-log.component.ts Ver fichero

@@ -0,0 +1,10 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-trip-work-log',
templateUrl: './trip-work-log.component.html',
styleUrl: './trip-work-log.component.scss'
})
export class TripWorkLogComponent {

}

+ 1
- 0
angular/src/app/_views/trip/trip.component.html Ver fichero

@@ -0,0 +1 @@
<p>trip works!</p>

+ 0
- 0
angular/src/app/_views/trip/trip.component.scss Ver fichero


+ 23
- 0
angular/src/app/_views/trip/trip.component.spec.ts Ver fichero

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { TripComponent } from './trip.component';

describe('TripComponent', () => {
let component: TripComponent;
let fixture: ComponentFixture<TripComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [TripComponent]
})
.compileComponents();
fixture = TestBed.createComponent(TripComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 10
- 0
angular/src/app/_views/trip/trip.component.ts Ver fichero

@@ -0,0 +1,10 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-trip',
templateUrl: './trip.component.html',
styleUrl: './trip.component.scss'
})
export class TripComponent {

}

+ 9
- 0
angular/src/app/_views/vessel/vessel-list/vessel-list.component.html Ver fichero

@@ -0,0 +1,9 @@
<div class="spt-container">
<app-list #listComponent
[listId]="'vesselList'"
[getDataFunction]="getData"
[onNavigateToDetailsFunction]="navigateToVesselDetail"
[onSortFunction]="onSortChange"
[listColDefinitions]="listColDefinitions"
></app-list>
</div>

+ 0
- 0
angular/src/app/_views/vessel/vessel-list/vessel-list.component.scss Ver fichero


+ 23
- 0
angular/src/app/_views/vessel/vessel-list/vessel-list.component.spec.ts Ver fichero

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { VesselListComponent } from './vessel-list.component';

describe('VesselListComponent', () => {
let component: VesselListComponent;
let fixture: ComponentFixture<VesselListComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [VesselListComponent]
})
.compileComponents();
fixture = TestBed.createComponent(VesselListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 77
- 0
angular/src/app/_views/vessel/vessel-list/vessel-list.component.ts Ver fichero

@@ -0,0 +1,77 @@
import {Component, ViewChild} from '@angular/core';
import {ListComponent} from "@app/_components/list/list.component";
import {ListColDefinition} from "@app/_components/list/list-col-definition";
import {VesselJsonld, VesselService} from "@app/core/api/v1";
import {Router} from "@angular/router";
import {AppHelperService} from "@app/_helpers/app-helper.service";
import {FilterBarComponent} from "@app/_components/filter-bar/filter-bar.component";
import {ListGetDataFunctionType} from "@app/_components/list/list-get-data-function-type";
import {Sort} from "@angular/material/sort";
import {ROUTE_VESSELS} from "@app/app-routing.module";

@Component({
selector: 'app-vessel-list',
templateUrl: './vessel-list.component.html',
styleUrl: './vessel-list.component.scss'
})
export class VesselListComponent {
@ViewChild("listComponent", {static: false}) listComponent!: ListComponent;

protected listColDefinitions!: ListColDefinition[];

constructor(
private vesselService: VesselService,
private router: Router,
protected appHelperService: AppHelperService,
) {

this.listColDefinitions = [
{
name: 'name',
text: 'common.name',
type: ListComponent.COLUMN_TYPE_TEXT,
field: 'name',
sortable: true,
filterType: FilterBarComponent.FILTER_TYPE_TEXT,
} as ListColDefinition,
{
name: 'creationDate',
text: 'common.creation_date',
type: ListComponent.COLUMN_TYPE_DATE,
field: 'creationDate',
sortable: true,
filterType: FilterBarComponent.FILTER_TYPE_DATE,
} as ListColDefinition,
];
}

ngOnInit() {

}

ngAfterViewInit(): void {
this.listComponent.getData();
}

getData: ListGetDataFunctionType = (
index: number,
pageSize: number,
term?: string,
) => {
return this.vesselService.vesselsGetCollection(
index,
pageSize,
term,
this.listComponent.getFilterJsonString(),
this.listComponent.getSortingJsonString()
);
}

onSortChange = (sortState: Sort) => {
}

navigateToVesselDetail = (element: any) => {
const vessel: VesselJsonld = element as VesselJsonld;
this.router.navigate(['/' + ROUTE_VESSELS, this.appHelperService.extractId(vessel.id)]);
}
}

+ 1
- 0
angular/src/app/_views/vessel/vessel.component.html Ver fichero

@@ -0,0 +1 @@
<p>vessel works!</p>

+ 0
- 0
angular/src/app/_views/vessel/vessel.component.scss Ver fichero


+ 23
- 0
angular/src/app/_views/vessel/vessel.component.spec.ts Ver fichero

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { VesselComponent } from './vessel.component';

describe('VesselComponent', () => {
let component: VesselComponent;
let fixture: ComponentFixture<VesselComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [VesselComponent]
})
.compileComponents();
fixture = TestBed.createComponent(VesselComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 10
- 0
angular/src/app/_views/vessel/vessel.component.ts Ver fichero

@@ -0,0 +1,10 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-vessel',
templateUrl: './vessel.component.html',
styleUrl: './vessel.component.scss'
})
export class VesselComponent {

}

+ 10
- 0
angular/src/app/_views/zone/zone-list/zone-list.component.html Ver fichero

@@ -0,0 +1,10 @@
<div class="spt-container">
<app-list #listComponent
[listId]="'zoneList'"
[getDataFunction]="getData"
[onNavigateToDetailsFunction]="navigateToZoneDetail"
[onSortFunction]="onSortChange"
[listColDefinitions]="listColDefinitions"
[createDataComponent]="ZoneNewComponent"
></app-list>
</div>

+ 0
- 0
angular/src/app/_views/zone/zone-list/zone-list.component.scss Ver fichero


+ 23
- 0
angular/src/app/_views/zone/zone-list/zone-list.component.spec.ts Ver fichero

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { ZoneListComponent } from './zone-list.component';

describe('ZoneListComponent', () => {
let component: ZoneListComponent;
let fixture: ComponentFixture<ZoneListComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ZoneListComponent]
})
.compileComponents();
fixture = TestBed.createComponent(ZoneListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 79
- 0
angular/src/app/_views/zone/zone-list/zone-list.component.ts Ver fichero

@@ -0,0 +1,79 @@
import {Component, ViewChild} from '@angular/core';
import {ListComponent} from "@app/_components/list/list.component";
import {ListColDefinition} from "@app/_components/list/list-col-definition";
import {ZoneJsonld, ZoneService} from "@app/core/api/v1";
import {Router} from "@angular/router";
import {AppHelperService} from "@app/_helpers/app-helper.service";
import {FilterBarComponent} from "@app/_components/filter-bar/filter-bar.component";
import {ListGetDataFunctionType} from "@app/_components/list/list-get-data-function-type";
import {Sort} from "@angular/material/sort";
import {ROUTE_ZONES} from "@app/app-routing.module";
import {ZoneNewComponent} from "@app/_views/zone/zone-new/zone-new.component";

@Component({
selector: 'app-zone-list',
templateUrl: './zone-list.component.html',
styleUrl: './zone-list.component.scss'
})
export class ZoneListComponent {
@ViewChild("listComponent", {static: false}) listComponent!: ListComponent;

protected listColDefinitions!: ListColDefinition[];

constructor(
private zoneService: ZoneService,
private router: Router,
protected appHelperService: AppHelperService,
) {

this.listColDefinitions = [
{
name: 'name',
text: 'common.name',
type: ListComponent.COLUMN_TYPE_TEXT,
field: 'name',
sortable: true,
filterType: FilterBarComponent.FILTER_TYPE_TEXT,
} as ListColDefinition,
{
name: 'creationDate',
text: 'common.creation_date',
type: ListComponent.COLUMN_TYPE_DATE,
field: 'creationDate',
sortable: true,
filterType: FilterBarComponent.FILTER_TYPE_DATE,
} as ListColDefinition,
];
}

ngOnInit() {

}

ngAfterViewInit(): void {
this.listComponent.getData();
}

getData: ListGetDataFunctionType = (
index: number,
pageSize: number,
term?: string,
) => {
return this.zoneService.zonesGetCollection(
index,
pageSize,
term,
this.listComponent.getFilterJsonString(),
this.listComponent.getSortingJsonString()
);
}

onSortChange = (sortState: Sort) => {
}

navigateToZoneDetail = (element: any) => {
const zone: ZoneJsonld = element as ZoneJsonld;
this.router.navigate(['/' + ROUTE_ZONES, this.appHelperService.extractId(zone.id)]);
}
protected readonly ZoneNewComponent = ZoneNewComponent;
}

+ 1
- 0
angular/src/app/_views/zone/zone-new/zone-new.component.html Ver fichero

@@ -0,0 +1 @@
<p>zone-new works!</p>

+ 0
- 0
angular/src/app/_views/zone/zone-new/zone-new.component.scss Ver fichero


+ 23
- 0
angular/src/app/_views/zone/zone-new/zone-new.component.spec.ts Ver fichero

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { ZoneNewComponent } from './zone-new.component';

describe('ZoneNewComponent', () => {
let component: ZoneNewComponent;
let fixture: ComponentFixture<ZoneNewComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ZoneNewComponent]
})
.compileComponents();
fixture = TestBed.createComponent(ZoneNewComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 43
- 0
angular/src/app/_views/zone/zone-new/zone-new.component.ts Ver fichero

@@ -0,0 +1,43 @@
import {Component, EventEmitter, Input, Output} from '@angular/core';
import {ZoneJsonld, ZoneService} from "@app/core/api/v1";
import {ModalStatus} from "@app/_helpers/modal.states";
import {FormGroup} from "@angular/forms";
import {zoneForm} from "@app/_forms/apiForms";
import {AbstractCreateDataComponent} from "@app/_interfaces/AbstractCreateDataComponent";

@Component({
selector: 'app-zone-new',
templateUrl: './zone-new.component.html',
styleUrl: './zone-new.component.scss'
})
export class ZoneNewComponent extends AbstractCreateDataComponent<ZoneJsonld>{

@Input() public override data!: ZoneJsonld;
@Output() public override submit: EventEmitter<ModalStatus> = new EventEmitter<ModalStatus>();

override form: FormGroup = zoneForm;

constructor(
private zoneService: ZoneService
) {
super();
}

getInitialData(): ZoneJsonld {
let zone: ZoneJsonld = {} as ZoneJsonld;
return zone;
}

onSubmit() {
if (this.form.valid) {
this.zoneService.zonesPost(
this.form.value as ZoneJsonld
).subscribe(
data => {
this.form.reset();
this.submit.emit(ModalStatus.Submitted);
}
);
}
}
}

+ 1
- 0
angular/src/app/_views/zone/zone.component.html Ver fichero

@@ -0,0 +1 @@
<p>zone works!</p>

+ 0
- 0
angular/src/app/_views/zone/zone.component.scss Ver fichero


+ 23
- 0
angular/src/app/_views/zone/zone.component.spec.ts Ver fichero

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { ZoneComponent } from './zone.component';

describe('ZoneComponent', () => {
let component: ZoneComponent;
let fixture: ComponentFixture<ZoneComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ZoneComponent]
})
.compileComponents();
fixture = TestBed.createComponent(ZoneComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 10
- 0
angular/src/app/_views/zone/zone.component.ts Ver fichero

@@ -0,0 +1,10 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-zone',
templateUrl: './zone.component.html',
styleUrl: './zone.component.scss'
})
export class ZoneComponent {

}

+ 15
- 0
angular/src/app/app-routing.module.ts Ver fichero

@@ -7,12 +7,19 @@ import {adminGuard} from "@app/_guards/admin.guard";
import {UsersComponent} from "@app/_views/user/users.component";
import {TwoColumnComponent} from "@app/_components/layout/two-column/two-column.component";
import {DashboardComponent} from "@app/_views/dashboard/dashboard.component";
import {BaseDataComponent} from "@app/_views/base-data/base-data.component";

const accountModule = () => import('@app/_views/account/account.module').then(x => x.AccountModule);

export const ROUTE_DASHBOARD = 'dashboard';
export const ROUTE_BASE_DATA = 'base-data';
export const ROUTE_LOCATIONS = 'locations';
export const ROUTE_SHIPPING_COMPANIES = 'shipping-companies';
export const ROUTE_TRIPS = 'trips';
export const ROUTE_PROFILE = 'profile';
export const ROUTE_USERS = 'users';
export const ROUTE_VESSELS = 'vessels';
export const ROUTE_ZONES = 'zones';

const routes: Routes = [
{
@@ -28,6 +35,14 @@ const routes: Routes = [
{path: '', component: DashboardComponent},
]
},
{
path: ROUTE_BASE_DATA,
component: TwoColumnComponent,
canActivate: [userGuard],
children: [
{path: '', component: BaseDataComponent},
]
},
{
path: ROUTE_PROFILE,
component: TwoColumnComponent,


+ 26
- 0
angular/src/app/app.module.ts Ver fichero

@@ -41,6 +41,19 @@ import {MatTabsModule} from "@angular/material/tabs";
import {DashboardComponent} from './_views/dashboard/dashboard.component';
import localeDe from '@angular/common/locales/de';
import { FilterBarComponent } from './_components/filter-bar/filter-bar.component';
import { LocationComponent } from './_views/location/location.component';
import { ZoneComponent } from './_views/zone/zone.component';
import { ShippingCompanyComponent } from './_views/shipping-company/shipping-company.component';
import { TripComponent } from './_views/trip/trip.component';
import { TripLocationComponent } from './_views/trip-location/trip-location.component';
import { TripWorkLogComponent } from './_views/trip-work-log/trip-work-log.component';
import { VesselComponent } from './_views/vessel/vessel.component';
import { BaseDataComponent } from './_views/base-data/base-data.component';
import { LocationListComponent } from './_views/location/location-list/location-list.component';
import { ZoneListComponent } from './_views/zone/zone-list/zone-list.component';
import { VesselListComponent } from './_views/vessel/vessel-list/vessel-list.component';
import { ShippingCompanyListComponent } from './_views/shipping-company/shipping-company-list/shipping-company-list.component';
import { ZoneNewComponent } from './_views/zone/zone-new/zone-new.component';

registerLocaleData(localeDe, 'de-DE');

@@ -104,6 +117,19 @@ export function HttpLoaderFactory(http: HttpClient) {
ListComponent,
DashboardComponent,
FilterBarComponent,
LocationComponent,
ZoneComponent,
ShippingCompanyComponent,
TripComponent,
TripLocationComponent,
TripWorkLogComponent,
VesselComponent,
BaseDataComponent,
LocationListComponent,
ZoneListComponent,
VesselListComponent,
ShippingCompanyListComponent,
ZoneNewComponent,
],
providers: [
{provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true},


+ 42
- 54
angular/src/app/core/api/v1/.openapi-generator/FILES Ver fichero

@@ -1,74 +1,62 @@
.gitignore
README.md
api.module.ts
api/accountTradePileItem.service.ts
api/api.ts
api/candidate.service.ts
api/candidateStat.service.ts
api/candidateStockAccounts.service.ts
api/config.service.ts
api/gameAccount.service.ts
api/logAccountCredit.service.ts
api/logAccountProfit.service.ts
api/logAccountSoldItem.service.ts
api/logGeneral.service.ts
api/logTotalProfit.service.ts
api/location.service.ts
api/loginCheck.service.ts
api/mediaObject.service.ts
api/modeConfig.service.ts
api/player.service.ts
api/rarity.service.ts
api/systemStat.service.ts
api/shippingCompany.service.ts
api/trip.service.ts
api/tripLocation.service.ts
api/user.service.ts
api/userTrip.service.ts
api/userTripLocation.service.ts
api/userTripWorkLog.service.ts
api/vessel.service.ts
api/zone.service.ts
configuration.ts
encoder.ts
git_push.sh
index.ts
model/accountTradePileItem.ts
model/accountTradePileItemJsonld.ts
model/accountTradePileItemJsonldContext.ts
model/accountTradePileItemJsonldContextOneOf.ts
model/apiAccountTradePileItemsGetCollection200Response.ts
model/apiAccountTradePileItemsGetCollection200ResponseHydraSearch.ts
model/apiAccountTradePileItemsGetCollection200ResponseHydraSearchHydraMappingInner.ts
model/apiAccountTradePileItemsGetCollection200ResponseHydraView.ts
model/apiCandidateStatsGetCollection200Response.ts
model/apiCandidatesGetCollection200Response.ts
model/apiGameAccountsGetCollection200Response.ts
model/apiLogAccountCreditsGetCollection200Response.ts
model/apiLogAccountProfitsGetCollection200Response.ts
model/apiLogAccountSoldItemsGetCollection200Response.ts
model/apiLogGeneralsGetCollection200Response.ts
model/apiLogTotalProfitsGetCollection200Response.ts
model/apiLocationsGetCollection200Response.ts
model/apiLocationsGetCollection200ResponseSearch.ts
model/apiLocationsGetCollection200ResponseSearchMappingInner.ts
model/apiLocationsGetCollection200ResponseView.ts
model/apiMediaObjectsGetCollection200Response.ts
model/apiPlayersGetCollection200Response.ts
model/apiRaritiesGetCollection200Response.ts
model/apiShippingCompaniesGetCollection200Response.ts
model/apiTripLocationsGetCollection200Response.ts
model/apiTripsGetCollection200Response.ts
model/apiUserTripLocationsGetCollection200Response.ts
model/apiUserTripWorkLogsGetCollection200Response.ts
model/apiUserTripsGetCollection200Response.ts
model/apiUsersGetCollection200Response.ts
model/candidate.ts
model/candidateJsonld.ts
model/candidateStatJsonld.ts
model/candidateStockAccountsJsonld.ts
model/config.ts
model/configJsonld.ts
model/gameAccount.ts
model/gameAccountJsonld.ts
model/logAccountCreditJsonld.ts
model/logAccountProfitJsonld.ts
model/logAccountSoldItemJsonld.ts
model/logGeneralJsonld.ts
model/logTotalProfit.ts
model/logTotalProfitJsonld.ts
model/apiVesselsGetCollection200Response.ts
model/apiZonesGetCollection200Response.ts
model/location.ts
model/locationJsonld.ts
model/locationJsonldContext.ts
model/locationJsonldContextOneOf.ts
model/loginCheckPost200Response.ts
model/loginCheckPostRequest.ts
model/mediaObjectJsonldMediaObjectRead.ts
model/modeConfig.ts
model/modeConfigJsonld.ts
model/models.ts
model/player.ts
model/playerJsonld.ts
model/rarity.ts
model/rarityJsonld.ts
model/systemStatJsonld.ts
model/shippingCompany.ts
model/shippingCompanyJsonld.ts
model/trip.ts
model/tripJsonld.ts
model/tripLocation.ts
model/tripLocationJsonld.ts
model/user.ts
model/userJsonld.ts
model/userTrip.ts
model/userTripJsonld.ts
model/userTripLocation.ts
model/userTripLocationJsonld.ts
model/userTripWorkLog.ts
model/userTripWorkLogJsonld.ts
model/vessel.ts
model/vesselJsonld.ts
model/zone.ts
model/zoneJsonld.ts
param.ts
variables.ts

+ 19
- 31
angular/src/app/core/api/v1/api/api.ts Ver fichero

@@ -1,37 +1,25 @@
export * from './accountTradePileItem.service';
import { AccountTradePileItemService } from './accountTradePileItem.service';
export * from './candidate.service';
import { CandidateService } from './candidate.service';
export * from './candidateStat.service';
import { CandidateStatService } from './candidateStat.service';
export * from './candidateStockAccounts.service';
import { CandidateStockAccountsService } from './candidateStockAccounts.service';
export * from './config.service';
import { ConfigService } from './config.service';
export * from './gameAccount.service';
import { GameAccountService } from './gameAccount.service';
export * from './logAccountCredit.service';
import { LogAccountCreditService } from './logAccountCredit.service';
export * from './logAccountProfit.service';
import { LogAccountProfitService } from './logAccountProfit.service';
export * from './logAccountSoldItem.service';
import { LogAccountSoldItemService } from './logAccountSoldItem.service';
export * from './logGeneral.service';
import { LogGeneralService } from './logGeneral.service';
export * from './logTotalProfit.service';
import { LogTotalProfitService } from './logTotalProfit.service';
export * from './location.service';
import { LocationService } from './location.service';
export * from './loginCheck.service';
import { LoginCheckService } from './loginCheck.service';
export * from './mediaObject.service';
import { MediaObjectService } from './mediaObject.service';
export * from './modeConfig.service';
import { ModeConfigService } from './modeConfig.service';
export * from './player.service';
import { PlayerService } from './player.service';
export * from './rarity.service';
import { RarityService } from './rarity.service';
export * from './systemStat.service';
import { SystemStatService } from './systemStat.service';
export * from './shippingCompany.service';
import { ShippingCompanyService } from './shippingCompany.service';
export * from './trip.service';
import { TripService } from './trip.service';
export * from './tripLocation.service';
import { TripLocationService } from './tripLocation.service';
export * from './user.service';
import { UserService } from './user.service';
export const APIS = [AccountTradePileItemService, CandidateService, CandidateStatService, CandidateStockAccountsService, ConfigService, GameAccountService, LogAccountCreditService, LogAccountProfitService, LogAccountSoldItemService, LogGeneralService, LogTotalProfitService, LoginCheckService, MediaObjectService, ModeConfigService, PlayerService, RarityService, SystemStatService, UserService];
export * from './userTrip.service';
import { UserTripService } from './userTrip.service';
export * from './userTripLocation.service';
import { UserTripLocationService } from './userTripLocation.service';
export * from './userTripWorkLog.service';
import { UserTripWorkLogService } from './userTripWorkLog.service';
export * from './vessel.service';
import { VesselService } from './vessel.service';
export * from './zone.service';
import { ZoneService } from './zone.service';
export const APIS = [LocationService, LoginCheckService, MediaObjectService, ShippingCompanyService, TripService, TripLocationService, UserService, UserTripService, UserTripLocationService, UserTripWorkLogService, VesselService, ZoneService];

+ 434
- 0
angular/src/app/core/api/v1/api/location.service.ts Ver fichero

@@ -0,0 +1,434 @@
/**
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* 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, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';

// @ts-ignore
import { ApiLocationsGetCollection200Response } from '../model/apiLocationsGetCollection200Response';
// @ts-ignore
import { Location } from '../model/location';
// @ts-ignore
import { LocationJsonld } from '../model/locationJsonld';

// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';



@Injectable({
providedIn: 'root'
})
export class LocationService {

protected basePath = 'http://localhost';
public defaultHeaders = new HttpHeaders();
public configuration = new Configuration();
public encoder: HttpParameterCodec;

constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) {
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
if (Array.isArray(basePath) && basePath.length > 0) {
basePath = basePath[0];
}

if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}


// @ts-ignore
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
} else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}

private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
if (value == null) {
return httpParams;
}

if (typeof value === "object") {
if (Array.isArray(value)) {
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
} else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
} else {
throw Error("key may not be null if value is Date");
}
} else {
Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
httpParams, value[k], key != null ? `${key}.${k}` : k));
}
} else if (key != null) {
httpParams = httpParams.append(key, value);
} else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}

/**
* Retrieves the collection of Location resources.
* Retrieves the collection of Location resources.
* @param page The collection page number
* @param itemsPerPage The number of items per page
* @param name
* @param customJsonFilter
* @param customJsonOrder
* @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 locationsGetCollection(page?: number, itemsPerPage?: number, name?: string, customJsonFilter?: string, customJsonOrder?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiLocationsGetCollection200Response>;
public locationsGetCollection(page?: number, itemsPerPage?: number, name?: string, customJsonFilter?: string, customJsonOrder?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiLocationsGetCollection200Response>>;
public locationsGetCollection(page?: number, itemsPerPage?: number, name?: string, customJsonFilter?: string, customJsonOrder?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiLocationsGetCollection200Response>>;
public locationsGetCollection(page?: number, itemsPerPage?: number, name?: string, customJsonFilter?: string, customJsonOrder?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {

let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>page, 'page');
}
if (itemsPerPage !== undefined && itemsPerPage !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>itemsPerPage, 'itemsPerPage');
}
if (name !== undefined && name !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>name, 'name');
}
if (customJsonFilter !== undefined && customJsonFilter !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>customJsonFilter, 'custom_json_filter');
}
if (customJsonOrder !== undefined && customJsonOrder !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>customJsonOrder, 'custom_json_order');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/locations`;
return this.httpClient.request<ApiLocationsGetCollection200Response>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Retrieves a Location resource.
* Retrieves a Location resource.
* @param id Location identifier
* @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 locationsIdGet(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<LocationJsonld>;
public locationsIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<LocationJsonld>>;
public locationsIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<LocationJsonld>>;
public locationsIdGet(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling locationsIdGet.');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/locations/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<LocationJsonld>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Updates the Location resource.
* Updates the Location resource.
* @param id Location identifier
* @param location The updated Location resource
* @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 locationsIdPatch(id: string, location: Location, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<LocationJsonld>;
public locationsIdPatch(id: string, location: Location, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<LocationJsonld>>;
public locationsIdPatch(id: string, location: Location, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<LocationJsonld>>;
public locationsIdPatch(id: string, location: Location, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling locationsIdPatch.');
}
if (location === null || location === undefined) {
throw new Error('Required parameter location was null or undefined when calling locationsIdPatch.');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


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

let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/locations/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<LocationJsonld>('patch', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: location,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

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

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


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

let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/locations`;
return this.httpClient.request<LocationJsonld>('post', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: locationJsonld,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

}

+ 1
- 1
angular/src/app/core/api/v1/api/loginCheck.service.ts Ver fichero

@@ -1,5 +1,5 @@
/**
* Hello API Platform
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0


+ 1
- 1
angular/src/app/core/api/v1/api/mediaObject.service.ts Ver fichero

@@ -1,5 +1,5 @@
/**
* Hello API Platform
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0


+ 434
- 0
angular/src/app/core/api/v1/api/shippingCompany.service.ts Ver fichero

@@ -0,0 +1,434 @@
/**
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* 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, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';

// @ts-ignore
import { ApiShippingCompaniesGetCollection200Response } from '../model/apiShippingCompaniesGetCollection200Response';
// @ts-ignore
import { ShippingCompany } from '../model/shippingCompany';
// @ts-ignore
import { ShippingCompanyJsonld } from '../model/shippingCompanyJsonld';

// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';



@Injectable({
providedIn: 'root'
})
export class ShippingCompanyService {

protected basePath = 'http://localhost';
public defaultHeaders = new HttpHeaders();
public configuration = new Configuration();
public encoder: HttpParameterCodec;

constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) {
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
if (Array.isArray(basePath) && basePath.length > 0) {
basePath = basePath[0];
}

if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}


// @ts-ignore
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
} else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}

private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
if (value == null) {
return httpParams;
}

if (typeof value === "object") {
if (Array.isArray(value)) {
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
} else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
} else {
throw Error("key may not be null if value is Date");
}
} else {
Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
httpParams, value[k], key != null ? `${key}.${k}` : k));
}
} else if (key != null) {
httpParams = httpParams.append(key, value);
} else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}

/**
* Retrieves the collection of ShippingCompany resources.
* Retrieves the collection of ShippingCompany resources.
* @param page The collection page number
* @param itemsPerPage The number of items per page
* @param name
* @param customJsonFilter
* @param customJsonOrder
* @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 shippingCompaniesGetCollection(page?: number, itemsPerPage?: number, name?: string, customJsonFilter?: string, customJsonOrder?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiShippingCompaniesGetCollection200Response>;
public shippingCompaniesGetCollection(page?: number, itemsPerPage?: number, name?: string, customJsonFilter?: string, customJsonOrder?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiShippingCompaniesGetCollection200Response>>;
public shippingCompaniesGetCollection(page?: number, itemsPerPage?: number, name?: string, customJsonFilter?: string, customJsonOrder?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiShippingCompaniesGetCollection200Response>>;
public shippingCompaniesGetCollection(page?: number, itemsPerPage?: number, name?: string, customJsonFilter?: string, customJsonOrder?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {

let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>page, 'page');
}
if (itemsPerPage !== undefined && itemsPerPage !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>itemsPerPage, 'itemsPerPage');
}
if (name !== undefined && name !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>name, 'name');
}
if (customJsonFilter !== undefined && customJsonFilter !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>customJsonFilter, 'custom_json_filter');
}
if (customJsonOrder !== undefined && customJsonOrder !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>customJsonOrder, 'custom_json_order');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/shipping_companies`;
return this.httpClient.request<ApiShippingCompaniesGetCollection200Response>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Retrieves a ShippingCompany resource.
* Retrieves a ShippingCompany resource.
* @param id ShippingCompany identifier
* @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 shippingCompaniesIdGet(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<ShippingCompanyJsonld>;
public shippingCompaniesIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ShippingCompanyJsonld>>;
public shippingCompaniesIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ShippingCompanyJsonld>>;
public shippingCompaniesIdGet(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling shippingCompaniesIdGet.');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/shipping_companies/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<ShippingCompanyJsonld>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Updates the ShippingCompany resource.
* Updates the ShippingCompany resource.
* @param id ShippingCompany identifier
* @param shippingCompany The updated ShippingCompany resource
* @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 shippingCompaniesIdPatch(id: string, shippingCompany: ShippingCompany, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<ShippingCompanyJsonld>;
public shippingCompaniesIdPatch(id: string, shippingCompany: ShippingCompany, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ShippingCompanyJsonld>>;
public shippingCompaniesIdPatch(id: string, shippingCompany: ShippingCompany, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ShippingCompanyJsonld>>;
public shippingCompaniesIdPatch(id: string, shippingCompany: ShippingCompany, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling shippingCompaniesIdPatch.');
}
if (shippingCompany === null || shippingCompany === undefined) {
throw new Error('Required parameter shippingCompany was null or undefined when calling shippingCompaniesIdPatch.');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


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

let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/shipping_companies/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<ShippingCompanyJsonld>('patch', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: shippingCompany,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

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

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


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

let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/shipping_companies`;
return this.httpClient.request<ShippingCompanyJsonld>('post', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: shippingCompanyJsonld,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

}

+ 419
- 0
angular/src/app/core/api/v1/api/trip.service.ts Ver fichero

@@ -0,0 +1,419 @@
/**
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* 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, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';

// @ts-ignore
import { ApiTripsGetCollection200Response } from '../model/apiTripsGetCollection200Response';
// @ts-ignore
import { Trip } from '../model/trip';
// @ts-ignore
import { TripJsonld } from '../model/tripJsonld';

// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';



@Injectable({
providedIn: 'root'
})
export class TripService {

protected basePath = 'http://localhost';
public defaultHeaders = new HttpHeaders();
public configuration = new Configuration();
public encoder: HttpParameterCodec;

constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) {
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
if (Array.isArray(basePath) && basePath.length > 0) {
basePath = basePath[0];
}

if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}


// @ts-ignore
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
} else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}

private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
if (value == null) {
return httpParams;
}

if (typeof value === "object") {
if (Array.isArray(value)) {
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
} else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
} else {
throw Error("key may not be null if value is Date");
}
} else {
Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
httpParams, value[k], key != null ? `${key}.${k}` : k));
}
} else if (key != null) {
httpParams = httpParams.append(key, value);
} else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}

/**
* Retrieves the collection of Trip resources.
* Retrieves the collection of Trip resources.
* @param page The collection page number
* @param itemsPerPage The number of items per page
* @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 tripsGetCollection(page?: number, itemsPerPage?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiTripsGetCollection200Response>;
public tripsGetCollection(page?: number, itemsPerPage?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiTripsGetCollection200Response>>;
public tripsGetCollection(page?: number, itemsPerPage?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiTripsGetCollection200Response>>;
public tripsGetCollection(page?: number, itemsPerPage?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {

let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>page, 'page');
}
if (itemsPerPage !== undefined && itemsPerPage !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>itemsPerPage, 'itemsPerPage');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/trips`;
return this.httpClient.request<ApiTripsGetCollection200Response>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Retrieves a Trip resource.
* Retrieves a Trip resource.
* @param id Trip identifier
* @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 tripsIdGet(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<TripJsonld>;
public tripsIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<TripJsonld>>;
public tripsIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<TripJsonld>>;
public tripsIdGet(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling tripsIdGet.');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/trips/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<TripJsonld>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Updates the Trip resource.
* Updates the Trip resource.
* @param id Trip identifier
* @param trip The updated Trip resource
* @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 tripsIdPatch(id: string, trip: Trip, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<TripJsonld>;
public tripsIdPatch(id: string, trip: Trip, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<TripJsonld>>;
public tripsIdPatch(id: string, trip: Trip, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<TripJsonld>>;
public tripsIdPatch(id: string, trip: Trip, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling tripsIdPatch.');
}
if (trip === null || trip === undefined) {
throw new Error('Required parameter trip was null or undefined when calling tripsIdPatch.');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


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

let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/trips/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<TripJsonld>('patch', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: trip,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

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

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


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

let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/trips`;
return this.httpClient.request<TripJsonld>('post', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: tripJsonld,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

}

+ 419
- 0
angular/src/app/core/api/v1/api/tripLocation.service.ts Ver fichero

@@ -0,0 +1,419 @@
/**
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* 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, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';

// @ts-ignore
import { ApiTripLocationsGetCollection200Response } from '../model/apiTripLocationsGetCollection200Response';
// @ts-ignore
import { TripLocation } from '../model/tripLocation';
// @ts-ignore
import { TripLocationJsonld } from '../model/tripLocationJsonld';

// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';



@Injectable({
providedIn: 'root'
})
export class TripLocationService {

protected basePath = 'http://localhost';
public defaultHeaders = new HttpHeaders();
public configuration = new Configuration();
public encoder: HttpParameterCodec;

constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) {
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
if (Array.isArray(basePath) && basePath.length > 0) {
basePath = basePath[0];
}

if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}


// @ts-ignore
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
} else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}

private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
if (value == null) {
return httpParams;
}

if (typeof value === "object") {
if (Array.isArray(value)) {
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
} else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
} else {
throw Error("key may not be null if value is Date");
}
} else {
Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
httpParams, value[k], key != null ? `${key}.${k}` : k));
}
} else if (key != null) {
httpParams = httpParams.append(key, value);
} else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}

/**
* Retrieves the collection of TripLocation resources.
* Retrieves the collection of TripLocation resources.
* @param page The collection page number
* @param itemsPerPage The number of items per page
* @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 tripLocationsGetCollection(page?: number, itemsPerPage?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiTripLocationsGetCollection200Response>;
public tripLocationsGetCollection(page?: number, itemsPerPage?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiTripLocationsGetCollection200Response>>;
public tripLocationsGetCollection(page?: number, itemsPerPage?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiTripLocationsGetCollection200Response>>;
public tripLocationsGetCollection(page?: number, itemsPerPage?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {

let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>page, 'page');
}
if (itemsPerPage !== undefined && itemsPerPage !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>itemsPerPage, 'itemsPerPage');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/trip_locations`;
return this.httpClient.request<ApiTripLocationsGetCollection200Response>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Retrieves a TripLocation resource.
* Retrieves a TripLocation resource.
* @param id TripLocation identifier
* @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 tripLocationsIdGet(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<TripLocationJsonld>;
public tripLocationsIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<TripLocationJsonld>>;
public tripLocationsIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<TripLocationJsonld>>;
public tripLocationsIdGet(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling tripLocationsIdGet.');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/trip_locations/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<TripLocationJsonld>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Updates the TripLocation resource.
* Updates the TripLocation resource.
* @param id TripLocation identifier
* @param tripLocation The updated TripLocation resource
* @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 tripLocationsIdPatch(id: string, tripLocation: TripLocation, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<TripLocationJsonld>;
public tripLocationsIdPatch(id: string, tripLocation: TripLocation, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<TripLocationJsonld>>;
public tripLocationsIdPatch(id: string, tripLocation: TripLocation, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<TripLocationJsonld>>;
public tripLocationsIdPatch(id: string, tripLocation: TripLocation, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling tripLocationsIdPatch.');
}
if (tripLocation === null || tripLocation === undefined) {
throw new Error('Required parameter tripLocation was null or undefined when calling tripLocationsIdPatch.');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


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

let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/trip_locations/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<TripLocationJsonld>('patch', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: tripLocation,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

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

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


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

let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/trip_locations`;
return this.httpClient.request<TripLocationJsonld>('post', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: tripLocationJsonld,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

}

+ 89
- 1
angular/src/app/core/api/v1/api/user.service.ts Ver fichero

@@ -1,5 +1,5 @@
/**
* Hello API Platform
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
@@ -21,6 +21,8 @@ import { Observable } from 'rxjs';
// @ts-ignore
import { ApiUsersGetCollection200Response } from '../model/apiUsersGetCollection200Response';
// @ts-ignore
import { User } from '../model/user';
// @ts-ignore
import { UserJsonld } from '../model/userJsonld';

// @ts-ignore
@@ -266,6 +268,92 @@ export class UserService {
);
}

/**
* Updates the User resource.
* Updates the User resource.
* @param id User identifier
* @param user The updated User resource
* @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 usersIdPatch(id: string, user: User, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<UserJsonld>;
public usersIdPatch(id: string, user: User, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<UserJsonld>>;
public usersIdPatch(id: string, user: User, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<UserJsonld>>;
public usersIdPatch(id: string, user: User, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling usersIdPatch.');
}
if (user === null || user === undefined) {
throw new Error('Required parameter user was null or undefined when calling usersIdPatch.');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


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

let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/users/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<UserJsonld>('patch', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: user,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Creates a User resource.
* Creates a User resource.


+ 419
- 0
angular/src/app/core/api/v1/api/userTrip.service.ts Ver fichero

@@ -0,0 +1,419 @@
/**
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* 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, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';

// @ts-ignore
import { ApiUserTripsGetCollection200Response } from '../model/apiUserTripsGetCollection200Response';
// @ts-ignore
import { UserTrip } from '../model/userTrip';
// @ts-ignore
import { UserTripJsonld } from '../model/userTripJsonld';

// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';



@Injectable({
providedIn: 'root'
})
export class UserTripService {

protected basePath = 'http://localhost';
public defaultHeaders = new HttpHeaders();
public configuration = new Configuration();
public encoder: HttpParameterCodec;

constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) {
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
if (Array.isArray(basePath) && basePath.length > 0) {
basePath = basePath[0];
}

if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}


// @ts-ignore
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
} else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}

private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
if (value == null) {
return httpParams;
}

if (typeof value === "object") {
if (Array.isArray(value)) {
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
} else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
} else {
throw Error("key may not be null if value is Date");
}
} else {
Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
httpParams, value[k], key != null ? `${key}.${k}` : k));
}
} else if (key != null) {
httpParams = httpParams.append(key, value);
} else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}

/**
* Retrieves the collection of UserTrip resources.
* Retrieves the collection of UserTrip resources.
* @param page The collection page number
* @param itemsPerPage The number of items per page
* @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 userTripsGetCollection(page?: number, itemsPerPage?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiUserTripsGetCollection200Response>;
public userTripsGetCollection(page?: number, itemsPerPage?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiUserTripsGetCollection200Response>>;
public userTripsGetCollection(page?: number, itemsPerPage?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiUserTripsGetCollection200Response>>;
public userTripsGetCollection(page?: number, itemsPerPage?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {

let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>page, 'page');
}
if (itemsPerPage !== undefined && itemsPerPage !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>itemsPerPage, 'itemsPerPage');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/user_trips`;
return this.httpClient.request<ApiUserTripsGetCollection200Response>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Retrieves a UserTrip resource.
* Retrieves a UserTrip resource.
* @param id UserTrip identifier
* @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 userTripsIdGet(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<UserTripJsonld>;
public userTripsIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<UserTripJsonld>>;
public userTripsIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<UserTripJsonld>>;
public userTripsIdGet(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling userTripsIdGet.');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/user_trips/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<UserTripJsonld>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Updates the UserTrip resource.
* Updates the UserTrip resource.
* @param id UserTrip identifier
* @param userTrip The updated UserTrip resource
* @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 userTripsIdPatch(id: string, userTrip: UserTrip, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<UserTripJsonld>;
public userTripsIdPatch(id: string, userTrip: UserTrip, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<UserTripJsonld>>;
public userTripsIdPatch(id: string, userTrip: UserTrip, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<UserTripJsonld>>;
public userTripsIdPatch(id: string, userTrip: UserTrip, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling userTripsIdPatch.');
}
if (userTrip === null || userTrip === undefined) {
throw new Error('Required parameter userTrip was null or undefined when calling userTripsIdPatch.');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


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

let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/user_trips/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<UserTripJsonld>('patch', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: userTrip,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

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

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


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

let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/user_trips`;
return this.httpClient.request<UserTripJsonld>('post', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: userTripJsonld,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

}

+ 419
- 0
angular/src/app/core/api/v1/api/userTripLocation.service.ts Ver fichero

@@ -0,0 +1,419 @@
/**
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* 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, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';

// @ts-ignore
import { ApiUserTripLocationsGetCollection200Response } from '../model/apiUserTripLocationsGetCollection200Response';
// @ts-ignore
import { UserTripLocation } from '../model/userTripLocation';
// @ts-ignore
import { UserTripLocationJsonld } from '../model/userTripLocationJsonld';

// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';



@Injectable({
providedIn: 'root'
})
export class UserTripLocationService {

protected basePath = 'http://localhost';
public defaultHeaders = new HttpHeaders();
public configuration = new Configuration();
public encoder: HttpParameterCodec;

constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) {
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
if (Array.isArray(basePath) && basePath.length > 0) {
basePath = basePath[0];
}

if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}


// @ts-ignore
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
} else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}

private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
if (value == null) {
return httpParams;
}

if (typeof value === "object") {
if (Array.isArray(value)) {
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
} else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
} else {
throw Error("key may not be null if value is Date");
}
} else {
Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
httpParams, value[k], key != null ? `${key}.${k}` : k));
}
} else if (key != null) {
httpParams = httpParams.append(key, value);
} else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}

/**
* Retrieves the collection of UserTripLocation resources.
* Retrieves the collection of UserTripLocation resources.
* @param page The collection page number
* @param itemsPerPage The number of items per page
* @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 userTripLocationsGetCollection(page?: number, itemsPerPage?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiUserTripLocationsGetCollection200Response>;
public userTripLocationsGetCollection(page?: number, itemsPerPage?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiUserTripLocationsGetCollection200Response>>;
public userTripLocationsGetCollection(page?: number, itemsPerPage?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiUserTripLocationsGetCollection200Response>>;
public userTripLocationsGetCollection(page?: number, itemsPerPage?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {

let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>page, 'page');
}
if (itemsPerPage !== undefined && itemsPerPage !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>itemsPerPage, 'itemsPerPage');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/user_trip_locations`;
return this.httpClient.request<ApiUserTripLocationsGetCollection200Response>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Retrieves a UserTripLocation resource.
* Retrieves a UserTripLocation resource.
* @param id UserTripLocation identifier
* @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 userTripLocationsIdGet(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<UserTripLocationJsonld>;
public userTripLocationsIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<UserTripLocationJsonld>>;
public userTripLocationsIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<UserTripLocationJsonld>>;
public userTripLocationsIdGet(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling userTripLocationsIdGet.');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/user_trip_locations/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<UserTripLocationJsonld>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Updates the UserTripLocation resource.
* Updates the UserTripLocation resource.
* @param id UserTripLocation identifier
* @param userTripLocation The updated UserTripLocation resource
* @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 userTripLocationsIdPatch(id: string, userTripLocation: UserTripLocation, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<UserTripLocationJsonld>;
public userTripLocationsIdPatch(id: string, userTripLocation: UserTripLocation, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<UserTripLocationJsonld>>;
public userTripLocationsIdPatch(id: string, userTripLocation: UserTripLocation, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<UserTripLocationJsonld>>;
public userTripLocationsIdPatch(id: string, userTripLocation: UserTripLocation, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling userTripLocationsIdPatch.');
}
if (userTripLocation === null || userTripLocation === undefined) {
throw new Error('Required parameter userTripLocation was null or undefined when calling userTripLocationsIdPatch.');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


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

let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/user_trip_locations/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<UserTripLocationJsonld>('patch', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: userTripLocation,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

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

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


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

let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/user_trip_locations`;
return this.httpClient.request<UserTripLocationJsonld>('post', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: userTripLocationJsonld,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

}

+ 419
- 0
angular/src/app/core/api/v1/api/userTripWorkLog.service.ts Ver fichero

@@ -0,0 +1,419 @@
/**
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* 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, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';

// @ts-ignore
import { ApiUserTripWorkLogsGetCollection200Response } from '../model/apiUserTripWorkLogsGetCollection200Response';
// @ts-ignore
import { UserTripWorkLog } from '../model/userTripWorkLog';
// @ts-ignore
import { UserTripWorkLogJsonld } from '../model/userTripWorkLogJsonld';

// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';



@Injectable({
providedIn: 'root'
})
export class UserTripWorkLogService {

protected basePath = 'http://localhost';
public defaultHeaders = new HttpHeaders();
public configuration = new Configuration();
public encoder: HttpParameterCodec;

constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) {
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
if (Array.isArray(basePath) && basePath.length > 0) {
basePath = basePath[0];
}

if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}


// @ts-ignore
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
} else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}

private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
if (value == null) {
return httpParams;
}

if (typeof value === "object") {
if (Array.isArray(value)) {
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
} else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
} else {
throw Error("key may not be null if value is Date");
}
} else {
Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
httpParams, value[k], key != null ? `${key}.${k}` : k));
}
} else if (key != null) {
httpParams = httpParams.append(key, value);
} else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}

/**
* Retrieves the collection of UserTripWorkLog resources.
* Retrieves the collection of UserTripWorkLog resources.
* @param page The collection page number
* @param itemsPerPage The number of items per page
* @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 userTripWorkLogsGetCollection(page?: number, itemsPerPage?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiUserTripWorkLogsGetCollection200Response>;
public userTripWorkLogsGetCollection(page?: number, itemsPerPage?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiUserTripWorkLogsGetCollection200Response>>;
public userTripWorkLogsGetCollection(page?: number, itemsPerPage?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiUserTripWorkLogsGetCollection200Response>>;
public userTripWorkLogsGetCollection(page?: number, itemsPerPage?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {

let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>page, 'page');
}
if (itemsPerPage !== undefined && itemsPerPage !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>itemsPerPage, 'itemsPerPage');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/user_trip_work_logs`;
return this.httpClient.request<ApiUserTripWorkLogsGetCollection200Response>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Retrieves a UserTripWorkLog resource.
* Retrieves a UserTripWorkLog resource.
* @param id UserTripWorkLog identifier
* @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 userTripWorkLogsIdGet(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<UserTripWorkLogJsonld>;
public userTripWorkLogsIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<UserTripWorkLogJsonld>>;
public userTripWorkLogsIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<UserTripWorkLogJsonld>>;
public userTripWorkLogsIdGet(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling userTripWorkLogsIdGet.');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/user_trip_work_logs/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<UserTripWorkLogJsonld>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Updates the UserTripWorkLog resource.
* Updates the UserTripWorkLog resource.
* @param id UserTripWorkLog identifier
* @param userTripWorkLog The updated UserTripWorkLog resource
* @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 userTripWorkLogsIdPatch(id: string, userTripWorkLog: UserTripWorkLog, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<UserTripWorkLogJsonld>;
public userTripWorkLogsIdPatch(id: string, userTripWorkLog: UserTripWorkLog, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<UserTripWorkLogJsonld>>;
public userTripWorkLogsIdPatch(id: string, userTripWorkLog: UserTripWorkLog, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<UserTripWorkLogJsonld>>;
public userTripWorkLogsIdPatch(id: string, userTripWorkLog: UserTripWorkLog, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling userTripWorkLogsIdPatch.');
}
if (userTripWorkLog === null || userTripWorkLog === undefined) {
throw new Error('Required parameter userTripWorkLog was null or undefined when calling userTripWorkLogsIdPatch.');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


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

let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/user_trip_work_logs/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<UserTripWorkLogJsonld>('patch', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: userTripWorkLog,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

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

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


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

let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/user_trip_work_logs`;
return this.httpClient.request<UserTripWorkLogJsonld>('post', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: userTripWorkLogJsonld,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

}

+ 434
- 0
angular/src/app/core/api/v1/api/vessel.service.ts Ver fichero

@@ -0,0 +1,434 @@
/**
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* 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, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';

// @ts-ignore
import { ApiVesselsGetCollection200Response } from '../model/apiVesselsGetCollection200Response';
// @ts-ignore
import { Vessel } from '../model/vessel';
// @ts-ignore
import { VesselJsonld } from '../model/vesselJsonld';

// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';



@Injectable({
providedIn: 'root'
})
export class VesselService {

protected basePath = 'http://localhost';
public defaultHeaders = new HttpHeaders();
public configuration = new Configuration();
public encoder: HttpParameterCodec;

constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) {
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
if (Array.isArray(basePath) && basePath.length > 0) {
basePath = basePath[0];
}

if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}


// @ts-ignore
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
} else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}

private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
if (value == null) {
return httpParams;
}

if (typeof value === "object") {
if (Array.isArray(value)) {
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
} else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
} else {
throw Error("key may not be null if value is Date");
}
} else {
Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
httpParams, value[k], key != null ? `${key}.${k}` : k));
}
} else if (key != null) {
httpParams = httpParams.append(key, value);
} else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}

/**
* Retrieves the collection of Vessel resources.
* Retrieves the collection of Vessel resources.
* @param page The collection page number
* @param itemsPerPage The number of items per page
* @param name
* @param customJsonFilter
* @param customJsonOrder
* @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 vesselsGetCollection(page?: number, itemsPerPage?: number, name?: string, customJsonFilter?: string, customJsonOrder?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiVesselsGetCollection200Response>;
public vesselsGetCollection(page?: number, itemsPerPage?: number, name?: string, customJsonFilter?: string, customJsonOrder?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiVesselsGetCollection200Response>>;
public vesselsGetCollection(page?: number, itemsPerPage?: number, name?: string, customJsonFilter?: string, customJsonOrder?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiVesselsGetCollection200Response>>;
public vesselsGetCollection(page?: number, itemsPerPage?: number, name?: string, customJsonFilter?: string, customJsonOrder?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {

let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>page, 'page');
}
if (itemsPerPage !== undefined && itemsPerPage !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>itemsPerPage, 'itemsPerPage');
}
if (name !== undefined && name !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>name, 'name');
}
if (customJsonFilter !== undefined && customJsonFilter !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>customJsonFilter, 'custom_json_filter');
}
if (customJsonOrder !== undefined && customJsonOrder !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>customJsonOrder, 'custom_json_order');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/vessels`;
return this.httpClient.request<ApiVesselsGetCollection200Response>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Retrieves a Vessel resource.
* Retrieves a Vessel resource.
* @param id Vessel identifier
* @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 vesselsIdGet(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<VesselJsonld>;
public vesselsIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<VesselJsonld>>;
public vesselsIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<VesselJsonld>>;
public vesselsIdGet(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling vesselsIdGet.');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/vessels/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<VesselJsonld>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Updates the Vessel resource.
* Updates the Vessel resource.
* @param id Vessel identifier
* @param vessel The updated Vessel resource
* @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 vesselsIdPatch(id: string, vessel: Vessel, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<VesselJsonld>;
public vesselsIdPatch(id: string, vessel: Vessel, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<VesselJsonld>>;
public vesselsIdPatch(id: string, vessel: Vessel, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<VesselJsonld>>;
public vesselsIdPatch(id: string, vessel: Vessel, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling vesselsIdPatch.');
}
if (vessel === null || vessel === undefined) {
throw new Error('Required parameter vessel was null or undefined when calling vesselsIdPatch.');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


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

let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/vessels/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<VesselJsonld>('patch', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: vessel,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

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

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


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

let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/vessels`;
return this.httpClient.request<VesselJsonld>('post', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: vesselJsonld,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

}

+ 434
- 0
angular/src/app/core/api/v1/api/zone.service.ts Ver fichero

@@ -0,0 +1,434 @@
/**
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* 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, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';

// @ts-ignore
import { ApiZonesGetCollection200Response } from '../model/apiZonesGetCollection200Response';
// @ts-ignore
import { Zone } from '../model/zone';
// @ts-ignore
import { ZoneJsonld } from '../model/zoneJsonld';

// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';



@Injectable({
providedIn: 'root'
})
export class ZoneService {

protected basePath = 'http://localhost';
public defaultHeaders = new HttpHeaders();
public configuration = new Configuration();
public encoder: HttpParameterCodec;

constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) {
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
if (Array.isArray(basePath) && basePath.length > 0) {
basePath = basePath[0];
}

if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}


// @ts-ignore
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
} else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}

private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
if (value == null) {
return httpParams;
}

if (typeof value === "object") {
if (Array.isArray(value)) {
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
} else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
} else {
throw Error("key may not be null if value is Date");
}
} else {
Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
httpParams, value[k], key != null ? `${key}.${k}` : k));
}
} else if (key != null) {
httpParams = httpParams.append(key, value);
} else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}

/**
* Retrieves the collection of Zone resources.
* Retrieves the collection of Zone resources.
* @param page The collection page number
* @param itemsPerPage The number of items per page
* @param name
* @param customJsonFilter
* @param customJsonOrder
* @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 zonesGetCollection(page?: number, itemsPerPage?: number, name?: string, customJsonFilter?: string, customJsonOrder?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiZonesGetCollection200Response>;
public zonesGetCollection(page?: number, itemsPerPage?: number, name?: string, customJsonFilter?: string, customJsonOrder?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiZonesGetCollection200Response>>;
public zonesGetCollection(page?: number, itemsPerPage?: number, name?: string, customJsonFilter?: string, customJsonOrder?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiZonesGetCollection200Response>>;
public zonesGetCollection(page?: number, itemsPerPage?: number, name?: string, customJsonFilter?: string, customJsonOrder?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {

let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>page, 'page');
}
if (itemsPerPage !== undefined && itemsPerPage !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>itemsPerPage, 'itemsPerPage');
}
if (name !== undefined && name !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>name, 'name');
}
if (customJsonFilter !== undefined && customJsonFilter !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>customJsonFilter, 'custom_json_filter');
}
if (customJsonOrder !== undefined && customJsonOrder !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>customJsonOrder, 'custom_json_order');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/zones`;
return this.httpClient.request<ApiZonesGetCollection200Response>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Retrieves a Zone resource.
* Retrieves a Zone resource.
* @param id Zone identifier
* @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 zonesIdGet(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<ZoneJsonld>;
public zonesIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ZoneJsonld>>;
public zonesIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ZoneJsonld>>;
public zonesIdGet(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling zonesIdGet.');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/zones/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<ZoneJsonld>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Updates the Zone resource.
* Updates the Zone resource.
* @param id Zone identifier
* @param zone The updated Zone resource
* @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 zonesIdPatch(id: string, zone: Zone, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<ZoneJsonld>;
public zonesIdPatch(id: string, zone: Zone, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ZoneJsonld>>;
public zonesIdPatch(id: string, zone: Zone, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ZoneJsonld>>;
public zonesIdPatch(id: string, zone: Zone, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling zonesIdPatch.');
}
if (zone === null || zone === undefined) {
throw new Error('Required parameter zone was null or undefined when calling zonesIdPatch.');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


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

let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/zones/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<ZoneJsonld>('patch', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: zone,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

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

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


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

let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/zones`;
return this.httpClient.request<ZoneJsonld>('post', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: zoneJsonld,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

}

+ 23
- 0
angular/src/app/core/api/v1/model/apiLocationsGetCollection200Response.ts Ver fichero

@@ -0,0 +1,23 @@
/**
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { ApiLocationsGetCollection200ResponseSearch } from './apiLocationsGetCollection200ResponseSearch';
import { ApiLocationsGetCollection200ResponseView } from './apiLocationsGetCollection200ResponseView';
import { LocationJsonld } from './locationJsonld';


export interface ApiLocationsGetCollection200Response {
member: Array<LocationJsonld>;
totalItems?: number;
view?: ApiLocationsGetCollection200ResponseView;
search?: ApiLocationsGetCollection200ResponseSearch;
}


+ 21
- 0
angular/src/app/core/api/v1/model/apiLocationsGetCollection200ResponseSearch.ts Ver fichero

@@ -0,0 +1,21 @@
/**
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { ApiLocationsGetCollection200ResponseSearchMappingInner } from './apiLocationsGetCollection200ResponseSearchMappingInner';


export interface ApiLocationsGetCollection200ResponseSearch {
type?: string;
template?: string;
variableRepresentation?: string;
mapping?: Array<ApiLocationsGetCollection200ResponseSearchMappingInner>;
}


+ 20
- 0
angular/src/app/core/api/v1/model/apiLocationsGetCollection200ResponseSearchMappingInner.ts Ver fichero

@@ -0,0 +1,20 @@
/**
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


export interface ApiLocationsGetCollection200ResponseSearchMappingInner {
type?: string;
variable?: string;
property?: string | null;
required?: boolean;
}


+ 22
- 0
angular/src/app/core/api/v1/model/apiLocationsGetCollection200ResponseView.ts Ver fichero

@@ -0,0 +1,22 @@
/**
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


export interface ApiLocationsGetCollection200ResponseView {
id?: string;
type?: string;
first?: string;
last?: string;
previous?: string;
next?: string;
}


+ 7
- 7
angular/src/app/core/api/v1/model/apiMediaObjectsGetCollection200Response.ts Ver fichero

@@ -1,5 +1,5 @@
/**
* Hello API Platform
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
@@ -9,15 +9,15 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { ApiAccountTradePileItemsGetCollection200ResponseHydraView } from './apiAccountTradePileItemsGetCollection200ResponseHydraView';
import { ApiAccountTradePileItemsGetCollection200ResponseHydraSearch } from './apiAccountTradePileItemsGetCollection200ResponseHydraSearch';
import { ApiLocationsGetCollection200ResponseSearch } from './apiLocationsGetCollection200ResponseSearch';
import { ApiLocationsGetCollection200ResponseView } from './apiLocationsGetCollection200ResponseView';
import { MediaObjectJsonldMediaObjectRead } from './mediaObjectJsonldMediaObjectRead';


export interface ApiMediaObjectsGetCollection200Response {
'hydra:member': Array<MediaObjectJsonldMediaObjectRead>;
'hydra:totalItems'?: number;
'hydra:view'?: ApiAccountTradePileItemsGetCollection200ResponseHydraView;
'hydra:search'?: ApiAccountTradePileItemsGetCollection200ResponseHydraSearch;
member: Array<MediaObjectJsonldMediaObjectRead>;
totalItems?: number;
view?: ApiLocationsGetCollection200ResponseView;
search?: ApiLocationsGetCollection200ResponseSearch;
}


+ 23
- 0
angular/src/app/core/api/v1/model/apiShippingCompaniesGetCollection200Response.ts Ver fichero

@@ -0,0 +1,23 @@
/**
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { ApiLocationsGetCollection200ResponseSearch } from './apiLocationsGetCollection200ResponseSearch';
import { ApiLocationsGetCollection200ResponseView } from './apiLocationsGetCollection200ResponseView';
import { ShippingCompanyJsonld } from './shippingCompanyJsonld';


export interface ApiShippingCompaniesGetCollection200Response {
member: Array<ShippingCompanyJsonld>;
totalItems?: number;
view?: ApiLocationsGetCollection200ResponseView;
search?: ApiLocationsGetCollection200ResponseSearch;
}


+ 23
- 0
angular/src/app/core/api/v1/model/apiTripLocationsGetCollection200Response.ts Ver fichero

@@ -0,0 +1,23 @@
/**
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { ApiLocationsGetCollection200ResponseSearch } from './apiLocationsGetCollection200ResponseSearch';
import { ApiLocationsGetCollection200ResponseView } from './apiLocationsGetCollection200ResponseView';
import { TripLocationJsonld } from './tripLocationJsonld';


export interface ApiTripLocationsGetCollection200Response {
member: Array<TripLocationJsonld>;
totalItems?: number;
view?: ApiLocationsGetCollection200ResponseView;
search?: ApiLocationsGetCollection200ResponseSearch;
}


+ 23
- 0
angular/src/app/core/api/v1/model/apiTripsGetCollection200Response.ts Ver fichero

@@ -0,0 +1,23 @@
/**
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { ApiLocationsGetCollection200ResponseSearch } from './apiLocationsGetCollection200ResponseSearch';
import { ApiLocationsGetCollection200ResponseView } from './apiLocationsGetCollection200ResponseView';
import { TripJsonld } from './tripJsonld';


export interface ApiTripsGetCollection200Response {
member: Array<TripJsonld>;
totalItems?: number;
view?: ApiLocationsGetCollection200ResponseView;
search?: ApiLocationsGetCollection200ResponseSearch;
}


+ 23
- 0
angular/src/app/core/api/v1/model/apiUserTripLocationsGetCollection200Response.ts Ver fichero

@@ -0,0 +1,23 @@
/**
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { ApiLocationsGetCollection200ResponseSearch } from './apiLocationsGetCollection200ResponseSearch';
import { ApiLocationsGetCollection200ResponseView } from './apiLocationsGetCollection200ResponseView';
import { UserTripLocationJsonld } from './userTripLocationJsonld';


export interface ApiUserTripLocationsGetCollection200Response {
member: Array<UserTripLocationJsonld>;
totalItems?: number;
view?: ApiLocationsGetCollection200ResponseView;
search?: ApiLocationsGetCollection200ResponseSearch;
}


+ 23
- 0
angular/src/app/core/api/v1/model/apiUserTripWorkLogsGetCollection200Response.ts Ver fichero

@@ -0,0 +1,23 @@
/**
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { ApiLocationsGetCollection200ResponseSearch } from './apiLocationsGetCollection200ResponseSearch';
import { ApiLocationsGetCollection200ResponseView } from './apiLocationsGetCollection200ResponseView';
import { UserTripWorkLogJsonld } from './userTripWorkLogJsonld';


export interface ApiUserTripWorkLogsGetCollection200Response {
member: Array<UserTripWorkLogJsonld>;
totalItems?: number;
view?: ApiLocationsGetCollection200ResponseView;
search?: ApiLocationsGetCollection200ResponseSearch;
}


+ 23
- 0
angular/src/app/core/api/v1/model/apiUserTripsGetCollection200Response.ts Ver fichero

@@ -0,0 +1,23 @@
/**
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { ApiLocationsGetCollection200ResponseSearch } from './apiLocationsGetCollection200ResponseSearch';
import { ApiLocationsGetCollection200ResponseView } from './apiLocationsGetCollection200ResponseView';
import { UserTripJsonld } from './userTripJsonld';


export interface ApiUserTripsGetCollection200Response {
member: Array<UserTripJsonld>;
totalItems?: number;
view?: ApiLocationsGetCollection200ResponseView;
search?: ApiLocationsGetCollection200ResponseSearch;
}


+ 7
- 7
angular/src/app/core/api/v1/model/apiUsersGetCollection200Response.ts Ver fichero

@@ -1,5 +1,5 @@
/**
* Hello API Platform
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
@@ -9,15 +9,15 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { ApiAccountTradePileItemsGetCollection200ResponseHydraView } from './apiAccountTradePileItemsGetCollection200ResponseHydraView';
import { ApiLocationsGetCollection200ResponseSearch } from './apiLocationsGetCollection200ResponseSearch';
import { ApiLocationsGetCollection200ResponseView } from './apiLocationsGetCollection200ResponseView';
import { UserJsonld } from './userJsonld';
import { ApiAccountTradePileItemsGetCollection200ResponseHydraSearch } from './apiAccountTradePileItemsGetCollection200ResponseHydraSearch';


export interface ApiUsersGetCollection200Response {
'hydra:member': Array<UserJsonld>;
'hydra:totalItems'?: number;
'hydra:view'?: ApiAccountTradePileItemsGetCollection200ResponseHydraView;
'hydra:search'?: ApiAccountTradePileItemsGetCollection200ResponseHydraSearch;
member: Array<UserJsonld>;
totalItems?: number;
view?: ApiLocationsGetCollection200ResponseView;
search?: ApiLocationsGetCollection200ResponseSearch;
}


+ 23
- 0
angular/src/app/core/api/v1/model/apiVesselsGetCollection200Response.ts Ver fichero

@@ -0,0 +1,23 @@
/**
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { ApiLocationsGetCollection200ResponseSearch } from './apiLocationsGetCollection200ResponseSearch';
import { ApiLocationsGetCollection200ResponseView } from './apiLocationsGetCollection200ResponseView';
import { VesselJsonld } from './vesselJsonld';


export interface ApiVesselsGetCollection200Response {
member: Array<VesselJsonld>;
totalItems?: number;
view?: ApiLocationsGetCollection200ResponseView;
search?: ApiLocationsGetCollection200ResponseSearch;
}


+ 23
- 0
angular/src/app/core/api/v1/model/apiZonesGetCollection200Response.ts Ver fichero

@@ -0,0 +1,23 @@
/**
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { ApiLocationsGetCollection200ResponseSearch } from './apiLocationsGetCollection200ResponseSearch';
import { ApiLocationsGetCollection200ResponseView } from './apiLocationsGetCollection200ResponseView';
import { ZoneJsonld } from './zoneJsonld';


export interface ApiZonesGetCollection200Response {
member: Array<ZoneJsonld>;
totalItems?: number;
view?: ApiLocationsGetCollection200ResponseView;
search?: ApiLocationsGetCollection200ResponseSearch;
}


+ 23
- 0
angular/src/app/core/api/v1/model/location.ts Ver fichero

@@ -0,0 +1,23 @@
/**
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


/**
*
*/
export interface Location {
readonly zone?: string;
name: string;
readonly zoneName?: string;
readonly createdAt?: string | null;
}


+ 28
- 0
angular/src/app/core/api/v1/model/locationJsonld.ts Ver fichero

@@ -0,0 +1,28 @@
/**
* Imaq Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { LocationJsonldContext } from './locationJsonldContext';
import { ZoneJsonld } from './zoneJsonld';


/**
*
*/
export interface LocationJsonld {
context?: LocationJsonldContext;
readonly id?: string;
readonly type?: string;
readonly zone?: ZoneJsonld;
name: string;
readonly zoneName?: string;
readonly createdAt?: string | null;
}


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio

Cargando…
Cancelar
Guardar