Explorar el Código

api changes

master
Daniel hace 1 año
padre
commit
183c181f14
Se han modificado 29 ficheros con 431 adiciones y 209 borrados
  1. +0
    -65
      angular/1deployMatsenFE.sh
  2. +5
    -5
      angular/angular.json
  3. +1
    -1
      angular/openapi.json
  4. +84
    -42
      angular/openapi.yaml
  5. +1
    -1
      angular/package.json
  6. +22
    -2
      angular/src/app/_forms/apiForms.ts
  7. +4
    -4
      angular/src/app/core/api/v1/.openapi-generator/FILES
  8. +3
    -3
      angular/src/app/core/api/v1/api/api.ts
  9. +167
    -0
      angular/src/app/core/api/v1/api/auth.service.ts
  10. +5
    -5
      angular/src/app/core/api/v1/api/location.service.ts
  11. +13
    -13
      angular/src/app/core/api/v1/api/mediaObject.service.ts
  12. +5
    -5
      angular/src/app/core/api/v1/api/shippingCompany.service.ts
  13. +4
    -4
      angular/src/app/core/api/v1/api/trip.service.ts
  14. +4
    -4
      angular/src/app/core/api/v1/api/tripLocation.service.ts
  15. +5
    -5
      angular/src/app/core/api/v1/api/user.service.ts
  16. +4
    -4
      angular/src/app/core/api/v1/api/userTrip.service.ts
  17. +4
    -4
      angular/src/app/core/api/v1/api/userTripLocation.service.ts
  18. +4
    -4
      angular/src/app/core/api/v1/api/userTripWorkLog.service.ts
  19. +5
    -5
      angular/src/app/core/api/v1/api/vessel.service.ts
  20. +5
    -5
      angular/src/app/core/api/v1/api/zone.service.ts
  21. +5
    -3
      angular/src/app/core/api/v1/configuration.ts
  22. +2
    -2
      angular/src/app/core/api/v1/model/apiMediaObjectsGetCollection200Response.ts
  23. +24
    -0
      angular/src/app/core/api/v1/model/authResponse.ts
  24. +18
    -0
      angular/src/app/core/api/v1/model/credentials.ts
  25. +30
    -0
      angular/src/app/core/api/v1/model/mediaObjectJsonld.ts
  26. +3
    -3
      angular/src/app/core/api/v1/model/models.ts
  27. +2
    -18
      httpdocs/src/Entity/MediaObject.php
  28. +1
    -2
      httpdocs/src/OpenApi/AuthDecorator.php
  29. +1
    -0
      httpdocs/src/OpenApi/OpenApiFactory.php

+ 0
- 65
angular/1deployMatsenFE.sh Ver fichero

@@ -1,65 +0,0 @@
#!/bin/bash

export PATH=/opt/plesk/php/8.2/bin:$PATH;

cd /var/www/vhosts/spawntree.de/git_repo_clones/futbase-fe/
sudo git pull

echo "$(tput setab 2)matsen frontend has been PULLED$(tput sgr 0)"

rm -rf /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs/composer.lock
#cp -rf /var/www/vhosts/spawntree.de/git_repo_clones/futbase-fe/httpdocs/composer.lock /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs
rm -rf /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs/composer.json
cp -rf /var/www/vhosts/spawntree.de/git_repo_clones/futbase-fe/composer.json /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs

rm -rf /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs/config
cp -rf /var/www/vhosts/spawntree.de/git_repo_clones/futbase-fe/config /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs

rm -rf /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs/bin
cp -rf /var/www/vhosts/spawntree.de/git_repo_clones/futbase-fe/bin /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs

rm -rf /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs/migrations
cp -rf /var/www/vhosts/spawntree.de/git_repo_clones/futbase-fe/migrations /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs

rm -rf /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs/src
cp -rf /var/www/vhosts/spawntree.de/git_repo_clones/futbase-fe/src /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs

rm -rf /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs/public/index.php
cp -rf /var/www/vhosts/spawntree.de/git_repo_clones/futbase-fe/public/index.php /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs/public

echo "$(tput setab 2)Files have been copied$(tput sgr 0)"

cd /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs
composer update --no-scripts

