diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 1ad3858..28c8bc3 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 1cc01e85-de06-43c6-8eba-b42d8ac9f2f1 management: - docChecksum: 0dd32241bcd639c7e99747c1a7b3780d + docChecksum: 8a72152156319b55ebd9dd4cff488703 docVersion: 1.0.0 - speakeasyVersion: 1.204.1 + speakeasyVersion: 1.205.0 generationVersion: 2.279.1 - releaseVersion: 5.2.0 - configChecksum: 583a08d485555b1a3ba1ff550115faf0 + releaseVersion: 5.2.1 + configChecksum: 5d106addd37d2dd1ba534190538cdd30 repoURL: https://github.com/speakeasy-sdks/hightouch-python-sdk.git repoSubDirectory: . installationURL: https://github.com/speakeasy-sdks/hightouch-python-sdk.git @@ -91,6 +91,7 @@ generatedFiles: - src/hightouch/models/shared/__init__.py - docs/models/operations/createdestinationresponsebody.md - docs/models/operations/createdestinationresponse.md + - docs/models/operations/createmodelrequest.md - docs/models/operations/createmodelresponsebody.md - docs/models/operations/createmodelresponse.md - docs/models/operations/createsourceresponsebody.md diff --git a/RELEASES.md b/RELEASES.md index 04f51f3..3cd2722 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -774,4 +774,12 @@ Based on: - OpenAPI Doc 1.0.0 - Speakeasy CLI 1.204.1 (2.279.1) https://github.com/speakeasy-api/speakeasy ### Generated -- [python v5.2.0] . \ No newline at end of file +- [python v5.2.0] . + +## 2024-03-09 00:32:31 +### Changes +Based on: +- OpenAPI Doc 1.0.0 +- Speakeasy CLI 1.205.0 (2.279.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v5.2.1] . \ No newline at end of file diff --git a/docs/models/operations/createmodelrequest.md b/docs/models/operations/createmodelrequest.md new file mode 100644 index 0000000..698b316 --- /dev/null +++ b/docs/models/operations/createmodelrequest.md @@ -0,0 +1,9 @@ +# CreateModelRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `model_create` | [shared.ModelCreate](../../models/shared/modelcreate.md) | :heavy_check_mark: | N/A | +| `skip_column_query` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdks/hightouch/README.md b/docs/sdks/hightouch/README.md index 7e8836d..5429aa4 100644 --- a/docs/sdks/hightouch/README.md +++ b/docs/sdks/hightouch/README.md @@ -88,7 +88,7 @@ Create a new model ```python import hightouch -from hightouch.models import shared +from hightouch.models import operations, shared s = hightouch.Hightouch( security=shared.Security( @@ -96,13 +96,15 @@ s = hightouch.Hightouch( ), ) -req = shared.ModelCreate( - is_schema=False, - name='', - primary_key='', - query_type='', - slug='', - source_id=8761.56, +req = operations.CreateModelRequest( + model_create=shared.ModelCreate( + is_schema=False, + name='', + primary_key='', + query_type='', + slug='', + source_id=8761.56, + ), ) res = s.create_model(req) @@ -115,9 +117,9 @@ if res.one_of is not None: ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| `request` | [shared.ModelCreate](../../models/shared/modelcreate.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `request` | [operations.CreateModelRequest](../../models/operations/createmodelrequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response diff --git a/gen.yaml b/gen.yaml index 5f33437..e836dc8 100644 --- a/gen.yaml +++ b/gen.yaml @@ -10,7 +10,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false python: - version: 5.2.0 + version: 5.2.1 additionalDependencies: dependencies: {} extraDependencies: diff --git a/setup.py b/setup.py index 03d3a83..391351c 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setuptools.setup( name="hightouch", - version="5.2.0", + version="5.2.1", author="Speakeasy", description="Python SDK for Hightouch API", long_description=long_description, diff --git a/src/hightouch/models/operations/__init__.py b/src/hightouch/models/operations/__init__.py index 9bd8bcc..970e731 100644 --- a/src/hightouch/models/operations/__init__.py +++ b/src/hightouch/models/operations/__init__.py @@ -23,4 +23,4 @@ from .updatesource import * from .updatesync import * -__all__ = ["CreateDestinationResponse","CreateModelResponse","CreateSourceResponse","CreateSyncResponse","GetDestinationRequest","GetDestinationResponse","GetModelRequest","GetModelResponse","GetSourceRequest","GetSourceResponse","GetSyncRequest","GetSyncResponse","GetSyncSequenceRunRequest","GetSyncSequenceRunResponse","ListDestinationRequest","ListDestinationResponse","ListDestinationResponseBody","ListModelRequest","ListModelResponse","ListModelResponseBody","ListSourceQueryParamOrderBy","ListSourceRequest","ListSourceResponse","ListSourceResponseBody","ListSyncQueryParamOrderBy","ListSyncRequest","ListSyncResponse","ListSyncResponseBody","ListSyncRunsQueryParamOrderBy","ListSyncRunsRequest","ListSyncRunsResponse","ListSyncRunsResponseBody","OrderBy","QueryParamOrderBy","TriggerRunCustomResponse","TriggerRunIDGraphRequest","TriggerRunIDGraphResponse","TriggerRunRequest","TriggerRunResponse","TriggerSequenceRunRequest","TriggerSequenceRunResponse","UpdateDestinationRequest","UpdateDestinationResponse","UpdateModelRequest","UpdateModelResponse","UpdateSourceRequest","UpdateSourceResponse","UpdateSyncRequest","UpdateSyncResponse"] +__all__ = ["CreateDestinationResponse","CreateModelRequest","CreateModelResponse","CreateSourceResponse","CreateSyncResponse","GetDestinationRequest","GetDestinationResponse","GetModelRequest","GetModelResponse","GetSourceRequest","GetSourceResponse","GetSyncRequest","GetSyncResponse","GetSyncSequenceRunRequest","GetSyncSequenceRunResponse","ListDestinationRequest","ListDestinationResponse","ListDestinationResponseBody","ListModelRequest","ListModelResponse","ListModelResponseBody","ListSourceQueryParamOrderBy","ListSourceRequest","ListSourceResponse","ListSourceResponseBody","ListSyncQueryParamOrderBy","ListSyncRequest","ListSyncResponse","ListSyncResponseBody","ListSyncRunsQueryParamOrderBy","ListSyncRunsRequest","ListSyncRunsResponse","ListSyncRunsResponseBody","OrderBy","QueryParamOrderBy","TriggerRunCustomResponse","TriggerRunIDGraphRequest","TriggerRunIDGraphResponse","TriggerRunRequest","TriggerRunResponse","TriggerSequenceRunRequest","TriggerSequenceRunResponse","UpdateDestinationRequest","UpdateDestinationResponse","UpdateModelRequest","UpdateModelResponse","UpdateSourceRequest","UpdateSourceResponse","UpdateSyncRequest","UpdateSyncResponse"] diff --git a/src/hightouch/models/operations/createmodel.py b/src/hightouch/models/operations/createmodel.py index ca46fb8..523323f 100644 --- a/src/hightouch/models/operations/createmodel.py +++ b/src/hightouch/models/operations/createmodel.py @@ -6,9 +6,18 @@ from ...models.errors import validateerrorjson as errors_validateerrorjson from ...models.shared import internalservererror as shared_internalservererror from ...models.shared import model as shared_model +from ...models.shared import modelcreate as shared_modelcreate from typing import Optional, Union +@dataclasses.dataclass +class CreateModelRequest: + model_create: shared_modelcreate.ModelCreate = dataclasses.field(metadata={'request': { 'media_type': 'application/json' }}) + skip_column_query: Optional[bool] = dataclasses.field(default=False, metadata={'query_param': { 'field_name': 'skipColumnQuery', 'style': 'form', 'explode': True }}) + + + + @dataclasses.dataclass class CreateModelResponse: content_type: str = dataclasses.field() diff --git a/src/hightouch/sdk.py b/src/hightouch/sdk.py index 2ded518..bb6e9cb 100644 --- a/src/hightouch/sdk.py +++ b/src/hightouch/sdk.py @@ -128,7 +128,7 @@ def create_destination(self, request: shared.DestinationCreate) -> operations.Cr - def create_model(self, request: shared.ModelCreate) -> operations.CreateModelResponse: + def create_model(self, request: operations.CreateModelRequest) -> operations.CreateModelResponse: r"""Create Model Create a new model """ @@ -142,11 +142,12 @@ def create_model(self, request: shared.ModelCreate) -> operations.CreateModelRes else: headers, query_params = utils.get_security(self.sdk_configuration.security) - req_content_type, data, form = utils.serialize_request_body(request, shared.ModelCreate, "request", False, False, 'json') + req_content_type, data, form = utils.serialize_request_body(request, operations.CreateModelRequest, "model_create", False, False, 'json') if req_content_type is not None and req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type if data is None and form is None: raise Exception('request body is required') + query_params = { **utils.get_query_params(operations.CreateModelRequest, request), **query_params } headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent client = self.sdk_configuration.client diff --git a/src/hightouch/sdkconfiguration.py b/src/hightouch/sdkconfiguration.py index 1c3c4c6..9a0a534 100644 --- a/src/hightouch/sdkconfiguration.py +++ b/src/hightouch/sdkconfiguration.py @@ -23,9 +23,9 @@ class SDKConfiguration: server_idx: int = 0 language: str = 'python' openapi_doc_version: str = '1.0.0' - sdk_version: str = '5.2.0' + sdk_version: str = '5.2.1' gen_version: str = '2.279.1' - user_agent: str = 'speakeasy-sdk/python 5.2.0 2.279.1 1.0.0 hightouch' + user_agent: str = 'speakeasy-sdk/python 5.2.1 2.279.1 1.0.0 hightouch' retry_config: RetryConfig = None _hooks: SDKHooks = None