From 8c0d10c76c7d4a17da73adaa40160aca653697d9 Mon Sep 17 00:00:00 2001 From: "hotdata-automation[bot]" <267177015+hotdata-automation[bot]@users.noreply.github.com> Date: Mon, 11 May 2026 23:31:42 +0000 Subject: [PATCH 1/3] chore: regenerate client from OpenAPI spec --- .openapi-generator/FILES | 1 - docs/WorkspacesApi.md | 79 ++++++++++ hotdata/api/workspaces_api.py | 270 ++++++++++++++++++++++++++++++++++ 3 files changed, 349 insertions(+), 1 deletion(-) diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index caacec3..a28cb02 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -289,5 +289,4 @@ requirements.txt setup.cfg test-requirements.txt test/__init__.py -test/test_results_format_query.py tox.ini diff --git a/docs/WorkspacesApi.md b/docs/WorkspacesApi.md index 0c440ce..d88e118 100644 --- a/docs/WorkspacesApi.md +++ b/docs/WorkspacesApi.md @@ -5,6 +5,7 @@ All URIs are relative to *https://api.hotdata.dev* Method | HTTP request | Description ------------- | ------------- | ------------- [**create_workspace**](WorkspacesApi.md#create_workspace) | **POST** /v1/workspaces | Create a workspace +[**delete_workspace**](WorkspacesApi.md#delete_workspace) | **DELETE** /v1/workspaces/{public_id} | Delete a workspace [**list_workspaces**](WorkspacesApi.md#list_workspaces) | **GET** /v1/workspaces | List workspaces @@ -92,6 +93,84 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **delete_workspace** +> delete_workspace(public_id) + +Delete a workspace + +Hard-deletes the workspace. Namespace, storage, and catalog deprovisioning runs asynchronously after the row is removed. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import hotdata +from hotdata.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.hotdata.dev +# See configuration.py for a list of all supported configuration parameters. +configuration = hotdata.Configuration( + host = "https://api.hotdata.dev" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = hotdata.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with hotdata.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hotdata.WorkspacesApi(api_client) + public_id = 'public_id_example' # str | Public id of the workspace. + + try: + # Delete a workspace + api_instance.delete_workspace(public_id) + except Exception as e: + print("Exception when calling WorkspacesApi->delete_workspace: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **public_id** | **str**| Public id of the workspace. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Workspace deleted | - | +**401** | Missing or invalid authorization | - | +**403** | Workspace-scoped tokens are not allowed | - | +**404** | Workspace not found, or caller is not a member of its organization | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **list_workspaces** > ListWorkspacesResponse list_workspaces(organization_public_id=organization_public_id) diff --git a/hotdata/api/workspaces_api.py b/hotdata/api/workspaces_api.py index 3a562e0..bf79c0b 100644 --- a/hotdata/api/workspaces_api.py +++ b/hotdata/api/workspaces_api.py @@ -330,6 +330,276 @@ def _create_workspace_serialize( + @validate_call + def delete_workspace( + self, + public_id: Annotated[StrictStr, Field(description="Public id of the workspace.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a workspace + + Hard-deletes the workspace. Namespace, storage, and catalog deprovisioning runs asynchronously after the row is removed. + + :param public_id: Public id of the workspace. (required) + :type public_id: str + :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. + :type _request_timeout: int, tuple(int, int), optional + :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 + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_workspace_serialize( + public_id=public_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "Error", + '403': "Error", + '404': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_workspace_with_http_info( + self, + public_id: Annotated[StrictStr, Field(description="Public id of the workspace.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a workspace + + Hard-deletes the workspace. Namespace, storage, and catalog deprovisioning runs asynchronously after the row is removed. + + :param public_id: Public id of the workspace. (required) + :type public_id: str + :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. + :type _request_timeout: int, tuple(int, int), optional + :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 + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_workspace_serialize( + public_id=public_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "Error", + '403': "Error", + '404': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_workspace_without_preload_content( + self, + public_id: Annotated[StrictStr, Field(description="Public id of the workspace.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a workspace + + Hard-deletes the workspace. Namespace, storage, and catalog deprovisioning runs asynchronously after the row is removed. + + :param public_id: Public id of the workspace. (required) + :type public_id: str + :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. + :type _request_timeout: int, tuple(int, int), optional + :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 + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_workspace_serialize( + public_id=public_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "Error", + '403': "Error", + '404': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_workspace_serialize( + self, + public_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if public_id is not None: + _path_params['public_id'] = public_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/workspaces/{public_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def list_workspaces( self, From 0d837b01abd1e4af37ac03cabf0c1476f79f34de Mon Sep 17 00:00:00 2001 From: Eddie A Tejeda <669988+eddietejeda@users.noreply.github.com> Date: Thu, 14 May 2026 11:47:50 -0700 Subject: [PATCH 2/3] fix: remove unescaped mustache interpolations in config template Use escaped template interpolation in the OpenAPI configuration template to resolve the security scanner finding on triple-mustache rendering while preserving generated client behavior. --- .../configuration.mustache | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/.openapi-generator-templates/configuration.mustache b/.openapi-generator-templates/configuration.mustache index 3a22364..acd05b2 100644 --- a/.openapi-generator-templates/configuration.mustache +++ b/.openapi-generator-templates/configuration.mustache @@ -175,7 +175,7 @@ class Configuration: :param password: Password for HTTP basic authentication. {{#hasHttpSignatureMethods}} :param signing_info: Configuration parameters for the HTTP signature security scheme. - Must be an instance of {{{packageName}}}.signing.HttpSigningConfiguration + Must be an instance of {{packageName}}.signing.HttpSigningConfiguration {{/hasHttpSignatureMethods}} :param server_index: Index to servers configuration. :param server_variables: Mapping with string values to replace variables in @@ -206,7 +206,7 @@ class Configuration: Workspace / sandbox scoping example: -conf = {{{packageName}}}.Configuration( +conf = {{packageName}}.Configuration( api_key='sk_live_...', workspace_id='ws_abc', session_id='sb_xyz', @@ -224,7 +224,7 @@ conf = {{{packageName}}}.Configuration( Configure API client with HTTP basic authentication: -conf = {{{packageName}}}.Configuration( +conf = {{packageName}}.Configuration( username='the-user', password='the-password', ) @@ -243,7 +243,7 @@ conf = {{{packageName}}}.Configuration( Configure API client with HTTP signature authentication. Use the 'hs2019' signature scheme, sign the HTTP requests with the RSA-SSA-PSS signature algorithm, and set the expiration time of the signature to 5 minutes after the signature has been created. - Note you can use the constants defined in the {{{packageName}}}.signing module, and you can + Note you can use the constants defined in the {{packageName}}.signing module, and you can also specify arbitrary HTTP headers to be included in the HTTP signature, except for the 'Authorization' header, which is used to carry the signature. @@ -252,18 +252,18 @@ conf = {{{packageName}}}.Configuration( load balancers may add/modify/remove headers. Include the HTTP headers that you know are not going to be modified in transit. -conf = {{{packageName}}}.Configuration( - signing_info = {{{packageName}}}.signing.HttpSigningConfiguration( +conf = {{packageName}}.Configuration( + signing_info = {{packageName}}.signing.HttpSigningConfiguration( key_id = 'my-key-id', private_key_path = 'rsa.pem', - signing_scheme = {{{packageName}}}.signing.SCHEME_HS2019, - signing_algorithm = {{{packageName}}}.signing.ALGORITHM_RSASSA_PSS, - signed_headers = [{{{packageName}}}.signing.HEADER_REQUEST_TARGET, - {{{packageName}}}.signing.HEADER_CREATED, - {{{packageName}}}.signing.HEADER_EXPIRES, - {{{packageName}}}.signing.HEADER_HOST, - {{{packageName}}}.signing.HEADER_DATE, - {{{packageName}}}.signing.HEADER_DIGEST, + signing_scheme = {{packageName}}.signing.SCHEME_HS2019, + signing_algorithm = {{packageName}}.signing.ALGORITHM_RSASSA_PSS, + signed_headers = [{{packageName}}.signing.HEADER_REQUEST_TARGET, + {{packageName}}.signing.HEADER_CREATED, + {{packageName}}.signing.HEADER_EXPIRES, + {{packageName}}.signing.HEADER_HOST, + {{packageName}}.signing.HEADER_DATE, + {{packageName}}.signing.HEADER_DIGEST, 'Content-Type', 'User-Agent' ], @@ -304,7 +304,7 @@ conf = {{{packageName}}}.Configuration( ) -> None: """Constructor """ - self._base_path = "{{{basePath}}}" if host is None else host + self._base_path = "{{basePath}}" if host is None else host """Default Base url """ self.server_index = 0 if server_index is None and host is None else server_index @@ -438,11 +438,11 @@ conf = {{{packageName}}}.Configuration( """Options to pass down to the underlying urllib3 socket """ - self.datetime_format = "{{{datetimeFormat}}}" + self.datetime_format = "{{datetimeFormat}}" """datetime format """ - self.date_format = "{{{dateFormat}}}" + self.date_format = "{{dateFormat}}" """date format """ @@ -694,7 +694,7 @@ conf = {{{packageName}}}.Configuration( 'type': 'bearer', 'in': 'header', {{#bearerFormat}} - 'format': '{{{.}}}', + 'format': '{{.}}', {{/bearerFormat}} 'key': 'Authorization', 'value': 'Bearer ' + self.api_key @@ -746,20 +746,20 @@ conf = {{{packageName}}}.Configuration( return [ {{#servers}} { - 'url': "{{{url}}}", - 'description': "{{{description}}}{{^description}}No description provided{{/description}}", + 'url': "{{url}}", + 'description': "{{description}}{{^description}}No description provided{{/description}}", {{#variables}} {{#-first}} 'variables': { {{/-first}} - '{{{name}}}': { - 'description': "{{{description}}}{{^description}}No description provided{{/description}}", - 'default_value': "{{{defaultValue}}}", + '{{name}}': { + 'description': "{{description}}{{^description}}No description provided{{/description}}", + 'default_value': "{{defaultValue}}", {{#enumValues}} {{#-first}} 'enum_values': [ {{/-first}} - "{{{.}}}"{{^-last}},{{/-last}} + "{{.}}"{{^-last}},{{/-last}} {{#-last}} ] {{/-last}} From b3302761186a03acaba05bc98134682b44d408ac Mon Sep 17 00:00:00 2001 From: Eddie A Tejeda <669988+eddietejeda@users.noreply.github.com> Date: Thu, 14 May 2026 11:51:18 -0700 Subject: [PATCH 3/3] chore: ignore macOS metadata files Add .DS_Store to gitignore so local Finder metadata does not appear as untracked changes. --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 65b06b9..37ddc2d 100644 --- a/.gitignore +++ b/.gitignore @@ -64,3 +64,5 @@ target/ # Ipython Notebook .ipynb_checkpoints + +.DS_Store