echo "$(tput setab 2)COMPOSER UPDATED updated$(tput sgr 0)"

php /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs/bin/console doctrine:migrations:migrate

echo "$(tput setab 2)DATABASE SCHEMA updated$(tput sgr 0)"

cd /var/www/vhosts/spawntree.de/
sudo chmod 777 matsen.spawntree.de
cd /var/www/vhosts/spawntree.de/matsen.spawntree.de/
sudo chmod 777 -R *

cd /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs/var/cache/
rm -R *

php /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs/bin/console cache:clear
php /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs/bin/console cache:warmup

echo "$(tput setab 2)CACHE HAS BEEN CLEARED$(tput sgr 0)"

cd /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs/var/
chmod 777 -R *
chmod 777 cache/ *
chmod 777 cache/

#service apache2 restart

#echo "$(tput setab 2)CACHE cleared$(tput sgr 0)"

echo "$(tput setab 7)$(tput setaf 1)THINK ABOUT POSSIBLE PATCHES!"

echo "You have updated matsen api!$(tput sgr 0)"

+ 5
- 5
angular/angular.json Ver fichero

@@ -3,7 +3,7 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"futbase": {
"imaq": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
@@ -94,13 +94,13 @@
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"buildTarget": "futbase:build:production"
"buildTarget": "imaq:build:production"
},
"development": {
"buildTarget": "futbase:build:development"
"buildTarget": "imaq:build:development"
},
"beta": {
"buildTarget": "futbase:build:beta"
"buildTarget": "imaq:build:beta"
}
},
"defaultConfiguration": "development"
@@ -108,7 +108,7 @@
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"buildTarget": "futbase:build"
"buildTarget": "imaq:build"
}
},
"test": {


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


+ 84
- 42
angular/openapi.yaml Ver fichero

@@ -8,6 +8,27 @@ servers:
url: /
description: ''
paths:
/api/auth:
post:
operationId: postCredentialsItem
tags:
- Auth
responses:
'200':
description: 'Get JWT token'
content:
application/json:
schema:
$ref: '#/components/schemas/AuthResponse'
summary: 'Get JWT token to login.'
requestBody:
description: 'Generate new JWT Token'
content:
application/json:
schema:
$ref: '#/components/schemas/Credentials'
required: false
security: []
/api/locations:
get:
operationId: api_locations_get_collection
@@ -218,41 +239,6 @@ paths:
$ref: '#/components/schemas/Location'
required: true
deprecated: false
/api/auth:
post:
operationId: login_check_post
tags:
- 'Login Check'
responses:
'200':
description: 'User token created'
content:
application/json:
schema:
type: object
properties:
token: { readOnly: true, type: string, nullable: false }
required:
- token
summary: 'Creates a user token.'
description: 'Creates a user token.'
requestBody:
description: 'The login data'
content:
application/json:
schema:
type: object
properties:
email:
type: string
nullable: false
password:
type: string
nullable: false
required:
- email
- password
required: true
/api/media_objects:
get:
operationId: api_media_objects_get_collection
@@ -266,7 +252,7 @@ paths:
schema:
type: object
properties:
member: { type: array, items: { $ref: '#/components/schemas/MediaObject.jsonld-media_object.read' } }
member: { type: array, items: { $ref: '#/components/schemas/MediaObject.jsonld' } }
totalItems: { type: integer, minimum: 0 }
view: { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, first: { type: string, format: iri-reference }, last: { type: string, format: iri-reference }, previous: { type: string, format: iri-reference }, next: { type: string, format: iri-reference } }, example: { '@id': string, type: string, first: string, last: string, previous: string, next: string } }
search: { type: object, properties: { '@type': { type: string }, template: { type: string }, variableRepresentation: { type: string }, mapping: { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [string, 'null'] }, required: { type: boolean } } } } } }
@@ -314,7 +300,7 @@ paths:
content:
application/ld+json:
schema:
$ref: '#/components/schemas/MediaObject.jsonld-media_object.read'
$ref: '#/components/schemas/MediaObject.jsonld'
links: { }
'400':
description: 'Invalid input'
@@ -346,7 +332,7 @@ paths:
content:
application/ld+json:
schema:
$ref: '#/components/schemas/MediaObject.jsonld-media_object.read'
$ref: '#/components/schemas/MediaObject.jsonld'
'404':
description: 'Resource not found'
summary: 'Retrieves a MediaObject resource.'
@@ -2062,7 +2048,7 @@ components:
required:
- name
- code
MediaObject.jsonld-media_object.read:
MediaObject.jsonld:
type: object
description: ''
deprecated: false
@@ -2092,12 +2078,32 @@ components:
'@type':
readOnly: true
type: string
id:
readOnly: true
type: integer
contentUrl:
externalDocs:
url: 'https://schema.org/contentUrl'
type:
- string
- 'null'
file:
type:
- string
- 'null'
format: binary
filePath:
type:
- string
- 'null'
createdBy:
$ref: '#/components/schemas/User.jsonld'
createdAt:
readOnly: true
type: string
format: date-time
required:
- file
ShippingCompany:
type: object
description: ''
@@ -2893,6 +2899,41 @@ components:
format: date-time
required:
- name
Credentials:
type: object
properties:
email:
type: string
example: user@example.com
password:
type: string
example: password123
AuthResponse:
type: object
properties:
token:
type: string
readOnly: true
id:
type: integer
readOnly: true
email:
type: string
readOnly: true
firstName:
type: string
readOnly: true
lastName:
type: string
readOnly: true
roles:
type: array
items:
type: string
readOnly: true
user:
$ref: '#/components/schemas/User'
readOnly: true
responses: { }
parameters: { }
examples: { }
@@ -2900,9 +2941,10 @@ components:
headers: { }
securitySchemes:
JWT:
type: http
scheme: bearer
bearerFormat: JWT
type: apiKey
description: 'Value for the Authorization header parameter.'
name: Authorization
in: header
security:
-
JWT: []


