Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -313,14 +313,4 @@ requirements.txt
setup.cfg
test-requirements.txt
test/__init__.py
test/test_attach_database_catalog_request.py
test/test_create_database_request.py
test/test_create_database_response.py
test/test_database_attachment_info.py
test/test_database_default_schema_decl.py
test/test_database_default_table_decl.py
test/test_database_detail_response.py
test/test_database_summary.py
test/test_databases_api.py
test/test_list_databases_response.py
tox.ini
1 change: 1 addition & 0 deletions docs/ConnectionTypeDetail.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# ConnectionTypeDetail

Detailed configuration and authentication schema for a single connection type.

## Properties

Expand Down
1 change: 1 addition & 0 deletions docs/ConnectionTypeSummary.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# ConnectionTypeSummary

Summary entry for the connection-type list endpoint.

## Properties

Expand Down
2 changes: 1 addition & 1 deletion docs/ConnectionsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ void (empty response body)
|-------------|-------------|------------------|
**204** | Connection deleted | - |
**404** | Connection not found | - |
**409** | Connection backs a database's default catalog and cannot be deleted directly | - |
**409** | Connection backs a database's default catalog, or is attached to one or more databases as a non-default catalog; detach via DELETE /v1/databases/{database_id}/catalogs/{connection_id} first | - |

[[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)

Expand Down
1 change: 1 addition & 0 deletions docs/CreateDatabaseRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Request body for POST /databases
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**description** | **str** | Optional free-form display label (for UIs/CLIs). Not unique. Not an identifier — databases are always addressed by `id`. | [optional]
**expires_at** | **str** | When this database expires. Accepts either an RFC 3339 timestamp (e.g. `\"2026-06-01T00:00:00Z\"`) or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days) — for example `\"24h\"`, `\"48h\"`, or `\"7d\"`. Defaults to `\"24h\"` when omitted. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp. | [optional]
**schemas** | [**List[DatabaseDefaultSchemaDecl]**](DatabaseDefaultSchemaDecl.md) | Optional schemas/tables to declare on the database's auto-created `default` catalog. Mirrors the `config.schemas` field of a managed `POST /v1/connections`. Tables declared here can be loaded via the standard managed-table load endpoint targeting `default_connection_id`. Omitted or empty means the default catalog starts empty. | [optional]

## Example
Expand Down
1 change: 1 addition & 0 deletions docs/CreateDatabaseResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**default_connection_id** | **str** | Internal id of the connection that backs this database's `default` catalog. Workspace-level connection endpoints (list, get, health, delete, cache purge) refuse to act on this id — it is exposed only for the managed-tables load endpoint (`POST /v1/connections/{id}/schemas/{s}/tables/{t}/loads`) so callers can publish parquet into tables declared at database-create time. Addressing it directly in SQL is not the recommended path — use `default` inside an `X-Database-Id` scope instead. |
**description** | **str** | | [optional]
**expires_at** | **datetime** | When this database expires. | [optional]
**id** | **str** | |

## Example
Expand Down
1 change: 1 addition & 0 deletions docs/DatabaseDetailResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Name | Type | Description | Notes
**attachments** | [**List[DatabaseAttachmentInfo]**](DatabaseAttachmentInfo.md) | |
**default_connection_id** | **str** | |
**description** | **str** | | [optional]
**expires_at** | **datetime** | When this database expires. | [optional]
**id** | **str** | |

## Example
Expand Down
1 change: 1 addition & 0 deletions docs/DatabaseSummary.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Summary item in GET /databases
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**description** | **str** | | [optional]
**expires_at** | **datetime** | | [optional]
**id** | **str** | |

## Example
Expand Down
2 changes: 1 addition & 1 deletion docs/DatabasesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void (empty response body)

Create database

Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default`. The optional `description` is a free-form display label and is not required to be unique. Optional `schemas` declares schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`.
Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default`, with a `main` schema pre-declared so `default.main.<table>` works out of the box. The optional `description` is a free-form display label and is not required to be unique. Optional `schemas` declares additional schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`. Optional `expires_at` sets when the database expires — accepts either an RFC 3339 timestamp or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days), e.g. `24h`, `48h`, `90m`, `7d`. Defaults to `24h` when omitted. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp.

### Example

Expand Down
1 change: 1 addition & 0 deletions docs/ListConnectionTypesResponse.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# ListConnectionTypesResponse

Envelope for the connection-types list response.

## Properties

