From 78f321a129abff474707f02add8333b6da934ee1 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 4 Mar 2025 17:06:13 +0200 Subject: [PATCH] trips and trip locations --- angular/openapi.json | 2 +- angular/openapi.yaml | 900 +++++++----------- .../_abstract/abstract-data-form-component.ts | 6 + .../datetime-picker.component.ts | 4 +- .../two-column/two-column.component.html | 4 +- .../search-select/search-select.component.ts | 70 ++ angular/src/app/_forms/apiForms.ts | 65 +- angular/src/app/_helpers/jwt.interceptor.ts | 5 +- .../location-form.component.html | 26 +- .../location-form/location-form.component.ts | 2 + .../location-list/location-list.component.ts | 24 + .../trip-detail/trip-detail.component.html | 99 ++ .../trip-detail/trip-detail.component.scss | 0 .../trip-detail/trip-detail.component.spec.ts | 23 + .../trip/trip-detail/trip-detail.component.ts | 218 +++++ .../trip/trip-form/trip-form.component.html | 93 ++ .../trip/trip-form/trip-form.component.scss | 0 .../trip-form/trip-form.component.spec.ts | 23 + .../trip/trip-form/trip-form.component.ts | 64 ++ .../trip/trip-list/trip-list.component.html | 8 + .../trip/trip-list/trip-list.component.scss | 0 .../trip-list/trip-list.component.spec.ts | 23 + .../trip/trip-list/trip-list.component.ts | 127 +++ .../src/app/_views/trip/trip.component.html | 7 +- .../vessel-list/vessel-list.component.ts | 37 +- angular/src/app/app-routing.module.ts | 18 + angular/src/app/app.component.ts | 3 +- angular/src/app/app.module.ts | 8 + .../app/core/api/v1/.openapi-generator/FILES | 22 +- angular/src/app/core/api/v1/api/api.ts | 8 +- .../src/app/core/api/v1/api/event.service.ts | 264 +++++ .../src/app/core/api/v1/api/trip.service.ts | 94 +- .../core/api/v1/api/tripLocation.service.ts | 101 +- .../api/v1/api/userTripLocation.service.ts | 419 -------- .../api/v1/api/userTripWorkLog.service.ts | 419 -------- .../apiEventsGetCollection200Response.ts | 23 + ...piEventsGetCollection200ResponseSearch.ts} | 6 +- ...ollection200ResponseSearchMappingInner.ts} | 2 +- ... apiEventsGetCollection200ResponseView.ts} | 2 +- .../apiLocationsGetCollection200Response.ts | 8 +- ...apiMediaObjectsGetCollection200Response.ts | 8 +- ...ippingCompaniesGetCollection200Response.ts | 8 +- ...piTripLocationsGetCollection200Response.ts | 8 +- .../model/apiTripsGetCollection200Response.ts | 8 +- ...erTripLocationsGetCollection200Response.ts | 23 - ...serTripWorkLogsGetCollection200Response.ts | 23 - .../apiUserTripsGetCollection200Response.ts | 8 +- .../model/apiUsersGetCollection200Response.ts | 8 +- .../apiVesselsGetCollection200Response.ts | 8 +- .../model/apiZonesGetCollection200Response.ts | 8 +- .../{userTripLocation.ts => eventJsonld.ts} | 13 +- ...JsonldContext.ts => eventJsonldContext.ts} | 6 +- ...extOneOf.ts => eventJsonldContextOneOf.ts} | 6 +- angular/src/app/core/api/v1/model/location.ts | 3 + .../app/core/api/v1/model/locationJsonld.ts | 7 +- .../core/api/v1/model/mediaObjectJsonld.ts | 4 +- angular/src/app/core/api/v1/model/models.ts | 18 +- .../api/v1/model/shippingCompanyJsonld.ts | 4 +- angular/src/app/core/api/v1/model/trip.ts | 12 +- .../src/app/core/api/v1/model/tripJsonld.ts | 14 +- .../src/app/core/api/v1/model/tripLocation.ts | 7 +- .../core/api/v1/model/tripLocationJsonld.ts | 9 +- angular/src/app/core/api/v1/model/user.ts | 2 +- .../src/app/core/api/v1/model/userJsonld.ts | 6 +- .../app/core/api/v1/model/userTripJsonld.ts | 4 +- .../api/v1/model/userTripLocationJsonld.ts | 30 - .../app/core/api/v1/model/userTripWorkLog.ts | 26 - .../api/v1/model/userTripWorkLogJsonld.ts | 32 - .../src/app/core/api/v1/model/vesselJsonld.ts | 4 +- .../src/app/core/api/v1/model/zoneJsonld.ts | 4 +- angular/src/assets/i18n/en.json | 24 +- httpdocs/config/packages/api_platform.yaml | 2 +- httpdocs/migrations/Version20250228112455.php | 31 + httpdocs/migrations/Version20250228113640.php | 31 + httpdocs/migrations/Version20250303144554.php | 53 ++ httpdocs/migrations/Version20250303152548.php | 31 + httpdocs/migrations/Version20250304114315.php | 31 + httpdocs/migrations/Version20250304115016.php | 33 + httpdocs/migrations/Version20250304122802.php | 31 + httpdocs/migrations/Version20250304124329.php | 31 + httpdocs/src/ApiResource/EventApi.php | 56 ++ httpdocs/src/ApiResource/LocationApi.php | 6 + httpdocs/src/ApiResource/TripApi.php | 33 +- httpdocs/src/ApiResource/TripLocationApi.php | 23 +- httpdocs/src/ApiResource/UserApi.php | 3 + ...ipLocationApi.php => UserTripEventApi.php} | 21 +- .../src/ApiResource/UserTripWorkLogApi.php | 103 -- .../Command/Import/CreateEventsCommand.php | 116 +++ httpdocs/src/Entity/Event.php | 89 ++ httpdocs/src/Entity/Location.php | 55 +- httpdocs/src/Entity/Trip.php | 28 +- httpdocs/src/Entity/TripLocation.php | 13 + httpdocs/src/Entity/User.php | 13 + httpdocs/src/Entity/UserTrip.php | 61 +- httpdocs/src/Entity/UserTripEvent.php | 96 ++ httpdocs/src/Entity/UserTripLocation.php | 83 -- httpdocs/src/Entity/UserTripWorkLog.php | 119 --- .../src/Mapper/EventEntityToApiMapper.php | 41 + .../src/Mapper/LocationApiToEntityMapper.php | 3 + .../src/Mapper/LocationEntityToApiMapper.php | 3 + httpdocs/src/Mapper/TripApiToEntityMapper.php | 4 +- httpdocs/src/Mapper/TripEntityToApiMapper.php | 4 +- .../Mapper/TripLocationApiToEntityMapper.php | 9 + .../Mapper/TripLocationEntityToApiMapper.php | 1 + httpdocs/src/Mapper/UserApiToEntityMapper.php | 4 +- httpdocs/src/Mapper/UserEntityToApiMapper.php | 1 + .../Mapper/UserTripEventApiToEntityMapper.php | 83 ++ .../Mapper/UserTripEventEntityToApiMapper.php | 54 ++ httpdocs/src/Repository/EventRepository.php | 137 +++ .../Repository/UserTripEventRepository.php | 125 +++ 110 files changed, 3099 insertions(+), 2134 deletions(-) create mode 100644 angular/src/app/_views/trip/trip-detail/trip-detail.component.html create mode 100644 angular/src/app/_views/trip/trip-detail/trip-detail.component.scss create mode 100644 angular/src/app/_views/trip/trip-detail/trip-detail.component.spec.ts create mode 100644 angular/src/app/_views/trip/trip-detail/trip-detail.component.ts create mode 100644 angular/src/app/_views/trip/trip-form/trip-form.component.html create mode 100644 angular/src/app/_views/trip/trip-form/trip-form.component.scss create mode 100644 angular/src/app/_views/trip/trip-form/trip-form.component.spec.ts create mode 100644 angular/src/app/_views/trip/trip-form/trip-form.component.ts create mode 100644 angular/src/app/_views/trip/trip-list/trip-list.component.html create mode 100644 angular/src/app/_views/trip/trip-list/trip-list.component.scss create mode 100644 angular/src/app/_views/trip/trip-list/trip-list.component.spec.ts create mode 100644 angular/src/app/_views/trip/trip-list/trip-list.component.ts create mode 100644 angular/src/app/core/api/v1/api/event.service.ts delete mode 100644 angular/src/app/core/api/v1/api/userTripLocation.service.ts delete mode 100644 angular/src/app/core/api/v1/api/userTripWorkLog.service.ts create mode 100644 angular/src/app/core/api/v1/model/apiEventsGetCollection200Response.ts rename angular/src/app/core/api/v1/model/{apiLocationsGetCollection200ResponseSearch.ts => apiEventsGetCollection200ResponseSearch.ts} (61%) rename angular/src/app/core/api/v1/model/{apiLocationsGetCollection200ResponseSearchMappingInner.ts => apiEventsGetCollection200ResponseSearchMappingInner.ts} (85%) rename angular/src/app/core/api/v1/model/{apiLocationsGetCollection200ResponseView.ts => apiEventsGetCollection200ResponseView.ts} (88%) delete mode 100644 angular/src/app/core/api/v1/model/apiUserTripLocationsGetCollection200Response.ts delete mode 100644 angular/src/app/core/api/v1/model/apiUserTripWorkLogsGetCollection200Response.ts rename angular/src/app/core/api/v1/model/{userTripLocation.ts => eventJsonld.ts} (62%) rename angular/src/app/core/api/v1/model/{locationJsonldContext.ts => eventJsonldContext.ts} (67%) rename angular/src/app/core/api/v1/model/{locationJsonldContextOneOf.ts => eventJsonldContextOneOf.ts} (80%) delete mode 100644 angular/src/app/core/api/v1/model/userTripLocationJsonld.ts delete mode 100644 angular/src/app/core/api/v1/model/userTripWorkLog.ts delete mode 100644 angular/src/app/core/api/v1/model/userTripWorkLogJsonld.ts create mode 100644 httpdocs/migrations/Version20250228112455.php create mode 100644 httpdocs/migrations/Version20250228113640.php create mode 100644 httpdocs/migrations/Version20250303144554.php create mode 100644 httpdocs/migrations/Version20250303152548.php create mode 100644 httpdocs/migrations/Version20250304114315.php create mode 100644 httpdocs/migrations/Version20250304115016.php create mode 100644 httpdocs/migrations/Version20250304122802.php create mode 100644 httpdocs/migrations/Version20250304124329.php create mode 100644 httpdocs/src/ApiResource/EventApi.php rename httpdocs/src/ApiResource/{UserTripLocationApi.php => UserTripEventApi.php} (82%) delete mode 100644 httpdocs/src/ApiResource/UserTripWorkLogApi.php create mode 100644 httpdocs/src/Command/Import/CreateEventsCommand.php create mode 100644 httpdocs/src/Entity/Event.php create mode 100644 httpdocs/src/Entity/UserTripEvent.php delete mode 100644 httpdocs/src/Entity/UserTripLocation.php delete mode 100644 httpdocs/src/Entity/UserTripWorkLog.php create mode 100644 httpdocs/src/Mapper/EventEntityToApiMapper.php create mode 100644 httpdocs/src/Mapper/UserTripEventApiToEntityMapper.php create mode 100644 httpdocs/src/Mapper/UserTripEventEntityToApiMapper.php create mode 100644 httpdocs/src/Repository/EventRepository.php create mode 100644 httpdocs/src/Repository/UserTripEventRepository.php diff --git a/angular/openapi.json b/angular/openapi.json index 9b617f0..3fea20d 100644 --- a/angular/openapi.json +++ b/angular/openapi.json @@ -1 +1 @@ -{"openapi":"3.1.0","info":{"title":"Imaq Platform","description":"","version":"1.0.0"},"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","tags":["Location"],"responses":{"200":{"description":"Location collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Location.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"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of Location resources.","description":"Retrieves the collection of Location resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false},{"name":"name","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_locations_post","tags":["Location"],"responses":{"201":{"description":"Location resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Location.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Location resource.","description":"Creates a Location resource.","parameters":[],"requestBody":{"description":"The new Location resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Location.jsonld"}}},"required":true},"deprecated":false}},"\/api\/locations\/{id}":{"get":{"operationId":"api_locations_id_get","tags":["Location"],"responses":{"200":{"description":"Location resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Location.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Location resource.","description":"Retrieves a Location resource.","parameters":[{"name":"id","in":"path","description":"Location identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_locations_id_delete","tags":["Location"],"responses":{"204":{"description":"Location resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the Location resource.","description":"Removes the Location resource.","parameters":[{"name":"id","in":"path","description":"Location identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_locations_id_patch","tags":["Location"],"responses":{"200":{"description":"Location resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Location.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Location resource.","description":"Updates the Location resource.","parameters":[{"name":"id","in":"path","description":"Location identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Location resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Location"}}},"required":true},"deprecated":false}},"\/api\/media_objects":{"get":{"operationId":"api_media_objects_get_collection","tags":["MediaObject"],"responses":{"200":{"description":"MediaObject collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"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"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of MediaObject resources.","description":"Retrieves the collection of MediaObject resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_media_objects_post","tags":["MediaObject"],"responses":{"201":{"description":"MediaObject resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/MediaObject.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a MediaObject resource.","description":"Creates a MediaObject resource.","parameters":[],"requestBody":{"description":"The new MediaObject resource","content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":false},"deprecated":false}},"\/api\/media_objects\/{id}":{"get":{"operationId":"api_media_objects_id_get","tags":["MediaObject"],"responses":{"200":{"description":"MediaObject resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/MediaObject.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a MediaObject resource.","description":"Retrieves a MediaObject resource.","parameters":[{"name":"id","in":"path","description":"MediaObject identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_media_objects_id_delete","tags":["MediaObject"],"responses":{"204":{"description":"MediaObject resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the MediaObject resource.","description":"Removes the MediaObject resource.","parameters":[{"name":"id","in":"path","description":"MediaObject identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false}},"\/api\/shipping_companies":{"get":{"operationId":"api_shipping_companies_get_collection","tags":["ShippingCompany"],"responses":{"200":{"description":"ShippingCompany collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/ShippingCompany.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"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of ShippingCompany resources.","description":"Retrieves the collection of ShippingCompany resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false},{"name":"name","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_shipping_companies_post","tags":["ShippingCompany"],"responses":{"201":{"description":"ShippingCompany resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a ShippingCompany resource.","description":"Creates a ShippingCompany resource.","parameters":[],"requestBody":{"description":"The new ShippingCompany resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}}},"required":true},"deprecated":false}},"\/api\/shipping_companies\/{id}":{"get":{"operationId":"api_shipping_companies_id_get","tags":["ShippingCompany"],"responses":{"200":{"description":"ShippingCompany resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a ShippingCompany resource.","description":"Retrieves a ShippingCompany resource.","parameters":[{"name":"id","in":"path","description":"ShippingCompany identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_shipping_companies_id_delete","tags":["ShippingCompany"],"responses":{"204":{"description":"ShippingCompany resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the ShippingCompany resource.","description":"Removes the ShippingCompany resource.","parameters":[{"name":"id","in":"path","description":"ShippingCompany identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_shipping_companies_id_patch","tags":["ShippingCompany"],"responses":{"200":{"description":"ShippingCompany resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the ShippingCompany resource.","description":"Updates the ShippingCompany resource.","parameters":[{"name":"id","in":"path","description":"ShippingCompany identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated ShippingCompany resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany"}}},"required":true},"deprecated":false}},"\/api\/trips":{"get":{"operationId":"api_trips_get_collection","tags":["Trip"],"responses":{"200":{"description":"Trip collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Trip.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"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of Trip resources.","description":"Retrieves the collection of Trip resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_trips_post","tags":["Trip"],"responses":{"201":{"description":"Trip resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Trip.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Trip resource.","description":"Creates a Trip resource.","parameters":[],"requestBody":{"description":"The new Trip resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Trip.jsonld"}}},"required":true},"deprecated":false}},"\/api\/trips\/{id}":{"get":{"operationId":"api_trips_id_get","tags":["Trip"],"responses":{"200":{"description":"Trip resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Trip.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Trip resource.","description":"Retrieves a Trip resource.","parameters":[{"name":"id","in":"path","description":"Trip identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_trips_id_patch","tags":["Trip"],"responses":{"200":{"description":"Trip resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Trip.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Trip resource.","description":"Updates the Trip resource.","parameters":[{"name":"id","in":"path","description":"Trip identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Trip resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Trip"}}},"required":true},"deprecated":false}},"\/api\/trip_locations":{"get":{"operationId":"api_trip_locations_get_collection","tags":["TripLocation"],"responses":{"200":{"description":"TripLocation collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/TripLocation.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"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of TripLocation resources.","description":"Retrieves the collection of TripLocation resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_trip_locations_post","tags":["TripLocation"],"responses":{"201":{"description":"TripLocation resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a TripLocation resource.","description":"Creates a TripLocation resource.","parameters":[],"requestBody":{"description":"The new TripLocation resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}}},"required":true},"deprecated":false}},"\/api\/trip_locations\/{id}":{"get":{"operationId":"api_trip_locations_id_get","tags":["TripLocation"],"responses":{"200":{"description":"TripLocation resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a TripLocation resource.","description":"Retrieves a TripLocation resource.","parameters":[{"name":"id","in":"path","description":"TripLocation identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_trip_locations_id_patch","tags":["TripLocation"],"responses":{"200":{"description":"TripLocation resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the TripLocation resource.","description":"Updates the TripLocation resource.","parameters":[{"name":"id","in":"path","description":"TripLocation identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated TripLocation resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation"}}},"required":true},"deprecated":false}},"\/api\/users":{"get":{"operationId":"api_users_get_collection","tags":["User"],"responses":{"200":{"description":"User collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/User.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"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of User resources.","description":"Retrieves the collection of User resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false},{"name":"firstName","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"lastName","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"userNameSearch","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_users_post","tags":["User"],"responses":{"201":{"description":"User resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a User resource.","description":"Creates a User resource.","parameters":[],"requestBody":{"description":"The new User resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonld"}}},"required":true},"deprecated":false}},"\/api\/users\/{id}":{"get":{"operationId":"api_users_id_get","tags":["User"],"responses":{"200":{"description":"User resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a User resource.","description":"Retrieves a User resource.","parameters":[{"name":"id","in":"path","description":"User identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_users_id_delete","tags":["User"],"responses":{"204":{"description":"User resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the User resource.","description":"Removes the User resource.","parameters":[{"name":"id","in":"path","description":"User identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_users_id_patch","tags":["User"],"responses":{"200":{"description":"User resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the User resource.","description":"Updates the User resource.","parameters":[{"name":"id","in":"path","description":"User identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated User resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/User"}}},"required":true},"deprecated":false}},"\/api\/user_trips":{"get":{"operationId":"api_user_trips_get_collection","tags":["UserTrip"],"responses":{"200":{"description":"UserTrip collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserTrip.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"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of UserTrip resources.","description":"Retrieves the collection of UserTrip resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_user_trips_post","tags":["UserTrip"],"responses":{"201":{"description":"UserTrip resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a UserTrip resource.","description":"Creates a UserTrip resource.","parameters":[],"requestBody":{"description":"The new UserTrip resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}}},"required":true},"deprecated":false}},"\/api\/user_trips\/{id}":{"get":{"operationId":"api_user_trips_id_get","tags":["UserTrip"],"responses":{"200":{"description":"UserTrip resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a UserTrip resource.","description":"Retrieves a UserTrip resource.","parameters":[{"name":"id","in":"path","description":"UserTrip identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_user_trips_id_patch","tags":["UserTrip"],"responses":{"200":{"description":"UserTrip resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the UserTrip resource.","description":"Updates the UserTrip resource.","parameters":[{"name":"id","in":"path","description":"UserTrip identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated UserTrip resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip"}}},"required":true},"deprecated":false}},"\/api\/user_trip_locations":{"get":{"operationId":"api_user_trip_locations_get_collection","tags":["UserTripLocation"],"responses":{"200":{"description":"UserTripLocation collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserTripLocation.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"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of UserTripLocation resources.","description":"Retrieves the collection of UserTripLocation resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_user_trip_locations_post","tags":["UserTripLocation"],"responses":{"201":{"description":"UserTripLocation resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripLocation.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a UserTripLocation resource.","description":"Creates a UserTripLocation resource.","parameters":[],"requestBody":{"description":"The new UserTripLocation resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripLocation.jsonld"}}},"required":true},"deprecated":false}},"\/api\/user_trip_locations\/{id}":{"get":{"operationId":"api_user_trip_locations_id_get","tags":["UserTripLocation"],"responses":{"200":{"description":"UserTripLocation resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripLocation.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a UserTripLocation resource.","description":"Retrieves a UserTripLocation resource.","parameters":[{"name":"id","in":"path","description":"UserTripLocation identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_user_trip_locations_id_patch","tags":["UserTripLocation"],"responses":{"200":{"description":"UserTripLocation resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripLocation.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the UserTripLocation resource.","description":"Updates the UserTripLocation resource.","parameters":[{"name":"id","in":"path","description":"UserTripLocation identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated UserTripLocation resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripLocation"}}},"required":true},"deprecated":false}},"\/api\/user_trip_work_logs":{"get":{"operationId":"api_user_trip_work_logs_get_collection","tags":["UserTripWorkLog"],"responses":{"200":{"description":"UserTripWorkLog collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserTripWorkLog.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"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of UserTripWorkLog resources.","description":"Retrieves the collection of UserTripWorkLog resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_user_trip_work_logs_post","tags":["UserTripWorkLog"],"responses":{"201":{"description":"UserTripWorkLog resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripWorkLog.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a UserTripWorkLog resource.","description":"Creates a UserTripWorkLog resource.","parameters":[],"requestBody":{"description":"The new UserTripWorkLog resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripWorkLog.jsonld"}}},"required":true},"deprecated":false}},"\/api\/user_trip_work_logs\/{id}":{"get":{"operationId":"api_user_trip_work_logs_id_get","tags":["UserTripWorkLog"],"responses":{"200":{"description":"UserTripWorkLog resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripWorkLog.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a UserTripWorkLog resource.","description":"Retrieves a UserTripWorkLog resource.","parameters":[{"name":"id","in":"path","description":"UserTripWorkLog identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_user_trip_work_logs_id_patch","tags":["UserTripWorkLog"],"responses":{"200":{"description":"UserTripWorkLog resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripWorkLog.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the UserTripWorkLog resource.","description":"Updates the UserTripWorkLog resource.","parameters":[{"name":"id","in":"path","description":"UserTripWorkLog identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated UserTripWorkLog resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripWorkLog"}}},"required":true},"deprecated":false}},"\/api\/vessels":{"get":{"operationId":"api_vessels_get_collection","tags":["Vessel"],"responses":{"200":{"description":"Vessel collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Vessel.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"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of Vessel resources.","description":"Retrieves the collection of Vessel resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false},{"name":"name","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_vessels_post","tags":["Vessel"],"responses":{"201":{"description":"Vessel resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Vessel resource.","description":"Creates a Vessel resource.","parameters":[],"requestBody":{"description":"The new Vessel resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}}},"required":true},"deprecated":false}},"\/api\/vessels\/{id}":{"get":{"operationId":"api_vessels_id_get","tags":["Vessel"],"responses":{"200":{"description":"Vessel resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Vessel resource.","description":"Retrieves a Vessel resource.","parameters":[{"name":"id","in":"path","description":"Vessel identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_vessels_id_delete","tags":["Vessel"],"responses":{"204":{"description":"Vessel resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the Vessel resource.","description":"Removes the Vessel resource.","parameters":[{"name":"id","in":"path","description":"Vessel identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_vessels_id_patch","tags":["Vessel"],"responses":{"200":{"description":"Vessel resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Vessel resource.","description":"Updates the Vessel resource.","parameters":[{"name":"id","in":"path","description":"Vessel identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Vessel resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel"}}},"required":true},"deprecated":false}},"\/api\/zones":{"get":{"operationId":"api_zones_get_collection","tags":["Zone"],"responses":{"200":{"description":"Zone collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Zone.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"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of Zone resources.","description":"Retrieves the collection of Zone resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false},{"name":"name","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_zones_post","tags":["Zone"],"responses":{"201":{"description":"Zone resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Zone.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Zone resource.","description":"Creates a Zone resource.","parameters":[],"requestBody":{"description":"The new Zone resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Zone.jsonld"}}},"required":true},"deprecated":false}},"\/api\/zones\/{id}":{"get":{"operationId":"api_zones_id_get","tags":["Zone"],"responses":{"200":{"description":"Zone resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Zone.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Zone resource.","description":"Retrieves a Zone resource.","parameters":[{"name":"id","in":"path","description":"Zone identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_zones_id_delete","tags":["Zone"],"responses":{"204":{"description":"Zone resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the Zone resource.","description":"Removes the Zone resource.","parameters":[{"name":"id","in":"path","description":"Zone identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_zones_id_patch","tags":["Zone"],"responses":{"200":{"description":"Zone resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Zone.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Zone resource.","description":"Updates the Zone resource.","parameters":[{"name":"id","in":"path","description":"Zone identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Zone resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Zone"}}},"required":true},"deprecated":false}}},"components":{"schemas":{"Location":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"zone":{"$ref":"#\/components\/schemas\/Zone"},"name":{"type":"string"},"code":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"Location.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"zone":{"$ref":"#\/components\/schemas\/Zone.jsonld"},"name":{"type":"string"},"code":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"MediaObject.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"contentUrl":{"externalDocs":{"url":"https:\/\/schema.org\/contentUrl"},"type":["string","null"]},"filePath":{"readOnly":true,"type":["string","null"]},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"ShippingCompany":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"name":{"type":"string"},"code":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"ShippingCompany.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"name":{"type":"string"},"code":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"Trip":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"vessel":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"pilotReference":{"type":"string"},"captainName":{"type":["string","null"]},"startLocation":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"endLocation":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["pilotReference","startDate","endDate"]},"Trip.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"vessel":{"readOnly":true,"$ref":"#\/components\/schemas\/Vessel.jsonld"},"pilotReference":{"type":"string"},"captainName":{"type":["string","null"]},"startLocation":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"endLocation":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["pilotReference","startDate","endDate"]},"TripLocation":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"trip":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"location":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"date":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["date"]},"TripLocation.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"trip":{"readOnly":true,"$ref":"#\/components\/schemas\/Trip.jsonld"},"location":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"date":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["date"]},"User":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"image":{"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"imageUrl":{"readOnly":true,"type":["string","null"]},"fullName":{"readOnly":true,"type":["string","null"]},"password":{"writeOnly":true,"description":"The plaintext password when being set or changed.","type":"string"},"active":{"type":"boolean"},"roles":{"readOnly":true,"type":"array","items":{"type":"string"}},"token":{"readOnly":true,"type":["string","null"]},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["email","firstName","lastName"]},"User.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"image":{"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"imageUrl":{"readOnly":true,"type":["string","null"]},"fullName":{"readOnly":true,"type":["string","null"]},"password":{"writeOnly":true,"description":"The plaintext password when being set or changed.","type":"string"},"active":{"type":"boolean"},"roles":{"readOnly":true,"type":"array","items":{"type":"string"}},"token":{"readOnly":true,"type":["string","null"]},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["email","firstName","lastName"]},"UserTrip":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"trip":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"user":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"captainName":{"type":"string"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["captainName","startDate","endDate"]},"UserTrip.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"trip":{"readOnly":true,"$ref":"#\/components\/schemas\/Trip.jsonld"},"user":{"readOnly":true,"$ref":"#\/components\/schemas\/User.jsonld"},"captainName":{"type":"string"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["captainName","startDate","endDate"]},"UserTripLocation":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"userTrip":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"location":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"plannedDate":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["plannedDate"]},"UserTripLocation.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"userTrip":{"readOnly":true,"$ref":"#\/components\/schemas\/UserTrip.jsonld"},"location":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"plannedDate":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["plannedDate"]},"UserTripWorkLog":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"userTrip":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"startLocation":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"endLocation":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["startDate","endDate"]},"UserTripWorkLog.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"userTrip":{"readOnly":true,"$ref":"#\/components\/schemas\/UserTrip.jsonld"},"startLocation":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"endLocation":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["startDate","endDate"]},"Vessel":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"name":{"type":"string"},"code":{"type":"string"},"company":{"$ref":"#\/components\/schemas\/ShippingCompany"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"Vessel.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"name":{"type":"string"},"code":{"type":"string"},"company":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"Zone":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"name":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name"]},"Zone.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"name":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"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":{"@id":{"type":"string","example":"\/api\/users\/1"},"dbId":{"type":"integer","example":1},"token":{"type":"string","example":"JWT_TOKEN"}}}},"responses":{},"parameters":{},"examples":{},"requestBodies":{},"headers":{},"securitySchemes":{"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"security":[{"JWT":[]}],"tags":[],"webhooks":{}} \ No newline at end of file +{"openapi":"3.1.0","info":{"title":"Imaq Platform","description":"","version":"1.0.0"},"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\/events":{"get":{"operationId":"api_events_get_collection","tags":["Event"],"responses":{"200":{"description":"Event collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Event.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"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of Event resources.","description":"Retrieves the collection of Event resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":200},"style":"form","explode":false,"allowReserved":false},{"name":"name","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false}},"\/api\/events\/{id}":{"get":{"operationId":"api_events_id_get","tags":["Event"],"responses":{"200":{"description":"Event resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Event.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Event resource.","description":"Retrieves a Event resource.","parameters":[{"name":"id","in":"path","description":"Event identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false}},"\/api\/locations":{"get":{"operationId":"api_locations_get_collection","tags":["Location"],"responses":{"200":{"description":"Location collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Location.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"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of Location resources.","description":"Retrieves the collection of Location resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":200},"style":"form","explode":false,"allowReserved":false},{"name":"name","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_locations_post","tags":["Location"],"responses":{"201":{"description":"Location resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Location.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Location resource.","description":"Creates a Location resource.","parameters":[],"requestBody":{"description":"The new Location resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Location.jsonld"}}},"required":true},"deprecated":false}},"\/api\/locations\/{id}":{"get":{"operationId":"api_locations_id_get","tags":["Location"],"responses":{"200":{"description":"Location resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Location.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Location resource.","description":"Retrieves a Location resource.","parameters":[{"name":"id","in":"path","description":"Location identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_locations_id_delete","tags":["Location"],"responses":{"204":{"description":"Location resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the Location resource.","description":"Removes the Location resource.","parameters":[{"name":"id","in":"path","description":"Location identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_locations_id_patch","tags":["Location"],"responses":{"200":{"description":"Location resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Location.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Location resource.","description":"Updates the Location resource.","parameters":[{"name":"id","in":"path","description":"Location identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Location resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Location"}}},"required":true},"deprecated":false}},"\/api\/media_objects":{"get":{"operationId":"api_media_objects_get_collection","tags":["MediaObject"],"responses":{"200":{"description":"MediaObject collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"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"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of MediaObject resources.","description":"Retrieves the collection of MediaObject resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":200},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_media_objects_post","tags":["MediaObject"],"responses":{"201":{"description":"MediaObject resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/MediaObject.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a MediaObject resource.","description":"Creates a MediaObject resource.","parameters":[],"requestBody":{"description":"The new MediaObject resource","content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":false},"deprecated":false}},"\/api\/media_objects\/{id}":{"get":{"operationId":"api_media_objects_id_get","tags":["MediaObject"],"responses":{"200":{"description":"MediaObject resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/MediaObject.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a MediaObject resource.","description":"Retrieves a MediaObject resource.","parameters":[{"name":"id","in":"path","description":"MediaObject identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_media_objects_id_delete","tags":["MediaObject"],"responses":{"204":{"description":"MediaObject resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the MediaObject resource.","description":"Removes the MediaObject resource.","parameters":[{"name":"id","in":"path","description":"MediaObject identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false}},"\/api\/shipping_companies":{"get":{"operationId":"api_shipping_companies_get_collection","tags":["ShippingCompany"],"responses":{"200":{"description":"ShippingCompany collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/ShippingCompany.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"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of ShippingCompany resources.","description":"Retrieves the collection of ShippingCompany resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":200},"style":"form","explode":false,"allowReserved":false},{"name":"name","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_shipping_companies_post","tags":["ShippingCompany"],"responses":{"201":{"description":"ShippingCompany resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a ShippingCompany resource.","description":"Creates a ShippingCompany resource.","parameters":[],"requestBody":{"description":"The new ShippingCompany resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}}},"required":true},"deprecated":false}},"\/api\/shipping_companies\/{id}":{"get":{"operationId":"api_shipping_companies_id_get","tags":["ShippingCompany"],"responses":{"200":{"description":"ShippingCompany resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a ShippingCompany resource.","description":"Retrieves a ShippingCompany resource.","parameters":[{"name":"id","in":"path","description":"ShippingCompany identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_shipping_companies_id_delete","tags":["ShippingCompany"],"responses":{"204":{"description":"ShippingCompany resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the ShippingCompany resource.","description":"Removes the ShippingCompany resource.","parameters":[{"name":"id","in":"path","description":"ShippingCompany identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_shipping_companies_id_patch","tags":["ShippingCompany"],"responses":{"200":{"description":"ShippingCompany resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the ShippingCompany resource.","description":"Updates the ShippingCompany resource.","parameters":[{"name":"id","in":"path","description":"ShippingCompany identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated ShippingCompany resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany"}}},"required":true},"deprecated":false}},"\/api\/trips":{"get":{"operationId":"api_trips_get_collection","tags":["Trip"],"responses":{"200":{"description":"Trip collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Trip.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"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of Trip resources.","description":"Retrieves the collection of Trip resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":200},"style":"form","explode":false,"allowReserved":false},{"name":"id","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"integer"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_trips_post","tags":["Trip"],"responses":{"201":{"description":"Trip resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Trip.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Trip resource.","description":"Creates a Trip resource.","parameters":[],"requestBody":{"description":"The new Trip resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Trip.jsonld"}}},"required":true},"deprecated":false}},"\/api\/trips\/{id}":{"get":{"operationId":"api_trips_id_get","tags":["Trip"],"responses":{"200":{"description":"Trip resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Trip.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Trip resource.","description":"Retrieves a Trip resource.","parameters":[{"name":"id","in":"path","description":"Trip identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_trips_id_delete","tags":["Trip"],"responses":{"204":{"description":"Trip resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the Trip resource.","description":"Removes the Trip resource.","parameters":[{"name":"id","in":"path","description":"Trip identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_trips_id_patch","tags":["Trip"],"responses":{"200":{"description":"Trip resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Trip.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Trip resource.","description":"Updates the Trip resource.","parameters":[{"name":"id","in":"path","description":"Trip identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Trip resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Trip"}}},"required":true},"deprecated":false}},"\/api\/trip_locations":{"get":{"operationId":"api_trip_locations_get_collection","tags":["TripLocation"],"responses":{"200":{"description":"TripLocation collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/TripLocation.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"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of TripLocation resources.","description":"Retrieves the collection of TripLocation resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":200},"style":"form","explode":false,"allowReserved":false},{"name":"trip","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"trip[]","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_trip_locations_post","tags":["TripLocation"],"responses":{"201":{"description":"TripLocation resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a TripLocation resource.","description":"Creates a TripLocation resource.","parameters":[],"requestBody":{"description":"The new TripLocation resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}}},"required":true},"deprecated":false}},"\/api\/trip_locations\/{id}":{"get":{"operationId":"api_trip_locations_id_get","tags":["TripLocation"],"responses":{"200":{"description":"TripLocation resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a TripLocation resource.","description":"Retrieves a TripLocation resource.","parameters":[{"name":"id","in":"path","description":"TripLocation identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_trip_locations_id_delete","tags":["TripLocation"],"responses":{"204":{"description":"TripLocation resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the TripLocation resource.","description":"Removes the TripLocation resource.","parameters":[{"name":"id","in":"path","description":"TripLocation identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_trip_locations_id_patch","tags":["TripLocation"],"responses":{"200":{"description":"TripLocation resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the TripLocation resource.","description":"Updates the TripLocation resource.","parameters":[{"name":"id","in":"path","description":"TripLocation identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated TripLocation resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation"}}},"required":true},"deprecated":false}},"\/api\/users":{"get":{"operationId":"api_users_get_collection","tags":["User"],"responses":{"200":{"description":"User collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/User.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"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of User resources.","description":"Retrieves the collection of User resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":200},"style":"form","explode":false,"allowReserved":false},{"name":"firstName","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"lastName","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"userNameSearch","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_users_post","tags":["User"],"responses":{"201":{"description":"User resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a User resource.","description":"Creates a User resource.","parameters":[],"requestBody":{"description":"The new User resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonld"}}},"required":true},"deprecated":false}},"\/api\/users\/{id}":{"get":{"operationId":"api_users_id_get","tags":["User"],"responses":{"200":{"description":"User resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a User resource.","description":"Retrieves a User resource.","parameters":[{"name":"id","in":"path","description":"User identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_users_id_delete","tags":["User"],"responses":{"204":{"description":"User resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the User resource.","description":"Removes the User resource.","parameters":[{"name":"id","in":"path","description":"User identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_users_id_patch","tags":["User"],"responses":{"200":{"description":"User resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the User resource.","description":"Updates the User resource.","parameters":[{"name":"id","in":"path","description":"User identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated User resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/User"}}},"required":true},"deprecated":false}},"\/api\/user_trips":{"get":{"operationId":"api_user_trips_get_collection","tags":["UserTrip"],"responses":{"200":{"description":"UserTrip collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserTrip.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"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of UserTrip resources.","description":"Retrieves the collection of UserTrip resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":200},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_user_trips_post","tags":["UserTrip"],"responses":{"201":{"description":"UserTrip resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a UserTrip resource.","description":"Creates a UserTrip resource.","parameters":[],"requestBody":{"description":"The new UserTrip resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}}},"required":true},"deprecated":false}},"\/api\/user_trips\/{id}":{"get":{"operationId":"api_user_trips_id_get","tags":["UserTrip"],"responses":{"200":{"description":"UserTrip resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a UserTrip resource.","description":"Retrieves a UserTrip resource.","parameters":[{"name":"id","in":"path","description":"UserTrip identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_user_trips_id_patch","tags":["UserTrip"],"responses":{"200":{"description":"UserTrip resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the UserTrip resource.","description":"Updates the UserTrip resource.","parameters":[{"name":"id","in":"path","description":"UserTrip identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated UserTrip resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip"}}},"required":true},"deprecated":false}},"\/api\/vessels":{"get":{"operationId":"api_vessels_get_collection","tags":["Vessel"],"responses":{"200":{"description":"Vessel collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Vessel.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"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of Vessel resources.","description":"Retrieves the collection of Vessel resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":200},"style":"form","explode":false,"allowReserved":false},{"name":"name","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_vessels_post","tags":["Vessel"],"responses":{"201":{"description":"Vessel resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Vessel resource.","description":"Creates a Vessel resource.","parameters":[],"requestBody":{"description":"The new Vessel resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}}},"required":true},"deprecated":false}},"\/api\/vessels\/{id}":{"get":{"operationId":"api_vessels_id_get","tags":["Vessel"],"responses":{"200":{"description":"Vessel resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Vessel resource.","description":"Retrieves a Vessel resource.","parameters":[{"name":"id","in":"path","description":"Vessel identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_vessels_id_delete","tags":["Vessel"],"responses":{"204":{"description":"Vessel resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the Vessel resource.","description":"Removes the Vessel resource.","parameters":[{"name":"id","in":"path","description":"Vessel identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_vessels_id_patch","tags":["Vessel"],"responses":{"200":{"description":"Vessel resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Vessel resource.","description":"Updates the Vessel resource.","parameters":[{"name":"id","in":"path","description":"Vessel identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Vessel resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel"}}},"required":true},"deprecated":false}},"\/api\/zones":{"get":{"operationId":"api_zones_get_collection","tags":["Zone"],"responses":{"200":{"description":"Zone collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Zone.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"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of Zone resources.","description":"Retrieves the collection of Zone resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":200},"style":"form","explode":false,"allowReserved":false},{"name":"name","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_zones_post","tags":["Zone"],"responses":{"201":{"description":"Zone resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Zone.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Zone resource.","description":"Creates a Zone resource.","parameters":[],"requestBody":{"description":"The new Zone resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Zone.jsonld"}}},"required":true},"deprecated":false}},"\/api\/zones\/{id}":{"get":{"operationId":"api_zones_id_get","tags":["Zone"],"responses":{"200":{"description":"Zone resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Zone.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Zone resource.","description":"Retrieves a Zone resource.","parameters":[{"name":"id","in":"path","description":"Zone identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_zones_id_delete","tags":["Zone"],"responses":{"204":{"description":"Zone resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the Zone resource.","description":"Removes the Zone resource.","parameters":[{"name":"id","in":"path","description":"Zone identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_zones_id_patch","tags":["Zone"],"responses":{"200":{"description":"Zone resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Zone.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Zone resource.","description":"Updates the Zone resource.","parameters":[{"name":"id","in":"path","description":"Zone identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Zone resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Zone"}}},"required":true},"deprecated":false}}},"components":{"schemas":{"Event.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"dbId":{"readOnly":true,"type":["integer","null"]},"name":{"type":"string"},"identifier":{"type":"string"},"sequence":{"type":"integer"},"mandatory":{"type":"boolean"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Location":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"zone":{"$ref":"#\/components\/schemas\/Zone"},"name":{"type":"string"},"code":{"type":"string"},"isZone":{"type":"boolean"},"isPlace":{"type":"boolean"},"isPort":{"type":"boolean"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"Location.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"zone":{"$ref":"#\/components\/schemas\/Zone.jsonld"},"name":{"type":"string"},"code":{"type":"string"},"isZone":{"type":"boolean"},"isPlace":{"type":"boolean"},"isPort":{"type":"boolean"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"MediaObject.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"contentUrl":{"externalDocs":{"url":"https:\/\/schema.org\/contentUrl"},"type":["string","null"]},"filePath":{"readOnly":true,"type":["string","null"]},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"ShippingCompany":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"name":{"type":"string"},"code":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"ShippingCompany.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"name":{"type":"string"},"code":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"Trip":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"vessel":{"$ref":"#\/components\/schemas\/Vessel"},"pilotageReference":{"readOnly":true,"type":["string","null"]},"customerReference":{"type":["string","null"]},"captainName":{"type":["string","null"]},"startLocation":{"$ref":"#\/components\/schemas\/Location"},"endLocation":{"$ref":"#\/components\/schemas\/Location"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"note":{"type":["string","null"]},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["startDate","endDate"]},"Trip.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"vessel":{"$ref":"#\/components\/schemas\/Vessel.jsonld"},"pilotageReference":{"readOnly":true,"type":["string","null"]},"customerReference":{"type":["string","null"]},"captainName":{"type":["string","null"]},"startLocation":{"$ref":"#\/components\/schemas\/Location.jsonld"},"endLocation":{"$ref":"#\/components\/schemas\/Location.jsonld"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"note":{"type":["string","null"]},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["startDate","endDate"]},"TripLocation":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"trip":{"$ref":"#\/components\/schemas\/Trip"},"location":{"$ref":"#\/components\/schemas\/Location"},"isArrival":{"type":"boolean"},"date":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["date"]},"TripLocation.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"trip":{"$ref":"#\/components\/schemas\/Trip.jsonld"},"location":{"$ref":"#\/components\/schemas\/Location.jsonld"},"isArrival":{"type":"boolean"},"date":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["date"]},"User":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":"string"},"firstName":{"type":"string"},"referenceId":{"type":"string"},"lastName":{"type":"string"},"image":{"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"imageUrl":{"readOnly":true,"type":["string","null"]},"fullName":{"readOnly":true,"type":["string","null"]},"password":{"writeOnly":true,"description":"The plaintext password when being set or changed.","type":"string"},"active":{"type":"boolean"},"roles":{"readOnly":true,"type":"array","items":{"type":"string"}},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["email","firstName","referenceId","lastName"]},"User.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":"string"},"firstName":{"type":"string"},"referenceId":{"type":"string"},"lastName":{"type":"string"},"image":{"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"imageUrl":{"readOnly":true,"type":["string","null"]},"fullName":{"readOnly":true,"type":["string","null"]},"password":{"writeOnly":true,"description":"The plaintext password when being set or changed.","type":"string"},"active":{"type":"boolean"},"roles":{"readOnly":true,"type":"array","items":{"type":"string"}},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["email","firstName","referenceId","lastName"]},"UserTrip":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"trip":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"user":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"captainName":{"type":"string"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["captainName","startDate","endDate"]},"UserTrip.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"trip":{"readOnly":true,"$ref":"#\/components\/schemas\/Trip.jsonld"},"user":{"readOnly":true,"$ref":"#\/components\/schemas\/User.jsonld"},"captainName":{"type":"string"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["captainName","startDate","endDate"]},"Vessel":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"name":{"type":"string"},"code":{"type":"string"},"company":{"$ref":"#\/components\/schemas\/ShippingCompany"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"Vessel.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"name":{"type":"string"},"code":{"type":"string"},"company":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"Zone":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"name":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name"]},"Zone.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"name":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"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":{"@id":{"type":"string","example":"\/api\/users\/1"},"dbId":{"type":"integer","example":1},"token":{"type":"string","example":"JWT_TOKEN"}}}},"responses":{},"parameters":{},"examples":{},"requestBodies":{},"headers":{},"securitySchemes":{"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"security":[{"JWT":[]}],"tags":[],"webhooks":{}} \ No newline at end of file diff --git a/angular/openapi.yaml b/angular/openapi.yaml index f6336e5..2e0d2b2 100644 --- a/angular/openapi.yaml +++ b/angular/openapi.yaml @@ -29,6 +29,123 @@ paths: $ref: '#/components/schemas/Credentials' required: false security: [] + /api/events: + get: + operationId: api_events_get_collection + tags: + - Event + responses: + '200': + description: 'Event collection' + content: + application/ld+json: + schema: + type: object + properties: + member: { type: array, items: { $ref: '#/components/schemas/Event.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 } } } } } } + required: + - member + summary: 'Retrieves the collection of Event resources.' + description: 'Retrieves the collection of Event resources.' + parameters: + - + name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + - + name: itemsPerPage + in: query + description: 'The number of items per page' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 50 + minimum: 0 + maximum: 200 + style: form + explode: false + allowReserved: false + - + name: name + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: false + schema: + type: string + style: form + explode: false + allowReserved: false + - + name: custom_json_filter + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: false + schema: + type: string + style: form + explode: false + allowReserved: false + - + name: custom_json_order + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: false + schema: + type: string + style: form + explode: false + allowReserved: false + deprecated: false + '/api/events/{id}': + get: + operationId: api_events_id_get + tags: + - Event + responses: + '200': + description: 'Event resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Event.jsonld' + '404': + description: 'Resource not found' + summary: 'Retrieves a Event resource.' + description: 'Retrieves a Event resource.' + parameters: + - + name: id + in: path + description: 'Event identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false /api/locations: get: operationId: api_locations_get_collection @@ -75,7 +192,7 @@ paths: type: integer default: 50 minimum: 0 - maximum: 100 + maximum: 200 style: form explode: false allowReserved: false @@ -285,7 +402,7 @@ paths: type: integer default: 50 minimum: 0 - maximum: 100 + maximum: 200 style: form explode: false allowReserved: false @@ -422,7 +539,7 @@ paths: type: integer default: 50 minimum: 0 - maximum: 100 + maximum: 200 style: form explode: false allowReserved: false @@ -632,7 +749,43 @@ paths: type: integer default: 50 minimum: 0 - maximum: 100 + maximum: 200 + style: form + explode: false + allowReserved: false + - + name: id + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: false + schema: + type: integer + style: form + explode: false + allowReserved: false + - + name: custom_json_filter + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: false + schema: + type: string + style: form + explode: false + allowReserved: false + - + name: custom_json_order + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: false + schema: + type: string style: form explode: false allowReserved: false @@ -694,6 +847,31 @@ paths: explode: false allowReserved: false deprecated: false + delete: + operationId: api_trips_id_delete + tags: + - Trip + responses: + '204': + description: 'Trip resource deleted' + '404': + description: 'Resource not found' + summary: 'Removes the Trip resource.' + description: 'Removes the Trip resource.' + parameters: + - + name: id + in: path + description: 'Trip identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false patch: operationId: api_trips_id_patch tags: @@ -781,7 +959,57 @@ paths: type: integer default: 50 minimum: 0 - maximum: 100 + maximum: 200 + style: form + explode: false + allowReserved: false + - + name: trip + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: false + schema: + type: string + style: form + explode: false + allowReserved: false + - + name: 'trip[]' + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: false + schema: + type: array + items: + type: string + style: form + explode: true + allowReserved: false + - + name: custom_json_filter + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: false + schema: + type: string + style: form + explode: false + allowReserved: false + - + name: custom_json_order + in: query + description: '' + required: false + deprecated: false + allowEmptyValue: false + schema: + type: string style: form explode: false allowReserved: false @@ -843,6 +1071,31 @@ paths: explode: false allowReserved: false deprecated: false + delete: + operationId: api_trip_locations_id_delete + tags: + - TripLocation + responses: + '204': + description: 'TripLocation resource deleted' + '404': + description: 'Resource not found' + summary: 'Removes the TripLocation resource.' + description: 'Removes the TripLocation resource.' + parameters: + - + name: id + in: path + description: 'TripLocation identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false patch: operationId: api_trip_locations_id_patch tags: @@ -930,7 +1183,7 @@ paths: type: integer default: 50 minimum: 0 - maximum: 100 + maximum: 200 style: form explode: false allowReserved: false @@ -1152,7 +1405,7 @@ paths: type: integer default: 50 minimum: 0 - maximum: 100 + maximum: 200 style: form explode: false allowReserved: false @@ -1255,27 +1508,27 @@ paths: $ref: '#/components/schemas/UserTrip' required: true deprecated: false - /api/user_trip_locations: + /api/vessels: get: - operationId: api_user_trip_locations_get_collection + operationId: api_vessels_get_collection tags: - - UserTripLocation + - Vessel responses: '200': - description: 'UserTripLocation collection' + description: 'Vessel collection' content: application/ld+json: schema: type: object properties: - member: { type: array, items: { $ref: '#/components/schemas/UserTripLocation.jsonld' } } + member: { type: array, items: { $ref: '#/components/schemas/Vessel.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 } } } } } } required: - member - summary: 'Retrieves the collection of UserTripLocation resources.' - description: 'Retrieves the collection of UserTripLocation resources.' + summary: 'Retrieves the collection of Vessel resources.' + description: 'Retrieves the collection of Vessel resources.' parameters: - name: page @@ -1301,305 +1554,7 @@ paths: type: integer default: 50 minimum: 0 - maximum: 100 - style: form - explode: false - allowReserved: false - deprecated: false - post: - operationId: api_user_trip_locations_post - tags: - - UserTripLocation - responses: - '201': - description: 'UserTripLocation resource created' - content: - application/ld+json: - schema: - $ref: '#/components/schemas/UserTripLocation.jsonld' - links: { } - '400': - description: 'Invalid input' - '422': - description: 'Unprocessable entity' - summary: 'Creates a UserTripLocation resource.' - description: 'Creates a UserTripLocation resource.' - parameters: [] - requestBody: - description: 'The new UserTripLocation resource' - content: - application/ld+json: - schema: - $ref: '#/components/schemas/UserTripLocation.jsonld' - required: true - deprecated: false - '/api/user_trip_locations/{id}': - get: - operationId: api_user_trip_locations_id_get - tags: - - UserTripLocation - responses: - '200': - description: 'UserTripLocation resource' - content: - application/ld+json: - schema: - $ref: '#/components/schemas/UserTripLocation.jsonld' - '404': - description: 'Resource not found' - summary: 'Retrieves a UserTripLocation resource.' - description: 'Retrieves a UserTripLocation resource.' - parameters: - - - name: id - in: path - description: 'UserTripLocation identifier' - required: true - deprecated: false - allowEmptyValue: false - schema: - type: string - style: simple - explode: false - allowReserved: false - deprecated: false - patch: - operationId: api_user_trip_locations_id_patch - tags: - - UserTripLocation - responses: - '200': - description: 'UserTripLocation resource updated' - content: - application/ld+json: - schema: - $ref: '#/components/schemas/UserTripLocation.jsonld' - links: { } - '400': - description: 'Invalid input' - '422': - description: 'Unprocessable entity' - '404': - description: 'Resource not found' - summary: 'Updates the UserTripLocation resource.' - description: 'Updates the UserTripLocation resource.' - parameters: - - - name: id - in: path - description: 'UserTripLocation identifier' - required: true - deprecated: false - allowEmptyValue: false - schema: - type: string - style: simple - explode: false - allowReserved: false - requestBody: - description: 'The updated UserTripLocation resource' - content: - application/merge-patch+json: - schema: - $ref: '#/components/schemas/UserTripLocation' - required: true - deprecated: false - /api/user_trip_work_logs: - get: - operationId: api_user_trip_work_logs_get_collection - tags: - - UserTripWorkLog - responses: - '200': - description: 'UserTripWorkLog collection' - content: - application/ld+json: - schema: - type: object - properties: - member: { type: array, items: { $ref: '#/components/schemas/UserTripWorkLog.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 } } } } } } - required: - - member - summary: 'Retrieves the collection of UserTripWorkLog resources.' - description: 'Retrieves the collection of UserTripWorkLog resources.' - parameters: - - - name: page - in: query - description: 'The collection page number' - required: false - deprecated: false - allowEmptyValue: true - schema: - type: integer - default: 1 - style: form - explode: false - allowReserved: false - - - name: itemsPerPage - in: query - description: 'The number of items per page' - required: false - deprecated: false - allowEmptyValue: true - schema: - type: integer - default: 50 - minimum: 0 - maximum: 100 - style: form - explode: false - allowReserved: false - deprecated: false - post: - operationId: api_user_trip_work_logs_post - tags: - - UserTripWorkLog - responses: - '201': - description: 'UserTripWorkLog resource created' - content: - application/ld+json: - schema: - $ref: '#/components/schemas/UserTripWorkLog.jsonld' - links: { } - '400': - description: 'Invalid input' - '422': - description: 'Unprocessable entity' - summary: 'Creates a UserTripWorkLog resource.' - description: 'Creates a UserTripWorkLog resource.' - parameters: [] - requestBody: - description: 'The new UserTripWorkLog resource' - content: - application/ld+json: - schema: - $ref: '#/components/schemas/UserTripWorkLog.jsonld' - required: true - deprecated: false - '/api/user_trip_work_logs/{id}': - get: - operationId: api_user_trip_work_logs_id_get - tags: - - UserTripWorkLog - responses: - '200': - description: 'UserTripWorkLog resource' - content: - application/ld+json: - schema: - $ref: '#/components/schemas/UserTripWorkLog.jsonld' - '404': - description: 'Resource not found' - summary: 'Retrieves a UserTripWorkLog resource.' - description: 'Retrieves a UserTripWorkLog resource.' - parameters: - - - name: id - in: path - description: 'UserTripWorkLog identifier' - required: true - deprecated: false - allowEmptyValue: false - schema: - type: string - style: simple - explode: false - allowReserved: false - deprecated: false - patch: - operationId: api_user_trip_work_logs_id_patch - tags: - - UserTripWorkLog - responses: - '200': - description: 'UserTripWorkLog resource updated' - content: - application/ld+json: - schema: - $ref: '#/components/schemas/UserTripWorkLog.jsonld' - links: { } - '400': - description: 'Invalid input' - '422': - description: 'Unprocessable entity' - '404': - description: 'Resource not found' - summary: 'Updates the UserTripWorkLog resource.' - description: 'Updates the UserTripWorkLog resource.' - parameters: - - - name: id - in: path - description: 'UserTripWorkLog identifier' - required: true - deprecated: false - allowEmptyValue: false - schema: - type: string - style: simple - explode: false - allowReserved: false - requestBody: - description: 'The updated UserTripWorkLog resource' - content: - application/merge-patch+json: - schema: - $ref: '#/components/schemas/UserTripWorkLog' - required: true - deprecated: false - /api/vessels: - get: - operationId: api_vessels_get_collection - tags: - - Vessel - responses: - '200': - description: 'Vessel collection' - content: - application/ld+json: - schema: - type: object - properties: - member: { type: array, items: { $ref: '#/components/schemas/Vessel.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 } } } } } } - required: - - member - summary: 'Retrieves the collection of Vessel resources.' - description: 'Retrieves the collection of Vessel resources.' - parameters: - - - name: page - in: query - description: 'The collection page number' - required: false - deprecated: false - allowEmptyValue: true - schema: - type: integer - default: 1 - style: form - explode: false - allowReserved: false - - - name: itemsPerPage - in: query - description: 'The number of items per page' - required: false - deprecated: false - allowEmptyValue: true - schema: - type: integer - default: 50 - minimum: 0 - maximum: 100 + maximum: 200 style: form explode: false allowReserved: false @@ -1809,7 +1764,7 @@ paths: type: integer default: 50 minimum: 0 - maximum: 100 + maximum: 200 style: form explode: false allowReserved: false @@ -1975,6 +1930,53 @@ paths: deprecated: false components: schemas: + Event.jsonld: + type: object + description: '' + deprecated: false + properties: + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + '@context': + readOnly: true + oneOf: + - + type: string + - + type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: ['http://www.w3.org/ns/hydra/core#'] + required: + - '@vocab' + - hydra + additionalProperties: true + dbId: + readOnly: true + type: + - integer + - 'null' + name: + type: string + identifier: + type: string + sequence: + type: integer + mandatory: + type: boolean + createdAt: + readOnly: true + type: + - string + - 'null' + format: date-time Location: type: object description: '' @@ -1991,6 +1993,12 @@ components: type: string code: type: string + isZone: + type: boolean + isPlace: + type: boolean + isPort: + type: boolean createdAt: readOnly: true type: @@ -2039,6 +2047,12 @@ components: type: string code: type: string + isZone: + type: boolean + isPlace: + type: boolean + isPort: + type: boolean createdAt: readOnly: true type: @@ -2178,32 +2192,34 @@ components: - integer - 'null' vessel: + $ref: '#/components/schemas/Vessel' + pilotageReference: readOnly: true - type: string - format: iri-reference - example: 'https://example.com/' - pilotReference: - type: string + type: + - string + - 'null' + customerReference: + type: + - string + - 'null' captainName: type: - string - 'null' startLocation: - readOnly: true - type: string - format: iri-reference - example: 'https://example.com/' + $ref: '#/components/schemas/Location' endLocation: - readOnly: true - type: string - format: iri-reference - example: 'https://example.com/' + $ref: '#/components/schemas/Location' startDate: type: string format: date-time endDate: type: string format: date-time + note: + type: + - string + - 'null' createdAt: readOnly: true type: @@ -2211,7 +2227,6 @@ components: - 'null' format: date-time required: - - pilotReference - startDate - endDate Trip.jsonld: @@ -2248,19 +2263,23 @@ components: - integer - 'null' vessel: - readOnly: true $ref: '#/components/schemas/Vessel.jsonld' - pilotReference: - type: string + pilotageReference: + readOnly: true + type: + - string + - 'null' + customerReference: + type: + - string + - 'null' captainName: type: - string - 'null' startLocation: - readOnly: true $ref: '#/components/schemas/Location.jsonld' endLocation: - readOnly: true $ref: '#/components/schemas/Location.jsonld' startDate: type: string @@ -2268,6 +2287,10 @@ components: endDate: type: string format: date-time + note: + type: + - string + - 'null' createdAt: readOnly: true type: @@ -2275,7 +2298,6 @@ components: - 'null' format: date-time required: - - pilotReference - startDate - endDate TripLocation: @@ -2289,15 +2311,11 @@ components: - integer - 'null' trip: - readOnly: true - type: string - format: iri-reference - example: 'https://example.com/' + $ref: '#/components/schemas/Trip' location: - readOnly: true - type: string - format: iri-reference - example: 'https://example.com/' + $ref: '#/components/schemas/Location' + isArrival: + type: boolean date: type: string format: date-time @@ -2343,11 +2361,11 @@ components: - integer - 'null' trip: - readOnly: true $ref: '#/components/schemas/Trip.jsonld' location: - readOnly: true $ref: '#/components/schemas/Location.jsonld' + isArrival: + type: boolean date: type: string format: date-time @@ -2376,6 +2394,8 @@ components: type: string firstName: type: string + referenceId: + type: string lastName: type: string image: @@ -2405,11 +2425,6 @@ components: type: array items: type: string - token: - readOnly: true - type: - - string - - 'null' createdAt: readOnly: true type: @@ -2419,6 +2434,7 @@ components: required: - email - firstName + - referenceId - lastName User.jsonld: type: object @@ -2460,6 +2476,8 @@ components: type: string firstName: type: string + referenceId: + type: string lastName: type: string image: @@ -2489,11 +2507,6 @@ components: type: array items: type: string - token: - readOnly: true - type: - - string - - 'null' createdAt: readOnly: true type: @@ -2503,6 +2516,7 @@ components: required: - email - firstName + - referenceId - lastName UserTrip: type: object @@ -2599,184 +2613,6 @@ components: - captainName - startDate - endDate - UserTripLocation: - type: object - description: '' - deprecated: false - properties: - dbId: - readOnly: true - type: - - integer - - 'null' - userTrip: - readOnly: true - type: string - format: iri-reference - example: 'https://example.com/' - location: - readOnly: true - type: string - format: iri-reference - example: 'https://example.com/' - plannedDate: - type: string - format: date-time - createdAt: - readOnly: true - type: - - string - - 'null' - format: date-time - required: - - plannedDate - UserTripLocation.jsonld: - type: object - description: '' - deprecated: false - properties: - '@context': - readOnly: true - oneOf: - - - type: string - - - type: object - properties: - '@vocab': - type: string - hydra: - type: string - enum: ['http://www.w3.org/ns/hydra/core#'] - required: - - '@vocab' - - hydra - additionalProperties: true - '@id': - readOnly: true - type: string - '@type': - readOnly: true - type: string - dbId: - readOnly: true - type: - - integer - - 'null' - userTrip: - readOnly: true - $ref: '#/components/schemas/UserTrip.jsonld' - location: - readOnly: true - $ref: '#/components/schemas/Location.jsonld' - plannedDate: - type: string - format: date-time - createdAt: - readOnly: true - type: - - string - - 'null' - format: date-time - required: - - plannedDate - UserTripWorkLog: - type: object - description: '' - deprecated: false - properties: - dbId: - readOnly: true - type: - - integer - - 'null' - userTrip: - readOnly: true - type: string - format: iri-reference - example: 'https://example.com/' - startLocation: - readOnly: true - type: string - format: iri-reference - example: 'https://example.com/' - endLocation: - readOnly: true - type: string - format: iri-reference - example: 'https://example.com/' - startDate: - type: string - format: date-time - endDate: - type: string - format: date-time - createdAt: - readOnly: true - type: - - string - - 'null' - format: date-time - required: - - startDate - - endDate - UserTripWorkLog.jsonld: - type: object - description: '' - deprecated: false - properties: - '@context': - readOnly: true - oneOf: - - - type: string - - - type: object - properties: - '@vocab': - type: string - hydra: - type: string - enum: ['http://www.w3.org/ns/hydra/core#'] - required: - - '@vocab' - - hydra - additionalProperties: true - '@id': - readOnly: true - type: string - '@type': - readOnly: true - type: string - dbId: - readOnly: true - type: - - integer - - 'null' - userTrip: - readOnly: true - $ref: '#/components/schemas/UserTrip.jsonld' - startLocation: - readOnly: true - $ref: '#/components/schemas/Location.jsonld' - endLocation: - readOnly: true - $ref: '#/components/schemas/Location.jsonld' - startDate: - type: string - format: date-time - endDate: - type: string - format: date-time - createdAt: - readOnly: true - type: - - string - - 'null' - format: date-time - required: - - startDate - - endDate Vessel: type: object description: '' diff --git a/angular/src/app/_components/_abstract/abstract-data-form-component.ts b/angular/src/app/_components/_abstract/abstract-data-form-component.ts index c98052f..5ea56ec 100644 --- a/angular/src/app/_components/_abstract/abstract-data-form-component.ts +++ b/angular/src/app/_components/_abstract/abstract-data-form-component.ts @@ -100,6 +100,12 @@ export abstract class AbstractDataFormComponent
-

{{'trips.view' | translate}}

+

{{'trip.view' | translate}}

diff --git a/angular/src/app/_components/search-select/search-select.component.ts b/angular/src/app/_components/search-select/search-select.component.ts index 95e09df..b4ff227 100644 --- a/angular/src/app/_components/search-select/search-select.component.ts +++ b/angular/src/app/_components/search-select/search-select.component.ts @@ -47,6 +47,8 @@ export class SearchSelectComponent implements OnInit, AfterViewInit { if (this.dataSet !== undefined) { this.searchBoxFilled = true; } + // Add this line to create a deep copy of the listColDefinitions + this.listColDefinitions = JSON.parse(JSON.stringify(this.listColDefinitions)); } ngAfterViewInit(): void { @@ -95,6 +97,36 @@ export class SearchSelectComponent implements OnInit, AfterViewInit { return this.listComponent.getPageSize(); } + public static getDefaultColDefLocations(subResource?: string): ListColDefinition[] { + return [ + { + name: 'name', + text: 'common.name', + type: ListComponent.COLUMN_TYPE_TEXT, + field: 'name', + sortable: true, + filterType: FilterBarComponent.FILTER_TYPE_TEXT, + } as ListColDefinition, + { + name: 'code', + text: 'common.code', + type: ListComponent.COLUMN_TYPE_TEXT, + field: 'code', + sortable: true, + filterType: FilterBarComponent.FILTER_TYPE_TEXT, + } as ListColDefinition, + { + name: 'zone', + text: 'model.zone', + type: ListComponent.COLUMN_TYPE_TEXT, + subResource: 'zone', + field: 'name', + sortable: true, + filterType: FilterBarComponent.FILTER_TYPE_TEXT, + } as ListColDefinition, + ]; + } + public static getDefaultColDefZones(subResource?: string): ListColDefinition[] { return [ { @@ -144,4 +176,42 @@ export class SearchSelectComponent implements OnInit, AfterViewInit { } as ListColDefinition, ]; } + + public static getDefaultColDefVessels(subResource?: string): ListColDefinition[] { + return [ + { + name: 'name', + text: 'common.name', + type: ListComponent.COLUMN_TYPE_TEXT, + field: 'name', + sortable: true, + filterType: FilterBarComponent.FILTER_TYPE_TEXT, + } as ListColDefinition, + { + name: 'code', + text: 'common.code', + type: ListComponent.COLUMN_TYPE_TEXT, + field: 'code', + sortable: true, + filterType: FilterBarComponent.FILTER_TYPE_TEXT, + } as ListColDefinition, + { + name: 'shippingCompanyName', + text: 'model.shipping_company', + type: ListComponent.COLUMN_TYPE_TEXT, + subResource: 'company', + field: 'name', + sortable: true, + filterType: FilterBarComponent.FILTER_TYPE_TEXT, + } as ListColDefinition, + { + name: 'createdAt', + text: 'common.created_at', + type: ListComponent.COLUMN_TYPE_DATE, + field: 'createdAt', + sortable: true, + filterType: FilterBarComponent.FILTER_TYPE_DATE, + } as ListColDefinition, + ]; + } } diff --git a/angular/src/app/_forms/apiForms.ts b/angular/src/app/_forms/apiForms.ts index 36da9cc..a523dc8 100644 --- a/angular/src/app/_forms/apiForms.ts +++ b/angular/src/app/_forms/apiForms.ts @@ -1,10 +1,22 @@ import { FormGroup, FormControl, Validators } from '@angular/forms'; +export const eventJsonldForm = new FormGroup({ + dbId: new FormControl(null, []), + name: new FormControl(null, []), + identifier: new FormControl(null, []), + sequence: new FormControl(null, []), + mandatory: new FormControl(null, []), + createdAt: new FormControl(null, []) +}); + export const locationForm = new FormGroup({ dbId: new FormControl(null, []), zone: new FormControl(null, []), name: new FormControl(null, [Validators.required]), code: new FormControl(null, [Validators.required]), + isZone: new FormControl(null, []), + isPlace: new FormControl(null, []), + isPort: new FormControl(null, []), createdAt: new FormControl(null, []) }); @@ -13,6 +25,9 @@ export const locationJsonldForm = new FormGroup({ zone: new FormControl(null, []), name: new FormControl(null, [Validators.required]), code: new FormControl(null, [Validators.required]), + isZone: new FormControl(null, []), + isPlace: new FormControl(null, []), + isPort: new FormControl(null, []), createdAt: new FormControl(null, []) }); @@ -40,24 +55,28 @@ export const shippingCompanyJsonldForm = new FormGroup({ export const tripForm = new FormGroup({ dbId: new FormControl(null, []), vessel: new FormControl(null, []), - pilotReference: new FormControl(null, [Validators.required]), + pilotageReference: new FormControl(null, []), + customerReference: new FormControl(null, []), captainName: new FormControl(null, []), startLocation: new FormControl(null, []), endLocation: new FormControl(null, []), startDate: new FormControl(null, [Validators.required]), endDate: new FormControl(null, [Validators.required]), + note: new FormControl(null, []), createdAt: new FormControl(null, []) }); export const tripJsonldForm = new FormGroup({ dbId: new FormControl(null, []), vessel: new FormControl(null, []), - pilotReference: new FormControl(null, [Validators.required]), + pilotageReference: new FormControl(null, []), + customerReference: new FormControl(null, []), captainName: new FormControl(null, []), startLocation: new FormControl(null, []), endLocation: new FormControl(null, []), startDate: new FormControl(null, [Validators.required]), endDate: new FormControl(null, [Validators.required]), + note: new FormControl(null, []), createdAt: new FormControl(null, []) }); @@ -65,6 +84,7 @@ export const tripLocationForm = new FormGroup({ dbId: new FormControl(null, []), trip: new FormControl(null, []), location: new FormControl(null, []), + isArrival: new FormControl(null, []), date: new FormControl(null, [Validators.required]), createdAt: new FormControl(null, []) }); @@ -73,6 +93,7 @@ export const tripLocationJsonldForm = new FormGroup({ dbId: new FormControl(null, []), trip: new FormControl(null, []), location: new FormControl(null, []), + isArrival: new FormControl(null, []), date: new FormControl(null, [Validators.required]), createdAt: new FormControl(null, []) }); @@ -81,6 +102,7 @@ export const userForm = new FormGroup({ dbId: new FormControl(null, []), email: new FormControl(null, [Validators.required, Validators.email]), firstName: new FormControl(null, [Validators.required]), + referenceId: new FormControl(null, [Validators.required]), lastName: new FormControl(null, [Validators.required]), image: new FormControl(null, []), imageUrl: new FormControl(null, []), @@ -88,7 +110,6 @@ export const userForm = new FormGroup({ password: new FormControl(null, []), active: new FormControl(null, []), roles: new FormControl(null, []), - token: new FormControl(null, []), createdAt: new FormControl(null, []) }); @@ -96,6 +117,7 @@ export const userJsonldForm = new FormGroup({ dbId: new FormControl(null, []), email: new FormControl(null, [Validators.required, Validators.email]), firstName: new FormControl(null, [Validators.required]), + referenceId: new FormControl(null, [Validators.required]), lastName: new FormControl(null, [Validators.required]), image: new FormControl(null, []), imageUrl: new FormControl(null, []), @@ -103,7 +125,6 @@ export const userJsonldForm = new FormGroup({ password: new FormControl(null, []), active: new FormControl(null, []), roles: new FormControl(null, []), - token: new FormControl(null, []), createdAt: new FormControl(null, []) }); @@ -127,42 +148,6 @@ export const userTripJsonldForm = new FormGroup({ createdAt: new FormControl(null, []) }); -export const userTripLocationForm = new FormGroup({ - dbId: new FormControl(null, []), - userTrip: new FormControl(null, []), - location: new FormControl(null, []), - plannedDate: new FormControl(null, [Validators.required]), - createdAt: new FormControl(null, []) -}); - -export const userTripLocationJsonldForm = new FormGroup({ - dbId: new FormControl(null, []), - userTrip: new FormControl(null, []), - location: new FormControl(null, []), - plannedDate: new FormControl(null, [Validators.required]), - createdAt: new FormControl(null, []) -}); - -export const userTripWorkLogForm = new FormGroup({ - dbId: new FormControl(null, []), - 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 userTripWorkLogJsonldForm = new FormGroup({ - dbId: new FormControl(null, []), - 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 vesselForm = new FormGroup({ dbId: new FormControl(null, []), name: new FormControl(null, [Validators.required]), diff --git a/angular/src/app/_helpers/jwt.interceptor.ts b/angular/src/app/_helpers/jwt.interceptor.ts index 85a2550..d71c4b1 100644 --- a/angular/src/app/_helpers/jwt.interceptor.ts +++ b/angular/src/app/_helpers/jwt.interceptor.ts @@ -12,12 +12,13 @@ export class JwtInterceptor implements HttpInterceptor { intercept(request: HttpRequest, next: HttpHandler): Observable> { // add auth header with jwt if user is logged in and request is to the api url const user = this.accountService.userValue; - const isLoggedIn = user && user.token; + const token = localStorage.getItem('token'); + const isLoggedIn = user && token; const isApiUrl = request.url.startsWith(environment.apiUrl); if (isLoggedIn && isApiUrl) { request = request.clone({ setHeaders: { - Authorization: `Bearer ${user.token}` + Authorization: `Bearer ${token}` } }); } diff --git a/angular/src/app/_views/location/location-form/location-form.component.html b/angular/src/app/_views/location/location-form/location-form.component.html index 4666659..525ce0e 100644 --- a/angular/src/app/_views/location/location-form/location-form.component.html +++ b/angular/src/app/_views/location/location-form/location-form.component.html @@ -3,7 +3,7 @@

{{ (isEditMode() ? 'basic.edit' : 'basic.new') | translate }} {{ 'model.location' | translate }}

-
+
@@ -27,6 +27,30 @@
+
+

{{ 'location.is_zone' | translate }}:

+ +
+ +
+

{{ 'location.is_place' | translate }}:

+ +
+ +
+

{{ 'location.is_port' | translate }}:

+ +
+
+
+
+ + +
+ +
+ +
+ +
+ + + + +} \ No newline at end of file diff --git a/angular/src/app/_views/trip/trip-detail/trip-detail.component.scss b/angular/src/app/_views/trip/trip-detail/trip-detail.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/angular/src/app/_views/trip/trip-detail/trip-detail.component.spec.ts b/angular/src/app/_views/trip/trip-detail/trip-detail.component.spec.ts new file mode 100644 index 0000000..ea5a487 --- /dev/null +++ b/angular/src/app/_views/trip/trip-detail/trip-detail.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { TripDetailComponent } from './trip-detail.component'; + +describe('TripDetailComponent', () => { + let component: TripDetailComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [TripDetailComponent] + }) + .compileComponents(); + + fixture = TestBed.createComponent(TripDetailComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/angular/src/app/_views/trip/trip-detail/trip-detail.component.ts b/angular/src/app/_views/trip/trip-detail/trip-detail.component.ts new file mode 100644 index 0000000..7394414 --- /dev/null +++ b/angular/src/app/_views/trip/trip-detail/trip-detail.component.ts @@ -0,0 +1,218 @@ +import { Component, OnInit, ViewChild, AfterViewInit, QueryList, ViewChildren } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { TripJsonld, TripLocationJsonld, TripLocationService, TripService, LocationService, LocationJsonld } from "@app/core/api/v1"; +import { AppHelperService } from "@app/_helpers/app-helper.service"; +import { ActivatedRoute } from "@angular/router"; +import { FormMode, FormSubmitEvent } from "@app/_components/_abstract/abstract-data-form-component"; +import { ModalStatus } from "@app/_helpers/modal.states"; +import { Observable } from 'rxjs'; +import { ListColDefinition } from '@app/_components/list/list-col-definition'; +import { SearchSelectComponent } from '@app/_components/search-select/search-select.component'; +import { ListComponent } from '@app/_components/list/list.component'; + +@Component({ + selector: 'app-trip-detail', + templateUrl: './trip-detail.component.html', + styleUrl: './trip-detail.component.scss' +}) +export class TripDetailComponent implements OnInit, AfterViewInit { + protected trip!: TripJsonld; + protected readonly FormMode = FormMode; + protected tripLocations: TripLocationJsonld[] = []; + protected locationForms: FormGroup[] = []; + protected locationColDefinitions: ListColDefinition[] = SearchSelectComponent.getDefaultColDefLocations(); + + @ViewChildren(SearchSelectComponent) searchSelects!: QueryList; + + constructor( + private tripService: TripService, + private tripLocationService: TripLocationService, + private locationService: LocationService, + protected appHelperService: AppHelperService, + private route: ActivatedRoute, + private fb: FormBuilder + ) {} + + ngOnInit() { + this.route.params.subscribe(params => { + this.tripService.tripsIdGet(params['id']).subscribe( + data => { + this.trip = data; + this.loadTripLocations(); + } + ); + }); + } + + ngAfterViewInit() { + // Reinitialize search selects when they change + this.searchSelects.changes.subscribe(components => { + components.forEach((component: SearchSelectComponent) => { + // Force search selects to initialize + if (component.dataSet) { + component.ngAfterViewInit(); + } + }); + }); + } + + loadTripLocations() { + this.tripLocationService.tripLocationsGetCollection( + 1, + 200, + this.trip !== undefined ? this.trip.id : undefined, + ).subscribe( + data => { + this.tripLocations = data.member; + // Create a form for each trip location + this.locationForms = []; + this.tripLocations.forEach(() => { + this.locationForms.push(this.createLocationForm()); + }); + } + ); + } + + createLocationForm(): FormGroup { + return this.fb.group({ + location: [null] + }); + } + + getLocations = (page: number, pageSize: number, term?: string): Observable => { + return this.locationService.locationsGetCollection(page, pageSize, undefined, term); + } + + onFormUpdate(event: FormSubmitEvent) { + if (event.status === ModalStatus.Submitted && event.data) { + this.trip = event.data; + } + } + + formatDateForInput(dateString: string): string { + if (!dateString) return ''; + const date = new Date(dateString); + return date.toISOString().split('T')[0]; + } + + formatTimeForInput(dateString: string): string { + if (!dateString) return ''; + const date = new Date(dateString); + return date.toTimeString().slice(0, 5); + } + + onDateInputChange(event: Event, index: number) { + const input = event.target as HTMLInputElement; + const currentDate = new Date(this.tripLocations[index].date || new Date()); + const [year, month, day] = input.value.split('-').map(Number); + + currentDate.setFullYear(year, month - 1, day); + this.tripLocations[index].date = currentDate.toISOString(); + } + + onTimeInputChange(event: Event, index: number) { + const input = event.target as HTMLInputElement; + const currentDate = new Date(this.tripLocations[index].date || new Date()); + const [hours, minutes] = input.value.split(':').map(Number); + + currentDate.setHours(hours, minutes); + this.tripLocations[index].date = currentDate.toISOString(); + } + + onIsArrivalChange(event: Event, index: number) { + const checkbox = event.target as HTMLInputElement; + this.tripLocations[index].isArrival = checkbox.checked; + } + + addNewTripLocation() { + // Create a new empty trip location + const newTripLocation: TripLocationJsonld = { + trip: { + 'id': this.trip.id // Ensure we send the trip ID in the correct format + } as TripJsonld, + date: new Date().toISOString(), + isArrival: false + }; + + this.tripLocations.push(newTripLocation); + this.locationForms.push(this.createLocationForm()); + + // Force update in the next event loop to properly initialize the search-select + setTimeout(() => { + if (this.searchSelects) { + const lastSelect = this.searchSelects.last; + if (lastSelect) { + lastSelect.ngAfterViewInit(); + } + } + }); + } + + removeTripLocation(index: number) { + const tripLocationId = this.tripLocations[index].id; + + if (tripLocationId) { + // If it exists on the server, delete it + this.tripLocationService.tripLocationsIdDelete(this.appHelperService.extractId(tripLocationId)).subscribe( + () => { + this.tripLocations.splice(index, 1); + this.locationForms.splice(index, 1); + } + ); + } else { + // If it's only local, just remove it from the array + this.tripLocations.splice(index, 1); + this.locationForms.splice(index, 1); + } + } + + saveAllTripLocations() { + // First update the location objects in our tripLocations array + this.tripLocations.forEach((tripLocation, index) => { + const locationFormValue = this.locationForms[index].get('location')?.value; + + // Ensure we have a location + if (locationFormValue) { + // If just an ID was set, create a proper location object + if (typeof locationFormValue === 'string') { + tripLocation.location = { + 'id': locationFormValue + } as LocationJsonld; + } + } else { + // If no location is set, show an error + return; + } + }); + + // Filter out trip locations that have no location set + const validTripLocations = this.tripLocations.filter(tl => tl.location); + + if (validTripLocations.length === 0) { + return; + } + + // Save all trip locations + const savePromises = validTripLocations.map(tripLocation => { + if (tripLocation.id) { + // Update existing + return this.tripLocationService.tripLocationsIdPatch( + this.appHelperService.extractId(tripLocation.id), + tripLocation + ).toPromise(); + } else { + // Create new + return this.tripLocationService.tripLocationsPost(tripLocation).toPromise(); + } + }); + + Promise.all(savePromises) + .then(() => { + // Reload trip locations to get updated data + this.loadTripLocations(); + }) + .catch(error => { + console.error('Error saving trip locations:', error); + }); + } +} \ No newline at end of file diff --git a/angular/src/app/_views/trip/trip-form/trip-form.component.html b/angular/src/app/_views/trip/trip-form/trip-form.component.html new file mode 100644 index 0000000..323abbf --- /dev/null +++ b/angular/src/app/_views/trip/trip-form/trip-form.component.html @@ -0,0 +1,93 @@ +
+ @if (!isEditMode()) { +
+

{{ ('basic.new') | translate }} {{ 'model.trip' | translate }}

+
+ } +
+ +
+ + + + +
+
+ + + + +
+
+ + + + +
+ +
+ + +
+ +
+ + +
+ +
+ +
+ +
+ +
+ +
+ + + @if (isEditMode()) { + + } +
+ +
+
diff --git a/angular/src/app/_views/trip/trip-form/trip-form.component.scss b/angular/src/app/_views/trip/trip-form/trip-form.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/angular/src/app/_views/trip/trip-form/trip-form.component.spec.ts b/angular/src/app/_views/trip/trip-form/trip-form.component.spec.ts new file mode 100644 index 0000000..cbc6a3b --- /dev/null +++ b/angular/src/app/_views/trip/trip-form/trip-form.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { TripFormComponent } from './trip-form.component'; + +describe('TripFormComponent', () => { + let component: TripFormComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [TripFormComponent] + }) + .compileComponents(); + + fixture = TestBed.createComponent(TripFormComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/angular/src/app/_views/trip/trip-form/trip-form.component.ts b/angular/src/app/_views/trip/trip-form/trip-form.component.ts new file mode 100644 index 0000000..d4762ef --- /dev/null +++ b/angular/src/app/_views/trip/trip-form/trip-form.component.ts @@ -0,0 +1,64 @@ +import { Component } from '@angular/core'; +import { + AbstractDataFormComponent, DeleteFunction, + SaveFunction, + UpdateFunction +} from "@app/_components/_abstract/abstract-data-form-component"; +import { + LocationJsonld, LocationService, + ShippingCompanyService, + TripJsonld, + TripService, + VesselJsonld, + VesselService +} from "@app/core/api/v1"; +import {SearchSelectComponent} from "@app/_components/search-select/search-select.component"; +import {tripForm, vesselForm} from "@app/_forms/apiForms"; +import {FormGroup} from "@angular/forms"; +import {TranslateService} from "@ngx-translate/core"; +import {Router} from "@angular/router"; +import {ROUTE_BASE_DATA} from "@app/app-routing.module"; +import {ListColDefinition} from "@app/_components/list/list-col-definition"; +import {ListGetDataFunctionType} from "@app/_components/list/list-get-data-function-type"; + +@Component({ + selector: 'app-trip-form', + templateUrl: './trip-form.component.html', + styleUrl: './trip-form.component.scss' +}) +export class TripFormComponent extends AbstractDataFormComponent { + + protected readonly SearchSelectComponent = SearchSelectComponent; + protected vesselColDefinitions: ListColDefinition[]; + protected locationColDefinitions: ListColDefinition[]; + protected readonly tripForm = tripForm; + + constructor( + private tripService: TripService, + private vesselService: VesselService, + private locationService: LocationService, + translateService: TranslateService, + router: Router + ) { + super( + tripForm, + (data: TripJsonld) => this.tripService.tripsPost(data), + (id: string | number, data: TripJsonld) => this.tripService.tripsIdPatch(id.toString(), data), + (id: string | number) => this.tripService.tripsIdDelete(id.toString()), + translateService, + router + ); + + this.redirectAfterDelete = '/' + ROUTE_BASE_DATA; + this.vesselColDefinitions = SearchSelectComponent.getDefaultColDefVessels(); + this.locationColDefinitions = SearchSelectComponent.getDefaultColDefLocations(); + } + + getVessels: ListGetDataFunctionType = (index: number, pageSize: number, term?: string) => { + return this.vesselService.vesselsGetCollection(index, pageSize, term); + } + + getLocations: ListGetDataFunctionType = (index: number, pageSize: number, term?: string) => { + return this.locationService.locationsGetCollection(index, pageSize, term); + } +} diff --git a/angular/src/app/_views/trip/trip-list/trip-list.component.html b/angular/src/app/_views/trip/trip-list/trip-list.component.html new file mode 100644 index 0000000..c2ca05c --- /dev/null +++ b/angular/src/app/_views/trip/trip-list/trip-list.component.html @@ -0,0 +1,8 @@ +
+ +
diff --git a/angular/src/app/_views/trip/trip-list/trip-list.component.scss b/angular/src/app/_views/trip/trip-list/trip-list.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/angular/src/app/_views/trip/trip-list/trip-list.component.spec.ts b/angular/src/app/_views/trip/trip-list/trip-list.component.spec.ts new file mode 100644 index 0000000..246f4b6 --- /dev/null +++ b/angular/src/app/_views/trip/trip-list/trip-list.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { TripListComponent } from './trip-list.component'; + +describe('TripListComponent', () => { + let component: TripListComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [TripListComponent] + }) + .compileComponents(); + + fixture = TestBed.createComponent(TripListComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/angular/src/app/_views/trip/trip-list/trip-list.component.ts b/angular/src/app/_views/trip/trip-list/trip-list.component.ts new file mode 100644 index 0000000..1d17aa3 --- /dev/null +++ b/angular/src/app/_views/trip/trip-list/trip-list.component.ts @@ -0,0 +1,127 @@ +import {Component, ViewChild} from '@angular/core'; +import {ListComponent} from "@app/_components/list/list.component"; +import {ListColDefinition} from "@app/_components/list/list-col-definition"; +import {TripFormComponent} from "@app/_views/trip/trip-form/trip-form.component"; +import {TripService} from "@app/core/api/v1"; +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"; + +@Component({ + selector: 'app-trip-list', + templateUrl: './trip-list.component.html', + styleUrl: './trip-list.component.scss' +}) +export class TripListComponent { + + @ViewChild("listComponent", {static: false}) listComponent!: ListComponent; + + protected readonly tripFormComponent = TripFormComponent; + protected listColDefinitions!: ListColDefinition[]; + + constructor( + private tripService: TripService, + protected appHelperService: AppHelperService, + ) { + this.listColDefinitions = [ + { + name: 'pilotageReference', + text: 'trip.pilot_reference', + type: ListComponent.COLUMN_TYPE_TEXT_BOLD, + field: 'pilotageReference', + sortable: true, + filterType: FilterBarComponent.FILTER_TYPE_TEXT, + } as ListColDefinition, + { + name: 'customerReference', + text: 'trip.customer_reference', + type: ListComponent.COLUMN_TYPE_TEXT, + field: 'customerReference', + sortable: true, + filterType: FilterBarComponent.FILTER_TYPE_TEXT, + } as ListColDefinition, + { + name: 'vessel', + text: 'trip.vessel', + type: ListComponent.COLUMN_TYPE_TEXT, + subResource: 'vessel', + field: 'name', + sortable: true, + filterType: FilterBarComponent.FILTER_TYPE_TEXT, + } as ListColDefinition, + { + name: 'captainName', + text: 'trip.captain_name', + type: ListComponent.COLUMN_TYPE_TEXT, + field: 'captainName', + sortable: true, + filterType: FilterBarComponent.FILTER_TYPE_TEXT, + } as ListColDefinition, + { + name: 'startLocation', + text: 'trip.start_location', + type: ListComponent.COLUMN_TYPE_TEXT, + subResource: 'startLocation', + field: 'name', + sortable: true, + filterType: FilterBarComponent.FILTER_TYPE_TEXT, + } as ListColDefinition, + { + name: 'endLocation', + text: 'trip.end_location', + type: ListComponent.COLUMN_TYPE_TEXT, + subResource: 'endLocation', + field: 'name', + sortable: true, + filterType: FilterBarComponent.FILTER_TYPE_TEXT, + } as ListColDefinition, + { + name: 'startDate', + text: 'trip.start_date', + type: ListComponent.COLUMN_TYPE_DATE, + field: 'startDate', + sortable: true, + filterType: FilterBarComponent.FILTER_TYPE_DATE, + } as ListColDefinition, + { + name: 'endDate', + text: 'trip.end_date', + type: ListComponent.COLUMN_TYPE_DATE, + field: 'endDate', + sortable: true, + filterType: FilterBarComponent.FILTER_TYPE_DATE, + } as ListColDefinition, + { + name: 'createdAt', + text: 'common.created_at', + type: ListComponent.COLUMN_TYPE_DATE, + field: 'createdAt', + 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.tripService.tripsGetCollection( + index, + pageSize, + term ? Number(term) : undefined, + this.listComponent.getFilterJsonString(), + this.listComponent.getSortingJsonString() + ); + } + +} diff --git a/angular/src/app/_views/trip/trip.component.html b/angular/src/app/_views/trip/trip.component.html index 66e5e2f..46c19f4 100644 --- a/angular/src/app/_views/trip/trip.component.html +++ b/angular/src/app/_views/trip/trip.component.html @@ -1 +1,6 @@ -

trip works!

+
+
+

{{ 'trip.view' | translate }}

+
+ +
\ No newline at end of file diff --git a/angular/src/app/_views/vessel/vessel-list/vessel-list.component.ts b/angular/src/app/_views/vessel/vessel-list/vessel-list.component.ts index 5475944..c3aaac2 100644 --- a/angular/src/app/_views/vessel/vessel-list/vessel-list.component.ts +++ b/angular/src/app/_views/vessel/vessel-list/vessel-list.component.ts @@ -9,6 +9,7 @@ import {ListGetDataFunctionType} from "@app/_components/list/list-get-data-funct import {Sort} from "@angular/material/sort"; import {ROUTE_VESSELS, ROUTE_ZONES} from "@app/app-routing.module"; import {VesselFormComponent} from "@app/_views/vessel/vessel-form/vessel-form.component"; +import {SearchSelectComponent} from "@app/_components/search-select/search-select.component"; @Component({ selector: 'app-vessel-list', @@ -27,41 +28,7 @@ export class VesselListComponent { 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: 'code', - text: 'common.code', - type: ListComponent.COLUMN_TYPE_TEXT, - field: 'code', - sortable: true, - filterType: FilterBarComponent.FILTER_TYPE_TEXT, - } as ListColDefinition, - { - name: 'shippingCompanyName', - text: 'model.shipping_company', - type: ListComponent.COLUMN_TYPE_TEXT, - subResource: 'company', - field: 'name', - sortable: true, - filterType: FilterBarComponent.FILTER_TYPE_TEXT, - } as ListColDefinition, - { - name: 'createdAt', - text: 'common.created_at', - type: ListComponent.COLUMN_TYPE_DATE, - field: 'createdAt', - sortable: true, - filterType: FilterBarComponent.FILTER_TYPE_DATE, - } as ListColDefinition, - ]; + this.listColDefinitions = SearchSelectComponent.getDefaultColDefVessels(); } ngOnInit() { diff --git a/angular/src/app/app-routing.module.ts b/angular/src/app/app-routing.module.ts index db4e5fb..107ec33 100644 --- a/angular/src/app/app-routing.module.ts +++ b/angular/src/app/app-routing.module.ts @@ -14,6 +14,8 @@ import {VesselDetailComponent} from "@app/_views/vessel/vessel-detail/vessel-det import { ShippingCompanyDetailComponent } from "@app/_views/shipping-company/shipping-company-detail/shipping-company-detail.component"; +import {TripComponent} from "@app/_views/trip/trip.component"; +import {TripDetailComponent} from "@app/_views/trip/trip-detail/trip-detail.component"; const accountModule = () => import('@app/_views/account/account.module').then(x => x.AccountModule); @@ -57,6 +59,22 @@ const routes: Routes = [ {path: ':id', component: LocationDetailComponent}, ] }, + { + path: ROUTE_TRIPS, + component: TwoColumnComponent, + canActivate: [userGuard], + children: [ + {path: '', component: TripComponent}, + ] + }, + { + path: ROUTE_TRIPS, + component: TwoColumnComponent, + canActivate: [userGuard], + children: [ + {path: ':id', component: TripDetailComponent}, + ] + }, { path: ROUTE_ZONES, component: TwoColumnComponent, diff --git a/angular/src/app/app.component.ts b/angular/src/app/app.component.ts index 6c75e89..5e5534c 100644 --- a/angular/src/app/app.component.ts +++ b/angular/src/app/app.component.ts @@ -55,7 +55,8 @@ export class AppComponent implements OnInit { // TODO: Hilfsfunktion - entfernen copyTokenToClipboard() { const el = document.createElement('textarea'); - el.value = this.user?.token || ""; + const token = localStorage.getItem('token'); + el.value = token || ""; document.body.appendChild(el); el.select(); document.execCommand('copy'); diff --git a/angular/src/app/app.module.ts b/angular/src/app/app.module.ts index d5f0e8b..29f31af 100644 --- a/angular/src/app/app.module.ts +++ b/angular/src/app/app.module.ts @@ -61,6 +61,10 @@ import { LocationFormComponent } from './_views/location/location-form/location- import { ZoneFormComponent } from './_views/zone/zone-form/zone-form.component'; import { VesselFormComponent } from './_views/vessel/vessel-form/vessel-form.component'; import { ShippingCompanyFormComponent } from './_views/shipping-company/shipping-company-form/shipping-company-form.component'; +import { TripListComponent } from './_views/trip/trip-list/trip-list.component'; +import { TripDetailComponent } from './_views/trip/trip-detail/trip-detail.component'; +import { TripFormComponent } from './_views/trip/trip-form/trip-form.component'; +import {DatetimePickerComponent} from "@app/_components/datetime-picker/datetime-picker.component"; registerLocaleData(localeDe, 'de-DE'); @@ -119,6 +123,7 @@ export function HttpLoaderFactory(http: HttpClient) { ProfileComponent, SearchInputComponent, PagingComponent, + DatetimePickerComponent, UsersComponent, UserDetailComponent, UserListComponent, @@ -147,6 +152,9 @@ export function HttpLoaderFactory(http: HttpClient) { ZoneFormComponent, VesselFormComponent, ShippingCompanyFormComponent, + TripListComponent, + TripDetailComponent, + TripFormComponent, ], providers: [ {provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true}, diff --git a/angular/src/app/core/api/v1/.openapi-generator/FILES b/angular/src/app/core/api/v1/.openapi-generator/FILES index 5c9a88f..6d74358 100644 --- a/angular/src/app/core/api/v1/.openapi-generator/FILES +++ b/angular/src/app/core/api/v1/.openapi-generator/FILES @@ -1,9 +1,9 @@ .gitignore -.openapi-generator-ignore README.md api.module.ts api/api.ts api/auth.service.ts +api/event.service.ts api/location.service.ts api/mediaObject.service.ts api/shippingCompany.service.ts @@ -11,34 +11,32 @@ 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/apiEventsGetCollection200Response.ts +model/apiEventsGetCollection200ResponseSearch.ts +model/apiEventsGetCollection200ResponseSearchMappingInner.ts +model/apiEventsGetCollection200ResponseView.ts model/apiLocationsGetCollection200Response.ts -model/apiLocationsGetCollection200ResponseSearch.ts -model/apiLocationsGetCollection200ResponseSearchMappingInner.ts -model/apiLocationsGetCollection200ResponseView.ts model/apiMediaObjectsGetCollection200Response.ts model/apiShippingCompaniesGetCollection200Response.ts model/apiTripLocationsGetCollection200Response.ts model/apiTripsGetCollection200Response.ts -model/apiUserTripLocationsGetCollection200Response.ts -model/apiUserTripWorkLogsGetCollection200Response.ts model/apiUserTripsGetCollection200Response.ts model/apiUsersGetCollection200Response.ts model/apiVesselsGetCollection200Response.ts model/apiZonesGetCollection200Response.ts model/authResponse.ts model/credentials.ts +model/eventJsonld.ts +model/eventJsonldContext.ts +model/eventJsonldContextOneOf.ts model/location.ts model/locationJsonld.ts -model/locationJsonldContext.ts -model/locationJsonldContextOneOf.ts model/mediaObjectJsonld.ts model/models.ts model/shippingCompany.ts @@ -51,10 +49,6 @@ 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 diff --git a/angular/src/app/core/api/v1/api/api.ts b/angular/src/app/core/api/v1/api/api.ts index 7f4f939..99c39f2 100644 --- a/angular/src/app/core/api/v1/api/api.ts +++ b/angular/src/app/core/api/v1/api/api.ts @@ -1,5 +1,7 @@ export * from './auth.service'; import { AuthService } from './auth.service'; +export * from './event.service'; +import { EventService } from './event.service'; export * from './location.service'; import { LocationService } from './location.service'; export * from './mediaObject.service'; @@ -14,12 +16,8 @@ export * from './user.service'; import { UserService } from './user.service'; 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 = [AuthService, LocationService, MediaObjectService, ShippingCompanyService, TripService, TripLocationService, UserService, UserTripService, UserTripLocationService, UserTripWorkLogService, VesselService, ZoneService]; +export const APIS = [AuthService, EventService, LocationService, MediaObjectService, ShippingCompanyService, TripService, TripLocationService, UserService, UserTripService, VesselService, ZoneService]; diff --git a/angular/src/app/core/api/v1/api/event.service.ts b/angular/src/app/core/api/v1/api/event.service.ts new file mode 100644 index 0000000..784fa2b --- /dev/null +++ b/angular/src/app/core/api/v1/api/event.service.ts @@ -0,0 +1,264 @@ +/** + * 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 { ApiEventsGetCollection200Response } from '../model/apiEventsGetCollection200Response'; +// @ts-ignore +import { EventJsonld } from '../model/eventJsonld'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + + +@Injectable({ + providedIn: 'root' +}) +export class EventService { + + 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 Event resources. + * Retrieves the collection of Event 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 eventsGetCollection(page?: number, itemsPerPage?: number, name?: string, customJsonFilter?: string, customJsonOrder?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable; + public eventsGetCollection(page?: number, itemsPerPage?: number, name?: string, customJsonFilter?: string, customJsonOrder?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; + public eventsGetCollection(page?: number, itemsPerPage?: number, name?: string, customJsonFilter?: string, customJsonOrder?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; + public eventsGetCollection(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 { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (page !== undefined && page !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + } + if (itemsPerPage !== undefined && itemsPerPage !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + itemsPerPage, 'itemsPerPage'); + } + if (name !== undefined && name !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + name, 'name'); + } + if (customJsonFilter !== undefined && customJsonFilter !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + customJsonFilter, 'custom_json_filter'); + } + if (customJsonOrder !== undefined && customJsonOrder !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + 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/events`; + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * Retrieves a Event resource. + * Retrieves a Event resource. + * @param id Event 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 eventsIdGet(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable; + public eventsIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; + public eventsIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; + public eventsIdGet(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling eventsIdGet.'); + } + + 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/events/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + +} diff --git a/angular/src/app/core/api/v1/api/trip.service.ts b/angular/src/app/core/api/v1/api/trip.service.ts index 9d5fff2..037b355 100644 --- a/angular/src/app/core/api/v1/api/trip.service.ts +++ b/angular/src/app/core/api/v1/api/trip.service.ts @@ -100,13 +100,16 @@ export class TripService { * Retrieves the collection of Trip resources. * @param page The collection page number * @param itemsPerPage The number of items per page + * @param id + * @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 tripsGetCollection(page?: number, itemsPerPage?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable; - public tripsGetCollection(page?: number, itemsPerPage?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; - public tripsGetCollection(page?: number, itemsPerPage?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; - public tripsGetCollection(page?: number, itemsPerPage?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable { + public tripsGetCollection(page?: number, itemsPerPage?: number, id?: number, customJsonFilter?: string, customJsonOrder?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable; + public tripsGetCollection(page?: number, itemsPerPage?: number, id?: number, customJsonFilter?: string, customJsonOrder?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; + public tripsGetCollection(page?: number, itemsPerPage?: number, id?: number, customJsonFilter?: string, customJsonOrder?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; + public tripsGetCollection(page?: number, itemsPerPage?: number, id?: number, customJsonFilter?: string, customJsonOrder?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable { let localVarQueryParameters = new HttpParams({encoder: this.encoder}); if (page !== undefined && page !== null) { @@ -117,6 +120,18 @@ export class TripService { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, itemsPerPage, 'itemsPerPage'); } + if (id !== undefined && id !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + id, 'id'); + } + if (customJsonFilter !== undefined && customJsonFilter !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + customJsonFilter, 'custom_json_filter'); + } + if (customJsonOrder !== undefined && customJsonOrder !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + customJsonOrder, 'custom_json_order'); + } let localVarHeaders = this.defaultHeaders; @@ -176,6 +191,77 @@ export class TripService { ); } + /** + * Removes the Trip resource. + * Removes the 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 tripsIdDelete(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable; + public tripsIdDelete(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public tripsIdDelete(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public tripsIdDelete(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling tripsIdDelete.'); + } + + 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[] = [ + ]; + 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('delete', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + /** * Retrieves a Trip resource. * Retrieves a Trip resource. diff --git a/angular/src/app/core/api/v1/api/tripLocation.service.ts b/angular/src/app/core/api/v1/api/tripLocation.service.ts index 35cace8..b71ed3a 100644 --- a/angular/src/app/core/api/v1/api/tripLocation.service.ts +++ b/angular/src/app/core/api/v1/api/tripLocation.service.ts @@ -100,13 +100,17 @@ export class TripLocationService { * Retrieves the collection of TripLocation resources. * @param page The collection page number * @param itemsPerPage The number of items per page + * @param trip + * @param trip2 + * @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 tripLocationsGetCollection(page?: number, itemsPerPage?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable; - public tripLocationsGetCollection(page?: number, itemsPerPage?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; - public tripLocationsGetCollection(page?: number, itemsPerPage?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; - public tripLocationsGetCollection(page?: number, itemsPerPage?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable { + public tripLocationsGetCollection(page?: number, itemsPerPage?: number, trip?: string, trip2?: Array, customJsonFilter?: string, customJsonOrder?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable; + public tripLocationsGetCollection(page?: number, itemsPerPage?: number, trip?: string, trip2?: Array, customJsonFilter?: string, customJsonOrder?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; + public tripLocationsGetCollection(page?: number, itemsPerPage?: number, trip?: string, trip2?: Array, customJsonFilter?: string, customJsonOrder?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; + public tripLocationsGetCollection(page?: number, itemsPerPage?: number, trip?: string, trip2?: Array, customJsonFilter?: string, customJsonOrder?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable { let localVarQueryParameters = new HttpParams({encoder: this.encoder}); if (page !== undefined && page !== null) { @@ -117,6 +121,24 @@ export class TripLocationService { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, itemsPerPage, 'itemsPerPage'); } + if (trip !== undefined && trip !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + trip, 'trip'); + } + if (trip2) { + trip2.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'trip[]'); + }) + } + if (customJsonFilter !== undefined && customJsonFilter !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + customJsonFilter, 'custom_json_filter'); + } + if (customJsonOrder !== undefined && customJsonOrder !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + customJsonOrder, 'custom_json_order'); + } let localVarHeaders = this.defaultHeaders; @@ -176,6 +198,77 @@ export class TripLocationService { ); } + /** + * Removes the TripLocation resource. + * Removes the 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 tripLocationsIdDelete(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable; + public tripLocationsIdDelete(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public tripLocationsIdDelete(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public tripLocationsIdDelete(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling tripLocationsIdDelete.'); + } + + 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[] = [ + ]; + 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('delete', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + /** * Retrieves a TripLocation resource. * Retrieves a TripLocation resource. diff --git a/angular/src/app/core/api/v1/api/userTripLocation.service.ts b/angular/src/app/core/api/v1/api/userTripLocation.service.ts deleted file mode 100644 index f2301dc..0000000 --- a/angular/src/app/core/api/v1/api/userTripLocation.service.ts +++ /dev/null @@ -1,419 +0,0 @@ -/** - * 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; - public userTripLocationsGetCollection(page?: number, itemsPerPage?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; - public userTripLocationsGetCollection(page?: number, itemsPerPage?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; - public userTripLocationsGetCollection(page?: number, itemsPerPage?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable { - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - if (page !== undefined && page !== null) { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - page, 'page'); - } - if (itemsPerPage !== undefined && itemsPerPage !== null) { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - 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('get', `${this.configuration.basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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; - public userTripLocationsIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; - public userTripLocationsIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; - public userTripLocationsIdGet(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable { - 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('get', `${this.configuration.basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: 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; - public userTripLocationsIdPatch(id: string, userTripLocation: UserTripLocation, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; - public userTripLocationsIdPatch(id: string, userTripLocation: UserTripLocation, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; - public userTripLocationsIdPatch(id: string, userTripLocation: UserTripLocation, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable { - 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('patch', `${this.configuration.basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: userTripLocation, - responseType: 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; - public userTripLocationsPost(userTripLocationJsonld: UserTripLocationJsonld, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; - public userTripLocationsPost(userTripLocationJsonld: UserTripLocationJsonld, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; - public userTripLocationsPost(userTripLocationJsonld: UserTripLocationJsonld, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable { - 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('post', `${this.configuration.basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: userTripLocationJsonld, - responseType: responseType_, - withCredentials: this.configuration.withCredentials, - headers: localVarHeaders, - observe: observe, - transferCache: localVarTransferCache, - reportProgress: reportProgress - } - ); - } - -} diff --git a/angular/src/app/core/api/v1/api/userTripWorkLog.service.ts b/angular/src/app/core/api/v1/api/userTripWorkLog.service.ts deleted file mode 100644 index feff8c7..0000000 --- a/angular/src/app/core/api/v1/api/userTripWorkLog.service.ts +++ /dev/null @@ -1,419 +0,0 @@ -/** - * 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; - public userTripWorkLogsGetCollection(page?: number, itemsPerPage?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; - public userTripWorkLogsGetCollection(page?: number, itemsPerPage?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; - public userTripWorkLogsGetCollection(page?: number, itemsPerPage?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable { - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - if (page !== undefined && page !== null) { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - page, 'page'); - } - if (itemsPerPage !== undefined && itemsPerPage !== null) { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - 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('get', `${this.configuration.basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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; - public userTripWorkLogsIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; - public userTripWorkLogsIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; - public userTripWorkLogsIdGet(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable { - 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('get', `${this.configuration.basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: 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; - public userTripWorkLogsIdPatch(id: string, userTripWorkLog: UserTripWorkLog, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; - public userTripWorkLogsIdPatch(id: string, userTripWorkLog: UserTripWorkLog, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; - public userTripWorkLogsIdPatch(id: string, userTripWorkLog: UserTripWorkLog, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable { - 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('patch', `${this.configuration.basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: userTripWorkLog, - responseType: 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; - public userTripWorkLogsPost(userTripWorkLogJsonld: UserTripWorkLogJsonld, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; - public userTripWorkLogsPost(userTripWorkLogJsonld: UserTripWorkLogJsonld, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable>; - public userTripWorkLogsPost(userTripWorkLogJsonld: UserTripWorkLogJsonld, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json', context?: HttpContext, transferCache?: boolean}): Observable { - 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('post', `${this.configuration.basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: userTripWorkLogJsonld, - responseType: responseType_, - withCredentials: this.configuration.withCredentials, - headers: localVarHeaders, - observe: observe, - transferCache: localVarTransferCache, - reportProgress: reportProgress - } - ); - } - -} diff --git a/angular/src/app/core/api/v1/model/apiEventsGetCollection200Response.ts b/angular/src/app/core/api/v1/model/apiEventsGetCollection200Response.ts new file mode 100644 index 0000000..f9c0af3 --- /dev/null +++ b/angular/src/app/core/api/v1/model/apiEventsGetCollection200Response.ts @@ -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 { EventJsonld } from './eventJsonld'; +import { ApiEventsGetCollection200ResponseSearch } from './apiEventsGetCollection200ResponseSearch'; +import { ApiEventsGetCollection200ResponseView } from './apiEventsGetCollection200ResponseView'; + + +export interface ApiEventsGetCollection200Response { + member: Array; + totalItems?: number; + view?: ApiEventsGetCollection200ResponseView; + search?: ApiEventsGetCollection200ResponseSearch; +} + diff --git a/angular/src/app/core/api/v1/model/apiLocationsGetCollection200ResponseSearch.ts b/angular/src/app/core/api/v1/model/apiEventsGetCollection200ResponseSearch.ts similarity index 61% rename from angular/src/app/core/api/v1/model/apiLocationsGetCollection200ResponseSearch.ts rename to angular/src/app/core/api/v1/model/apiEventsGetCollection200ResponseSearch.ts index e5c9000..eec86b9 100644 --- a/angular/src/app/core/api/v1/model/apiLocationsGetCollection200ResponseSearch.ts +++ b/angular/src/app/core/api/v1/model/apiEventsGetCollection200ResponseSearch.ts @@ -9,13 +9,13 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { ApiLocationsGetCollection200ResponseSearchMappingInner } from './apiLocationsGetCollection200ResponseSearchMappingInner'; +import { ApiEventsGetCollection200ResponseSearchMappingInner } from './apiEventsGetCollection200ResponseSearchMappingInner'; -export interface ApiLocationsGetCollection200ResponseSearch { +export interface ApiEventsGetCollection200ResponseSearch { type?: string; template?: string; variableRepresentation?: string; - mapping?: Array; + mapping?: Array; } diff --git a/angular/src/app/core/api/v1/model/apiLocationsGetCollection200ResponseSearchMappingInner.ts b/angular/src/app/core/api/v1/model/apiEventsGetCollection200ResponseSearchMappingInner.ts similarity index 85% rename from angular/src/app/core/api/v1/model/apiLocationsGetCollection200ResponseSearchMappingInner.ts rename to angular/src/app/core/api/v1/model/apiEventsGetCollection200ResponseSearchMappingInner.ts index 99607e2..3fb07af 100644 --- a/angular/src/app/core/api/v1/model/apiLocationsGetCollection200ResponseSearchMappingInner.ts +++ b/angular/src/app/core/api/v1/model/apiEventsGetCollection200ResponseSearchMappingInner.ts @@ -11,7 +11,7 @@ */ -export interface ApiLocationsGetCollection200ResponseSearchMappingInner { +export interface ApiEventsGetCollection200ResponseSearchMappingInner { type?: string; variable?: string; property?: string | null; diff --git a/angular/src/app/core/api/v1/model/apiLocationsGetCollection200ResponseView.ts b/angular/src/app/core/api/v1/model/apiEventsGetCollection200ResponseView.ts similarity index 88% rename from angular/src/app/core/api/v1/model/apiLocationsGetCollection200ResponseView.ts rename to angular/src/app/core/api/v1/model/apiEventsGetCollection200ResponseView.ts index 32cc610..381898b 100644 --- a/angular/src/app/core/api/v1/model/apiLocationsGetCollection200ResponseView.ts +++ b/angular/src/app/core/api/v1/model/apiEventsGetCollection200ResponseView.ts @@ -11,7 +11,7 @@ */ -export interface ApiLocationsGetCollection200ResponseView { +export interface ApiEventsGetCollection200ResponseView { id?: string; type?: string; first?: string; diff --git a/angular/src/app/core/api/v1/model/apiLocationsGetCollection200Response.ts b/angular/src/app/core/api/v1/model/apiLocationsGetCollection200Response.ts index 5a1c33e..88f9621 100644 --- a/angular/src/app/core/api/v1/model/apiLocationsGetCollection200Response.ts +++ b/angular/src/app/core/api/v1/model/apiLocationsGetCollection200Response.ts @@ -9,15 +9,15 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { ApiLocationsGetCollection200ResponseSearch } from './apiLocationsGetCollection200ResponseSearch'; -import { ApiLocationsGetCollection200ResponseView } from './apiLocationsGetCollection200ResponseView'; +import { ApiEventsGetCollection200ResponseSearch } from './apiEventsGetCollection200ResponseSearch'; +import { ApiEventsGetCollection200ResponseView } from './apiEventsGetCollection200ResponseView'; import { LocationJsonld } from './locationJsonld'; export interface ApiLocationsGetCollection200Response { member: Array; totalItems?: number; - view?: ApiLocationsGetCollection200ResponseView; - search?: ApiLocationsGetCollection200ResponseSearch; + view?: ApiEventsGetCollection200ResponseView; + search?: ApiEventsGetCollection200ResponseSearch; } diff --git a/angular/src/app/core/api/v1/model/apiMediaObjectsGetCollection200Response.ts b/angular/src/app/core/api/v1/model/apiMediaObjectsGetCollection200Response.ts index b4f44dc..e312812 100644 --- a/angular/src/app/core/api/v1/model/apiMediaObjectsGetCollection200Response.ts +++ b/angular/src/app/core/api/v1/model/apiMediaObjectsGetCollection200Response.ts @@ -9,15 +9,15 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { ApiLocationsGetCollection200ResponseSearch } from './apiLocationsGetCollection200ResponseSearch'; -import { ApiLocationsGetCollection200ResponseView } from './apiLocationsGetCollection200ResponseView'; import { MediaObjectJsonld } from './mediaObjectJsonld'; +import { ApiEventsGetCollection200ResponseSearch } from './apiEventsGetCollection200ResponseSearch'; +import { ApiEventsGetCollection200ResponseView } from './apiEventsGetCollection200ResponseView'; export interface ApiMediaObjectsGetCollection200Response { member: Array; totalItems?: number; - view?: ApiLocationsGetCollection200ResponseView; - search?: ApiLocationsGetCollection200ResponseSearch; + view?: ApiEventsGetCollection200ResponseView; + search?: ApiEventsGetCollection200ResponseSearch; } diff --git a/angular/src/app/core/api/v1/model/apiShippingCompaniesGetCollection200Response.ts b/angular/src/app/core/api/v1/model/apiShippingCompaniesGetCollection200Response.ts index 957aa88..2630f7f 100644 --- a/angular/src/app/core/api/v1/model/apiShippingCompaniesGetCollection200Response.ts +++ b/angular/src/app/core/api/v1/model/apiShippingCompaniesGetCollection200Response.ts @@ -9,15 +9,15 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { ApiLocationsGetCollection200ResponseSearch } from './apiLocationsGetCollection200ResponseSearch'; -import { ApiLocationsGetCollection200ResponseView } from './apiLocationsGetCollection200ResponseView'; import { ShippingCompanyJsonld } from './shippingCompanyJsonld'; +import { ApiEventsGetCollection200ResponseSearch } from './apiEventsGetCollection200ResponseSearch'; +import { ApiEventsGetCollection200ResponseView } from './apiEventsGetCollection200ResponseView'; export interface ApiShippingCompaniesGetCollection200Response { member: Array; totalItems?: number; - view?: ApiLocationsGetCollection200ResponseView; - search?: ApiLocationsGetCollection200ResponseSearch; + view?: ApiEventsGetCollection200ResponseView; + search?: ApiEventsGetCollection200ResponseSearch; } diff --git a/angular/src/app/core/api/v1/model/apiTripLocationsGetCollection200Response.ts b/angular/src/app/core/api/v1/model/apiTripLocationsGetCollection200Response.ts index da6ed06..cc42f63 100644 --- a/angular/src/app/core/api/v1/model/apiTripLocationsGetCollection200Response.ts +++ b/angular/src/app/core/api/v1/model/apiTripLocationsGetCollection200Response.ts @@ -9,15 +9,15 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { ApiLocationsGetCollection200ResponseSearch } from './apiLocationsGetCollection200ResponseSearch'; -import { ApiLocationsGetCollection200ResponseView } from './apiLocationsGetCollection200ResponseView'; import { TripLocationJsonld } from './tripLocationJsonld'; +import { ApiEventsGetCollection200ResponseSearch } from './apiEventsGetCollection200ResponseSearch'; +import { ApiEventsGetCollection200ResponseView } from './apiEventsGetCollection200ResponseView'; export interface ApiTripLocationsGetCollection200Response { member: Array; totalItems?: number; - view?: ApiLocationsGetCollection200ResponseView; - search?: ApiLocationsGetCollection200ResponseSearch; + view?: ApiEventsGetCollection200ResponseView; + search?: ApiEventsGetCollection200ResponseSearch; } diff --git a/angular/src/app/core/api/v1/model/apiTripsGetCollection200Response.ts b/angular/src/app/core/api/v1/model/apiTripsGetCollection200Response.ts index 4af3e85..118be17 100644 --- a/angular/src/app/core/api/v1/model/apiTripsGetCollection200Response.ts +++ b/angular/src/app/core/api/v1/model/apiTripsGetCollection200Response.ts @@ -9,15 +9,15 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { ApiLocationsGetCollection200ResponseSearch } from './apiLocationsGetCollection200ResponseSearch'; -import { ApiLocationsGetCollection200ResponseView } from './apiLocationsGetCollection200ResponseView'; import { TripJsonld } from './tripJsonld'; +import { ApiEventsGetCollection200ResponseSearch } from './apiEventsGetCollection200ResponseSearch'; +import { ApiEventsGetCollection200ResponseView } from './apiEventsGetCollection200ResponseView'; export interface ApiTripsGetCollection200Response { member: Array; totalItems?: number; - view?: ApiLocationsGetCollection200ResponseView; - search?: ApiLocationsGetCollection200ResponseSearch; + view?: ApiEventsGetCollection200ResponseView; + search?: ApiEventsGetCollection200ResponseSearch; } diff --git a/angular/src/app/core/api/v1/model/apiUserTripLocationsGetCollection200Response.ts b/angular/src/app/core/api/v1/model/apiUserTripLocationsGetCollection200Response.ts deleted file mode 100644 index f393b69..0000000 --- a/angular/src/app/core/api/v1/model/apiUserTripLocationsGetCollection200Response.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * 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; - totalItems?: number; - view?: ApiLocationsGetCollection200ResponseView; - search?: ApiLocationsGetCollection200ResponseSearch; -} - diff --git a/angular/src/app/core/api/v1/model/apiUserTripWorkLogsGetCollection200Response.ts b/angular/src/app/core/api/v1/model/apiUserTripWorkLogsGetCollection200Response.ts deleted file mode 100644 index a82286b..0000000 --- a/angular/src/app/core/api/v1/model/apiUserTripWorkLogsGetCollection200Response.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * 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; - totalItems?: number; - view?: ApiLocationsGetCollection200ResponseView; - search?: ApiLocationsGetCollection200ResponseSearch; -} - diff --git a/angular/src/app/core/api/v1/model/apiUserTripsGetCollection200Response.ts b/angular/src/app/core/api/v1/model/apiUserTripsGetCollection200Response.ts index 9ef1eb3..eff9578 100644 --- a/angular/src/app/core/api/v1/model/apiUserTripsGetCollection200Response.ts +++ b/angular/src/app/core/api/v1/model/apiUserTripsGetCollection200Response.ts @@ -9,15 +9,15 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { ApiLocationsGetCollection200ResponseSearch } from './apiLocationsGetCollection200ResponseSearch'; -import { ApiLocationsGetCollection200ResponseView } from './apiLocationsGetCollection200ResponseView'; import { UserTripJsonld } from './userTripJsonld'; +import { ApiEventsGetCollection200ResponseSearch } from './apiEventsGetCollection200ResponseSearch'; +import { ApiEventsGetCollection200ResponseView } from './apiEventsGetCollection200ResponseView'; export interface ApiUserTripsGetCollection200Response { member: Array; totalItems?: number; - view?: ApiLocationsGetCollection200ResponseView; - search?: ApiLocationsGetCollection200ResponseSearch; + view?: ApiEventsGetCollection200ResponseView; + search?: ApiEventsGetCollection200ResponseSearch; } diff --git a/angular/src/app/core/api/v1/model/apiUsersGetCollection200Response.ts b/angular/src/app/core/api/v1/model/apiUsersGetCollection200Response.ts index fe00593..43c8ed2 100644 --- a/angular/src/app/core/api/v1/model/apiUsersGetCollection200Response.ts +++ b/angular/src/app/core/api/v1/model/apiUsersGetCollection200Response.ts @@ -9,15 +9,15 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { ApiLocationsGetCollection200ResponseSearch } from './apiLocationsGetCollection200ResponseSearch'; -import { ApiLocationsGetCollection200ResponseView } from './apiLocationsGetCollection200ResponseView'; import { UserJsonld } from './userJsonld'; +import { ApiEventsGetCollection200ResponseSearch } from './apiEventsGetCollection200ResponseSearch'; +import { ApiEventsGetCollection200ResponseView } from './apiEventsGetCollection200ResponseView'; export interface ApiUsersGetCollection200Response { member: Array; totalItems?: number; - view?: ApiLocationsGetCollection200ResponseView; - search?: ApiLocationsGetCollection200ResponseSearch; + view?: ApiEventsGetCollection200ResponseView; + search?: ApiEventsGetCollection200ResponseSearch; } diff --git a/angular/src/app/core/api/v1/model/apiVesselsGetCollection200Response.ts b/angular/src/app/core/api/v1/model/apiVesselsGetCollection200Response.ts index 976d2aa..7298ae7 100644 --- a/angular/src/app/core/api/v1/model/apiVesselsGetCollection200Response.ts +++ b/angular/src/app/core/api/v1/model/apiVesselsGetCollection200Response.ts @@ -9,15 +9,15 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { ApiLocationsGetCollection200ResponseSearch } from './apiLocationsGetCollection200ResponseSearch'; -import { ApiLocationsGetCollection200ResponseView } from './apiLocationsGetCollection200ResponseView'; import { VesselJsonld } from './vesselJsonld'; +import { ApiEventsGetCollection200ResponseSearch } from './apiEventsGetCollection200ResponseSearch'; +import { ApiEventsGetCollection200ResponseView } from './apiEventsGetCollection200ResponseView'; export interface ApiVesselsGetCollection200Response { member: Array; totalItems?: number; - view?: ApiLocationsGetCollection200ResponseView; - search?: ApiLocationsGetCollection200ResponseSearch; + view?: ApiEventsGetCollection200ResponseView; + search?: ApiEventsGetCollection200ResponseSearch; } diff --git a/angular/src/app/core/api/v1/model/apiZonesGetCollection200Response.ts b/angular/src/app/core/api/v1/model/apiZonesGetCollection200Response.ts index 8ced97a..cbbb3f5 100644 --- a/angular/src/app/core/api/v1/model/apiZonesGetCollection200Response.ts +++ b/angular/src/app/core/api/v1/model/apiZonesGetCollection200Response.ts @@ -9,15 +9,15 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { ApiLocationsGetCollection200ResponseSearch } from './apiLocationsGetCollection200ResponseSearch'; -import { ApiLocationsGetCollection200ResponseView } from './apiLocationsGetCollection200ResponseView'; +import { ApiEventsGetCollection200ResponseSearch } from './apiEventsGetCollection200ResponseSearch'; +import { ApiEventsGetCollection200ResponseView } from './apiEventsGetCollection200ResponseView'; import { ZoneJsonld } from './zoneJsonld'; export interface ApiZonesGetCollection200Response { member: Array; totalItems?: number; - view?: ApiLocationsGetCollection200ResponseView; - search?: ApiLocationsGetCollection200ResponseSearch; + view?: ApiEventsGetCollection200ResponseView; + search?: ApiEventsGetCollection200ResponseSearch; } diff --git a/angular/src/app/core/api/v1/model/userTripLocation.ts b/angular/src/app/core/api/v1/model/eventJsonld.ts similarity index 62% rename from angular/src/app/core/api/v1/model/userTripLocation.ts rename to angular/src/app/core/api/v1/model/eventJsonld.ts index 45916f9..d49c32a 100644 --- a/angular/src/app/core/api/v1/model/userTripLocation.ts +++ b/angular/src/app/core/api/v1/model/eventJsonld.ts @@ -9,16 +9,21 @@ * https://openapi-generator.tech * Do not edit the class manually. */ +import { EventJsonldContext } from './eventJsonldContext'; /** * */ -export interface UserTripLocation { +export interface EventJsonld { + readonly id?: string; + readonly type?: string; + context?: EventJsonldContext; readonly dbId?: number | null; - readonly userTrip?: string; - readonly location?: string; - plannedDate: string; + name?: string; + identifier?: string; + sequence?: number; + mandatory?: boolean; readonly createdAt?: string | null; } diff --git a/angular/src/app/core/api/v1/model/locationJsonldContext.ts b/angular/src/app/core/api/v1/model/eventJsonldContext.ts similarity index 67% rename from angular/src/app/core/api/v1/model/locationJsonldContext.ts rename to angular/src/app/core/api/v1/model/eventJsonldContext.ts index b297fc8..8b30db8 100644 --- a/angular/src/app/core/api/v1/model/locationJsonldContext.ts +++ b/angular/src/app/core/api/v1/model/eventJsonldContext.ts @@ -9,12 +9,12 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { LocationJsonldContextOneOf } from './locationJsonldContextOneOf'; +import { EventJsonldContextOneOf } from './eventJsonldContextOneOf'; /** - * @type LocationJsonldContext + * @type EventJsonldContext * @export */ -export type LocationJsonldContext = LocationJsonldContextOneOf | string; +export type EventJsonldContext = EventJsonldContextOneOf | string; diff --git a/angular/src/app/core/api/v1/model/locationJsonldContextOneOf.ts b/angular/src/app/core/api/v1/model/eventJsonldContextOneOf.ts similarity index 80% rename from angular/src/app/core/api/v1/model/locationJsonldContextOneOf.ts rename to angular/src/app/core/api/v1/model/eventJsonldContextOneOf.ts index e8f17b1..0fcbac1 100644 --- a/angular/src/app/core/api/v1/model/locationJsonldContextOneOf.ts +++ b/angular/src/app/core/api/v1/model/eventJsonldContextOneOf.ts @@ -11,14 +11,14 @@ */ -export interface LocationJsonldContextOneOf { +export interface EventJsonldContextOneOf { [key: string]: any | any; vocab: string; - hydra: LocationJsonldContextOneOf.HydraEnum; + hydra: EventJsonldContextOneOf.HydraEnum; } -export namespace LocationJsonldContextOneOf { +export namespace EventJsonldContextOneOf { export type HydraEnum = 'http://www.w3.org/ns/hydra/core#'; export const HydraEnum = { HttpWwwW3OrgNsHydraCore: 'http://www.w3.org/ns/hydra/core#' as HydraEnum diff --git a/angular/src/app/core/api/v1/model/location.ts b/angular/src/app/core/api/v1/model/location.ts index 9827650..882cf6c 100644 --- a/angular/src/app/core/api/v1/model/location.ts +++ b/angular/src/app/core/api/v1/model/location.ts @@ -20,6 +20,9 @@ export interface Location { zone?: Zone; name: string; code: string; + isZone?: boolean; + isPlace?: boolean; + isPort?: boolean; readonly createdAt?: string | null; } diff --git a/angular/src/app/core/api/v1/model/locationJsonld.ts b/angular/src/app/core/api/v1/model/locationJsonld.ts index 957b493..2cbe90c 100644 --- a/angular/src/app/core/api/v1/model/locationJsonld.ts +++ b/angular/src/app/core/api/v1/model/locationJsonld.ts @@ -9,7 +9,7 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { LocationJsonldContext } from './locationJsonldContext'; +import { EventJsonldContext } from './eventJsonldContext'; import { ZoneJsonld } from './zoneJsonld'; @@ -17,13 +17,16 @@ import { ZoneJsonld } from './zoneJsonld'; * */ export interface LocationJsonld { - context?: LocationJsonldContext; + context?: EventJsonldContext; readonly id?: string; readonly type?: string; readonly dbId?: number | null; zone?: ZoneJsonld; name: string; code: string; + isZone?: boolean; + isPlace?: boolean; + isPort?: boolean; readonly createdAt?: string | null; } diff --git a/angular/src/app/core/api/v1/model/mediaObjectJsonld.ts b/angular/src/app/core/api/v1/model/mediaObjectJsonld.ts index aa4a61b..d7a2263 100644 --- a/angular/src/app/core/api/v1/model/mediaObjectJsonld.ts +++ b/angular/src/app/core/api/v1/model/mediaObjectJsonld.ts @@ -9,14 +9,14 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { LocationJsonldContext } from './locationJsonldContext'; +import { EventJsonldContext } from './eventJsonldContext'; /** * */ export interface MediaObjectJsonld { - context?: LocationJsonldContext; + context?: EventJsonldContext; readonly id?: string; readonly type?: string; readonly dbId?: number | null; diff --git a/angular/src/app/core/api/v1/model/models.ts b/angular/src/app/core/api/v1/model/models.ts index 21ea0e1..07034f9 100644 --- a/angular/src/app/core/api/v1/model/models.ts +++ b/angular/src/app/core/api/v1/model/models.ts @@ -1,23 +1,23 @@ +export * from './apiEventsGetCollection200Response'; +export * from './apiEventsGetCollection200ResponseSearch'; +export * from './apiEventsGetCollection200ResponseSearchMappingInner'; +export * from './apiEventsGetCollection200ResponseView'; export * from './apiLocationsGetCollection200Response'; -export * from './apiLocationsGetCollection200ResponseSearch'; -export * from './apiLocationsGetCollection200ResponseSearchMappingInner'; -export * from './apiLocationsGetCollection200ResponseView'; export * from './apiMediaObjectsGetCollection200Response'; export * from './apiShippingCompaniesGetCollection200Response'; export * from './apiTripLocationsGetCollection200Response'; export * from './apiTripsGetCollection200Response'; -export * from './apiUserTripLocationsGetCollection200Response'; -export * from './apiUserTripWorkLogsGetCollection200Response'; export * from './apiUserTripsGetCollection200Response'; export * from './apiUsersGetCollection200Response'; export * from './apiVesselsGetCollection200Response'; export * from './apiZonesGetCollection200Response'; export * from './authResponse'; export * from './credentials'; +export * from './eventJsonld'; +export * from './eventJsonldContext'; +export * from './eventJsonldContextOneOf'; export * from './location'; export * from './locationJsonld'; -export * from './locationJsonldContext'; -export * from './locationJsonldContextOneOf'; export * from './mediaObjectJsonld'; export * from './shippingCompany'; export * from './shippingCompanyJsonld'; @@ -29,10 +29,6 @@ export * from './user'; export * from './userJsonld'; export * from './userTrip'; export * from './userTripJsonld'; -export * from './userTripLocation'; -export * from './userTripLocationJsonld'; -export * from './userTripWorkLog'; -export * from './userTripWorkLogJsonld'; export * from './vessel'; export * from './vesselJsonld'; export * from './zone'; diff --git a/angular/src/app/core/api/v1/model/shippingCompanyJsonld.ts b/angular/src/app/core/api/v1/model/shippingCompanyJsonld.ts index efd4aef..96826be 100644 --- a/angular/src/app/core/api/v1/model/shippingCompanyJsonld.ts +++ b/angular/src/app/core/api/v1/model/shippingCompanyJsonld.ts @@ -9,14 +9,14 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { LocationJsonldContext } from './locationJsonldContext'; +import { EventJsonldContext } from './eventJsonldContext'; /** * */ export interface ShippingCompanyJsonld { - context?: LocationJsonldContext; + context?: EventJsonldContext; readonly id?: string; readonly type?: string; readonly dbId?: number | null; diff --git a/angular/src/app/core/api/v1/model/trip.ts b/angular/src/app/core/api/v1/model/trip.ts index eb695c0..e02fb15 100644 --- a/angular/src/app/core/api/v1/model/trip.ts +++ b/angular/src/app/core/api/v1/model/trip.ts @@ -9,6 +9,8 @@ * https://openapi-generator.tech * Do not edit the class manually. */ +import { Vessel } from './vessel'; +import { Location } from './location'; /** @@ -16,13 +18,15 @@ */ export interface Trip { readonly dbId?: number | null; - readonly vessel?: string; - pilotReference: string; + vessel?: Vessel; + readonly pilotageReference?: string | null; + customerReference?: string | null; captainName?: string | null; - readonly startLocation?: string; - readonly endLocation?: string; + startLocation?: Location; + endLocation?: Location; startDate: string; endDate: string; + note?: string | null; readonly createdAt?: string | null; } diff --git a/angular/src/app/core/api/v1/model/tripJsonld.ts b/angular/src/app/core/api/v1/model/tripJsonld.ts index 839fc7c..b6714cf 100644 --- a/angular/src/app/core/api/v1/model/tripJsonld.ts +++ b/angular/src/app/core/api/v1/model/tripJsonld.ts @@ -10,25 +10,27 @@ * Do not edit the class manually. */ import { VesselJsonld } from './vesselJsonld'; +import { EventJsonldContext } from './eventJsonldContext'; import { LocationJsonld } from './locationJsonld'; -import { LocationJsonldContext } from './locationJsonldContext'; /** * */ export interface TripJsonld { - context?: LocationJsonldContext; + context?: EventJsonldContext; readonly id?: string; readonly type?: string; readonly dbId?: number | null; - readonly vessel?: VesselJsonld; - pilotReference: string; + vessel?: VesselJsonld; + readonly pilotageReference?: string | null; + customerReference?: string | null; captainName?: string | null; - readonly startLocation?: LocationJsonld; - readonly endLocation?: LocationJsonld; + startLocation?: LocationJsonld; + endLocation?: LocationJsonld; startDate: string; endDate: string; + note?: string | null; readonly createdAt?: string | null; } diff --git a/angular/src/app/core/api/v1/model/tripLocation.ts b/angular/src/app/core/api/v1/model/tripLocation.ts index b3b6cec..bce4946 100644 --- a/angular/src/app/core/api/v1/model/tripLocation.ts +++ b/angular/src/app/core/api/v1/model/tripLocation.ts @@ -9,6 +9,8 @@ * https://openapi-generator.tech * Do not edit the class manually. */ +import { Trip } from './trip'; +import { Location } from './location'; /** @@ -16,8 +18,9 @@ */ export interface TripLocation { readonly dbId?: number | null; - readonly trip?: string; - readonly location?: string; + trip?: Trip; + location?: Location; + isArrival?: boolean; date: string; readonly createdAt?: string | null; } diff --git a/angular/src/app/core/api/v1/model/tripLocationJsonld.ts b/angular/src/app/core/api/v1/model/tripLocationJsonld.ts index 0ff277c..4ac46eb 100644 --- a/angular/src/app/core/api/v1/model/tripLocationJsonld.ts +++ b/angular/src/app/core/api/v1/model/tripLocationJsonld.ts @@ -10,20 +10,21 @@ * Do not edit the class manually. */ import { TripJsonld } from './tripJsonld'; +import { EventJsonldContext } from './eventJsonldContext'; import { LocationJsonld } from './locationJsonld'; -import { LocationJsonldContext } from './locationJsonldContext'; /** * */ export interface TripLocationJsonld { - context?: LocationJsonldContext; + context?: EventJsonldContext; readonly id?: string; readonly type?: string; readonly dbId?: number | null; - readonly trip?: TripJsonld; - readonly location?: LocationJsonld; + trip?: TripJsonld; + location?: LocationJsonld; + isArrival?: boolean; date: string; readonly createdAt?: string | null; } diff --git a/angular/src/app/core/api/v1/model/user.ts b/angular/src/app/core/api/v1/model/user.ts index 520c973..321d711 100644 --- a/angular/src/app/core/api/v1/model/user.ts +++ b/angular/src/app/core/api/v1/model/user.ts @@ -18,6 +18,7 @@ export interface User { readonly dbId?: number | null; email: string; firstName: string; + referenceId: string; lastName: string; image?: string | null; readonly imageUrl?: string | null; @@ -28,7 +29,6 @@ export interface User { password?: string; active?: boolean; roles?: Array; - readonly token?: string | null; readonly createdAt?: string | null; } diff --git a/angular/src/app/core/api/v1/model/userJsonld.ts b/angular/src/app/core/api/v1/model/userJsonld.ts index 5f4a2a9..42b1e1c 100644 --- a/angular/src/app/core/api/v1/model/userJsonld.ts +++ b/angular/src/app/core/api/v1/model/userJsonld.ts @@ -9,19 +9,20 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { LocationJsonldContext } from './locationJsonldContext'; +import { EventJsonldContext } from './eventJsonldContext'; /** * */ export interface UserJsonld { - context?: LocationJsonldContext; + context?: EventJsonldContext; readonly id?: string; readonly type?: string; readonly dbId?: number | null; email: string; firstName: string; + referenceId: string; lastName: string; image?: string | null; readonly imageUrl?: string | null; @@ -32,7 +33,6 @@ export interface UserJsonld { password?: string; active?: boolean; roles?: Array; - readonly token?: string | null; readonly createdAt?: string | null; } diff --git a/angular/src/app/core/api/v1/model/userTripJsonld.ts b/angular/src/app/core/api/v1/model/userTripJsonld.ts index 91e94c7..7142564 100644 --- a/angular/src/app/core/api/v1/model/userTripJsonld.ts +++ b/angular/src/app/core/api/v1/model/userTripJsonld.ts @@ -11,14 +11,14 @@ */ import { TripJsonld } from './tripJsonld'; import { UserJsonld } from './userJsonld'; -import { LocationJsonldContext } from './locationJsonldContext'; +import { EventJsonldContext } from './eventJsonldContext'; /** * */ export interface UserTripJsonld { - context?: LocationJsonldContext; + context?: EventJsonldContext; readonly id?: string; readonly type?: string; readonly dbId?: number | null; diff --git a/angular/src/app/core/api/v1/model/userTripLocationJsonld.ts b/angular/src/app/core/api/v1/model/userTripLocationJsonld.ts deleted file mode 100644 index 1883515..0000000 --- a/angular/src/app/core/api/v1/model/userTripLocationJsonld.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * 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 { UserTripJsonld } from './userTripJsonld'; -import { LocationJsonld } from './locationJsonld'; -import { LocationJsonldContext } from './locationJsonldContext'; - - -/** - * - */ -export interface UserTripLocationJsonld { - context?: LocationJsonldContext; - readonly id?: string; - readonly type?: string; - readonly dbId?: number | null; - readonly userTrip?: UserTripJsonld; - readonly location?: LocationJsonld; - plannedDate: string; - readonly createdAt?: string | null; -} - diff --git a/angular/src/app/core/api/v1/model/userTripWorkLog.ts b/angular/src/app/core/api/v1/model/userTripWorkLog.ts deleted file mode 100644 index 41d4eb9..0000000 --- a/angular/src/app/core/api/v1/model/userTripWorkLog.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * 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 UserTripWorkLog { - readonly dbId?: number | null; - readonly userTrip?: string; - readonly startLocation?: string; - readonly endLocation?: string; - startDate: string; - endDate: string; - readonly createdAt?: string | null; -} - diff --git a/angular/src/app/core/api/v1/model/userTripWorkLogJsonld.ts b/angular/src/app/core/api/v1/model/userTripWorkLogJsonld.ts deleted file mode 100644 index 71cdcaa..0000000 --- a/angular/src/app/core/api/v1/model/userTripWorkLogJsonld.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * 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 { UserTripJsonld } from './userTripJsonld'; -import { LocationJsonld } from './locationJsonld'; -import { LocationJsonldContext } from './locationJsonldContext'; - - -/** - * - */ -export interface UserTripWorkLogJsonld { - context?: LocationJsonldContext; - readonly id?: string; - readonly type?: string; - readonly dbId?: number | null; - readonly userTrip?: UserTripJsonld; - readonly startLocation?: LocationJsonld; - readonly endLocation?: LocationJsonld; - startDate: string; - endDate: string; - readonly createdAt?: string | null; -} - diff --git a/angular/src/app/core/api/v1/model/vesselJsonld.ts b/angular/src/app/core/api/v1/model/vesselJsonld.ts index f7ccf24..bc50be4 100644 --- a/angular/src/app/core/api/v1/model/vesselJsonld.ts +++ b/angular/src/app/core/api/v1/model/vesselJsonld.ts @@ -10,14 +10,14 @@ * Do not edit the class manually. */ import { ShippingCompanyJsonld } from './shippingCompanyJsonld'; -import { LocationJsonldContext } from './locationJsonldContext'; +import { EventJsonldContext } from './eventJsonldContext'; /** * */ export interface VesselJsonld { - context?: LocationJsonldContext; + context?: EventJsonldContext; readonly id?: string; readonly type?: string; readonly dbId?: number | null; diff --git a/angular/src/app/core/api/v1/model/zoneJsonld.ts b/angular/src/app/core/api/v1/model/zoneJsonld.ts index 9fd6e49..0b5081d 100644 --- a/angular/src/app/core/api/v1/model/zoneJsonld.ts +++ b/angular/src/app/core/api/v1/model/zoneJsonld.ts @@ -9,14 +9,14 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { LocationJsonldContext } from './locationJsonldContext'; +import { EventJsonldContext } from './eventJsonldContext'; /** * */ export interface ZoneJsonld { - context?: LocationJsonldContext; + context?: EventJsonldContext; readonly id?: string; readonly type?: string; readonly dbId?: number | null; diff --git a/angular/src/assets/i18n/en.json b/angular/src/assets/i18n/en.json index fc12beb..1a2dad7 100644 --- a/angular/src/assets/i18n/en.json +++ b/angular/src/assets/i18n/en.json @@ -15,11 +15,21 @@ "code": "Code", "created_at": "Created at" }, - "trips": + "trip": { - "view": "Trips" + "view": "Trips", + "view_single": "Trip", + "pilot_reference": "Pilotage reference", + "customer_reference": "Customer reference", + "captain_name": "Captain name", + "vessel": "Vessel", + "start_location": "Start location", + "end_location": "End location", + "start_date": "Start date", + "end_date": "End date", + "itinerary": "Itinerary" }, - "user_trips": + "user_trip": { "view": "User Trips" }, @@ -35,12 +45,14 @@ "location": "Location", "zone": "Zone", "vessel": "Vessel", - "shipping_company": "Shipping Company" - + "shipping_company": "Shipping Company", + "trip": "Trip" }, "location": { - + "is_zone": "Is zone", + "is_place": "Is place", + "is_port": "Is port" }, "zone": { diff --git a/httpdocs/config/packages/api_platform.yaml b/httpdocs/config/packages/api_platform.yaml index 54e2b3c..2b191f9 100644 --- a/httpdocs/config/packages/api_platform.yaml +++ b/httpdocs/config/packages/api_platform.yaml @@ -15,7 +15,7 @@ api_platform: standard_put: true pagination_client_items_per_page: true pagination_items_per_page: 50 - pagination_maximum_items_per_page: 100 + pagination_maximum_items_per_page: 200 swagger: api_keys: diff --git a/httpdocs/migrations/Version20250228112455.php b/httpdocs/migrations/Version20250228112455.php new file mode 100644 index 0000000..b9e97f6 --- /dev/null +++ b/httpdocs/migrations/Version20250228112455.php @@ -0,0 +1,31 @@ +addSql('ALTER TABLE location ADD is_area TINYINT(1) NOT NULL, ADD is_place TINYINT(1) NOT NULL, ADD is_port TINYINT(1) NOT NULL'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE location DROP is_area, DROP is_place, DROP is_port'); + } +} diff --git a/httpdocs/migrations/Version20250228113640.php b/httpdocs/migrations/Version20250228113640.php new file mode 100644 index 0000000..ed1390c --- /dev/null +++ b/httpdocs/migrations/Version20250228113640.php @@ -0,0 +1,31 @@ +addSql('ALTER TABLE location CHANGE is_area is_zone TINYINT(1) NOT NULL'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE location CHANGE is_zone is_area TINYINT(1) NOT NULL'); + } +} diff --git a/httpdocs/migrations/Version20250303144554.php b/httpdocs/migrations/Version20250303144554.php new file mode 100644 index 0000000..f2d67f3 --- /dev/null +++ b/httpdocs/migrations/Version20250303144554.php @@ -0,0 +1,53 @@ +addSql('CREATE TABLE event (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, identifier VARCHAR(255) NOT NULL, `order` INT UNSIGNED NOT NULL, mandatory TINYINT(1) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', UNIQUE INDEX UNIQ_3BAE0AA75E237E06 (name), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE user_trip_event (id INT AUTO_INCREMENT NOT NULL, user_trip_id INT NOT NULL, event_id INT NOT NULL, date DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_46824C08FDB13004 (user_trip_id), INDEX IDX_46824C0871F7E88B (event_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('ALTER TABLE user_trip_event ADD CONSTRAINT FK_46824C08FDB13004 FOREIGN KEY (user_trip_id) REFERENCES user_trip (id)'); + $this->addSql('ALTER TABLE user_trip_event ADD CONSTRAINT FK_46824C0871F7E88B FOREIGN KEY (event_id) REFERENCES event (id)'); + $this->addSql('ALTER TABLE user_trip_location DROP FOREIGN KEY FK_1841178B64D218E'); + $this->addSql('ALTER TABLE user_trip_location DROP FOREIGN KEY FK_1841178BFDB13004'); + $this->addSql('ALTER TABLE user_trip_work_log DROP FOREIGN KEY FK_B38EA119FDB13004'); + $this->addSql('ALTER TABLE user_trip_work_log DROP FOREIGN KEY FK_B38EA1195C3A313A'); + $this->addSql('ALTER TABLE user_trip_work_log DROP FOREIGN KEY FK_B38EA119C43C7F1'); + $this->addSql('DROP TABLE user_trip_location'); + $this->addSql('DROP TABLE user_trip_work_log'); + $this->addSql('ALTER TABLE trip_location ADD is_arrival TINYINT(1) NOT NULL'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('CREATE TABLE user_trip_location (id INT AUTO_INCREMENT NOT NULL, user_trip_id INT NOT NULL, location_id INT NOT NULL, planned_date DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_1841178BFDB13004 (user_trip_id), INDEX IDX_1841178B64D218E (location_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' '); + $this->addSql('CREATE TABLE user_trip_work_log (id INT AUTO_INCREMENT NOT NULL, user_trip_id INT NOT NULL, start_location_id INT NOT NULL, end_location_id INT NOT NULL, start_date DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', end_date DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_B38EA119C43C7F1 (end_location_id), INDEX IDX_B38EA119FDB13004 (user_trip_id), INDEX IDX_B38EA1195C3A313A (start_location_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' '); + $this->addSql('ALTER TABLE user_trip_location ADD CONSTRAINT FK_1841178B64D218E FOREIGN KEY (location_id) REFERENCES location (id)'); + $this->addSql('ALTER TABLE user_trip_location ADD CONSTRAINT FK_1841178BFDB13004 FOREIGN KEY (user_trip_id) REFERENCES user_trip (id)'); + $this->addSql('ALTER TABLE user_trip_work_log ADD CONSTRAINT FK_B38EA119FDB13004 FOREIGN KEY (user_trip_id) REFERENCES user_trip (id)'); + $this->addSql('ALTER TABLE user_trip_work_log ADD CONSTRAINT FK_B38EA1195C3A313A FOREIGN KEY (start_location_id) REFERENCES location (id)'); + $this->addSql('ALTER TABLE user_trip_work_log ADD CONSTRAINT FK_B38EA119C43C7F1 FOREIGN KEY (end_location_id) REFERENCES location (id)'); + $this->addSql('ALTER TABLE user_trip_event DROP FOREIGN KEY FK_46824C08FDB13004'); + $this->addSql('ALTER TABLE user_trip_event DROP FOREIGN KEY FK_46824C0871F7E88B'); + $this->addSql('DROP TABLE event'); + $this->addSql('DROP TABLE user_trip_event'); + $this->addSql('ALTER TABLE trip_location DROP is_arrival'); + } +} diff --git a/httpdocs/migrations/Version20250303152548.php b/httpdocs/migrations/Version20250303152548.php new file mode 100644 index 0000000..c74700b --- /dev/null +++ b/httpdocs/migrations/Version20250303152548.php @@ -0,0 +1,31 @@ +addSql('ALTER TABLE event CHANGE `order` sequence INT UNSIGNED NOT NULL'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE event CHANGE sequence `order` INT UNSIGNED NOT NULL'); + } +} diff --git a/httpdocs/migrations/Version20250304114315.php b/httpdocs/migrations/Version20250304114315.php new file mode 100644 index 0000000..a8845f4 --- /dev/null +++ b/httpdocs/migrations/Version20250304114315.php @@ -0,0 +1,31 @@ +addSql('ALTER TABLE user_trip_event ADD note LONGTEXT DEFAULT NULL'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE user_trip_event DROP note'); + } +} diff --git a/httpdocs/migrations/Version20250304115016.php b/httpdocs/migrations/Version20250304115016.php new file mode 100644 index 0000000..6bde2c6 --- /dev/null +++ b/httpdocs/migrations/Version20250304115016.php @@ -0,0 +1,33 @@ +addSql('DROP INDEX UNIQ_7656F53B69AF50E7 ON trip'); + $this->addSql('ALTER TABLE trip DROP pilotage_reference'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE trip ADD pilotage_reference VARCHAR(255) NOT NULL'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_7656F53B69AF50E7 ON trip (pilotage_reference)'); + } +} diff --git a/httpdocs/migrations/Version20250304122802.php b/httpdocs/migrations/Version20250304122802.php new file mode 100644 index 0000000..ca3b3e8 --- /dev/null +++ b/httpdocs/migrations/Version20250304122802.php @@ -0,0 +1,31 @@ +addSql('ALTER TABLE trip CHANGE cruise_reference cruise_reference VARCHAR(255) DEFAULT NULL'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE trip CHANGE cruise_reference cruise_reference VARCHAR(255) NOT NULL'); + } +} diff --git a/httpdocs/migrations/Version20250304124329.php b/httpdocs/migrations/Version20250304124329.php new file mode 100644 index 0000000..d4a4b35 --- /dev/null +++ b/httpdocs/migrations/Version20250304124329.php @@ -0,0 +1,31 @@ +addSql('ALTER TABLE trip CHANGE cruise_reference customer_reference VARCHAR(255) DEFAULT NULL'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE trip CHANGE customer_reference cruise_reference VARCHAR(255) DEFAULT NULL'); + } +} diff --git a/httpdocs/src/ApiResource/EventApi.php b/httpdocs/src/ApiResource/EventApi.php new file mode 100644 index 0000000..2d3dd30 --- /dev/null +++ b/httpdocs/src/ApiResource/EventApi.php @@ -0,0 +1,56 @@ + 'ipartial', +])] +#[ApiFilter(CustomJsonFilter::class)] +#[ApiFilter(CustomJsonOrderFilter::class)] +class EventApi +{ + #[ApiProperty(readable: false, writable: false, identifier: true)] + public ?int $id = null; + + #[ApiProperty(writable: false)] + public ?int $dbId = null; + + public string $name; + + public string $identifier; + + public int $sequence; + + public bool $mandatory; + + #[ApiProperty(writable: false)] + public ?\DateTimeImmutable $createdAt = null; +} \ No newline at end of file diff --git a/httpdocs/src/ApiResource/LocationApi.php b/httpdocs/src/ApiResource/LocationApi.php index a50a5ff..daeb8c9 100644 --- a/httpdocs/src/ApiResource/LocationApi.php +++ b/httpdocs/src/ApiResource/LocationApi.php @@ -79,6 +79,12 @@ class LocationApi #[Assert\NotBlank] public string $code; + public bool $isZone; + + public bool $isPlace; + + public bool $isPort; + #[ApiProperty(writable: false)] public ?\DateTimeImmutable $createdAt = null; } \ No newline at end of file diff --git a/httpdocs/src/ApiResource/TripApi.php b/httpdocs/src/ApiResource/TripApi.php index eafe62d..d8f890f 100644 --- a/httpdocs/src/ApiResource/TripApi.php +++ b/httpdocs/src/ApiResource/TripApi.php @@ -2,14 +2,19 @@ namespace App\ApiResource; +use ApiPlatform\Doctrine\Orm\Filter\SearchFilter; +use ApiPlatform\Metadata\ApiFilter; use ApiPlatform\Metadata\ApiProperty; use ApiPlatform\Metadata\ApiResource; +use ApiPlatform\Metadata\Delete; use ApiPlatform\Metadata\Get; use ApiPlatform\Metadata\GetCollection; use ApiPlatform\Metadata\Patch; use ApiPlatform\Metadata\Post; use ApiPlatform\Doctrine\Orm\State\Options; use App\Entity\Trip; +use App\Filter\CustomJsonFilter; +use App\Filter\CustomJsonOrderFilter; use App\State\EntityClassDtoStateProcessor; use App\State\EntityToDtoStateProvider; use Symfony\Component\Validator\Constraints as Assert; @@ -30,12 +35,20 @@ use Symfony\Component\PropertyInfo\Type; new Patch( security: 'is_granted("ROLE_ADMIN")' ), + new Delete( + security: 'is_granted("ROLE_ADMIN")' + ) ], security: 'is_granted("ROLE_USER")', provider: EntityToDtoStateProvider::class, processor: EntityClassDtoStateProcessor::class, stateOptions: new Options(entityClass: Trip::class), )] +#[ApiFilter(SearchFilter::class, properties: [ + 'id' => 'ipartial', +])] +#[ApiFilter(CustomJsonFilter::class)] +#[ApiFilter(CustomJsonOrderFilter::class)] class TripApi { #[ApiProperty(readable: false, writable: false, identifier: true)] @@ -48,9 +61,9 @@ class TripApi * @var VesselApi */ #[ApiProperty( - writable: false, + writable: true, readableLink: true, - writableLink: false, + writableLink: true, builtinTypes: [ new Type( 'object', @@ -60,8 +73,10 @@ class TripApi )] public ?VesselApi $vessel = null; - #[Assert\NotBlank] - public string $pilotReference; + #[ApiProperty(writable: false)] + public ?string $pilotageReference = null; + + public ?string $customerReference = null; public ?string $captainName = null; @@ -69,9 +84,9 @@ class TripApi * @var LocationApi */ #[ApiProperty( - writable: false, + writable: true, readableLink: true, - writableLink: false, + writableLink: true, builtinTypes: [ new Type( 'object', @@ -85,9 +100,9 @@ class TripApi * @var LocationApi */ #[ApiProperty( - writable: false, + writable: true, readableLink: true, - writableLink: false, + writableLink: true, builtinTypes: [ new Type( 'object', @@ -103,6 +118,8 @@ class TripApi #[Assert\NotBlank] public \DateTimeImmutable $endDate; + public ?string $note; + #[ApiProperty(writable: false)] public ?\DateTimeImmutable $createdAt = null; } \ No newline at end of file diff --git a/httpdocs/src/ApiResource/TripLocationApi.php b/httpdocs/src/ApiResource/TripLocationApi.php index 0a3cfce..013e860 100644 --- a/httpdocs/src/ApiResource/TripLocationApi.php +++ b/httpdocs/src/ApiResource/TripLocationApi.php @@ -2,14 +2,19 @@ namespace App\ApiResource; +use ApiPlatform\Doctrine\Orm\Filter\SearchFilter; +use ApiPlatform\Metadata\ApiFilter; use ApiPlatform\Metadata\ApiProperty; use ApiPlatform\Metadata\ApiResource; +use ApiPlatform\Metadata\Delete; use ApiPlatform\Metadata\Get; use ApiPlatform\Metadata\GetCollection; use ApiPlatform\Metadata\Patch; use ApiPlatform\Metadata\Post; use ApiPlatform\Doctrine\Orm\State\Options; use App\Entity\TripLocation; +use App\Filter\CustomJsonFilter; +use App\Filter\CustomJsonOrderFilter; use App\State\EntityClassDtoStateProcessor; use App\State\EntityToDtoStateProvider; use Symfony\Component\Validator\Constraints as Assert; @@ -30,12 +35,20 @@ use Symfony\Component\PropertyInfo\Type; new Patch( security: 'is_granted("ROLE_ADMIN")' ), + new Delete( + security: 'is_granted("ROLE_ADMIN")' + ) ], + order: ['date' => 'ASC'], security: 'is_granted("ROLE_USER")', provider: EntityToDtoStateProvider::class, processor: EntityClassDtoStateProcessor::class, stateOptions: new Options(entityClass: TripLocation::class), )] + +#[ApiFilter(SearchFilter::class, properties: ['trip' => 'exact'])] +#[ApiFilter(CustomJsonFilter::class)] +#[ApiFilter(CustomJsonOrderFilter::class)] class TripLocationApi { #[ApiProperty(readable: false, writable: false, identifier: true)] @@ -48,9 +61,9 @@ class TripLocationApi * @var TripApi */ #[ApiProperty( - writable: false, + writable: true, readableLink: true, - writableLink: false, + writableLink: true, builtinTypes: [ new Type( 'object', @@ -64,9 +77,9 @@ class TripLocationApi * @var LocationApi */ #[ApiProperty( - writable: false, + writable: true, readableLink: true, - writableLink: false, + writableLink: true, builtinTypes: [ new Type( 'object', @@ -76,6 +89,8 @@ class TripLocationApi )] public ?LocationApi $location = null; + public bool $isArrival; + #[Assert\NotBlank] public \DateTimeImmutable $date; diff --git a/httpdocs/src/ApiResource/UserApi.php b/httpdocs/src/ApiResource/UserApi.php index 7054537..b6de2c6 100644 --- a/httpdocs/src/ApiResource/UserApi.php +++ b/httpdocs/src/ApiResource/UserApi.php @@ -69,6 +69,9 @@ class UserApi #[Assert\NotBlank] public string $firstName; + #[Assert\NotBlank] + public string $referenceId; + #[Assert\NotBlank] public string $lastName; diff --git a/httpdocs/src/ApiResource/UserTripLocationApi.php b/httpdocs/src/ApiResource/UserTripEventApi.php similarity index 82% rename from httpdocs/src/ApiResource/UserTripLocationApi.php rename to httpdocs/src/ApiResource/UserTripEventApi.php index eecbaf7..ad6b3ab 100644 --- a/httpdocs/src/ApiResource/UserTripLocationApi.php +++ b/httpdocs/src/ApiResource/UserTripEventApi.php @@ -9,14 +9,15 @@ use ApiPlatform\Metadata\GetCollection; use ApiPlatform\Metadata\Patch; use ApiPlatform\Metadata\Post; use ApiPlatform\Doctrine\Orm\State\Options; -use App\Entity\UserTripLocation; +use App\Entity\UserTrip; +use App\Entity\UserTripEvent; use App\State\EntityClassDtoStateProcessor; use App\State\EntityToDtoStateProvider; use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\PropertyInfo\Type; #[ApiResource( - shortName: 'UserTripLocation', + shortName: 'UserTrip', operations: [ new Get( security: 'is_granted("ROLE_USER")' @@ -34,9 +35,9 @@ use Symfony\Component\PropertyInfo\Type; security: 'is_granted("ROLE_USER")', provider: EntityToDtoStateProvider::class, processor: EntityClassDtoStateProcessor::class, - stateOptions: new Options(entityClass: UserTripLocation::class), + stateOptions: new Options(entityClass: UserTripEvent::class), )] -class UserTripLocationApi +class UserTripEventApi { #[ApiProperty(readable: false, writable: false, identifier: true)] public ?int $id = null; @@ -54,14 +55,14 @@ class UserTripLocationApi builtinTypes: [ new Type( 'object', - class: UserTripApi::class, + class: UserTrip::class, ) ] )] public ?UserTripApi $userTrip = null; /** - * @var LocationApi + * @var EventApi */ #[ApiProperty( writable: false, @@ -70,14 +71,16 @@ class UserTripLocationApi builtinTypes: [ new Type( 'object', - class: LocationApi::class, + class: EventApi::class, ) ] )] - public ?LocationApi $location = null; + public ?EventApi $event = null; #[Assert\NotBlank] - public \DateTimeImmutable $plannedDate; + public \DateTimeImmutable $date; + + public ?string $note; #[ApiProperty(writable: false)] public ?\DateTimeImmutable $createdAt = null; diff --git a/httpdocs/src/ApiResource/UserTripWorkLogApi.php b/httpdocs/src/ApiResource/UserTripWorkLogApi.php deleted file mode 100644 index e0715a4..0000000 --- a/httpdocs/src/ApiResource/UserTripWorkLogApi.php +++ /dev/null @@ -1,103 +0,0 @@ -setName('EEZ In'); + $event->setIdentifier('eez'); + $event->setSequence(1); + $this->entityManager->persist($event); + + $event = new Event(); + $event->setName('EEZ Out'); + $event->setIdentifier('eez'); + $event->setSequence(2); + $this->entityManager->persist($event); + + $event = new Event(); + $event->setName('Watch Start'); + $event->setIdentifier('watch'); + $event->setSequence(1); + $this->entityManager->persist($event); + + $event = new Event(); + $event->setName('Watch Stop'); + $event->setIdentifier('watch'); + $event->setSequence(2); + $this->entityManager->persist($event); + + $event = new Event(); + $event->setName('3nm In'); + $event->setIdentifier('3nm'); + $event->setSequence(1); + $this->entityManager->persist($event); + + $event = new Event(); + $event->setName('3nm Out'); + $event->setIdentifier('3nm'); + $event->setSequence(2); + $this->entityManager->persist($event); + + $event = new Event(); + $event->setName('Arrival to port'); + $event->setIdentifier('port'); + $event->setSequence(1); + $this->entityManager->persist($event); + + $event = new Event(); + $event->setName('Departure from port'); + $event->setIdentifier('port'); + $event->setSequence(2); + $this->entityManager->persist($event); + + $event = new Event(); + $event->setName('Anchor Start'); + $event->setIdentifier('anchor'); + $event->setSequence(1); + $this->entityManager->persist($event); + + $event = new Event(); + $event->setName('Anchor Stop'); + $event->setIdentifier('anchor'); + $event->setSequence(2); + $this->entityManager->persist($event); + + $event = new Event(); + $event->setName('Drifting Start'); + $event->setIdentifier('drifting'); + $event->setSequence(1); + $this->entityManager->persist($event); + + $event = new Event(); + $event->setName('Drifting Stop'); + $event->setIdentifier('drifting'); + $event->setSequence(2); + $this->entityManager->persist($event); + + $event = new Event(); + $event->setName('Port canceled'); + $event->setIdentifier('port_canceled'); + $event->setSequence(1); + $this->entityManager->persist($event); + + $event = new Event(); + $event->setName('Port amended'); + $event->setIdentifier('port_amended'); + $event->setSequence(1); + $this->entityManager->persist($event); + + $this->entityManager->flush(); + return Command::SUCCESS; + } +} \ No newline at end of file diff --git a/httpdocs/src/Entity/Event.php b/httpdocs/src/Entity/Event.php new file mode 100644 index 0000000..cf07dda --- /dev/null +++ b/httpdocs/src/Entity/Event.php @@ -0,0 +1,89 @@ + true])] + private ?int $sequence = null; + + #[ORM\Column(nullable: false)] + private bool $mandatory = true; + + #[ORM\Column] + private DateTimeImmutable $createdAt; + + public function __construct() + { + $this->createdAt = new DateTimeImmutable(); + } + + public function getId(): ?int + { + return $this->id; + } + + public function getName(): string + { + return $this->name; + } + + public function setName(string $name): void + { + $this->name = $name; + } + + public function getIdentifier(): string + { + return $this->identifier; + } + + public function setIdentifier(string $identifier): void + { + $this->identifier = $identifier; + } + + public function getSequence(): ?int + { + return $this->sequence; + } + + public function setSequence(?int $sequence): void + { + $this->sequence = $sequence; + } + + public function isMandatory(): bool + { + return $this->mandatory; + } + + public function setMandatory(bool $mandatory): void + { + $this->mandatory = $mandatory; + } + + public function getCreatedAt(): DateTimeImmutable + { + return $this->createdAt; + } + +} \ No newline at end of file diff --git a/httpdocs/src/Entity/Location.php b/httpdocs/src/Entity/Location.php index bdab149..ceb6b51 100644 --- a/httpdocs/src/Entity/Location.php +++ b/httpdocs/src/Entity/Location.php @@ -28,21 +28,21 @@ class Location #[ORM\Column(length: 255)] private string $name; + #[ORM\Column(nullable: false)] + private bool $isZone = false; + + #[ORM\Column(nullable: false)] + private bool $isPlace = false; + + #[ORM\Column(nullable: false)] + private bool $isPort = false; + #[ORM\Column] private DateTimeImmutable $createdAt; #[ORM\OneToMany(targetEntity: TripLocation::class, mappedBy: 'location')] private Collection $tripLocations; - #[ORM\OneToMany(targetEntity: UserTripLocation::class, mappedBy: 'location')] - private Collection $userTripLocations; - - #[ORM\OneToMany(targetEntity: UserTripWorkLog::class, mappedBy: 'startLocation')] - private Collection $startWorkLogs; - - #[ORM\OneToMany(targetEntity: UserTripWorkLog::class, mappedBy: 'endLocation')] - private Collection $endWorkLogs; - public function __construct(Zone $zone, string $name, string $code) { $this->zone = $zone; @@ -50,9 +50,6 @@ class Location $this->code = $code; $this->createdAt = new DateTimeImmutable(); $this->tripLocations = new ArrayCollection(); - $this->userTripLocations = new ArrayCollection(); - $this->startWorkLogs = new ArrayCollection(); - $this->endWorkLogs = new ArrayCollection(); } public function getId(): ?int @@ -92,29 +89,43 @@ class Location $this->code = $code; } - public function getCreatedAt(): DateTimeImmutable + public function isZone(): bool { - return $this->createdAt; + return $this->isZone; } - public function getTripLocations(): Collection + public function setIsZone(bool $isZone): void { - return $this->tripLocations; + $this->isZone = $isZone; + } + + public function isPlace(): bool + { + return $this->isPlace; } - public function getUserTripLocations(): Collection + public function setIsPlace(bool $isPlace): void { - return $this->userTripLocations; + $this->isPlace = $isPlace; } - public function getStartWorkLogs(): Collection + public function isPort(): bool { - return $this->startWorkLogs; + return $this->isPort; } - public function getEndWorkLogs(): Collection + public function setIsPort(bool $isPort): void { - return $this->endWorkLogs; + $this->isPort = $isPort; } + public function getCreatedAt(): DateTimeImmutable + { + return $this->createdAt; + } + + public function getTripLocations(): Collection + { + return $this->tripLocations; + } } \ No newline at end of file diff --git a/httpdocs/src/Entity/Trip.php b/httpdocs/src/Entity/Trip.php index 24f2e82..4a594b9 100644 --- a/httpdocs/src/Entity/Trip.php +++ b/httpdocs/src/Entity/Trip.php @@ -22,8 +22,8 @@ class Trip #[ORM\JoinColumn(nullable: false)] private Vessel $vessel; - #[ORM\Column(length: 255)] - private string $pilotReference; + #[ORM\Column(length: 255, nullable: true)] + private ?string $customerReference = null; #[ORM\Column(length: 255, nullable: true)] private ?string $captainName = null; @@ -42,6 +42,9 @@ class Trip #[ORM\Column] private DateTimeImmutable $endDate; + #[ORM\Column(type: "text", nullable: true)] + protected ?string $note; + #[ORM\Column] private DateTimeImmutable $createdAt; @@ -53,14 +56,12 @@ class Trip public function __construct( Vessel $vessel, - string $pilotageReference, Location $startLocation, Location $endLocation, DateTimeImmutable $startDate, DateTimeImmutable $endDate ) { $this->vessel = $vessel; - $this->pilotReference = $pilotageReference; $this->startLocation = $startLocation; $this->endLocation = $endLocation; $this->startDate = $startDate; @@ -86,15 +87,14 @@ class Trip return $this; } - public function getPilotReference(): string + public function getCustomerReference(): ?string { - return $this->pilotReference; + return $this->customerReference; } - public function setPilotReference(string $pilotReference): self + public function setCustomerReference(?string $customerReference): void { - $this->pilotReference = $pilotReference; - return $this; + $this->customerReference = $customerReference; } public function getCaptainName(): ?string @@ -152,6 +152,16 @@ class Trip return $this; } + public function getNote(): ?string + { + return $this->note; + } + + public function setNote(?string $note): void + { + $this->note = $note; + } + public function getCreatedAt(): DateTimeImmutable { return $this->createdAt; diff --git a/httpdocs/src/Entity/TripLocation.php b/httpdocs/src/Entity/TripLocation.php index 12a7301..3535160 100644 --- a/httpdocs/src/Entity/TripLocation.php +++ b/httpdocs/src/Entity/TripLocation.php @@ -24,6 +24,9 @@ class TripLocation #[ORM\JoinColumn(nullable: false)] private Location $location; + #[ORM\Column(nullable: false)] + private bool $isArrival = true; + #[ORM\Column] private DateTimeImmutable $date; @@ -76,6 +79,16 @@ class TripLocation return $this; } + public function isArrival(): bool + { + return $this->isArrival; + } + + public function setIsArrival(bool $isArrival): void + { + $this->isArrival = $isArrival; + } + public function getCreatedAt(): DateTimeImmutable { return $this->createdAt; diff --git a/httpdocs/src/Entity/User.php b/httpdocs/src/Entity/User.php index 6baf85f..235b25f 100644 --- a/httpdocs/src/Entity/User.php +++ b/httpdocs/src/Entity/User.php @@ -22,6 +22,9 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface #[ORM\Column(length: 180, unique: true)] private ?string $email = null; + #[ORM\Column(length: 255)] + private ?string $referenceId = null; + #[ORM\Column(length: 255)] private ?string $firstName = null; @@ -70,6 +73,16 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface return $this; } + public function getReferenceId(): ?string + { + return $this->referenceId; + } + + public function setReferenceId(?string $referenceId): void + { + $this->referenceId = $referenceId; + } + /** * A visual identifier that represents this user. * diff --git a/httpdocs/src/Entity/UserTrip.php b/httpdocs/src/Entity/UserTrip.php index bc8ac5c..abff6ec 100644 --- a/httpdocs/src/Entity/UserTrip.php +++ b/httpdocs/src/Entity/UserTrip.php @@ -38,11 +38,8 @@ class UserTrip #[ORM\Column] private DateTimeImmutable $createdAt; - #[ORM\OneToMany(targetEntity: UserTripLocation::class, mappedBy: 'userTrip')] - private Collection $tripLocations; - - #[ORM\OneToMany(targetEntity: UserTripWorkLog::class, mappedBy: 'userTrip')] - private Collection $workLogs; + #[ORM\OneToMany(targetEntity: UserTripEvent::class, mappedBy: 'userTrip')] + private Collection $userTripEvents; public function __construct( Trip $trip, @@ -57,8 +54,7 @@ class UserTrip $this->startDate = $startDate; $this->endDate = $endDate; $this->createdAt = new DateTimeImmutable(); - $this->tripLocations = new ArrayCollection(); - $this->workLogs = new ArrayCollection(); + $this->userTripEvents = new ArrayCollection(); } public function getId(): ?int @@ -121,56 +117,13 @@ class UserTrip return $this; } - public function getCreatedAt(): DateTimeImmutable - { - return $this->createdAt; - } - - public function getTripLocations(): Collection - { - return $this->tripLocations; - } - - public function addTripLocation(UserTripLocation $tripLocation): self - { - if (!$this->tripLocations->contains($tripLocation)) { - $this->tripLocations->add($tripLocation); - $tripLocation->setUserTrip($this); - } - return $this; - } - - public function removeTripLocation(UserTripLocation $tripLocation): self - { - if ($this->tripLocations->removeElement($tripLocation)) { - if ($tripLocation->getUserTrip() === $this) { - $tripLocation->setUserTrip(null); - } - } - return $this; - } - - public function getWorkLogs(): Collection - { - return $this->workLogs; - } - - public function addWorkLog(UserTripWorkLog $workLog): self + public function getUserTripEvents(): Collection { - if (!$this->workLogs->contains($workLog)) { - $this->workLogs->add($workLog); - $workLog->setUserTrip($this); - } - return $this; + return $this->userTripEvents; } - public function removeWorkLog(UserTripWorkLog $workLog): self + public function getCreatedAt(): DateTimeImmutable { - if ($this->workLogs->removeElement($workLog)) { - if ($workLog->getUserTrip() === $this) { - $workLog->setUserTrip(null); - } - } - return $this; + return $this->createdAt; } } \ No newline at end of file diff --git a/httpdocs/src/Entity/UserTripEvent.php b/httpdocs/src/Entity/UserTripEvent.php new file mode 100644 index 0000000..751784f --- /dev/null +++ b/httpdocs/src/Entity/UserTripEvent.php @@ -0,0 +1,96 @@ +userTrip = $userTrip; + $this->event = $event; + $this->date = $date; + $this->createdAt = new DateTimeImmutable(); + } + + public function getId(): ?int + { + return $this->id; + } + + public function getUserTrip(): UserTrip + { + return $this->userTrip; + } + + public function setUserTrip(UserTrip $userTrip): void + { + $this->userTrip = $userTrip; + } + + public function getEvent(): Event + { + return $this->event; + } + + public function setEvent(Event $event): void + { + $this->event = $event; + } + + public function getDate(): DateTimeImmutable + { + return $this->date; + } + + public function setDate(DateTimeImmutable $date): void + { + $this->date = $date; + } + + public function getNote(): ?string + { + return $this->note; + } + + public function setNote(?string $note): void + { + $this->note = $note; + } + + public function getCreatedAt(): DateTimeImmutable + { + return $this->createdAt; + } +} \ No newline at end of file diff --git a/httpdocs/src/Entity/UserTripLocation.php b/httpdocs/src/Entity/UserTripLocation.php deleted file mode 100644 index 6a22d96..0000000 --- a/httpdocs/src/Entity/UserTripLocation.php +++ /dev/null @@ -1,83 +0,0 @@ -userTrip = $userTrip; - $this->location = $location; - $this->plannedDate = $plannedDate; - $this->createdAt = new DateTimeImmutable(); - } - - public function getId(): ?int - { - return $this->id; - } - - public function getUserTrip(): UserTrip - { - return $this->userTrip; - } - - public function setUserTrip(UserTrip $userTrip): self - { - $this->userTrip = $userTrip; - return $this; - } - - public function getLocation(): Location - { - return $this->location; - } - - public function setLocation(Location $location): self - { - $this->location = $location; - return $this; - } - - public function getPlannedDate(): DateTimeImmutable - { - return $this->plannedDate; - } - - public function setPlannedDate(DateTimeImmutable $plannedDate): self - { - $this->plannedDate = $plannedDate; - return $this; - } - - public function getCreatedAt(): DateTimeImmutable - { - return $this->createdAt; - } -} \ No newline at end of file diff --git a/httpdocs/src/Entity/UserTripWorkLog.php b/httpdocs/src/Entity/UserTripWorkLog.php deleted file mode 100644 index aecd2be..0000000 --- a/httpdocs/src/Entity/UserTripWorkLog.php +++ /dev/null @@ -1,119 +0,0 @@ -userTrip = $userTrip; - $this->startLocation = $startLocation; - $this->endLocation = $endLocation; - $this->startDate = $startDate; - $this->endDate = $endDate; - $this->createdAt = new DateTimeImmutable(); - } - - public function getId(): ?int - { - return $this->id; - } - - public function getUserTrip(): UserTrip - { - return $this->userTrip; - } - - public function setUserTrip(UserTrip $userTrip): self - { - $this->userTrip = $userTrip; - return $this; - } - - public function getStartLocation(): Location - { - return $this->startLocation; - } - - public function setStartLocation(Location $startLocation): self - { - $this->startLocation = $startLocation; - return $this; - } - - public function getEndLocation(): Location - { - return $this->endLocation; - } - - public function setEndLocation(Location $endLocation): self - { - $this->endLocation = $endLocation; - return $this; - } - - public function getStartDate(): DateTimeImmutable - { - return $this->startDate; - } - - public function setStartDate(DateTimeImmutable $startDate): self - { - $this->startDate = $startDate; - return $this; - } - - public function getEndDate(): DateTimeImmutable - { - return $this->endDate; - } - - public function setEndDate(DateTimeImmutable $endDate): self - { - $this->endDate = $endDate; - return $this; - } - - public function getCreatedAt(): DateTimeImmutable - { - return $this->createdAt; - } -} \ No newline at end of file diff --git a/httpdocs/src/Mapper/EventEntityToApiMapper.php b/httpdocs/src/Mapper/EventEntityToApiMapper.php new file mode 100644 index 0000000..d067f4f --- /dev/null +++ b/httpdocs/src/Mapper/EventEntityToApiMapper.php @@ -0,0 +1,41 @@ +id = $entity->getId(); + + return $dto; + } + + public function populate(object $from, object $to, array $context): object + { + $entity = $from; + $dto = $to; + assert($entity instanceof Event); + assert($dto instanceof EventApi); + + $dto->dbId = $entity->getId(); + $dto->name = $entity->getName(); + $dto->identifier = $entity->getIdentifier(); + $dto->sequence = $entity->getSequence(); + $dto->mandatory = $entity->isMandatory(); + $dto->createdAt = $entity->getCreatedAt(); + + return $dto; + } +} \ No newline at end of file diff --git a/httpdocs/src/Mapper/LocationApiToEntityMapper.php b/httpdocs/src/Mapper/LocationApiToEntityMapper.php index 3eb446f..657c4fc 100644 --- a/httpdocs/src/Mapper/LocationApiToEntityMapper.php +++ b/httpdocs/src/Mapper/LocationApiToEntityMapper.php @@ -53,6 +53,9 @@ class LocationApiToEntityMapper implements MapperInterface $entity->setName($dto->name); $entity->setCode($dto->code); + $entity->setIsZone($dto->isZone); + $entity->setIsPlace($dto->isPlace); + $entity->setIsPort($dto->isPort); if ($dto->zone) { $zone = $this->zoneRepository->find($dto->zone->id); diff --git a/httpdocs/src/Mapper/LocationEntityToApiMapper.php b/httpdocs/src/Mapper/LocationEntityToApiMapper.php index dbacc04..d97fbc7 100644 --- a/httpdocs/src/Mapper/LocationEntityToApiMapper.php +++ b/httpdocs/src/Mapper/LocationEntityToApiMapper.php @@ -38,6 +38,9 @@ class LocationEntityToApiMapper implements MapperInterface $dto->dbId = $entity->getId(); $dto->name = $entity->getName(); $dto->code = $entity->getCode(); + $dto->isZone = $entity->isZone(); + $dto->isPlace = $entity->isPlace(); + $dto->isPort = $entity->isPort(); $dto->createdAt = $entity->getCreatedAt(); $dto->zone = $this->microMapper->map($entity->getZone(), ZoneApi::class, [ diff --git a/httpdocs/src/Mapper/TripApiToEntityMapper.php b/httpdocs/src/Mapper/TripApiToEntityMapper.php index f85a7db..de1572e 100644 --- a/httpdocs/src/Mapper/TripApiToEntityMapper.php +++ b/httpdocs/src/Mapper/TripApiToEntityMapper.php @@ -59,7 +59,6 @@ class TripApiToEntityMapper implements MapperInterface return new Trip( $vessel, - $dto->pilotReference, $startLocation, $endLocation, $dto->startDate, @@ -74,10 +73,11 @@ class TripApiToEntityMapper implements MapperInterface assert($dto instanceof TripApi); assert($entity instanceof Trip); - $entity->setPilotReference($dto->pilotReference); + $entity->setCustomerReference($dto->customerReference); $entity->setCaptainName($dto->captainName); $entity->setStartDate($dto->startDate); $entity->setEndDate($dto->endDate); + $entity->setNote($dto->note); return $entity; } diff --git a/httpdocs/src/Mapper/TripEntityToApiMapper.php b/httpdocs/src/Mapper/TripEntityToApiMapper.php index 21758c5..68a01f3 100644 --- a/httpdocs/src/Mapper/TripEntityToApiMapper.php +++ b/httpdocs/src/Mapper/TripEntityToApiMapper.php @@ -37,10 +37,12 @@ class TripEntityToApiMapper implements MapperInterface assert($dto instanceof TripApi); $dto->dbId = $entity->getId(); - $dto->pilotReference = $entity->getPilotReference(); + $dto->pilotageReference = "P-" . $entity->getId() . "-" . $entity->getStartDate()->format('Y'); + $dto->customerReference = $entity->getCustomerReference(); $dto->captainName = $entity->getCaptainName(); $dto->startDate = $entity->getStartDate(); $dto->endDate = $entity->getEndDate(); + $dto->note = $entity->getNote(); $dto->createdAt = $entity->getCreatedAt(); // Map related entities diff --git a/httpdocs/src/Mapper/TripLocationApiToEntityMapper.php b/httpdocs/src/Mapper/TripLocationApiToEntityMapper.php index a5fbef2..fec969b 100644 --- a/httpdocs/src/Mapper/TripLocationApiToEntityMapper.php +++ b/httpdocs/src/Mapper/TripLocationApiToEntityMapper.php @@ -59,6 +59,15 @@ class TripLocationApiToEntityMapper implements MapperInterface assert($dto instanceof TripLocationApi); assert($entity instanceof TripLocation); + if ($dto->location) { + $location = $this->locationRepository->find($dto->location->id); + if (!$location) { + throw new \Exception('Location not found'); + } + $entity->setLocation($location); + } + + $entity->setIsArrival($dto->isArrival); $entity->setDate($dto->date); return $entity; diff --git a/httpdocs/src/Mapper/TripLocationEntityToApiMapper.php b/httpdocs/src/Mapper/TripLocationEntityToApiMapper.php index b2d224b..f2d7f59 100644 --- a/httpdocs/src/Mapper/TripLocationEntityToApiMapper.php +++ b/httpdocs/src/Mapper/TripLocationEntityToApiMapper.php @@ -38,6 +38,7 @@ class TripLocationEntityToApiMapper implements MapperInterface $dto->dbId = $entity->getId(); $dto->date = $entity->getDate(); + $dto->isArrival = $entity->isArrival(); $dto->createdAt = $entity->getCreatedAt(); $dto->trip = $this->microMapper->map($entity->getTrip(), TripApi::class, [ diff --git a/httpdocs/src/Mapper/UserApiToEntityMapper.php b/httpdocs/src/Mapper/UserApiToEntityMapper.php index e28ec91..98214e3 100644 --- a/httpdocs/src/Mapper/UserApiToEntityMapper.php +++ b/httpdocs/src/Mapper/UserApiToEntityMapper.php @@ -6,12 +6,9 @@ use App\ApiResource\UserApi; use App\Entity\User; use App\Entity\Posting; use App\Repository\UserRepository; -use Doctrine\Common\Collections\ArrayCollection; use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface; -use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfonycasts\MicroMapper\AsMapper; use Symfonycasts\MicroMapper\MapperInterface; -use Symfonycasts\MicroMapper\MicroMapperInterface; #[AsMapper(from: UserApi::class, to: User::class)] class UserApiToEntityMapper implements MapperInterface @@ -44,6 +41,7 @@ class UserApiToEntityMapper implements MapperInterface assert($entity instanceof User); $entity->setEmail($dto->email); + $entity->setReferenceId($dto->referenceId); $entity->setFirstName($dto->firstName); $entity->setLastName($dto->lastName); if ($dto->password) { diff --git a/httpdocs/src/Mapper/UserEntityToApiMapper.php b/httpdocs/src/Mapper/UserEntityToApiMapper.php index fa3159f..64360d1 100644 --- a/httpdocs/src/Mapper/UserEntityToApiMapper.php +++ b/httpdocs/src/Mapper/UserEntityToApiMapper.php @@ -39,6 +39,7 @@ class UserEntityToApiMapper implements MapperInterface $dto->dbId = $entity->getId(); $dto->email = $entity->getEmail(); + $dto->referenceId = $entity->getReferenceId(); $dto->firstName = $entity->getFirstName(); $dto->lastName = $entity->getLastName(); $dto->image = $entity->getImage(); diff --git a/httpdocs/src/Mapper/UserTripEventApiToEntityMapper.php b/httpdocs/src/Mapper/UserTripEventApiToEntityMapper.php new file mode 100644 index 0000000..0d8afb5 --- /dev/null +++ b/httpdocs/src/Mapper/UserTripEventApiToEntityMapper.php @@ -0,0 +1,83 @@ +id) { + $entity = $this->repository->find($dto->id); + if (!$entity) { + throw new \Exception('UserTripEvent not found'); + } + return $entity; + } + + // For new user trip events, we need userTrip and event + if (!$dto->userTrip?->id || !$dto->event?->id) { + throw new \Exception('UserTrip and Event are required for new user trip events'); + } + + $userTrip = $this->userTripRepository->find($dto->userTrip->id); + if (!$userTrip) { + throw new \Exception('UserTrip not found'); + } + + $event = $this->eventRepository->find($dto->event->id); + if (!$event) { + throw new \Exception('Event not found'); + } + + return new UserTripEvent($userTrip, $event, $dto->date); + } + + public function populate(object $from, object $to, array $context): object + { + $dto = $from; + $entity = $to; + assert($dto instanceof UserTripEventApi); + assert($entity instanceof UserTripEvent); + + if ($dto->event) { + $event = $this->eventRepository->find($dto->event->id); + if (!$event) { + throw new \Exception('Event not found'); + } + $entity->setEvent($event); + } + + if ($dto->userTrip) { + $userTrip = $this->userTripRepository->find($dto->userTrip->id); + if (!$userTrip) { + throw new \Exception('UserTrip not found'); + } + $entity->setUserTrip($userTrip); + } + + $entity->setNote($dto->note); + $entity->setDate($dto->date); + + return $entity; + } +} \ No newline at end of file diff --git a/httpdocs/src/Mapper/UserTripEventEntityToApiMapper.php b/httpdocs/src/Mapper/UserTripEventEntityToApiMapper.php new file mode 100644 index 0000000..72d910f --- /dev/null +++ b/httpdocs/src/Mapper/UserTripEventEntityToApiMapper.php @@ -0,0 +1,54 @@ +id = $entity->getId(); + + return $dto; + } + + public function populate(object $from, object $to, array $context): object + { + $entity = $from; + $dto = $to; + assert($entity instanceof UserTripEvent); + assert($dto instanceof UserTripEventApi); + + $dto->dbId = $entity->getId(); + $dto->date = $entity->getDate(); + $dto->note = $entity->getNote(); + $dto->createdAt = $entity->getCreatedAt(); + + $dto->userTrip = $this->microMapper->map($entity->getUserTrip(), UserTripApi::class, [ + MicroMapperInterface::MAX_DEPTH => 1, + ]); + + $dto->event = $this->microMapper->map($entity->getEvent(), EventApi::class, [ + MicroMapperInterface::MAX_DEPTH => 1, + ]); + + return $dto; + } +} \ No newline at end of file diff --git a/httpdocs/src/Repository/EventRepository.php b/httpdocs/src/Repository/EventRepository.php new file mode 100644 index 0000000..5bb565c --- /dev/null +++ b/httpdocs/src/Repository/EventRepository.php @@ -0,0 +1,137 @@ + + * + * @method Event|null find($id, $lockMode = null, $lockVersion = null) + * @method Event|null findOneBy(array $criteria, array $orderBy = null) + * @method Event[] findAll() + * @method Event[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + */ +class EventRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, Event::class); + } + + public function save(Event $event, bool $flush = false): void + { + $this->getEntityManager()->persist($event); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + + public function remove(Event $event, bool $flush = false): void + { + $this->getEntityManager()->remove($event); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + + /** + * @return Event[] Returns an array of Event objects + */ + public function findByName(string $name): array + { + return $this->createQueryBuilder('e') + ->andWhere('e.name LIKE :name') + ->setParameter('name', '%' . $name . '%') + ->orderBy('e.createdAt', 'DESC') + ->getQuery() + ->getResult(); + } + + public function findOneByEventIdentifier(string $eventIdentifier): ?Event + { + return $this->createQueryBuilder('e') + ->andWhere('e.eventIdentifier = :eventIdentifier') + ->setParameter('eventIdentifier', $eventIdentifier) + ->getQuery() + ->getOneOrNullResult(); + } + + /** + * @return Event[] Returns an array of Event objects that need pre or follow events + */ + public function findAllNeedingPreOrFollowEvent(): array + { + return $this->createQueryBuilder('e') + ->andWhere('e.needsPreOrFollowEvent = :needsPreOrFollowEvent') + ->setParameter('needsPreOrFollowEvent', true) + ->orderBy('e.createdAt', 'DESC') + ->getQuery() + ->getResult(); + } + + /** + * @return Event[] Returns an array of Event objects with direct pre-follow relationship + */ + public function findAllWithDirectPreFollow(): array + { + return $this->createQueryBuilder('e') + ->andWhere('e.directPreFollow = :directPreFollow') + ->setParameter('directPreFollow', true) + ->orderBy('e.createdAt', 'DESC') + ->getQuery() + ->getResult(); + } + + /** + * Find events created after a specific date + * + * @return Event[] Returns an array of Event objects + */ + public function findCreatedAfter(DateTimeImmutable $date): array + { + return $this->createQueryBuilder('e') + ->andWhere('e.createdAt > :date') + ->setParameter('date', $date) + ->orderBy('e.createdAt', 'ASC') + ->getQuery() + ->getResult(); + } + + /** + * Find events by pre event identifier + * + * @return Event[] Returns an array of Event objects + */ + public function findByPreEventIdentifier(string $preEventIdentifier): array + { + return $this->createQueryBuilder('e') + ->andWhere('e.preEventIdentifier = :preEventIdentifier') + ->setParameter('preEventIdentifier', $preEventIdentifier) + ->orderBy('e.createdAt', 'DESC') + ->getQuery() + ->getResult(); + } + + /** + * Find events by follow event identifier + * + * @return Event[] Returns an array of Event objects + */ + public function findByFollowEventIdentifier(string $followEventIdentifier): array + { + return $this->createQueryBuilder('e') + ->andWhere('e.followEventIdentifier = :followEventIdentifier') + ->setParameter('followEventIdentifier', $followEventIdentifier) + ->orderBy('e.createdAt', 'DESC') + ->getQuery() + ->getResult(); + } +} \ No newline at end of file diff --git a/httpdocs/src/Repository/UserTripEventRepository.php b/httpdocs/src/Repository/UserTripEventRepository.php new file mode 100644 index 0000000..56ca8c0 --- /dev/null +++ b/httpdocs/src/Repository/UserTripEventRepository.php @@ -0,0 +1,125 @@ + + */ +class UserTripEventRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, UserTripEvent::class); + } + + public function save(UserTripEvent $userTripEvent, bool $flush = true): void + { + $this->getEntityManager()->persist($userTripEvent); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + + public function remove(UserTripEvent $userTripEvent, bool $flush = true): void + { + $this->getEntityManager()->remove($userTripEvent); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + + /** + * @return UserTripEvent[] + */ + public function findByUserTrip(UserTrip $userTrip): array + { + return $this->createQueryBuilder('ute') + ->andWhere('ute.userTrip = :userTrip') + ->setParameter('userTrip', $userTrip) + ->orderBy('ute.date', 'ASC') + ->getQuery() + ->getResult(); + } + + /** + * @return UserTripEvent[] + */ + public function findByEvent(Event $event): array + { + return $this->createQueryBuilder('ute') + ->andWhere('ute.event = :event') + ->setParameter('event', $event) + ->orderBy('ute.date', 'ASC') + ->getQuery() + ->getResult(); + } + + /** + * @return UserTripEvent[] + */ + public function findByDateRange(DateTimeImmutable $start, DateTimeImmutable $end): array + { + return $this->createQueryBuilder('ute') + ->andWhere('ute.date >= :start') + ->andWhere('ute.date <= :end') + ->setParameter('start', $start) + ->setParameter('end', $end) + ->orderBy('ute.date', 'ASC') + ->getQuery() + ->getResult(); + } + + /** + * @return UserTripEvent[] + */ + public function findByUserTripAndDateRange(UserTrip $userTrip, DateTimeImmutable $start, DateTimeImmutable $end): array + { + return $this->createQueryBuilder('ute') + ->andWhere('ute.userTrip = :userTrip') + ->andWhere('ute.date >= :start') + ->andWhere('ute.date <= :end') + ->setParameter('userTrip', $userTrip) + ->setParameter('start', $start) + ->setParameter('end', $end) + ->orderBy('ute.date', 'ASC') + ->getQuery() + ->getResult(); + } + + /** + * @return UserTripEvent|null + */ + public function findOneByUserTripAndEvent(UserTrip $userTrip, Event $event): ?UserTripEvent + { + return $this->createQueryBuilder('ute') + ->andWhere('ute.userTrip = :userTrip') + ->andWhere('ute.event = :event') + ->setParameter('userTrip', $userTrip) + ->setParameter('event', $event) + ->getQuery() + ->getOneOrNullResult(); + } + + /** + * @return UserTripEvent[] + */ + public function findRecentEvents(int $limit = 10): array + { + return $this->createQueryBuilder('ute') + ->orderBy('ute.createdAt', 'DESC') + ->setMaxResults($limit) + ->getQuery() + ->getResult(); + } +} \ No newline at end of file