+ 1
- 1
angular/package.json Ver fichero

@@ -1,5 +1,5 @@
{
"name": "futbase",
"name": "imaq",
"version": "0.0.0",
"scripts": {
"ng": "ng",


+ 22
- 2
angular/src/app/_forms/apiForms.ts Ver fichero

@@ -16,8 +16,13 @@ export const locationJsonldForm = new FormGroup({
createdAt: new FormControl(null, [])
});

export const mediaObjectJsonldMediaObjectReadForm = new FormGroup({
contentUrl: new FormControl(null, [])
export const mediaObjectJsonldForm = new FormGroup({
id: new FormControl(null, []),
contentUrl: new FormControl(null, []),
file: new FormControl(null, [Validators.required]),
filePath: new FormControl(null, []),
createdBy: new FormControl(null, []),
createdAt: new FormControl(null, [])
});

export const shippingCompanyForm = new FormGroup({
@@ -183,3 +188,18 @@ export const zoneJsonldForm = new FormGroup({
name: new FormControl(null, [Validators.required]),
createdAt: new FormControl(null, [])
});

export const credentialsForm = new FormGroup({
email: new FormControl(null, []),
password: new FormControl(null, [])
});

export const authResponseForm = new FormGroup({
token: new FormControl(null, []),
id: new FormControl(null, []),
email: new FormControl(null, []),
firstName: new FormControl(null, []),
lastName: new FormControl(null, []),
roles: new FormControl(null, []),
user: new FormControl(null, [])
});

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

@@ -2,8 +2,8 @@
README.md
api.module.ts
api/api.ts
api/auth.service.ts
api/location.service.ts
api/loginCheck.service.ts
api/mediaObject.service.ts
api/shippingCompany.service.ts
api/trip.service.ts
@@ -32,13 +32,13 @@ model/apiUserTripsGetCollection200Response.ts
model/apiUsersGetCollection200Response.ts
model/apiVesselsGetCollection200Response.ts
model/apiZonesGetCollection200Response.ts
model/authResponse.ts
model/credentials.ts
model/location.ts
model/locationJsonld.ts
model/locationJsonldContext.ts
model/locationJsonldContextOneOf.ts
model/loginCheckPost200Response.ts
model/loginCheckPostRequest.ts
model/mediaObjectJsonldMediaObjectRead.ts
model/mediaObjectJsonld.ts
model/models.ts
model/shippingCompany.ts
model/shippingCompanyJsonld.ts


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

@@ -1,7 +1,7 @@
export * from './auth.service';
import { AuthService } from './auth.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 './shippingCompany.service';
@@ -22,4 +22,4 @@ 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];
export const APIS = [AuthService, LocationService, MediaObjectService, ShippingCompanyService, TripService, TripLocationService, UserService, UserTripService, UserTripLocationService, UserTripWorkLogService, VesselService, ZoneService];

+ 167
- 0
angular/src/app/core/api/v1/api/auth.service.ts Ver fichero

@@ -0,0 +1,167 @@
/**
* 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 { AuthResponse } from '../model/authResponse';
// @ts-ignore
import { Credentials } from '../model/credentials';

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



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

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

/**
* Get JWT token to login.
* @param credentials Generate new JWT Token
* @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 postCredentialsItem(credentials?: Credentials, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<AuthResponse>;
public postCredentialsItem(credentials?: Credentials, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<AuthResponse>>;
public postCredentialsItem(credentials?: Credentials, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<AuthResponse>>;
public postCredentialsItem(credentials?: Credentials, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {

let localVarHeaders = this.defaultHeaders;

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

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

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


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

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

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

}

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

@@ -139,7 +139,7 @@ export class LocationService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -212,7 +212,7 @@ export class LocationService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -283,7 +283,7 @@ export class LocationService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -359,7 +359,7 @@ export class LocationService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -441,7 +441,7 @@ export class LocationService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;


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

@@ -21,7 +21,7 @@ import { Observable } from 'rxjs';
// @ts-ignore
import { ApiMediaObjectsGetCollection200Response } from '../model/apiMediaObjectsGetCollection200Response';
// @ts-ignore
import { MediaObjectJsonldMediaObjectRead } from '../model/mediaObjectJsonldMediaObjectRead';
import { MediaObjectJsonld } from '../model/mediaObjectJsonld';

// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
@@ -135,7 +135,7 @@ export class MediaObjectService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -208,7 +208,7 @@ export class MediaObjectService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -265,9 +265,9 @@ export class MediaObjectService {
* @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 mediaObjectsIdGet(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<MediaObjectJsonldMediaObjectRead>;
public mediaObjectsIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<MediaObjectJsonldMediaObjectRead>>;
public mediaObjectsIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<MediaObjectJsonldMediaObjectRead>>;
public mediaObjectsIdGet(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<MediaObjectJsonld>;
public mediaObjectsIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<MediaObjectJsonld>>;
public mediaObjectsIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<MediaObjectJsonld>>;
public mediaObjectsIdGet(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 mediaObjectsIdGet.');
@@ -279,7 +279,7 @@ export class MediaObjectService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -317,7 +317,7 @@ export class MediaObjectService {
}

let localVarPath = `/api/media_objects/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<MediaObjectJsonldMediaObjectRead>('get', `${this.configuration.basePath}${localVarPath}`,
return this.httpClient.request<MediaObjectJsonld>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
@@ -337,9 +337,9 @@ export class MediaObjectService {
* @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 mediaObjectsPost(file?: Blob, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<MediaObjectJsonldMediaObjectRead>;
public mediaObjectsPost(file?: Blob, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<MediaObjectJsonldMediaObjectRead>>;
public mediaObjectsPost(file?: Blob, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<MediaObjectJsonldMediaObjectRead>>;
public mediaObjectsPost(file?: Blob, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<MediaObjectJsonld>;
public mediaObjectsPost(file?: Blob, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<MediaObjectJsonld>>;
public mediaObjectsPost(file?: Blob, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<MediaObjectJsonld>>;
public mediaObjectsPost(file?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {

let localVarHeaders = this.defaultHeaders;
@@ -348,7 +348,7 @@ export class MediaObjectService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -408,7 +408,7 @@ export class MediaObjectService {
}

let localVarPath = `/api/media_objects`;
return this.httpClient.request<MediaObjectJsonldMediaObjectRead>('post', `${this.configuration.basePath}${localVarPath}`,
return this.httpClient.request<MediaObjectJsonld>('post', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,


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

@@ -139,7 +139,7 @@ export class ShippingCompanyService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -212,7 +212,7 @@ export class ShippingCompanyService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -283,7 +283,7 @@ export class ShippingCompanyService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -359,7 +359,7 @@ export class ShippingCompanyService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -441,7 +441,7 @@ export class ShippingCompanyService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;


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

@@ -124,7 +124,7 @@ export class TripService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -197,7 +197,7 @@ export class TripService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -273,7 +273,7 @@ export class TripService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -355,7 +355,7 @@ export class TripService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;


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

@@ -124,7 +124,7 @@ export class TripLocationService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -197,7 +197,7 @@ export class TripLocationService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -273,7 +273,7 @@ export class TripLocationService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -355,7 +355,7 @@ export class TripLocationService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;


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

@@ -144,7 +144,7 @@ export class UserService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -217,7 +217,7 @@ export class UserService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -288,7 +288,7 @@ export class UserService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -364,7 +364,7 @@ export class UserService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -446,7 +446,7 @@ export class UserService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;


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

@@ -124,7 +124,7 @@ export class UserTripService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -197,7 +197,7 @@ export class UserTripService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -273,7 +273,7 @@ export class UserTripService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -355,7 +355,7 @@ export class UserTripService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;


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

@@ -124,7 +124,7 @@ export class UserTripLocationService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -197,7 +197,7 @@ export class UserTripLocationService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -273,7 +273,7 @@ export class UserTripLocationService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -355,7 +355,7 @@ export class UserTripLocationService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;


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

@@ -124,7 +124,7 @@ export class UserTripWorkLogService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -197,7 +197,7 @@ export class UserTripWorkLogService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -273,7 +273,7 @@ export class UserTripWorkLogService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -355,7 +355,7 @@ export class UserTripWorkLogService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;


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

@@ -139,7 +139,7 @@ export class VesselService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -212,7 +212,7 @@ export class VesselService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -283,7 +283,7 @@ export class VesselService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -359,7 +359,7 @@ export class VesselService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -441,7 +441,7 @@ export class VesselService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;


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

@@ -139,7 +139,7 @@ export class ZoneService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -212,7 +212,7 @@ export class ZoneService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -283,7 +283,7 @@ export class ZoneService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -359,7 +359,7 @@ export class ZoneService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
@@ -441,7 +441,7 @@ export class ZoneService {
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
localVarHeaders = localVarHeaders.set('Authorization', localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;


+ 5
- 3
angular/src/app/core/api/v1/configuration.ts Ver fichero

@@ -90,9 +90,11 @@ export class Configuration {
// init default JWT credential
if (!this.credentials['JWT']) {
this.credentials['JWT'] = () => {
return typeof this.accessToken === 'function'
? this.accessToken()
: this.accessToken;
if (this.apiKeys === null || this.apiKeys === undefined) {
return undefined;
} else {
return this.apiKeys['JWT'] || this.apiKeys['Authorization'];
}
};
}
}


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

@@ -11,11 +11,11 @@
*/
import { ApiLocationsGetCollection200ResponseSearch } from './apiLocationsGetCollection200ResponseSearch';
import { ApiLocationsGetCollection200ResponseView } from './apiLocationsGetCollection200ResponseView';
import { MediaObjectJsonldMediaObjectRead } from './mediaObjectJsonldMediaObjectRead';
import { MediaObjectJsonld } from './mediaObjectJsonld';


export interface ApiMediaObjectsGetCollection200Response {
member: Array<MediaObjectJsonldMediaObjectRead>;
member: Array<MediaObjectJsonld>;
totalItems?: number;
view?: ApiLocationsGetCollection200ResponseView;
search?: ApiLocationsGetCollection200ResponseSearch;


+ 24
- 0
angular/src/app/core/api/v1/model/authResponse.ts Ver fichero

@@ -0,0 +1,24 @@
/**
* 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 { User } from './user';


export interface AuthResponse {
readonly token?: string;
readonly id?: number;
readonly email?: string;
readonly firstName?: string;
readonly lastName?: string;
roles?: Array<string>;
readonly user?: User;
}


+ 18
- 0
angular/src/app/core/api/v1/model/credentials.ts Ver fichero

@@ -0,0 +1,18 @@
/**
* 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 Credentials {
email?: string;
password?: string;
}


+ 30
- 0
angular/src/app/core/api/v1/model/mediaObjectJsonld.ts Ver fichero

@@ -0,0 +1,30 @@
/**
* 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 { UserJsonld } from './userJsonld';
import { LocationJsonldContext } from './locationJsonldContext';


/**
*
*/
export interface MediaObjectJsonld {
context?: LocationJsonldContext;
readonly id?: string;
readonly type?: string;
readonly id?: number;
contentUrl?: string | null;
file: Blob | null;
filePath?: string | null;
createdBy?: UserJsonld;
readonly createdAt?: string;
}


+ 3
- 3
angular/src/app/core/api/v1/model/models.ts Ver fichero

@@ -12,13 +12,13 @@ export * from './apiUserTripsGetCollection200Response';
export * from './apiUsersGetCollection200Response';
export * from './apiVesselsGetCollection200Response';
export * from './apiZonesGetCollection200Response';
export * from './authResponse';
export * from './credentials';
export * from './location';
export * from './locationJsonld';
export * from './locationJsonldContext';
export * from './locationJsonldContextOneOf';
export * from './loginCheckPost200Response';
export * from './loginCheckPostRequest';
export * from './mediaObjectJsonldMediaObjectRead';
export * from './mediaObjectJsonld';
export * from './shippingCompany';
export * from './shippingCompanyJsonld';
export * from './trip';


+ 2
- 18
httpdocs/src/Entity/MediaObject.php Ver fichero

@@ -27,20 +27,7 @@ use Vich\UploaderBundle\Mapping\Annotation as Vich;
shortName: 'MediaObject',
types: ['https://schema.org/MediaObject'],
operations: [
new Get(
openapi: new Model\Operation(
responses: [
'200' => [
'content' => [
'application/ld+json' => [
'schema' => ['$ref' => '#/components/schemas/MediaObject']
]
]
]
]
),
normalizationContext: ['groups' => ['media_object:read']]
),
new Get(),
new GetCollection(),
new Post(
controller: CreateMediaObjectAction::class,
@@ -61,12 +48,10 @@ use Vich\UploaderBundle\Mapping\Annotation as Vich;
])
)
),
validationContext: ['groups' => ['Default', 'media_object:create']],
deserialize: false
),
new Delete(),
],
normalizationContext: ['groups' => ['media_object:read']],
security: 'is_granted("ROLE_USER")',
)]
class MediaObject
@@ -75,11 +60,10 @@ class MediaObject
private ?int $id = null;