Expand Down
6 changes: 3 additions & 3 deletions hotdata/api/databases_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def create_database(
) -> CreateDatabaseResponse:
"""Create database

Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default`. The optional `description` is a free-form display label and is not required to be unique. Optional `schemas` declares schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`.
Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default`, with a `main` schema pre-declared so `default.main.<table>` works out of the box. The optional `description` is a free-form display label and is not required to be unique. Optional `schemas` declares additional schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`. Optional `expires_at` sets when the database expires — accepts either an RFC 3339 timestamp or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days), e.g. `24h`, `48h`, `90m`, `7d`. Defaults to `24h` when omitted. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp.

:param create_database_request: (required)
:type create_database_request: CreateDatabaseRequest
Expand Down Expand Up @@ -429,7 +429,7 @@ def create_database_with_http_info(
) -> ApiResponse[CreateDatabaseResponse]:
"""Create database

Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default`. The optional `description` is a free-form display label and is not required to be unique. Optional `schemas` declares schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`.
Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default`, with a `main` schema pre-declared so `default.main.<table>` works out of the box. The optional `description` is a free-form display label and is not required to be unique. Optional `schemas` declares additional schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`. Optional `expires_at` sets when the database expires — accepts either an RFC 3339 timestamp or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days), e.g. `24h`, `48h`, `90m`, `7d`. Defaults to `24h` when omitted. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp.

