From 91802b25a78a383d246fe2a61d790bfd4a260fdd Mon Sep 17 00:00:00 2001 From: Michael Mattig Date: Tue, 29 Oct 2024 17:05:27 +0100 Subject: [PATCH 1/3] update openapi-client --- .generation/input/openapi.json | 174 +++++++ python/.openapi-generator/FILES | 6 + python/README.md | 5 + python/geoengine_openapi_client/__init__.py | 2 + .../api/layers_api.py | 428 ++++++++++++++++++ .../models/__init__.py | 2 + .../models/update_layer.py | 95 ++++ .../models/update_layer_collection.py | 76 ++++ python/test/test_layers_api.py | 21 + python/test/test_update_layer.py | 67 +++ python/test/test_update_layer_collection.py | 61 +++ typescript/dist/apis/LayersApi.d.ts | 37 +- typescript/dist/apis/LayersApi.js | 112 +++++ typescript/dist/esm/apis/LayersApi.d.ts | 37 +- typescript/dist/esm/apis/LayersApi.js | 114 ++++- typescript/dist/esm/models/UpdateLayer.d.ts | 65 +++ typescript/dist/esm/models/UpdateLayer.js | 58 +++ .../esm/models/UpdateLayerCollection.d.ts | 43 ++ .../dist/esm/models/UpdateLayerCollection.js | 49 ++ typescript/dist/esm/models/index.d.ts | 2 + typescript/dist/esm/models/index.js | 2 + typescript/dist/models/UpdateLayer.d.ts | 65 +++ typescript/dist/models/UpdateLayer.js | 65 +++ .../dist/models/UpdateLayerCollection.d.ts | 43 ++ .../dist/models/UpdateLayerCollection.js | 56 +++ typescript/dist/models/index.d.ts | 2 + typescript/dist/models/index.js | 2 + typescript/src/apis/LayersApi.ts | 145 ++++++ typescript/src/models/UpdateLayer.ts | 121 +++++ .../src/models/UpdateLayerCollection.ts | 83 ++++ typescript/src/models/index.ts | 2 + util/ui-dev-update.sh | 5 + 32 files changed, 2042 insertions(+), 3 deletions(-) create mode 100644 python/geoengine_openapi_client/models/update_layer.py create mode 100644 python/geoengine_openapi_client/models/update_layer_collection.py create mode 100644 python/test/test_update_layer.py create mode 100644 python/test/test_update_layer_collection.py create mode 100644 typescript/dist/esm/models/UpdateLayer.d.ts create mode 100644 typescript/dist/esm/models/UpdateLayer.js create mode 100644 typescript/dist/esm/models/UpdateLayerCollection.d.ts create mode 100644 typescript/dist/esm/models/UpdateLayerCollection.js create mode 100644 typescript/dist/models/UpdateLayer.d.ts create mode 100644 typescript/dist/models/UpdateLayer.js create mode 100644 typescript/dist/models/UpdateLayerCollection.d.ts create mode 100644 typescript/dist/models/UpdateLayerCollection.js create mode 100644 typescript/src/models/UpdateLayer.ts create mode 100644 typescript/src/models/UpdateLayerCollection.ts diff --git a/.generation/input/openapi.json b/.generation/input/openapi.json index 623f1141..74491875 100644 --- a/.generation/input/openapi.json +++ b/.generation/input/openapi.json @@ -1156,6 +1156,45 @@ } }, "/layerDb/collections/{collection}": { + "put": { + "tags": [ + "Layers" + ], + "summary": "Update a collection", + "operationId": "update_collection", + "parameters": [ + { + "name": "collection", + "in": "path", + "description": "Layer collection id", + "required": true, + "schema": { + "$ref": "#/components/schemas/LayerCollectionId" + }, + "example": "05102bb3-a855-4a37-8a8a-30026a91fef1" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateLayerCollection" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "session_token": [] + } + ] + }, "delete": { "tags": [ "Layers" @@ -1421,6 +1460,75 @@ ] } }, + "/layerDb/layers/{layer}": { + "put": { + "tags": [ + "Layers" + ], + "summary": "Update a layer", + "operationId": "update_layer", + "parameters": [ + { + "name": "layer", + "in": "path", + "description": "Layer id", + "required": true, + "schema": { + "$ref": "#/components/schemas/LayerId" + }, + "example": "05102bb3-a855-4a37-8a8a-30026a91fef1" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateLayer" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "session_token": [] + } + ] + }, + "delete": { + "tags": [ + "Layers" + ], + "summary": "Remove a collection", + "operationId": "remove_layer", + "parameters": [ + { + "name": "layer", + "in": "path", + "description": "Layer id", + "required": true, + "schema": { + "$ref": "#/components/schemas/LayerId" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "session_token": [] + } + ] + } + }, "/layers/collections": { "get": { "tags": [ @@ -9026,6 +9134,72 @@ } } }, + "UpdateLayer": { + "type": "object", + "required": [ + "name", + "description", + "workflow" + ], + "properties": { + "description": { + "type": "string", + "example": "Example layer description" + }, + "metadata": { + "type": "object", + "description": "metadata used for loading the data", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "type": "string", + "example": "Example Layer" + }, + "properties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Property" + }, + "description": "properties, for instance, to be rendered in the UI" + }, + "symbology": { + "allOf": [ + { + "$ref": "#/components/schemas/Symbology" + } + ], + "nullable": true + }, + "workflow": { + "$ref": "#/components/schemas/Workflow" + } + } + }, + "UpdateLayerCollection": { + "type": "object", + "required": [ + "name", + "description" + ], + "properties": { + "description": { + "type": "string", + "example": "A description for an example collection" + }, + "name": { + "type": "string", + "example": "Example Collection" + }, + "properties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Property" + } + } + } + }, "UpdateProject": { "type": "object", "required": [ diff --git a/python/.openapi-generator/FILES b/python/.openapi-generator/FILES index ca69c146..b846d636 100644 --- a/python/.openapi-generator/FILES +++ b/python/.openapi-generator/FILES @@ -208,6 +208,8 @@ docs/TypedVectorResultDescriptor.md docs/UnitlessMeasurement.md docs/UnixTimeStampType.md docs/UpdateDataset.md +docs/UpdateLayer.md +docs/UpdateLayerCollection.md docs/UpdateProject.md docs/UpdateQuota.md docs/UploadFileLayersResponse.md @@ -449,6 +451,8 @@ geoengine_openapi_client/models/typed_vector_result_descriptor.py geoengine_openapi_client/models/unitless_measurement.py geoengine_openapi_client/models/unix_time_stamp_type.py geoengine_openapi_client/models/update_dataset.py +geoengine_openapi_client/models/update_layer.py +geoengine_openapi_client/models/update_layer_collection.py geoengine_openapi_client/models/update_project.py geoengine_openapi_client/models/update_quota.py geoengine_openapi_client/models/upload_file_layers_response.py @@ -686,6 +690,8 @@ test/test_typed_vector_result_descriptor.py test/test_unitless_measurement.py test/test_unix_time_stamp_type.py test/test_update_dataset.py +test/test_update_layer.py +test/test_update_layer_collection.py test/test_update_project.py test/test_update_quota.py test/test_upload_file_layers_response.py diff --git a/python/README.md b/python/README.md index 6d147fe5..f6730636 100644 --- a/python/README.md +++ b/python/README.md @@ -122,8 +122,11 @@ Class | Method | HTTP request | Description *LayersApi* | [**provider_capabilities_handler**](docs/LayersApi.md#provider_capabilities_handler) | **GET** /layers/{provider}/capabilities | *LayersApi* | [**remove_collection**](docs/LayersApi.md#remove_collection) | **DELETE** /layerDb/collections/{collection} | Remove a collection *LayersApi* | [**remove_collection_from_collection**](docs/LayersApi.md#remove_collection_from_collection) | **DELETE** /layerDb/collections/{parent}/collections/{collection} | Delete a collection from a collection +*LayersApi* | [**remove_layer**](docs/LayersApi.md#remove_layer) | **DELETE** /layerDb/layers/{layer} | Remove a collection *LayersApi* | [**remove_layer_from_collection**](docs/LayersApi.md#remove_layer_from_collection) | **DELETE** /layerDb/collections/{collection}/layers/{layer} | Remove a layer from a collection *LayersApi* | [**search_handler**](docs/LayersApi.md#search_handler) | **GET** /layers/collections/search/{provider}/{collection} | Searches the contents of the collection of the given provider +*LayersApi* | [**update_collection**](docs/LayersApi.md#update_collection) | **PUT** /layerDb/collections/{collection} | Update a collection +*LayersApi* | [**update_layer**](docs/LayersApi.md#update_layer) | **PUT** /layerDb/layers/{layer} | Update a layer *MLApi* | [**add_ml_model**](docs/MLApi.md#add_ml_model) | **POST** /ml/models | Create a new ml model. *MLApi* | [**get_ml_model**](docs/MLApi.md#get_ml_model) | **GET** /ml/models/{model_name} | Get ml model by name. *MLApi* | [**list_ml_models**](docs/MLApi.md#list_ml_models) | **GET** /ml/models | List ml models. @@ -372,6 +375,8 @@ Class | Method | HTTP request | Description - [UnitlessMeasurement](docs/UnitlessMeasurement.md) - [UnixTimeStampType](docs/UnixTimeStampType.md) - [UpdateDataset](docs/UpdateDataset.md) + - [UpdateLayer](docs/UpdateLayer.md) + - [UpdateLayerCollection](docs/UpdateLayerCollection.md) - [UpdateProject](docs/UpdateProject.md) - [UpdateQuota](docs/UpdateQuota.md) - [UploadFileLayersResponse](docs/UploadFileLayersResponse.md) diff --git a/python/geoengine_openapi_client/__init__.py b/python/geoengine_openapi_client/__init__.py index cb2eb59a..e1eb79b8 100644 --- a/python/geoengine_openapi_client/__init__.py +++ b/python/geoengine_openapi_client/__init__.py @@ -239,6 +239,8 @@ from geoengine_openapi_client.models.unitless_measurement import UnitlessMeasurement from geoengine_openapi_client.models.unix_time_stamp_type import UnixTimeStampType from geoengine_openapi_client.models.update_dataset import UpdateDataset +from geoengine_openapi_client.models.update_layer import UpdateLayer +from geoengine_openapi_client.models.update_layer_collection import UpdateLayerCollection from geoengine_openapi_client.models.update_project import UpdateProject from geoengine_openapi_client.models.update_quota import UpdateQuota from geoengine_openapi_client.models.upload_file_layers_response import UploadFileLayersResponse diff --git a/python/geoengine_openapi_client/api/layers_api.py b/python/geoengine_openapi_client/api/layers_api.py index 164bd13e..52a815ce 100644 --- a/python/geoengine_openapi_client/api/layers_api.py +++ b/python/geoengine_openapi_client/api/layers_api.py @@ -32,6 +32,8 @@ from geoengine_openapi_client.models.provider_capabilities import ProviderCapabilities from geoengine_openapi_client.models.search_type import SearchType from geoengine_openapi_client.models.task_response import TaskResponse +from geoengine_openapi_client.models.update_layer import UpdateLayer +from geoengine_openapi_client.models.update_layer_collection import UpdateLayerCollection from geoengine_openapi_client.api_client import ApiClient from geoengine_openapi_client.api_response import ApiResponse @@ -1973,6 +1975,138 @@ def remove_collection_from_collection_with_http_info(self, parent : Annotated[St collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) + @validate_arguments + def remove_layer(self, layer : Annotated[StrictStr, Field(..., description="Layer id")], **kwargs) -> None: # noqa: E501 + """Remove a collection # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.remove_layer(layer, async_req=True) + >>> result = thread.get() + + :param layer: Layer id (required) + :type layer: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. + If one number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + message = "Error! Please call the remove_layer_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 + raise ValueError(message) + return self.remove_layer_with_http_info(layer, **kwargs) # noqa: E501 + + @validate_arguments + def remove_layer_with_http_info(self, layer : Annotated[StrictStr, Field(..., description="Layer id")], **kwargs) -> ApiResponse: # noqa: E501 + """Remove a collection # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.remove_layer_with_http_info(layer, async_req=True) + >>> result = thread.get() + + :param layer: Layer id (required) + :type layer: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'layer' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method remove_layer" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['layer']: + _path_params['layer'] = _params['layer'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['session_token'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/layerDb/layers/{layer}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + @validate_arguments def remove_layer_from_collection(self, collection : Annotated[StrictStr, Field(..., description="Layer collection id")], layer : Annotated[StrictStr, Field(..., description="Layer id")], **kwargs) -> None: # noqa: E501 """Remove a layer from a collection # noqa: E501 @@ -2290,3 +2424,297 @@ def search_handler_with_http_info(self, provider : Annotated[StrictStr, Field(.. _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_collection(self, collection : Annotated[StrictStr, Field(..., description="Layer collection id")], update_layer_collection : UpdateLayerCollection, **kwargs) -> None: # noqa: E501 + """Update a collection # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_collection(collection, update_layer_collection, async_req=True) + >>> result = thread.get() + + :param collection: Layer collection id (required) + :type collection: str + :param update_layer_collection: (required) + :type update_layer_collection: UpdateLayerCollection + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. + If one number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + message = "Error! Please call the update_collection_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 + raise ValueError(message) + return self.update_collection_with_http_info(collection, update_layer_collection, **kwargs) # noqa: E501 + + @validate_arguments + def update_collection_with_http_info(self, collection : Annotated[StrictStr, Field(..., description="Layer collection id")], update_layer_collection : UpdateLayerCollection, **kwargs) -> ApiResponse: # noqa: E501 + """Update a collection # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_collection_with_http_info(collection, update_layer_collection, async_req=True) + >>> result = thread.get() + + :param collection: Layer collection id (required) + :type collection: str + :param update_layer_collection: (required) + :type update_layer_collection: UpdateLayerCollection + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'collection', + 'update_layer_collection' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_collection" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['collection']: + _path_params['collection'] = _params['collection'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_layer_collection'] is not None: + _body_params = _params['update_layer_collection'] + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['session_token'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/layerDb/collections/{collection}', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_layer(self, layer : Annotated[StrictStr, Field(..., description="Layer id")], update_layer : UpdateLayer, **kwargs) -> None: # noqa: E501 + """Update a layer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_layer(layer, update_layer, async_req=True) + >>> result = thread.get() + + :param layer: Layer id (required) + :type layer: str + :param update_layer: (required) + :type update_layer: UpdateLayer + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. + If one number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + message = "Error! Please call the update_layer_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 + raise ValueError(message) + return self.update_layer_with_http_info(layer, update_layer, **kwargs) # noqa: E501 + + @validate_arguments + def update_layer_with_http_info(self, layer : Annotated[StrictStr, Field(..., description="Layer id")], update_layer : UpdateLayer, **kwargs) -> ApiResponse: # noqa: E501 + """Update a layer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_layer_with_http_info(layer, update_layer, async_req=True) + >>> result = thread.get() + + :param layer: Layer id (required) + :type layer: str + :param update_layer: (required) + :type update_layer: UpdateLayer + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'layer', + 'update_layer' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_layer" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['layer']: + _path_params['layer'] = _params['layer'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_layer'] is not None: + _body_params = _params['update_layer'] + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['session_token'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/layerDb/layers/{layer}', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/python/geoengine_openapi_client/models/__init__.py b/python/geoengine_openapi_client/models/__init__.py index 6a60233c..6aab86e0 100644 --- a/python/geoengine_openapi_client/models/__init__.py +++ b/python/geoengine_openapi_client/models/__init__.py @@ -207,6 +207,8 @@ from geoengine_openapi_client.models.unitless_measurement import UnitlessMeasurement from geoengine_openapi_client.models.unix_time_stamp_type import UnixTimeStampType from geoengine_openapi_client.models.update_dataset import UpdateDataset +from geoengine_openapi_client.models.update_layer import UpdateLayer +from geoengine_openapi_client.models.update_layer_collection import UpdateLayerCollection from geoengine_openapi_client.models.update_project import UpdateProject from geoengine_openapi_client.models.update_quota import UpdateQuota from geoengine_openapi_client.models.upload_file_layers_response import UploadFileLayersResponse diff --git a/python/geoengine_openapi_client/models/update_layer.py b/python/geoengine_openapi_client/models/update_layer.py new file mode 100644 index 00000000..8044dd23 --- /dev/null +++ b/python/geoengine_openapi_client/models/update_layer.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Geo Engine Pro API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.8.0 + Contact: dev@geoengine.de + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + + +from typing import Dict, List, Optional +from pydantic import BaseModel, Field, StrictStr, conlist +from geoengine_openapi_client.models.symbology import Symbology +from geoengine_openapi_client.models.workflow import Workflow + +class UpdateLayer(BaseModel): + """ + UpdateLayer + """ + description: StrictStr = Field(...) + metadata: Optional[Dict[str, StrictStr]] = Field(None, description="metadata used for loading the data") + name: StrictStr = Field(...) + properties: Optional[conlist(conlist(StrictStr, max_items=2, min_items=2))] = Field(None, description="properties, for instance, to be rendered in the UI") + symbology: Optional[Symbology] = None + workflow: Workflow = Field(...) + __properties = ["description", "metadata", "name", "properties", "symbology", "workflow"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateLayer: + """Create an instance of UpdateLayer from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of symbology + if self.symbology: + _dict['symbology'] = self.symbology.to_dict() + # override the default output from pydantic by calling `to_dict()` of workflow + if self.workflow: + _dict['workflow'] = self.workflow.to_dict() + # set to None if symbology (nullable) is None + # and __fields_set__ contains the field + if self.symbology is None and "symbology" in self.__fields_set__: + _dict['symbology'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateLayer: + """Create an instance of UpdateLayer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateLayer.parse_obj(obj) + + _obj = UpdateLayer.parse_obj({ + "description": obj.get("description"), + "metadata": obj.get("metadata"), + "name": obj.get("name"), + "properties": obj.get("properties"), + "symbology": Symbology.from_dict(obj.get("symbology")) if obj.get("symbology") is not None else None, + "workflow": Workflow.from_dict(obj.get("workflow")) if obj.get("workflow") is not None else None + }) + return _obj + + diff --git a/python/geoengine_openapi_client/models/update_layer_collection.py b/python/geoengine_openapi_client/models/update_layer_collection.py new file mode 100644 index 00000000..d322fec8 --- /dev/null +++ b/python/geoengine_openapi_client/models/update_layer_collection.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Geo Engine Pro API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.8.0 + Contact: dev@geoengine.de + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + + +from typing import List, Optional +from pydantic import BaseModel, Field, StrictStr, conlist + +class UpdateLayerCollection(BaseModel): + """ + UpdateLayerCollection + """ + description: StrictStr = Field(...) + name: StrictStr = Field(...) + properties: Optional[conlist(conlist(StrictStr, max_items=2, min_items=2))] = None + __properties = ["description", "name", "properties"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateLayerCollection: + """Create an instance of UpdateLayerCollection from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateLayerCollection: + """Create an instance of UpdateLayerCollection from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateLayerCollection.parse_obj(obj) + + _obj = UpdateLayerCollection.parse_obj({ + "description": obj.get("description"), + "name": obj.get("name"), + "properties": obj.get("properties") + }) + return _obj + + diff --git a/python/test/test_layers_api.py b/python/test/test_layers_api.py index 5f7a21b2..8db84404 100644 --- a/python/test/test_layers_api.py +++ b/python/test/test_layers_api.py @@ -117,6 +117,13 @@ def test_remove_collection_from_collection(self) -> None: """ pass + def test_remove_layer(self) -> None: + """Test case for remove_layer + + Remove a collection # noqa: E501 + """ + pass + def test_remove_layer_from_collection(self) -> None: """Test case for remove_layer_from_collection @@ -131,6 +138,20 @@ def test_search_handler(self) -> None: """ pass + def test_update_collection(self) -> None: + """Test case for update_collection + + Update a collection # noqa: E501 + """ + pass + + def test_update_layer(self) -> None: + """Test case for update_layer + + Update a layer # noqa: E501 + """ + pass + if __name__ == '__main__': unittest.main() diff --git a/python/test/test_update_layer.py b/python/test/test_update_layer.py new file mode 100644 index 00000000..b9d0a2e5 --- /dev/null +++ b/python/test/test_update_layer.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Geo Engine Pro API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.8.0 + Contact: dev@geoengine.de + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import datetime + +from geoengine_openapi_client.models.update_layer import UpdateLayer # noqa: E501 + +class TestUpdateLayer(unittest.TestCase): + """UpdateLayer unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateLayer: + """Test UpdateLayer + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateLayer` + """ + model = UpdateLayer() # noqa: E501 + if include_optional: + return UpdateLayer( + description = 'Example layer description', + metadata = { + 'key' : '' + }, + name = 'Example Layer', + properties = [ + [ + '' + ] + ], + symbology = None, + workflow = None + ) + else: + return UpdateLayer( + description = 'Example layer description', + name = 'Example Layer', + workflow = None, + ) + """ + + def testUpdateLayer(self): + """Test UpdateLayer""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_update_layer_collection.py b/python/test/test_update_layer_collection.py new file mode 100644 index 00000000..3b75aeef --- /dev/null +++ b/python/test/test_update_layer_collection.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Geo Engine Pro API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.8.0 + Contact: dev@geoengine.de + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import datetime + +from geoengine_openapi_client.models.update_layer_collection import UpdateLayerCollection # noqa: E501 + +class TestUpdateLayerCollection(unittest.TestCase): + """UpdateLayerCollection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateLayerCollection: + """Test UpdateLayerCollection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateLayerCollection` + """ + model = UpdateLayerCollection() # noqa: E501 + if include_optional: + return UpdateLayerCollection( + description = 'A description for an example collection', + name = 'Example Collection', + properties = [ + [ + '' + ] + ] + ) + else: + return UpdateLayerCollection( + description = 'A description for an example collection', + name = 'Example Collection', + ) + """ + + def testUpdateLayerCollection(self): + """Test UpdateLayerCollection""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/typescript/dist/apis/LayersApi.d.ts b/typescript/dist/apis/LayersApi.d.ts index f7823bb0..c4edcfb4 100644 --- a/typescript/dist/apis/LayersApi.d.ts +++ b/typescript/dist/apis/LayersApi.d.ts @@ -10,7 +10,7 @@ * Do not edit the class manually. */ import * as runtime from '../runtime'; -import type { AddCollection200Response, AddLayer, AddLayerCollection, Layer, LayerCollection, ProviderCapabilities, SearchType, TaskResponse } from '../models/index'; +import type { AddCollection200Response, AddLayer, AddLayerCollection, Layer, LayerCollection, ProviderCapabilities, SearchType, TaskResponse, UpdateLayer, UpdateLayerCollection } from '../models/index'; export interface AddCollectionRequest { collection: string; addLayerCollection: AddLayerCollection; @@ -67,6 +67,9 @@ export interface RemoveCollectionFromCollectionRequest { parent: string; collection: string; } +export interface RemoveLayerRequest { + layer: string; +} export interface RemoveLayerFromCollectionRequest { collection: string; layer: string; @@ -79,6 +82,14 @@ export interface SearchHandlerRequest { limit: number; offset: number; } +export interface UpdateCollectionRequest { + collection: string; + updateLayerCollection: UpdateLayerCollection; +} +export interface UpdateLayerRequest { + layer: string; + updateLayer: UpdateLayer; +} /** * */ @@ -185,6 +196,14 @@ export declare class LayersApi extends runtime.BaseAPI { * Delete a collection from a collection */ removeCollectionFromCollection(requestParameters: RemoveCollectionFromCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + /** + * Remove a collection + */ + removeLayerRaw(requestParameters: RemoveLayerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + /** + * Remove a collection + */ + removeLayer(requestParameters: RemoveLayerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Remove a layer from a collection */ @@ -201,4 +220,20 @@ export declare class LayersApi extends runtime.BaseAPI { * Searches the contents of the collection of the given provider */ searchHandler(requestParameters: SearchHandlerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + /** + * Update a collection + */ + updateCollectionRaw(requestParameters: UpdateCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + /** + * Update a collection + */ + updateCollection(requestParameters: UpdateCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + /** + * Update a layer + */ + updateLayerRaw(requestParameters: UpdateLayerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + /** + * Update a layer + */ + updateLayer(requestParameters: UpdateLayerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; } diff --git a/typescript/dist/apis/LayersApi.js b/typescript/dist/apis/LayersApi.js index 8b4ca799..7d963408 100644 --- a/typescript/dist/apis/LayersApi.js +++ b/typescript/dist/apis/LayersApi.js @@ -557,6 +557,40 @@ class LayersApi extends runtime.BaseAPI { yield this.removeCollectionFromCollectionRaw(requestParameters, initOverrides); }); } + /** + * Remove a collection + */ + removeLayerRaw(requestParameters, initOverrides) { + return __awaiter(this, void 0, void 0, function* () { + if (requestParameters.layer === null || requestParameters.layer === undefined) { + throw new runtime.RequiredError('layer', 'Required parameter requestParameters.layer was null or undefined when calling removeLayer.'); + } + const queryParameters = {}; + const headerParameters = {}; + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = yield token("session_token", []); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = yield this.request({ + path: `/layerDb/layers/{layer}`.replace(`{${"layer"}}`, encodeURIComponent(String(requestParameters.layer))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + return new runtime.VoidApiResponse(response); + }); + } + /** + * Remove a collection + */ + removeLayer(requestParameters, initOverrides) { + return __awaiter(this, void 0, void 0, function* () { + yield this.removeLayerRaw(requestParameters, initOverrides); + }); + } /** * Remove a layer from a collection */ @@ -656,5 +690,83 @@ class LayersApi extends runtime.BaseAPI { return yield response.value(); }); } + /** + * Update a collection + */ + updateCollectionRaw(requestParameters, initOverrides) { + return __awaiter(this, void 0, void 0, function* () { + if (requestParameters.collection === null || requestParameters.collection === undefined) { + throw new runtime.RequiredError('collection', 'Required parameter requestParameters.collection was null or undefined when calling updateCollection.'); + } + if (requestParameters.updateLayerCollection === null || requestParameters.updateLayerCollection === undefined) { + throw new runtime.RequiredError('updateLayerCollection', 'Required parameter requestParameters.updateLayerCollection was null or undefined when calling updateCollection.'); + } + const queryParameters = {}; + const headerParameters = {}; + headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = yield token("session_token", []); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = yield this.request({ + path: `/layerDb/collections/{collection}`.replace(`{${"collection"}}`, encodeURIComponent(String(requestParameters.collection))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: (0, index_1.UpdateLayerCollectionToJSON)(requestParameters.updateLayerCollection), + }, initOverrides); + return new runtime.VoidApiResponse(response); + }); + } + /** + * Update a collection + */ + updateCollection(requestParameters, initOverrides) { + return __awaiter(this, void 0, void 0, function* () { + yield this.updateCollectionRaw(requestParameters, initOverrides); + }); + } + /** + * Update a layer + */ + updateLayerRaw(requestParameters, initOverrides) { + return __awaiter(this, void 0, void 0, function* () { + if (requestParameters.layer === null || requestParameters.layer === undefined) { + throw new runtime.RequiredError('layer', 'Required parameter requestParameters.layer was null or undefined when calling updateLayer.'); + } + if (requestParameters.updateLayer === null || requestParameters.updateLayer === undefined) { + throw new runtime.RequiredError('updateLayer', 'Required parameter requestParameters.updateLayer was null or undefined when calling updateLayer.'); + } + const queryParameters = {}; + const headerParameters = {}; + headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = yield token("session_token", []); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = yield this.request({ + path: `/layerDb/layers/{layer}`.replace(`{${"layer"}}`, encodeURIComponent(String(requestParameters.layer))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: (0, index_1.UpdateLayerToJSON)(requestParameters.updateLayer), + }, initOverrides); + return new runtime.VoidApiResponse(response); + }); + } + /** + * Update a layer + */ + updateLayer(requestParameters, initOverrides) { + return __awaiter(this, void 0, void 0, function* () { + yield this.updateLayerRaw(requestParameters, initOverrides); + }); + } } exports.LayersApi = LayersApi; diff --git a/typescript/dist/esm/apis/LayersApi.d.ts b/typescript/dist/esm/apis/LayersApi.d.ts index f7823bb0..c4edcfb4 100644 --- a/typescript/dist/esm/apis/LayersApi.d.ts +++ b/typescript/dist/esm/apis/LayersApi.d.ts @@ -10,7 +10,7 @@ * Do not edit the class manually. */ import * as runtime from '../runtime'; -import type { AddCollection200Response, AddLayer, AddLayerCollection, Layer, LayerCollection, ProviderCapabilities, SearchType, TaskResponse } from '../models/index'; +import type { AddCollection200Response, AddLayer, AddLayerCollection, Layer, LayerCollection, ProviderCapabilities, SearchType, TaskResponse, UpdateLayer, UpdateLayerCollection } from '../models/index'; export interface AddCollectionRequest { collection: string; addLayerCollection: AddLayerCollection; @@ -67,6 +67,9 @@ export interface RemoveCollectionFromCollectionRequest { parent: string; collection: string; } +export interface RemoveLayerRequest { + layer: string; +} export interface RemoveLayerFromCollectionRequest { collection: string; layer: string; @@ -79,6 +82,14 @@ export interface SearchHandlerRequest { limit: number; offset: number; } +export interface UpdateCollectionRequest { + collection: string; + updateLayerCollection: UpdateLayerCollection; +} +export interface UpdateLayerRequest { + layer: string; + updateLayer: UpdateLayer; +} /** * */ @@ -185,6 +196,14 @@ export declare class LayersApi extends runtime.BaseAPI { * Delete a collection from a collection */ removeCollectionFromCollection(requestParameters: RemoveCollectionFromCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + /** + * Remove a collection + */ + removeLayerRaw(requestParameters: RemoveLayerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + /** + * Remove a collection + */ + removeLayer(requestParameters: RemoveLayerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Remove a layer from a collection */ @@ -201,4 +220,20 @@ export declare class LayersApi extends runtime.BaseAPI { * Searches the contents of the collection of the given provider */ searchHandler(requestParameters: SearchHandlerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + /** + * Update a collection + */ + updateCollectionRaw(requestParameters: UpdateCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + /** + * Update a collection + */ + updateCollection(requestParameters: UpdateCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + /** + * Update a layer + */ + updateLayerRaw(requestParameters: UpdateLayerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + /** + * Update a layer + */ + updateLayer(requestParameters: UpdateLayerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; } diff --git a/typescript/dist/esm/apis/LayersApi.js b/typescript/dist/esm/apis/LayersApi.js index 2dc4940d..77422c02 100644 --- a/typescript/dist/esm/apis/LayersApi.js +++ b/typescript/dist/esm/apis/LayersApi.js @@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; import * as runtime from '../runtime'; -import { AddCollection200ResponseFromJSON, AddLayerToJSON, AddLayerCollectionToJSON, LayerFromJSON, LayerCollectionFromJSON, ProviderCapabilitiesFromJSON, TaskResponseFromJSON, } from '../models/index'; +import { AddCollection200ResponseFromJSON, AddLayerToJSON, AddLayerCollectionToJSON, LayerFromJSON, LayerCollectionFromJSON, ProviderCapabilitiesFromJSON, TaskResponseFromJSON, UpdateLayerToJSON, UpdateLayerCollectionToJSON, } from '../models/index'; /** * */ @@ -554,6 +554,40 @@ export class LayersApi extends runtime.BaseAPI { yield this.removeCollectionFromCollectionRaw(requestParameters, initOverrides); }); } + /** + * Remove a collection + */ + removeLayerRaw(requestParameters, initOverrides) { + return __awaiter(this, void 0, void 0, function* () { + if (requestParameters.layer === null || requestParameters.layer === undefined) { + throw new runtime.RequiredError('layer', 'Required parameter requestParameters.layer was null or undefined when calling removeLayer.'); + } + const queryParameters = {}; + const headerParameters = {}; + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = yield token("session_token", []); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = yield this.request({ + path: `/layerDb/layers/{layer}`.replace(`{${"layer"}}`, encodeURIComponent(String(requestParameters.layer))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + return new runtime.VoidApiResponse(response); + }); + } + /** + * Remove a collection + */ + removeLayer(requestParameters, initOverrides) { + return __awaiter(this, void 0, void 0, function* () { + yield this.removeLayerRaw(requestParameters, initOverrides); + }); + } /** * Remove a layer from a collection */ @@ -653,4 +687,82 @@ export class LayersApi extends runtime.BaseAPI { return yield response.value(); }); } + /** + * Update a collection + */ + updateCollectionRaw(requestParameters, initOverrides) { + return __awaiter(this, void 0, void 0, function* () { + if (requestParameters.collection === null || requestParameters.collection === undefined) { + throw new runtime.RequiredError('collection', 'Required parameter requestParameters.collection was null or undefined when calling updateCollection.'); + } + if (requestParameters.updateLayerCollection === null || requestParameters.updateLayerCollection === undefined) { + throw new runtime.RequiredError('updateLayerCollection', 'Required parameter requestParameters.updateLayerCollection was null or undefined when calling updateCollection.'); + } + const queryParameters = {}; + const headerParameters = {}; + headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = yield token("session_token", []); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = yield this.request({ + path: `/layerDb/collections/{collection}`.replace(`{${"collection"}}`, encodeURIComponent(String(requestParameters.collection))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UpdateLayerCollectionToJSON(requestParameters.updateLayerCollection), + }, initOverrides); + return new runtime.VoidApiResponse(response); + }); + } + /** + * Update a collection + */ + updateCollection(requestParameters, initOverrides) { + return __awaiter(this, void 0, void 0, function* () { + yield this.updateCollectionRaw(requestParameters, initOverrides); + }); + } + /** + * Update a layer + */ + updateLayerRaw(requestParameters, initOverrides) { + return __awaiter(this, void 0, void 0, function* () { + if (requestParameters.layer === null || requestParameters.layer === undefined) { + throw new runtime.RequiredError('layer', 'Required parameter requestParameters.layer was null or undefined when calling updateLayer.'); + } + if (requestParameters.updateLayer === null || requestParameters.updateLayer === undefined) { + throw new runtime.RequiredError('updateLayer', 'Required parameter requestParameters.updateLayer was null or undefined when calling updateLayer.'); + } + const queryParameters = {}; + const headerParameters = {}; + headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = yield token("session_token", []); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = yield this.request({ + path: `/layerDb/layers/{layer}`.replace(`{${"layer"}}`, encodeURIComponent(String(requestParameters.layer))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UpdateLayerToJSON(requestParameters.updateLayer), + }, initOverrides); + return new runtime.VoidApiResponse(response); + }); + } + /** + * Update a layer + */ + updateLayer(requestParameters, initOverrides) { + return __awaiter(this, void 0, void 0, function* () { + yield this.updateLayerRaw(requestParameters, initOverrides); + }); + } } diff --git a/typescript/dist/esm/models/UpdateLayer.d.ts b/typescript/dist/esm/models/UpdateLayer.d.ts new file mode 100644 index 00000000..d00e51eb --- /dev/null +++ b/typescript/dist/esm/models/UpdateLayer.d.ts @@ -0,0 +1,65 @@ +/** + * Geo Engine Pro API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.8.0 + * Contact: dev@geoengine.de + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import type { Symbology } from './Symbology'; +import type { Workflow } from './Workflow'; +/** + * + * @export + * @interface UpdateLayer + */ +export interface UpdateLayer { + /** + * + * @type {string} + * @memberof UpdateLayer + */ + description: string; + /** + * metadata used for loading the data + * @type {{ [key: string]: string; }} + * @memberof UpdateLayer + */ + metadata?: { + [key: string]: string; + }; + /** + * + * @type {string} + * @memberof UpdateLayer + */ + name: string; + /** + * properties, for instance, to be rendered in the UI + * @type {Array>} + * @memberof UpdateLayer + */ + properties?: Array>; + /** + * + * @type {Symbology} + * @memberof UpdateLayer + */ + symbology?: Symbology | null; + /** + * + * @type {Workflow} + * @memberof UpdateLayer + */ + workflow: Workflow; +} +/** + * Check if a given object implements the UpdateLayer interface. + */ +export declare function instanceOfUpdateLayer(value: object): boolean; +export declare function UpdateLayerFromJSON(json: any): UpdateLayer; +export declare function UpdateLayerFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateLayer; +export declare function UpdateLayerToJSON(value?: UpdateLayer | null): any; diff --git a/typescript/dist/esm/models/UpdateLayer.js b/typescript/dist/esm/models/UpdateLayer.js new file mode 100644 index 00000000..f894050a --- /dev/null +++ b/typescript/dist/esm/models/UpdateLayer.js @@ -0,0 +1,58 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Geo Engine Pro API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.8.0 + * Contact: dev@geoengine.de + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { exists } from '../runtime'; +import { SymbologyFromJSON, SymbologyToJSON, } from './Symbology'; +import { WorkflowFromJSON, WorkflowToJSON, } from './Workflow'; +/** + * Check if a given object implements the UpdateLayer interface. + */ +export function instanceOfUpdateLayer(value) { + let isInstance = true; + isInstance = isInstance && "description" in value; + isInstance = isInstance && "name" in value; + isInstance = isInstance && "workflow" in value; + return isInstance; +} +export function UpdateLayerFromJSON(json) { + return UpdateLayerFromJSONTyped(json, false); +} +export function UpdateLayerFromJSONTyped(json, ignoreDiscriminator) { + if ((json === undefined) || (json === null)) { + return json; + } + return { + 'description': json['description'], + 'metadata': !exists(json, 'metadata') ? undefined : json['metadata'], + 'name': json['name'], + 'properties': !exists(json, 'properties') ? undefined : json['properties'], + 'symbology': !exists(json, 'symbology') ? undefined : SymbologyFromJSON(json['symbology']), + 'workflow': WorkflowFromJSON(json['workflow']), + }; +} +export function UpdateLayerToJSON(value) { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + 'description': value.description, + 'metadata': value.metadata, + 'name': value.name, + 'properties': value.properties, + 'symbology': SymbologyToJSON(value.symbology), + 'workflow': WorkflowToJSON(value.workflow), + }; +} diff --git a/typescript/dist/esm/models/UpdateLayerCollection.d.ts b/typescript/dist/esm/models/UpdateLayerCollection.d.ts new file mode 100644 index 00000000..948a5a57 --- /dev/null +++ b/typescript/dist/esm/models/UpdateLayerCollection.d.ts @@ -0,0 +1,43 @@ +/** + * Geo Engine Pro API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.8.0 + * Contact: dev@geoengine.de + * + * 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 UpdateLayerCollection + */ +export interface UpdateLayerCollection { + /** + * + * @type {string} + * @memberof UpdateLayerCollection + */ + description: string; + /** + * + * @type {string} + * @memberof UpdateLayerCollection + */ + name: string; + /** + * + * @type {Array>} + * @memberof UpdateLayerCollection + */ + properties?: Array>; +} +/** + * Check if a given object implements the UpdateLayerCollection interface. + */ +export declare function instanceOfUpdateLayerCollection(value: object): boolean; +export declare function UpdateLayerCollectionFromJSON(json: any): UpdateLayerCollection; +export declare function UpdateLayerCollectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateLayerCollection; +export declare function UpdateLayerCollectionToJSON(value?: UpdateLayerCollection | null): any; diff --git a/typescript/dist/esm/models/UpdateLayerCollection.js b/typescript/dist/esm/models/UpdateLayerCollection.js new file mode 100644 index 00000000..02c897a6 --- /dev/null +++ b/typescript/dist/esm/models/UpdateLayerCollection.js @@ -0,0 +1,49 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Geo Engine Pro API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.8.0 + * Contact: dev@geoengine.de + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { exists } from '../runtime'; +/** + * Check if a given object implements the UpdateLayerCollection interface. + */ +export function instanceOfUpdateLayerCollection(value) { + let isInstance = true; + isInstance = isInstance && "description" in value; + isInstance = isInstance && "name" in value; + return isInstance; +} +export function UpdateLayerCollectionFromJSON(json) { + return UpdateLayerCollectionFromJSONTyped(json, false); +} +export function UpdateLayerCollectionFromJSONTyped(json, ignoreDiscriminator) { + if ((json === undefined) || (json === null)) { + return json; + } + return { + 'description': json['description'], + 'name': json['name'], + 'properties': !exists(json, 'properties') ? undefined : json['properties'], + }; +} +export function UpdateLayerCollectionToJSON(value) { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + 'description': value.description, + 'name': value.name, + 'properties': value.properties, + }; +} diff --git a/typescript/dist/esm/models/index.d.ts b/typescript/dist/esm/models/index.d.ts index e433c12e..d999291d 100644 --- a/typescript/dist/esm/models/index.d.ts +++ b/typescript/dist/esm/models/index.d.ts @@ -190,6 +190,8 @@ export * from './TypedVectorResultDescriptor'; export * from './UnitlessMeasurement'; export * from './UnixTimeStampType'; export * from './UpdateDataset'; +export * from './UpdateLayer'; +export * from './UpdateLayerCollection'; export * from './UpdateProject'; export * from './UpdateQuota'; export * from './UploadFileLayersResponse'; diff --git a/typescript/dist/esm/models/index.js b/typescript/dist/esm/models/index.js index c34b1cd0..2ec77280 100644 --- a/typescript/dist/esm/models/index.js +++ b/typescript/dist/esm/models/index.js @@ -192,6 +192,8 @@ export * from './TypedVectorResultDescriptor'; export * from './UnitlessMeasurement'; export * from './UnixTimeStampType'; export * from './UpdateDataset'; +export * from './UpdateLayer'; +export * from './UpdateLayerCollection'; export * from './UpdateProject'; export * from './UpdateQuota'; export * from './UploadFileLayersResponse'; diff --git a/typescript/dist/models/UpdateLayer.d.ts b/typescript/dist/models/UpdateLayer.d.ts new file mode 100644 index 00000000..d00e51eb --- /dev/null +++ b/typescript/dist/models/UpdateLayer.d.ts @@ -0,0 +1,65 @@ +/** + * Geo Engine Pro API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.8.0 + * Contact: dev@geoengine.de + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import type { Symbology } from './Symbology'; +import type { Workflow } from './Workflow'; +/** + * + * @export + * @interface UpdateLayer + */ +export interface UpdateLayer { + /** + * + * @type {string} + * @memberof UpdateLayer + */ + description: string; + /** + * metadata used for loading the data + * @type {{ [key: string]: string; }} + * @memberof UpdateLayer + */ + metadata?: { + [key: string]: string; + }; + /** + * + * @type {string} + * @memberof UpdateLayer + */ + name: string; + /** + * properties, for instance, to be rendered in the UI + * @type {Array>} + * @memberof UpdateLayer + */ + properties?: Array>; + /** + * + * @type {Symbology} + * @memberof UpdateLayer + */ + symbology?: Symbology | null; + /** + * + * @type {Workflow} + * @memberof UpdateLayer + */ + workflow: Workflow; +} +/** + * Check if a given object implements the UpdateLayer interface. + */ +export declare function instanceOfUpdateLayer(value: object): boolean; +export declare function UpdateLayerFromJSON(json: any): UpdateLayer; +export declare function UpdateLayerFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateLayer; +export declare function UpdateLayerToJSON(value?: UpdateLayer | null): any; diff --git a/typescript/dist/models/UpdateLayer.js b/typescript/dist/models/UpdateLayer.js new file mode 100644 index 00000000..e2afa508 --- /dev/null +++ b/typescript/dist/models/UpdateLayer.js @@ -0,0 +1,65 @@ +"use strict"; +/* tslint:disable */ +/* eslint-disable */ +/** + * Geo Engine Pro API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.8.0 + * Contact: dev@geoengine.de + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.UpdateLayerToJSON = exports.UpdateLayerFromJSONTyped = exports.UpdateLayerFromJSON = exports.instanceOfUpdateLayer = void 0; +const runtime_1 = require("../runtime"); +const Symbology_1 = require("./Symbology"); +const Workflow_1 = require("./Workflow"); +/** + * Check if a given object implements the UpdateLayer interface. + */ +function instanceOfUpdateLayer(value) { + let isInstance = true; + isInstance = isInstance && "description" in value; + isInstance = isInstance && "name" in value; + isInstance = isInstance && "workflow" in value; + return isInstance; +} +exports.instanceOfUpdateLayer = instanceOfUpdateLayer; +function UpdateLayerFromJSON(json) { + return UpdateLayerFromJSONTyped(json, false); +} +exports.UpdateLayerFromJSON = UpdateLayerFromJSON; +function UpdateLayerFromJSONTyped(json, ignoreDiscriminator) { + if ((json === undefined) || (json === null)) { + return json; + } + return { + 'description': json['description'], + 'metadata': !(0, runtime_1.exists)(json, 'metadata') ? undefined : json['metadata'], + 'name': json['name'], + 'properties': !(0, runtime_1.exists)(json, 'properties') ? undefined : json['properties'], + 'symbology': !(0, runtime_1.exists)(json, 'symbology') ? undefined : (0, Symbology_1.SymbologyFromJSON)(json['symbology']), + 'workflow': (0, Workflow_1.WorkflowFromJSON)(json['workflow']), + }; +} +exports.UpdateLayerFromJSONTyped = UpdateLayerFromJSONTyped; +function UpdateLayerToJSON(value) { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + 'description': value.description, + 'metadata': value.metadata, + 'name': value.name, + 'properties': value.properties, + 'symbology': (0, Symbology_1.SymbologyToJSON)(value.symbology), + 'workflow': (0, Workflow_1.WorkflowToJSON)(value.workflow), + }; +} +exports.UpdateLayerToJSON = UpdateLayerToJSON; diff --git a/typescript/dist/models/UpdateLayerCollection.d.ts b/typescript/dist/models/UpdateLayerCollection.d.ts new file mode 100644 index 00000000..948a5a57 --- /dev/null +++ b/typescript/dist/models/UpdateLayerCollection.d.ts @@ -0,0 +1,43 @@ +/** + * Geo Engine Pro API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.8.0 + * Contact: dev@geoengine.de + * + * 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 UpdateLayerCollection + */ +export interface UpdateLayerCollection { + /** + * + * @type {string} + * @memberof UpdateLayerCollection + */ + description: string; + /** + * + * @type {string} + * @memberof UpdateLayerCollection + */ + name: string; + /** + * + * @type {Array>} + * @memberof UpdateLayerCollection + */ + properties?: Array>; +} +/** + * Check if a given object implements the UpdateLayerCollection interface. + */ +export declare function instanceOfUpdateLayerCollection(value: object): boolean; +export declare function UpdateLayerCollectionFromJSON(json: any): UpdateLayerCollection; +export declare function UpdateLayerCollectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateLayerCollection; +export declare function UpdateLayerCollectionToJSON(value?: UpdateLayerCollection | null): any; diff --git a/typescript/dist/models/UpdateLayerCollection.js b/typescript/dist/models/UpdateLayerCollection.js new file mode 100644 index 00000000..b8f1a49e --- /dev/null +++ b/typescript/dist/models/UpdateLayerCollection.js @@ -0,0 +1,56 @@ +"use strict"; +/* tslint:disable */ +/* eslint-disable */ +/** + * Geo Engine Pro API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.8.0 + * Contact: dev@geoengine.de + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.UpdateLayerCollectionToJSON = exports.UpdateLayerCollectionFromJSONTyped = exports.UpdateLayerCollectionFromJSON = exports.instanceOfUpdateLayerCollection = void 0; +const runtime_1 = require("../runtime"); +/** + * Check if a given object implements the UpdateLayerCollection interface. + */ +function instanceOfUpdateLayerCollection(value) { + let isInstance = true; + isInstance = isInstance && "description" in value; + isInstance = isInstance && "name" in value; + return isInstance; +} +exports.instanceOfUpdateLayerCollection = instanceOfUpdateLayerCollection; +function UpdateLayerCollectionFromJSON(json) { + return UpdateLayerCollectionFromJSONTyped(json, false); +} +exports.UpdateLayerCollectionFromJSON = UpdateLayerCollectionFromJSON; +function UpdateLayerCollectionFromJSONTyped(json, ignoreDiscriminator) { + if ((json === undefined) || (json === null)) { + return json; + } + return { + 'description': json['description'], + 'name': json['name'], + 'properties': !(0, runtime_1.exists)(json, 'properties') ? undefined : json['properties'], + }; +} +exports.UpdateLayerCollectionFromJSONTyped = UpdateLayerCollectionFromJSONTyped; +function UpdateLayerCollectionToJSON(value) { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + 'description': value.description, + 'name': value.name, + 'properties': value.properties, + }; +} +exports.UpdateLayerCollectionToJSON = UpdateLayerCollectionToJSON; diff --git a/typescript/dist/models/index.d.ts b/typescript/dist/models/index.d.ts index e433c12e..d999291d 100644 --- a/typescript/dist/models/index.d.ts +++ b/typescript/dist/models/index.d.ts @@ -190,6 +190,8 @@ export * from './TypedVectorResultDescriptor'; export * from './UnitlessMeasurement'; export * from './UnixTimeStampType'; export * from './UpdateDataset'; +export * from './UpdateLayer'; +export * from './UpdateLayerCollection'; export * from './UpdateProject'; export * from './UpdateQuota'; export * from './UploadFileLayersResponse'; diff --git a/typescript/dist/models/index.js b/typescript/dist/models/index.js index 7c486fb2..8d36742c 100644 --- a/typescript/dist/models/index.js +++ b/typescript/dist/models/index.js @@ -208,6 +208,8 @@ __exportStar(require("./TypedVectorResultDescriptor"), exports); __exportStar(require("./UnitlessMeasurement"), exports); __exportStar(require("./UnixTimeStampType"), exports); __exportStar(require("./UpdateDataset"), exports); +__exportStar(require("./UpdateLayer"), exports); +__exportStar(require("./UpdateLayerCollection"), exports); __exportStar(require("./UpdateProject"), exports); __exportStar(require("./UpdateQuota"), exports); __exportStar(require("./UploadFileLayersResponse"), exports); diff --git a/typescript/src/apis/LayersApi.ts b/typescript/src/apis/LayersApi.ts index 7803ba6c..b78ddf83 100644 --- a/typescript/src/apis/LayersApi.ts +++ b/typescript/src/apis/LayersApi.ts @@ -23,6 +23,8 @@ import type { ProviderCapabilities, SearchType, TaskResponse, + UpdateLayer, + UpdateLayerCollection, } from '../models/index'; import { AddCollection200ResponseFromJSON, @@ -41,6 +43,10 @@ import { SearchTypeToJSON, TaskResponseFromJSON, TaskResponseToJSON, + UpdateLayerFromJSON, + UpdateLayerToJSON, + UpdateLayerCollectionFromJSON, + UpdateLayerCollectionToJSON, } from '../models/index'; export interface AddCollectionRequest { @@ -112,6 +118,10 @@ export interface RemoveCollectionFromCollectionRequest { collection: string; } +export interface RemoveLayerRequest { + layer: string; +} + export interface RemoveLayerFromCollectionRequest { collection: string; layer: string; @@ -126,6 +136,16 @@ export interface SearchHandlerRequest { offset: number; } +export interface UpdateCollectionRequest { + collection: string; + updateLayerCollection: UpdateLayerCollection; +} + +export interface UpdateLayerRequest { + layer: string; + updateLayer: UpdateLayer; +} + /** * */ @@ -725,6 +745,43 @@ export class LayersApi extends runtime.BaseAPI { await this.removeCollectionFromCollectionRaw(requestParameters, initOverrides); } + /** + * Remove a collection + */ + async removeLayerRaw(requestParameters: RemoveLayerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.layer === null || requestParameters.layer === undefined) { + throw new runtime.RequiredError('layer','Required parameter requestParameters.layer was null or undefined when calling removeLayer.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("session_token", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/layerDb/layers/{layer}`.replace(`{${"layer"}}`, encodeURIComponent(String(requestParameters.layer))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Remove a collection + */ + async removeLayer(requestParameters: RemoveLayerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.removeLayerRaw(requestParameters, initOverrides); + } + /** * Remove a layer from a collection */ @@ -840,4 +897,92 @@ export class LayersApi extends runtime.BaseAPI { return await response.value(); } + /** + * Update a collection + */ + async updateCollectionRaw(requestParameters: UpdateCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.collection === null || requestParameters.collection === undefined) { + throw new runtime.RequiredError('collection','Required parameter requestParameters.collection was null or undefined when calling updateCollection.'); + } + + if (requestParameters.updateLayerCollection === null || requestParameters.updateLayerCollection === undefined) { + throw new runtime.RequiredError('updateLayerCollection','Required parameter requestParameters.updateLayerCollection was null or undefined when calling updateCollection.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("session_token", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/layerDb/collections/{collection}`.replace(`{${"collection"}}`, encodeURIComponent(String(requestParameters.collection))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UpdateLayerCollectionToJSON(requestParameters.updateLayerCollection), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Update a collection + */ + async updateCollection(requestParameters: UpdateCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.updateCollectionRaw(requestParameters, initOverrides); + } + + /** + * Update a layer + */ + async updateLayerRaw(requestParameters: UpdateLayerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.layer === null || requestParameters.layer === undefined) { + throw new runtime.RequiredError('layer','Required parameter requestParameters.layer was null or undefined when calling updateLayer.'); + } + + if (requestParameters.updateLayer === null || requestParameters.updateLayer === undefined) { + throw new runtime.RequiredError('updateLayer','Required parameter requestParameters.updateLayer was null or undefined when calling updateLayer.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("session_token", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/layerDb/layers/{layer}`.replace(`{${"layer"}}`, encodeURIComponent(String(requestParameters.layer))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UpdateLayerToJSON(requestParameters.updateLayer), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Update a layer + */ + async updateLayer(requestParameters: UpdateLayerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.updateLayerRaw(requestParameters, initOverrides); + } + } diff --git a/typescript/src/models/UpdateLayer.ts b/typescript/src/models/UpdateLayer.ts new file mode 100644 index 00000000..9031531f --- /dev/null +++ b/typescript/src/models/UpdateLayer.ts @@ -0,0 +1,121 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Geo Engine Pro API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.8.0 + * Contact: dev@geoengine.de + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Symbology } from './Symbology'; +import { + SymbologyFromJSON, + SymbologyFromJSONTyped, + SymbologyToJSON, +} from './Symbology'; +import type { Workflow } from './Workflow'; +import { + WorkflowFromJSON, + WorkflowFromJSONTyped, + WorkflowToJSON, +} from './Workflow'; + +/** + * + * @export + * @interface UpdateLayer + */ +export interface UpdateLayer { + /** + * + * @type {string} + * @memberof UpdateLayer + */ + description: string; + /** + * metadata used for loading the data + * @type {{ [key: string]: string; }} + * @memberof UpdateLayer + */ + metadata?: { [key: string]: string; }; + /** + * + * @type {string} + * @memberof UpdateLayer + */ + name: string; + /** + * properties, for instance, to be rendered in the UI + * @type {Array>} + * @memberof UpdateLayer + */ + properties?: Array>; + /** + * + * @type {Symbology} + * @memberof UpdateLayer + */ + symbology?: Symbology | null; + /** + * + * @type {Workflow} + * @memberof UpdateLayer + */ + workflow: Workflow; +} + +/** + * Check if a given object implements the UpdateLayer interface. + */ +export function instanceOfUpdateLayer(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "description" in value; + isInstance = isInstance && "name" in value; + isInstance = isInstance && "workflow" in value; + + return isInstance; +} + +export function UpdateLayerFromJSON(json: any): UpdateLayer { + return UpdateLayerFromJSONTyped(json, false); +} + +export function UpdateLayerFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateLayer { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'description': json['description'], + 'metadata': !exists(json, 'metadata') ? undefined : json['metadata'], + 'name': json['name'], + 'properties': !exists(json, 'properties') ? undefined : json['properties'], + 'symbology': !exists(json, 'symbology') ? undefined : SymbologyFromJSON(json['symbology']), + 'workflow': WorkflowFromJSON(json['workflow']), + }; +} + +export function UpdateLayerToJSON(value?: UpdateLayer | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'description': value.description, + 'metadata': value.metadata, + 'name': value.name, + 'properties': value.properties, + 'symbology': SymbologyToJSON(value.symbology), + 'workflow': WorkflowToJSON(value.workflow), + }; +} + diff --git a/typescript/src/models/UpdateLayerCollection.ts b/typescript/src/models/UpdateLayerCollection.ts new file mode 100644 index 00000000..f3081bfe --- /dev/null +++ b/typescript/src/models/UpdateLayerCollection.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Geo Engine Pro API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.8.0 + * Contact: dev@geoengine.de + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface UpdateLayerCollection + */ +export interface UpdateLayerCollection { + /** + * + * @type {string} + * @memberof UpdateLayerCollection + */ + description: string; + /** + * + * @type {string} + * @memberof UpdateLayerCollection + */ + name: string; + /** + * + * @type {Array>} + * @memberof UpdateLayerCollection + */ + properties?: Array>; +} + +/** + * Check if a given object implements the UpdateLayerCollection interface. + */ +export function instanceOfUpdateLayerCollection(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "description" in value; + isInstance = isInstance && "name" in value; + + return isInstance; +} + +export function UpdateLayerCollectionFromJSON(json: any): UpdateLayerCollection { + return UpdateLayerCollectionFromJSONTyped(json, false); +} + +export function UpdateLayerCollectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateLayerCollection { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'description': json['description'], + 'name': json['name'], + 'properties': !exists(json, 'properties') ? undefined : json['properties'], + }; +} + +export function UpdateLayerCollectionToJSON(value?: UpdateLayerCollection | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'description': value.description, + 'name': value.name, + 'properties': value.properties, + }; +} + diff --git a/typescript/src/models/index.ts b/typescript/src/models/index.ts index c34b1cd0..2ec77280 100644 --- a/typescript/src/models/index.ts +++ b/typescript/src/models/index.ts @@ -192,6 +192,8 @@ export * from './TypedVectorResultDescriptor'; export * from './UnitlessMeasurement'; export * from './UnixTimeStampType'; export * from './UpdateDataset'; +export * from './UpdateLayer'; +export * from './UpdateLayerCollection'; export * from './UpdateProject'; export * from './UpdateQuota'; export * from './UploadFileLayersResponse'; diff --git a/util/ui-dev-update.sh b/util/ui-dev-update.sh index 2d26ef24..50c519f0 100755 --- a/util/ui-dev-update.sh +++ b/util/ui-dev-update.sh @@ -19,6 +19,11 @@ git add . current_branch=$(git rev-parse --abbrev-ref HEAD) +if [ "$current_branch" == "main" ]; then + echo "Error: You are on the main branch. Exiting." + exit 1 +fi + # Check if -a is passed as an argument if [[ "$*" == *"-a"* ]]; then # Use git commit --amend From 78223247219dcbe397cb2e53c4a659476efa2faa Mon Sep 17 00:00:00 2001 From: Michael Mattig Date: Thu, 7 Nov 2024 15:25:31 +0100 Subject: [PATCH 2/3] update openapi.json --- .generation/input/openapi.json | 710 ++++++++++++++++----------------- 1 file changed, 355 insertions(+), 355 deletions(-) diff --git a/.generation/input/openapi.json b/.generation/input/openapi.json index 74491875..afa35c45 100644 --- a/.generation/input/openapi.json +++ b/.generation/input/openapi.json @@ -35,20 +35,20 @@ "$ref": "#/components/schemas/UserSession" }, "example": { - "created": "2021-04-26T13:47:10.579724800Z", "id": "208fa24e-7a92-4f57-a3fe-d1177d9f18ad", - "project": null, - "roles": [ - "8a27e61f-cc4d-4d0b-ae8c-4f1c91d07f5a", - "fd8e87bf-515c-4f36-8da6-1a53702ff102" - ], "user": { - "email": null, "id": "5b4466d2-8bab-4ed8-a182-722af3c80958", + "email": null, "realName": null }, + "created": "2021-04-26T13:47:10.579724800Z", "validUntil": "2021-04-26T14:47:10.579775400Z", - "view": null + "project": null, + "view": null, + "roles": [ + "8a27e61f-cc4d-4d0b-ae8c-4f1c91d07f5a", + "fd8e87bf-515c-4f36-8da6-1a53702ff102" + ] } } } @@ -90,38 +90,38 @@ "upload": "420b06de-0a7e-45cb-9c1c-ea901b46ab69" }, "definition": { + "properties": { + "name": "germany_border", + "displayName": "Germany Border", + "description": "The Outline of Germany", + "sourceOperator": "OgrSource" + }, "metaData": { + "type": "OgrMetaData", "loadingInfo": { + "fileName": "germany_polygon.gpkg", + "layerName": "test_germany", + "dataType": "MultiPolygon", + "time": { + "type": "none" + }, "columns": { - "bool": [], - "datetime": [], + "x": "", + "y": null, + "text": [], "float": [], "int": [], - "text": [], - "x": "", - "y": null + "bool": [], + "datetime": [] }, - "dataType": "MultiPolygon", - "fileName": "germany_polygon.gpkg", "forceOgrTimeFilter": false, - "layerName": "test_germany", - "onError": "ignore", - "time": { - "type": "none" - } + "onError": "ignore" }, "resultDescriptor": { - "columns": {}, "dataType": "MultiPolygon", - "spatialReference": "EPSG:4326" - }, - "type": "OgrMetaData" - }, - "properties": { - "description": "The Outline of Germany", - "displayName": "Germany Border", - "name": "germany_border", - "sourceOperator": "OgrSource" + "spatialReference": "EPSG:4326", + "columns": {} + } } } } @@ -132,27 +132,36 @@ "upload": "f3bd61ef-d9ce-471c-89a1-46b5f7295886" }, "definition": { + "properties": { + "name": "plain_data", + "displayName": "Plain Data", + "description": "Demo Dataset", + "sourceOperator": "OgrSource" + }, "metaData": { + "type": "OgrMetaData", "loadingInfo": { + "fileName": "plain_data.csv", + "layerName": "plain_data", + "dataType": "Data", + "time": { + "type": "none" + }, "columns": { + "x": "", + "y": null, + "text": [], "float": [], "int": [ "a" - ], - "text": [], - "x": "", - "y": null + ] }, - "dataType": "Data", - "fileName": "plain_data.csv", "forceOgrTimeFilter": false, - "layerName": "plain_data", - "onError": "abort", - "time": { - "type": "none" - } + "onError": "abort" }, "resultDescriptor": { + "dataType": "Data", + "spatialReference": "EPSG:4326", "columns": { "a": { "dataType": "int", @@ -160,17 +169,8 @@ "type": "unitless" } } - }, - "dataType": "Data", - "spatialReference": "EPSG:4326" - }, - "type": "OgrMetaData" - }, - "properties": { - "description": "Demo Dataset", - "displayName": "Plain Data", - "name": "plain_data", - "sourceOperator": "OgrSource" + } + } } } } @@ -401,39 +401,39 @@ "example": { "mainFile": "germany_polygon.gpkg", "metaData": { + "type": "OgrMetaData", "loadingInfo": { - "attributeQuery": null, + "fileName": "upload/23c9ea9e-15d6-453b-a243-1390967a5669/germany_polygon.gpkg", + "layerName": "test_germany", + "dataType": "MultiPolygon", + "time": { + "type": "none" + }, + "defaultGeometry": null, "columns": { - "bool": [], - "datetime": [], - "float": [], "formatSpecifics": null, + "x": "", + "y": null, "int": [], - "rename": null, + "float": [], "text": [], - "x": "", - "y": null + "bool": [], + "datetime": [], + "rename": null }, - "dataType": "MultiPolygon", - "defaultGeometry": null, - "fileName": "upload/23c9ea9e-15d6-453b-a243-1390967a5669/germany_polygon.gpkg", - "forceOgrSpatialFilter": false, "forceOgrTimeFilter": false, - "layerName": "test_germany", + "forceOgrSpatialFilter": false, "onError": "ignore", "sqlQuery": null, - "time": { - "type": "none" - } + "attributeQuery": null }, "resultDescriptor": { - "bbox": null, - "columns": {}, "dataType": "MultiPolygon", "spatialReference": "EPSG:4326", - "time": null - }, - "type": "OgrMetaData" + "columns": {}, + "time": null, + "bbox": null + } } } } @@ -615,16 +615,16 @@ "$ref": "#/components/schemas/Dataset" }, "example": { - "description": "Boundaries of Germany", "id": { "internal": "9c874b9e-cea0-4553-b727-a13cb26ae4bb" }, "name": "Germany", + "description": "Boundaries of Germany", "resultDescriptor": { "vector": { - "columns": {}, "dataType": "MultiPolygon", - "spatialReference": "EPSG:4326" + "spatialReference": "EPSG:4326", + "columns": {} } }, "sourceOperator": "OgrSource" @@ -1095,20 +1095,20 @@ }, "example": [ { - "description": "Boundaries of Germany", "id": { "internal": "9c874b9e-cea0-4553-b727-a13cb26ae4bb" }, "name": "Germany", + "description": "Boundaries of Germany", + "tags": [], + "sourceOperator": "OgrSource", "resultDescriptor": { "vector": { - "columns": {}, "dataType": "MultiPolygon", - "spatialReference": "EPSG:4326" + "spatialReference": "EPSG:4326", + "columns": {} } - }, - "sourceOperator": "OgrSource", - "tags": [] + } } ] } @@ -1146,8 +1146,8 @@ "example": { "buildDate": "2022-09-29", "commitHash": "555dc6d84d3682c37490a145d53c5097d0b81b27", - "features": "default", - "version": "0.7.0" + "version": "0.7.0", + "features": "default" } } } @@ -1569,33 +1569,33 @@ "$ref": "#/components/schemas/LayerCollection" }, "example": { - "description": "All available Geo Engine layer providers", - "entryLabel": null, "id": { - "collectionId": "f2424474-ef24-4c18-ab84-68592e12ce48", - "providerId": "1c3b8042-300b-485c-95b5-0147d9dc068d" + "providerId": "1c3b8042-300b-485c-95b5-0147d9dc068d", + "collectionId": "f2424474-ef24-4c18-ab84-68592e12ce48" }, + "name": "Layer Providers", + "description": "All available Geo Engine layer providers", "items": [ { - "description": "Basic Layers for all Datasets", + "type": "collection", "id": { - "collectionId": "546073b6-d535-4205-b601-99675c9f6dd7", - "providerId": "ac50ed0d-c9a0-41f8-9ce8-35fc9e38299b" + "providerId": "ac50ed0d-c9a0-41f8-9ce8-35fc9e38299b", + "collectionId": "546073b6-d535-4205-b601-99675c9f6dd7" }, "name": "Datasets", - "type": "collection" + "description": "Basic Layers for all Datasets" }, { - "description": "All available Geo Engine layers", + "type": "collection", "id": { - "collectionId": "05102bb3-a855-4a37-8a8a-30026a91fef1", - "providerId": "ce5e84db-cbf9-48a2-9a32-d4b7cc56ea74" + "providerId": "ce5e84db-cbf9-48a2-9a32-d4b7cc56ea74", + "collectionId": "05102bb3-a855-4a37-8a8a-30026a91fef1" }, "name": "Layers", - "type": "collection" + "description": "All available Geo Engine layers" } ], - "name": "Layer Providers", + "entryLabel": null, "properties": [] } } @@ -1782,35 +1782,35 @@ "$ref": "#/components/schemas/LayerCollection" }, "example": { - "description": "All available Geo Engine layers", - "entryLabel": null, "id": { - "collectionId": "05102bb3-a855-4a37-8a8a-30026a91fef1", - "providerId": "ce5e84db-cbf9-48a2-9a32-d4b7cc56ea74" + "providerId": "ce5e84db-cbf9-48a2-9a32-d4b7cc56ea74", + "collectionId": "05102bb3-a855-4a37-8a8a-30026a91fef1" }, + "name": "Layers", + "description": "All available Geo Engine layers", "items": [ { - "description": "There is nothing here", + "type": "collection", "id": { - "collectionId": "a29f77cc-51ce-466b-86ef-d0ab2170bc0a", - "providerId": "ce5e84db-cbf9-48a2-9a32-d4b7cc56ea74" + "providerId": "ce5e84db-cbf9-48a2-9a32-d4b7cc56ea74", + "collectionId": "a29f77cc-51ce-466b-86ef-d0ab2170bc0a" }, "name": "An empty collection", - "properties": [], - "type": "collection" + "description": "There is nothing here", + "properties": [] }, { - "description": "Natural Earth Ports point filtered with Germany polygon", + "type": "layer", "id": { - "layerId": "b75db46e-2b9a-4a86-b33f-bc06a73cd711", - "providerId": "ce5e84db-cbf9-48a2-9a32-d4b7cc56ea74" + "providerId": "ce5e84db-cbf9-48a2-9a32-d4b7cc56ea74", + "layerId": "b75db46e-2b9a-4a86-b33f-bc06a73cd711" }, "name": "Ports in Germany", - "properties": [], - "type": "layer" + "description": "Natural Earth Ports point filtered with Germany polygon", + "properties": [] } ], - "name": "Layers", + "entryLabel": null, "properties": [] } } @@ -1882,33 +1882,33 @@ "$ref": "#/components/schemas/LayerCollection" }, "example": { - "description": "Basic Layers for all Datasets", - "entryLabel": null, "id": { - "collectionId": "546073b6-d535-4205-b601-99675c9f6dd7", - "providerId": "ac50ed0d-c9a0-41f8-9ce8-35fc9e38299b" + "providerId": "ac50ed0d-c9a0-41f8-9ce8-35fc9e38299b", + "collectionId": "546073b6-d535-4205-b601-99675c9f6dd7" }, + "name": "Datasets", + "description": "Basic Layers for all Datasets", "items": [ { - "description": "Land Cover derived from MODIS/Terra+Aqua Land Cover", + "type": "layer", "id": { - "layerId": "9ee3619e-d0f9-4ced-9c44-3d407c3aed69", - "providerId": "ac50ed0d-c9a0-41f8-9ce8-35fc9e38299b" + "providerId": "ac50ed0d-c9a0-41f8-9ce8-35fc9e38299b", + "layerId": "9ee3619e-d0f9-4ced-9c44-3d407c3aed69" }, "name": "Land Cover", - "type": "layer" + "description": "Land Cover derived from MODIS/Terra+Aqua Land Cover" }, { - "description": "NDVI data from MODIS", + "type": "layer", "id": { - "layerId": "36574dc3-560a-4b09-9d22-d5945f2b8093", - "providerId": "ac50ed0d-c9a0-41f8-9ce8-35fc9e38299b" + "providerId": "ac50ed0d-c9a0-41f8-9ce8-35fc9e38299b", + "layerId": "36574dc3-560a-4b09-9d22-d5945f2b8093" }, "name": "NDVI", - "type": "layer" + "description": "NDVI data from MODIS" } ], - "name": "Datasets", + "entryLabel": null, "properties": [] } } @@ -1950,12 +1950,12 @@ "example": { "listing": true, "search": { - "autocomplete": true, - "filters": [], "search_types": { "fulltext": true, "prefix": true - } + }, + "autocomplete": true, + "filters": [] } } } @@ -2005,16 +2005,29 @@ "$ref": "#/components/schemas/Layer" }, "example": { - "description": "Land Cover derived from MODIS/Terra+Aqua Land Cover", "id": { - "layerId": "9ee3619e-d0f9-4ced-9c44-3d407c3aed69", - "providerId": "ac50ed0d-c9a0-41f8-9ce8-35fc9e38299b" + "providerId": "ac50ed0d-c9a0-41f8-9ce8-35fc9e38299b", + "layerId": "9ee3619e-d0f9-4ced-9c44-3d407c3aed69" }, - "metadata": {}, "name": "Land Cover", - "properties": [], + "description": "Land Cover derived from MODIS/Terra+Aqua Land Cover", + "workflow": { + "type": "Raster", + "operator": { + "type": "GdalSource", + "params": { + "data": { + "type": "internal", + "datasetId": "9ee3619e-d0f9-4ced-9c44-3d407c3aed69" + } + } + } + }, "symbology": { + "type": "raster", + "opacity": 1, "colorizer": { + "type": "palette", "colors": { "0": [ 134, @@ -2028,48 +2041,6 @@ 62, 255 ], - "10": [ - 223, - 192, - 125, - 255 - ], - "11": [ - 66, - 128, - 189, - 255 - ], - "12": [ - 225, - 222, - 127, - 255 - ], - "13": [ - 253, - 2, - 0, - 255 - ], - "14": [ - 162, - 159, - 66, - 255 - ], - "15": [ - 255, - 255, - 255, - 255 - ], - "16": [ - 192, - 192, - 192, - 255 - ], "2": [ 59, 194, @@ -2117,37 +2088,66 @@ 221, 7, 255 + ], + "10": [ + 223, + 192, + 125, + 255 + ], + "11": [ + 66, + 128, + 189, + 255 + ], + "12": [ + 225, + 222, + 127, + 255 + ], + "13": [ + 253, + 2, + 0, + 255 + ], + "14": [ + 162, + 159, + 66, + 255 + ], + "15": [ + 255, + 255, + 255, + 255 + ], + "16": [ + 192, + 192, + 192, + 255 ] }, - "defaultColor": [ + "noDataColor": [ 0, 0, 0, 0 ], - "noDataColor": [ + "defaultColor": [ 0, 0, 0, 0 - ], - "type": "palette" - }, - "opacity": 1, - "type": "raster" + ] + } }, - "workflow": { - "operator": { - "params": { - "data": { - "datasetId": "9ee3619e-d0f9-4ced-9c44-3d407c3aed69", - "type": "internal" - } - }, - "type": "GdalSource" - }, - "type": "Raster" - } + "properties": [], + "metadata": {} } } } @@ -2274,20 +2274,20 @@ "$ref": "#/components/schemas/UserSession" }, "example": { - "created": "2021-04-26T13:47:10.579724800Z", "id": "208fa24e-7a92-4f57-a3fe-d1177d9f18ad", - "project": null, - "roles": [ - "fa5be363-bc0d-4bfa-85c7-ebb5cd9a8783", - "4e8081b6-8aa6-4275-af0c-2fa2da557d28" - ], "user": { - "email": "foo@example.com", "id": "5b4466d2-8bab-4ed8-a182-722af3c80958", + "email": "foo@example.com", "realName": "Foo Bar" }, + "created": "2021-04-26T13:47:10.579724800Z", "validUntil": "2021-04-26T14:47:10.579775400Z", - "view": null + "project": null, + "view": null, + "roles": [ + "fa5be363-bc0d-4bfa-85c7-ebb5cd9a8783", + "4e8081b6-8aa6-4275-af0c-2fa2da557d28" + ] } } } @@ -2459,15 +2459,15 @@ "$ref": "#/components/schemas/UserSession" }, "example": { - "created": "2021-04-26T13:47:10.579724800Z", "id": "208fa24e-7a92-4f57-a3fe-d1177d9f18ad", - "project": null, "user": { - "email": "foo@bar.de", "id": "5b4466d2-8bab-4ed8-a182-722af3c80958", + "email": "foo@bar.de", "realName": "Foo Bar" }, + "created": "2021-04-26T13:47:10.579724800Z", "validUntil": "2021-04-26T14:47:10.579775400Z", + "project": null, "view": null } } @@ -2490,12 +2490,12 @@ "$ref": "#/components/schemas/PermissionRequest" }, "example": { - "permission": "Read", "resource": { - "id": "00000000-0000-0000-0000-000000000000", - "type": "layer" + "type": "layer", + "id": "00000000-0000-0000-0000-000000000000" }, - "roleId": "00000000-0000-0000-0000-000000000000" + "roleId": "00000000-0000-0000-0000-000000000000", + "permission": "Read" } } }, @@ -2525,12 +2525,12 @@ "$ref": "#/components/schemas/PermissionRequest" }, "example": { - "permission": "Read", "resource": { - "id": "00000000-0000-0000-0000-000000000000", - "type": "layer" + "type": "layer", + "id": "00000000-0000-0000-0000-000000000000" }, - "roleId": "00000000-0000-0000-0000-000000000000" + "roleId": "00000000-0000-0000-0000-000000000000", + "permission": "Read" } } }, @@ -2683,6 +2683,8 @@ "$ref": "#/components/schemas/WrappedPlotOutput" }, "example": { + "outputFormat": "JsonPlain", + "plotType": "Statistics", "data": { "a": { "max": 2.0, @@ -2692,9 +2694,7 @@ "validCount": 2, "valueCount": 2 } - }, - "outputFormat": "JsonPlain", - "plotType": "Statistics" + } } } } @@ -2763,7 +2763,18 @@ "$ref": "#/components/schemas/Project" }, "example": { + "id": "df4ad02e-0d61-4e29-90eb-dc1259c1f5b9", + "version": { + "id": "8f4b8683-f92c-4129-a16f-818aeeee484e", + "changed": "2021-04-26T14:05:39.677390600Z", + "author": "5b4466d2-8bab-4ed8-a182-722af3c80958" + }, + "name": "Test", + "description": "Foo", + "layers": [], + "plots": [], "bounds": { + "spatialReference": "EPSG:4326", "boundingBox": { "lowerLeftCoordinate": { "x": 0.0, @@ -2774,25 +2785,14 @@ "y": 1.0 } }, - "spatialReference": "EPSG:4326", "timeInterval": { - "end": 1, - "start": 0 + "start": 0, + "end": 1 } }, - "description": "Foo", - "id": "df4ad02e-0d61-4e29-90eb-dc1259c1f5b9", - "layers": [], - "name": "Test", - "plots": [], "timeStep": { "granularity": "months", "step": 1 - }, - "version": { - "author": "5b4466d2-8bab-4ed8-a182-722af3c80958", - "changed": "2021-04-26T14:05:39.677390600Z", - "id": "8f4b8683-f92c-4129-a16f-818aeeee484e" } } } @@ -2904,14 +2904,14 @@ }, "example": [ { - "author": "5b4466d2-8bab-4ed8-a182-722af3c80958", + "id": "8f4b8683-f92c-4129-a16f-818aeeee484e", "changed": "2021-04-26T14:05:39.677390600Z", - "id": "8f4b8683-f92c-4129-a16f-818aeeee484e" + "author": "5b4466d2-8bab-4ed8-a182-722af3c80958" }, { - "author": "5b4466d2-8bab-4ed8-a182-722af3c80958", + "id": "ced041c7-4b1d-4d13-b076-94596be6a36a", "changed": "2021-04-26T14:13:10.901912700Z", - "id": "ced041c7-4b1d-4d13-b076-94596be6a36a" + "author": "5b4466d2-8bab-4ed8-a182-722af3c80958" } ] } @@ -2961,7 +2961,18 @@ "$ref": "#/components/schemas/Project" }, "example": { + "id": "df4ad02e-0d61-4e29-90eb-dc1259c1f5b9", + "version": { + "id": "8f4b8683-f92c-4129-a16f-818aeeee484e", + "changed": "2021-04-26T14:05:39.677390600Z", + "author": "5b4466d2-8bab-4ed8-a182-722af3c80958" + }, + "name": "Test", + "description": "Foo", + "layers": [], + "plots": [], "bounds": { + "spatialReference": "EPSG:4326", "boundingBox": { "lowerLeftCoordinate": { "x": 0.0, @@ -2972,25 +2983,14 @@ "y": 1.0 } }, - "spatialReference": "EPSG:4326", "timeInterval": { - "end": 1, - "start": 0 + "start": 0, + "end": 1 } }, - "description": "Foo", - "id": "df4ad02e-0d61-4e29-90eb-dc1259c1f5b9", - "layers": [], - "name": "Test", - "plots": [], "timeStep": { "granularity": "months", "step": 1 - }, - "version": { - "author": "5b4466d2-8bab-4ed8-a182-722af3c80958", - "changed": "2021-04-26T14:05:39.677390600Z", - "id": "8f4b8683-f92c-4129-a16f-818aeeee484e" } } } @@ -3057,12 +3057,12 @@ }, "example": [ { - "changed": "2021-04-26T14:03:51.984537900Z", - "description": "Foo", "id": "df4ad02e-0d61-4e29-90eb-dc1259c1f5b9", - "layerNames": [], "name": "Test", - "plotNames": [] + "description": "Foo", + "layerNames": [], + "plotNames": [], + "changed": "2021-04-26T14:03:51.984537900Z" } ] } @@ -3300,20 +3300,20 @@ "$ref": "#/components/schemas/UserSession" }, "example": { - "created": "2021-04-26T13:47:10.579724800Z", "id": "208fa24e-7a92-4f57-a3fe-d1177d9f18ad", - "project": null, - "roles": [ - "fa5be363-bc0d-4bfa-85c7-ebb5cd9a8783", - "4e8081b6-8aa6-4275-af0c-2fa2da557d28" - ], "user": { - "email": "foo@example.com", "id": "5b4466d2-8bab-4ed8-a182-722af3c80958", + "email": "foo@example.com", "realName": "Foo Bar" }, + "created": "2021-04-26T13:47:10.579724800Z", "validUntil": "2021-04-26T14:47:10.579775400Z", - "view": null + "project": null, + "view": null, + "roles": [ + "fa5be363-bc0d-4bfa-85c7-ebb5cd9a8783", + "4e8081b6-8aa6-4275-af0c-2fa2da557d28" + ] } } } @@ -3352,11 +3352,9 @@ "$ref": "#/components/schemas/SpatialReferenceSpecification" }, "example": { - "axisLabels": [ - "Geodetic longitude", - "Geodetic latitude" - ], - "axisOrder": "northEast", + "name": "WGS 84", + "spatialReference": "EPSG:4326", + "projString": "+proj=longlat +datum=WGS84 +no_defs +type=crs", "extent": { "lowerLeftCoordinate": { "x": -180.0, @@ -3367,9 +3365,11 @@ "y": 90.0 } }, - "name": "WGS 84", - "projString": "+proj=longlat +datum=WGS84 +no_defs +type=crs", - "spatialReference": "EPSG:4326" + "axisLabels": [ + "Geodetic longitude", + "Geodetic latitude" + ], + "axisOrder": "northEast" } } } @@ -3439,13 +3439,13 @@ }, "example": [ { - "description": "Demo", - "info": null, - "status": "completed", "taskId": "420b06de-0a7e-45cb-9c1c-ea901b46ab69", + "status": "completed", "taskType": "dummy-task", - "timeStarted": "2023-02-16T15:25:45.390Z", - "timeTotal": "00:00:30" + "description": "Demo", + "info": null, + "timeTotal": "00:00:30", + "timeStarted": "2023-02-16T15:25:45.390Z" } ] } @@ -3525,13 +3525,13 @@ "$ref": "#/components/schemas/TaskStatus" }, "example": { - "description": "Demo", - "estimatedTimeRemaining": "? (\u00b1 ?)", - "info": null, - "pctComplete": "0.00%", "status": "running", "taskType": "dummy-task", - "timeStarted": "2023-02-16T15:25:45.390Z" + "description": "Demo", + "pctComplete": "0.00%", + "timeStarted": "2023-02-16T15:25:45.390Z", + "estimatedTimeRemaining": "? (\u00b1 ?)", + "info": null } } } @@ -3734,18 +3734,18 @@ }, "example": [ { - "individual": true, "role": { "id": "5b4466d2-8bab-4ed8-a182-722af3c80958", "name": "foo@example.com" - } + }, + "individual": true }, { - "individual": false, "role": { "id": "fa5be363-bc0d-4bfa-85c7-ebb5cd9a8783", "name": "Example role" - } + }, + "individual": false } ] } @@ -4345,99 +4345,99 @@ "$ref": "#/components/schemas/GeoJson" }, "example": { + "type": "FeatureCollection", "features": [ { + "type": "Feature", "geometry": { + "type": "Point", "coordinates": [ 0.0, 0.1 - ], - "type": "Point" + ] }, "properties": { "foo": 0 }, - "type": "Feature", "when": { - "end": "1970-01-01T00:00:00.001+00:00", "start": "1970-01-01T00:00:00+00:00", + "end": "1970-01-01T00:00:00.001+00:00", "type": "Interval" } }, { + "type": "Feature", "geometry": { + "type": "Point", "coordinates": [ 1.0, 1.1 - ], - "type": "Point" + ] }, "properties": { "foo": null }, - "type": "Feature", "when": { - "end": "1970-01-01T00:00:00.001+00:00", "start": "1970-01-01T00:00:00+00:00", + "end": "1970-01-01T00:00:00.001+00:00", "type": "Interval" } }, { + "type": "Feature", "geometry": { + "type": "Point", "coordinates": [ 2.0, 3.1 - ], - "type": "Point" + ] }, "properties": { "foo": 2 }, - "type": "Feature", "when": { - "end": "1970-01-01T00:00:00.001+00:00", "start": "1970-01-01T00:00:00+00:00", + "end": "1970-01-01T00:00:00.001+00:00", "type": "Interval" } }, { + "type": "Feature", "geometry": { + "type": "Point", "coordinates": [ 3.0, 3.1 - ], - "type": "Point" + ] }, "properties": { "foo": 3 }, - "type": "Feature", "when": { - "end": "1970-01-01T00:00:00.001+00:00", "start": "1970-01-01T00:00:00+00:00", + "end": "1970-01-01T00:00:00.001+00:00", "type": "Interval" } }, { + "type": "Feature", "geometry": { + "type": "Point", "coordinates": [ 4.0, 4.1 - ], - "type": "Point" + ] }, "properties": { "foo": 4 }, - "type": "Feature", "when": { - "end": "1970-01-01T00:00:00.001+00:00", "start": "1970-01-01T00:00:00+00:00", + "end": "1970-01-01T00:00:00.001+00:00", "type": "Interval" } } - ], - "type": "FeatureCollection" + ] } } } @@ -4796,7 +4796,9 @@ "examples": { "MockPointSource": { "value": { + "type": "Vector", "operator": { + "type": "MockPointSource", "params": { "points": [ { @@ -4808,29 +4810,27 @@ "y": 1.1 } ] - }, - "type": "MockPointSource" - }, - "type": "Vector" + } + } } }, "Statistics Plot": { "value": { + "type": "Plot", "operator": { + "type": "Statistics", "params": {}, "sources": { "source": { + "type": "OgrSource", "params": { - "attributeFilters": null, + "data": "ne_10m_ports", "attributeProjection": null, - "data": "ne_10m_ports" - }, - "type": "OgrSource" + "attributeFilters": null + } } - }, - "type": "Statistics" - }, - "type": "Plot" + } + } } } } @@ -4877,7 +4877,9 @@ "$ref": "#/components/schemas/Workflow" }, "example": { + "type": "Vector", "operator": { + "type": "MockPointSource", "params": { "points": [ { @@ -4889,10 +4891,8 @@ "y": 1.1 } ] - }, - "type": "MockPointSource" - }, - "type": "Vector" + } + } } } } @@ -4962,10 +4962,10 @@ "$ref": "#/components/schemas/TypedResultDescriptor" }, "example": { - "columns": {}, + "type": "vector", "dataType": "MultiPoint", "spatialReference": "EPSG:4326", - "type": "vector" + "columns": {} } } } @@ -5010,8 +5010,8 @@ "example": [ { "dataset": { - "datasetId": "846a823a-6859-4b94-ab0a-c1de80f593d8", - "type": "internal" + "type": "internal", + "datasetId": "846a823a-6859-4b94-ab0a-c1de80f593d8" }, "provenance": { "citation": "Author, Dataset Tile", @@ -5021,8 +5021,8 @@ }, { "dataset": { - "datasetId": "453cd398-f271-437b-9c3d-7f42213ea30a", - "type": "internal" + "type": "internal", + "datasetId": "453cd398-f271-437b-9c3d-7f42213ea30a" }, "provenance": { "citation": "Another Author, Another Dataset Tile", @@ -5306,13 +5306,13 @@ } }, "example": { - "datasetDescription": "The Outline of Germany (auto detected format)", + "upload": "420b06de-0a7e-45cb-9c1c-ea901b46ab69", "datasetName": "Germany Border (auto)", + "datasetDescription": "The Outline of Germany (auto detected format)", "mainFile": "germany_polygon.gpkg", "tags": [ "area" - ], - "upload": "420b06de-0a7e-45cb-9c1c-ea901b46ab69" + ] } }, "AxisLabels": { @@ -5562,7 +5562,10 @@ } }, "example": { + "name": "Test", + "description": "Foo", "bounds": { + "spatialReference": "EPSG:4326", "boundingBox": { "lowerLeftCoordinate": { "x": 0, @@ -5573,17 +5576,14 @@ "y": 1 } }, - "spatialReference": "EPSG:4326", "timeInterval": { - "end": 1, - "start": 0 + "start": 0, + "end": 1 } }, - "description": "Foo", - "name": "Test", "timeStep": { - "granularity": "months", - "step": 1 + "step": 1, + "granularity": "months" } } }, @@ -7924,27 +7924,27 @@ } }, "example": { - "description": null, - "displayName": "a new dataset", "name": "foo", + "displayName": "a new dataset", + "description": null, "query": { "spatialBounds": { - "lowerRightCoordinate": { - "x": 50.0, - "y": 20.0 - }, "upperLeftCoordinate": { "x": -10.0, "y": 80.0 + }, + "lowerRightCoordinate": { + "x": 50.0, + "y": 20.0 } }, + "timeInterval": { + "start": 1388534400000, + "end": 1388534401000 + }, "spatialResolution": { "x": 0.1, "y": 0.1 - }, - "timeInterval": { - "end": 1388534401000, - "start": 1388534400000 } } } @@ -8919,6 +8919,7 @@ } }, "example": { + "type": "MockPointSource", "params": { "points": [ { @@ -8930,8 +8931,7 @@ "y": 1.1 } ] - }, - "type": "MockPointSource" + } } }, "TypedPlotResultDescriptor": { @@ -9250,24 +9250,24 @@ }, "example": { "id": "df4ad02e-0d61-4e29-90eb-dc1259c1f5b9", + "name": "TestUpdate", "layers": [ { + "workflow": "100ee39c-761c-4218-9d85-ec861a8f3097", "name": "L1", - "symbology": { - "colorizer": { - "type": "rgba" - }, - "opacity": 1.0, - "type": "raster" - }, "visibility": { "data": true, "legend": false }, - "workflow": "100ee39c-761c-4218-9d85-ec861a8f3097" + "symbology": { + "type": "raster", + "opacity": 1.0, + "colorizer": { + "type": "rgba" + } + } } - ], - "name": "TestUpdate" + ] } }, "UpdateQuota": { From c634c411d08b06b80f572caea3cb0563385db748 Mon Sep 17 00:00:00 2001 From: Michael Mattig Date: Thu, 7 Nov 2024 15:27:17 +0100 Subject: [PATCH 3/3] increment version --- .generation/config.ini | 6 +++--- python/README.md | 2 +- python/geoengine_openapi_client/__init__.py | 2 +- python/geoengine_openapi_client/api_client.py | 2 +- python/geoengine_openapi_client/configuration.py | 2 +- python/pyproject.toml | 2 +- python/setup.py | 2 +- typescript/README.md | 4 ++-- typescript/dist/esm/runtime.js | 2 +- typescript/dist/runtime.js | 2 +- typescript/package.json | 2 +- typescript/src/runtime.ts | 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.generation/config.ini b/.generation/config.ini index d09797b3..cd402c18 100644 --- a/.generation/config.ini +++ b/.generation/config.ini @@ -1,14 +1,14 @@ [input] -backendTag = pro-nightly-2024-10-29 +backendTag = pro-nightly-2024-11-08 [general] githubUrl = https://github.com/geo-engine/openapi-client [python] name = geoengine_openapi_client -version = 0.0.13 +version = 0.0.14 [typescript] name = @geoengine/openapi-client -version = 0.0.13 +version = 0.0.14 diff --git a/python/README.md b/python/README.md index f6730636..e8996583 100644 --- a/python/README.md +++ b/python/README.md @@ -4,7 +4,7 @@ No description provided (generated by Openapi Generator https://github.com/opena This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 0.8.0 -- Package version: 0.0.13 +- Package version: 0.0.14 - Build package: org.openapitools.codegen.languages.PythonClientCodegen ## Requirements. diff --git a/python/geoengine_openapi_client/__init__.py b/python/geoengine_openapi_client/__init__.py index e1eb79b8..15d729d6 100644 --- a/python/geoengine_openapi_client/__init__.py +++ b/python/geoengine_openapi_client/__init__.py @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "0.0.13" +__version__ = "0.0.14" # import apis into sdk package from geoengine_openapi_client.api.datasets_api import DatasetsApi diff --git a/python/geoengine_openapi_client/api_client.py b/python/geoengine_openapi_client/api_client.py index 694819ce..e07e5580 100644 --- a/python/geoengine_openapi_client/api_client.py +++ b/python/geoengine_openapi_client/api_client.py @@ -76,7 +76,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'geoengine/openapi-client/python/0.0.13' + self.user_agent = 'geoengine/openapi-client/python/0.0.14' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/python/geoengine_openapi_client/configuration.py b/python/geoengine_openapi_client/configuration.py index 94bbbfbf..5fcab321 100644 --- a/python/geoengine_openapi_client/configuration.py +++ b/python/geoengine_openapi_client/configuration.py @@ -378,7 +378,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 0.8.0\n"\ - "SDK Package Version: 0.0.13".\ + "SDK Package Version: 0.0.14".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/python/pyproject.toml b/python/pyproject.toml index a2c82244..bf2f37e2 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "geoengine_openapi_client" -version = "0.0.13" +version = "0.0.14" description = "Geo Engine Pro API" authors = ["Geo Engine Developers "] license = "Apache-2.0" diff --git a/python/setup.py b/python/setup.py index 65dea8c1..303b3f78 100644 --- a/python/setup.py +++ b/python/setup.py @@ -22,7 +22,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "geoengine-openapi-client" -VERSION = "0.0.13" +VERSION = "0.0.14" PYTHON_REQUIRES = ">=3.7" REQUIRES = [ "urllib3 >= 1.25.3, < 2.1.0", diff --git a/typescript/README.md b/typescript/README.md index a41462bb..d9134b0d 100644 --- a/typescript/README.md +++ b/typescript/README.md @@ -1,4 +1,4 @@ -## @geoengine/openapi-client@0.0.13 +## @geoengine/openapi-client@0.0.14 This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments: @@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co _published:_ ``` -npm install @geoengine/openapi-client@0.0.13 --save +npm install @geoengine/openapi-client@0.0.14 --save ``` _unPublished (not recommended):_ diff --git a/typescript/dist/esm/runtime.js b/typescript/dist/esm/runtime.js index 66e65eb9..3bea251b 100644 --- a/typescript/dist/esm/runtime.js +++ b/typescript/dist/esm/runtime.js @@ -69,7 +69,7 @@ export class Configuration { } export const DefaultConfig = new Configuration({ headers: { - 'User-Agent': 'geoengine/openapi-client/typescript/0.0.13' + 'User-Agent': 'geoengine/openapi-client/typescript/0.0.14' } }); /** diff --git a/typescript/dist/runtime.js b/typescript/dist/runtime.js index 6d71274d..efc7dd8d 100644 --- a/typescript/dist/runtime.js +++ b/typescript/dist/runtime.js @@ -73,7 +73,7 @@ class Configuration { exports.Configuration = Configuration; exports.DefaultConfig = new Configuration({ headers: { - 'User-Agent': 'geoengine/openapi-client/typescript/0.0.13' + 'User-Agent': 'geoengine/openapi-client/typescript/0.0.14' } }); /** diff --git a/typescript/package.json b/typescript/package.json index 874b2aa9..1b0a3571 100644 --- a/typescript/package.json +++ b/typescript/package.json @@ -1,6 +1,6 @@ { "name": "@geoengine/openapi-client", - "version": "0.0.13", + "version": "0.0.14", "description": "OpenAPI client for @geoengine/openapi-client", "author": "OpenAPI-Generator", "repository": { diff --git a/typescript/src/runtime.ts b/typescript/src/runtime.ts index 698ade61..762902c7 100644 --- a/typescript/src/runtime.ts +++ b/typescript/src/runtime.ts @@ -86,7 +86,7 @@ export class Configuration { export const DefaultConfig = new Configuration({ headers: { - 'User-Agent': 'geoengine/openapi-client/typescript/0.0.13' + 'User-Agent': 'geoengine/openapi-client/typescript/0.0.14' } });