#[ApiProperty(types: ['https://schema.org/contentUrl'])]
#[Groups(['media_object:read'])]
public ?string $contentUrl = null;

#[Vich\UploadableField(mapping: 'media_object', fileNameProperty: 'filePath')]
#[Assert\NotNull(groups: ['media_object:create'])]
#[Assert\NotNull()]
public ?File $file = null;

#[ORM\Column(nullable: true)]


+ 1
- 2
httpdocs/src/OpenApi/AuthDecorator.php Ver fichero

@@ -43,7 +43,7 @@ final class AuthDecorator implements OpenApiFactoryInterface
'readOnly' => true,
],
'id' => [
'type' => 'string',
'type' => 'integer',
'readOnly' => true,
],
'email' => [
@@ -73,7 +73,6 @@ final class AuthDecorator implements OpenApiFactoryInterface
]);

$pathItem = new PathItem(
ref: 'JWT Token',
post: new Operation(
operationId: 'postCredentialsItem',
tags: ['Auth'],


+ 1
- 0
httpdocs/src/OpenApi/OpenApiFactory.php Ver fichero

@@ -22,6 +22,7 @@ class OpenApiFactory implements OpenApiFactoryInterface
foreach ($schemas as $key => $schema) {
// Remove the .jsonld-media_object.read suffix
$newKey = preg_replace('/\.jsonld-.*/', '', $key);
//$newKey = preg_replace('/\.jsonld-.*|\.jsonld$/', '', $key);
$cleanedSchemas[$newKey] = $schema;
}



Cargando…
Cancelar
Guardar