:param create_database_request: (required)
:type create_database_request: CreateDatabaseRequest
Expand Down Expand Up @@ -498,7 +498,7 @@ def create_database_without_preload_content(
) -> RESTResponseType:
"""Create database

Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default`. The optional `description` is a free-form display label and is not required to be unique. Optional `schemas` declares schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`.
Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default`, with a `main` schema pre-declared so `default.main.<table>` works out of the box. The optional `description` is a free-form display label and is not required to be unique. Optional `schemas` declares additional schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`. Optional `expires_at` sets when the database expires — accepts either an RFC 3339 timestamp or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days), e.g. `24h`, `48h`, `90m`, `7d`. Defaults to `24h` when omitted. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp.

:param create_database_request: (required)
:type create_database_request: CreateDatabaseRequest
Expand Down
2 changes: 1 addition & 1 deletion hotdata/models/connection_type_detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

class ConnectionTypeDetail(BaseModel):
"""
ConnectionTypeDetail
Detailed configuration and authentication schema for a single connection type.
""" # noqa: E501
auth: Optional[Any] = None
config_schema: Optional[Any] = None
Expand Down
2 changes: 1 addition & 1 deletion hotdata/models/connection_type_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

class ConnectionTypeSummary(BaseModel):
"""
ConnectionTypeSummary
Summary entry for the connection-type list endpoint.
""" # noqa: E501
label: StrictStr
name: StrictStr
Expand Down
9 changes: 8 additions & 1 deletion hotdata/models/create_database_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ class CreateDatabaseRequest(BaseModel):
Request body for POST /databases
""" # noqa: E501
description: Optional[StrictStr] = Field(default=None, description="Optional free-form display label (for UIs/CLIs). Not unique. Not an identifier — databases are always addressed by `id`.")
expires_at: Optional[StrictStr] = Field(default=None, description="When this database expires. Accepts either an RFC 3339 timestamp (e.g. `\"2026-06-01T00:00:00Z\"`) or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days) — for example `\"24h\"`, `\"48h\"`, or `\"7d\"`. Defaults to `\"24h\"` when omitted. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp.")
schemas: Optional[List[DatabaseDefaultSchemaDecl]] = Field(default=None, description="Optional schemas/tables to declare on the database's auto-created `default` catalog. Mirrors the `config.schemas` field of a managed `POST /v1/connections`. Tables declared here can be loaded via the standard managed-table load endpoint targeting `default_connection_id`. Omitted or empty means the default catalog starts empty.")
__properties: ClassVar[List[str]] = ["description", "schemas"]
__properties: ClassVar[List[str]] = ["description", "expires_at", "schemas"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -83,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.description is None and "description" in self.model_fields_set:
_dict['description'] = None

# set to None if expires_at (nullable) is None
# and model_fields_set contains the field
if self.expires_at is None and "expires_at" in self.model_fields_set:
_dict['expires_at'] = None

return _dict

@classmethod
Expand All @@ -96,6 +102,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:

_obj = cls.model_validate({
"description": obj.get("description"),
"expires_at": obj.get("expires_at"),
"schemas": [DatabaseDefaultSchemaDecl.from_dict(_item) for _item in obj["schemas"]] if obj.get("schemas") is not None else None
})
return _obj
Expand Down
10 changes: 9 additions & 1 deletion hotdata/models/create_database_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import re # noqa: F401
import json

from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
Expand All @@ -29,8 +30,9 @@ class CreateDatabaseResponse(BaseModel):
""" # noqa: E501
default_connection_id: StrictStr = Field(description="Internal id of the connection that backs this database's `default` catalog. Workspace-level connection endpoints (list, get, health, delete, cache purge) refuse to act on this id — it is exposed only for the managed-tables load endpoint (`POST /v1/connections/{id}/schemas/{s}/tables/{t}/loads`) so callers can publish parquet into tables declared at database-create time. Addressing it directly in SQL is not the recommended path — use `default` inside an `X-Database-Id` scope instead.")
description: Optional[StrictStr] = None
expires_at: Optional[datetime] = Field(default=None, description="When this database expires.")
id: StrictStr
__properties: ClassVar[List[str]] = ["default_connection_id", "description", "id"]
__properties: ClassVar[List[str]] = ["default_connection_id", "description", "expires_at", "id"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -76,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.description is None and "description" in self.model_fields_set:
_dict['description'] = None

# set to None if expires_at (nullable) is None
# and model_fields_set contains the field
if self.expires_at is None and "expires_at" in self.model_fields_set:
_dict['expires_at'] = None

return _dict

@classmethod
Expand All @@ -90,6 +97,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate({
"default_connection_id": obj.get("default_connection_id"),
"description": obj.get("description"),
"expires_at": obj.get("expires_at"),
"id": obj.get("id")
})
return _obj
Expand Down
12 changes: 10 additions & 2 deletions hotdata/models/database_detail_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
import re # noqa: F401
import json

from pydantic import BaseModel, ConfigDict, StrictStr
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from hotdata.models.database_attachment_info import DatabaseAttachmentInfo
from typing import Optional, Set
Expand All @@ -31,8 +32,9 @@ class DatabaseDetailResponse(BaseModel):
attachments: List[DatabaseAttachmentInfo]
default_connection_id: StrictStr
description: Optional[StrictStr] = None
expires_at: Optional[datetime] = Field(default=None, description="When this database expires.")
id: StrictStr
__properties: ClassVar[List[str]] = ["attachments", "default_connection_id", "description", "id"]
__properties: ClassVar[List[str]] = ["attachments", "default_connection_id", "description", "expires_at", "id"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -85,6 +87,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.description is None and "description" in self.model_fields_set:
_dict['description'] = None

# set to None if expires_at (nullable) is None
# and model_fields_set contains the field
if self.expires_at is None and "expires_at" in self.model_fields_set:
_dict['expires_at'] = None

return _dict

@classmethod
Expand All @@ -100,6 +107,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"attachments": [DatabaseAttachmentInfo.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None,
"default_connection_id": obj.get("default_connection_id"),
"description": obj.get("description"),
"expires_at": obj.get("expires_at"),
"id": obj.get("id")
})
return _obj
Expand Down
10 changes: 9 additions & 1 deletion hotdata/models/database_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import re # noqa: F401
import json

from datetime import datetime
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
Expand All @@ -28,8 +29,9 @@ class DatabaseSummary(BaseModel):
Summary item in GET /databases
""" # noqa: E501
description: Optional[StrictStr] = None
expires_at: Optional[datetime] = None
id: StrictStr
__properties: ClassVar[List[str]] = ["description", "id"]
__properties: ClassVar[List[str]] = ["description", "expires_at", "id"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -75,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.description is None and "description" in self.model_fields_set:
_dict['description'] = None

# set to None if expires_at (nullable) is None
# and model_fields_set contains the field
if self.expires_at is None and "expires_at" in self.model_fields_set:
_dict['expires_at'] = None

return _dict

@classmethod
Expand All @@ -88,6 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:

_obj = cls.model_validate({
"description": obj.get("description"),
"expires_at": obj.get("expires_at"),
"id": obj.get("id")
})
return _obj
Expand Down
2 changes: 1 addition & 1 deletion hotdata/models/list_connection_types_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

class ListConnectionTypesResponse(BaseModel):
"""
ListConnectionTypesResponse
Envelope for the connection-types list response.
""" # noqa: E501
connection_types: List[ConnectionTypeSummary]
__properties: ClassVar[List[str]] = ["connection_types"]
Expand Down