diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index f048ea78..488f6035 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 8b5fa338-9106-4734-abf0-e30d67044a90 management: - docChecksum: 95cf473b65c812e2a731bc586e691f89 - docVersion: 1.0.32 - speakeasyVersion: 1.299.4 - generationVersion: 2.338.7 - releaseVersion: 0.27.0 - configChecksum: f30a94fe7726e498bf687d6aefa48ec4 + docChecksum: 2cabb51a37782b691a9f16fbbf8df52b + docVersion: 1.0.33 + speakeasyVersion: 1.299.6 + generationVersion: 2.338.12 + releaseVersion: 0.27.1 + configChecksum: be7515df9b3a3a127ec54c60f405dc64 repoURL: https://github.com/Unstructured-IO/unstructured-python-client.git repoSubDirectory: . installationURL: https://github.com/Unstructured-IO/unstructured-python-client.git @@ -15,7 +15,7 @@ features: python: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.3 - core: 4.6.8 + core: 4.6.9 examples: 2.81.3 globalSecurity: 2.83.5 globalSecurityCallbacks: 0.1.0 @@ -43,19 +43,17 @@ generatedFiles: - src/unstructured_client/utils/utils.py - src/unstructured_client/models/errors/sdkerror.py - src/unstructured_client/models/operations/partition.py - - src/unstructured_client/models/shared/element.py + - src/unstructured_client/models/errors/httpvalidationerror.py - src/unstructured_client/models/shared/validationerror.py - src/unstructured_client/models/shared/partition_parameters.py - src/unstructured_client/models/shared/security.py - - src/unstructured_client/models/errors/httpvalidationerror.py - src/unstructured_client/models/__init__.py - src/unstructured_client/models/errors/__init__.py - src/unstructured_client/models/operations/__init__.py - src/unstructured_client/models/shared/__init__.py - docs/models/operations/partitionrequest.md - docs/models/operations/partitionresponse.md - - docs/models/shared/metadata.md - - docs/models/shared/element.md + - docs/models/errors/httpvalidationerror.md - docs/models/shared/loc.md - docs/models/shared/validationerror.md - docs/models/shared/chunkingstrategy.md @@ -64,7 +62,6 @@ generatedFiles: - docs/models/shared/strategy.md - docs/models/shared/partitionparameters.md - docs/models/shared/security.md - - docs/models/errors/httpvalidationerror.md - USAGE.md - .gitattributes - src/unstructured_client/_hooks/sdkhooks.py diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 774a48a7..66d97aed 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.299.4 +speakeasyVersion: 1.299.6 sources: my-source: sourceNamespace: my-source - sourceRevisionDigest: sha256:1f77ecb5a93c98a2666959cc431213df275eb3daf04c08c78f76b4d28579d765 - sourceBlobDigest: sha256:823dd5db79564693f9fe02a562840c3fe02a6cd546917e9bac7aecd60dd8c260 + sourceRevisionDigest: sha256:90bd16aaed9a9bfefbf815e309c927f19491bd472b7c1f7f56dab7bf4a4c2dc7 + sourceBlobDigest: sha256:6d2271499f0b5dd811144b3e1857443c6401e45229627f3078f88672f655334c tags: - latest - main @@ -11,8 +11,8 @@ targets: unstructured-python: source: my-source sourceNamespace: my-source - sourceRevisionDigest: sha256:1f77ecb5a93c98a2666959cc431213df275eb3daf04c08c78f76b4d28579d765 - sourceBlobDigest: sha256:823dd5db79564693f9fe02a562840c3fe02a6cd546917e9bac7aecd60dd8c260 + sourceRevisionDigest: sha256:90bd16aaed9a9bfefbf815e309c927f19491bd472b7c1f7f56dab7bf4a4c2dc7 + sourceBlobDigest: sha256:6d2271499f0b5dd811144b3e1857443c6401e45229627f3078f88672f655334c outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/RELEASES.md b/RELEASES.md index 0f0dd039..c8064523 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -562,4 +562,12 @@ Based on: - OpenAPI Doc - Speakeasy CLI 1.299.4 (2.338.7) https://github.com/speakeasy-api/speakeasy ### Generated -- [python v0.27.0] . \ No newline at end of file +- [python v0.27.0] . + +## 2024-06-04 02:44:17 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.299.6 (2.338.12) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.27.1] . \ No newline at end of file diff --git a/docs/models/operations/partitionresponse.md b/docs/models/operations/partitionresponse.md index 5a366908..f010516c 100644 --- a/docs/models/operations/partitionresponse.md +++ b/docs/models/operations/partitionresponse.md @@ -8,4 +8,4 @@ | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `elements` | List[[shared.Element](../../models/shared/element.md)] | :heavy_minus_sign: | Successful Response | \ No newline at end of file +| `elements` | List[Dict[str, *Any*]] | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/shared/element.md b/docs/models/shared/element.md deleted file mode 100644 index 403252e8..00000000 --- a/docs/models/shared/element.md +++ /dev/null @@ -1,11 +0,0 @@ -# Element - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `element_id` | *str* | :heavy_check_mark: | N/A | -| `metadata` | [shared.Metadata](../../models/shared/metadata.md) | :heavy_check_mark: | N/A | -| `text` | *str* | :heavy_check_mark: | N/A | -| `type` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/metadata.md b/docs/models/shared/metadata.md deleted file mode 100644 index e655f580..00000000 --- a/docs/models/shared/metadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# Metadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/gen.yaml b/gen.yaml index 73af646a..b19e0744 100644 --- a/gen.yaml +++ b/gen.yaml @@ -10,7 +10,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false python: - version: 0.27.0 + version: 0.27.1 additionalDependencies: dependencies: deepdiff: '>=6.0' diff --git a/setup.py b/setup.py index 0758cfac..93b379fc 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ setuptools.setup( name='unstructured-client', - version='0.27.0', + version='0.27.1', author='Unstructured', description='Python Client SDK for Unstructured API', license = 'MIT', diff --git a/src/unstructured_client/general.py b/src/unstructured_client/general.py index 2c5a49cf..e0642216 100644 --- a/src/unstructured_client/general.py +++ b/src/unstructured_client/general.py @@ -2,10 +2,10 @@ import requests as requests_http from .sdkconfiguration import SDKConfiguration -from typing import List, Optional +from typing import Any, Dict, List, Optional from unstructured_client import utils from unstructured_client._hooks import AfterErrorContext, AfterSuccessContext, BeforeRequestContext, HookContext -from unstructured_client.models import errors, operations, shared +from unstructured_client.models import errors, operations class General: sdk_configuration: SDKConfiguration @@ -83,7 +83,7 @@ def do_request(): if http_res.status_code == 200: # pylint: disable=no-else-return if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[List[shared.Element]]) + out = utils.unmarshal_json(http_res.text, Optional[List[Dict[str, Any]]]) res.elements = out else: content_type = http_res.headers.get('Content-Type') diff --git a/src/unstructured_client/models/operations/partition.py b/src/unstructured_client/models/operations/partition.py index d2241681..262e25c7 100644 --- a/src/unstructured_client/models/operations/partition.py +++ b/src/unstructured_client/models/operations/partition.py @@ -3,9 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ...models.shared import element as shared_element from ...models.shared import partition_parameters as shared_partition_parameters -from typing import List, Optional +from typing import Any, Dict, List, Optional @dataclasses.dataclass @@ -25,7 +24,7 @@ class PartitionResponse: r"""HTTP response status code for this operation""" raw_response: requests_http.Response = dataclasses.field() r"""Raw HTTP response; suitable for custom response parsing""" - elements: Optional[List[shared_element.Element]] = dataclasses.field(default=None) + elements: Optional[List[Dict[str, Any]]] = dataclasses.field(default=None) r"""Successful Response""" diff --git a/src/unstructured_client/models/shared/__init__.py b/src/unstructured_client/models/shared/__init__.py index 8fb7bdae..93e5127f 100644 --- a/src/unstructured_client/models/shared/__init__.py +++ b/src/unstructured_client/models/shared/__init__.py @@ -1,8 +1,7 @@ """Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" -from .element import * from .partition_parameters import * from .security import * from .validationerror import * -__all__ = ["ChunkingStrategy","Element","Files","Loc","Metadata","OutputFormat","PartitionParameters","Security","Strategy","ValidationError"] +__all__ = ["ChunkingStrategy","Files","Loc","OutputFormat","PartitionParameters","Security","Strategy","ValidationError"] diff --git a/src/unstructured_client/models/shared/element.py b/src/unstructured_client/models/shared/element.py deleted file mode 100644 index dddd4afe..00000000 --- a/src/unstructured_client/models/shared/element.py +++ /dev/null @@ -1,22 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -from dataclasses_json import Undefined, dataclass_json -from unstructured_client import utils - - -@dataclasses.dataclass -class Metadata: - pass - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class Element: - element_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('element_id') }}) - metadata: Metadata = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('metadata') }}) - text: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('text') }}) - type: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) - - diff --git a/src/unstructured_client/sdkconfiguration.py b/src/unstructured_client/sdkconfiguration.py index 61d01e16..5f5d52f1 100644 --- a/src/unstructured_client/sdkconfiguration.py +++ b/src/unstructured_client/sdkconfiguration.py @@ -28,10 +28,10 @@ class SDKConfiguration: server_url: Optional[str] = '' server: Optional[str] = '' language: str = 'python' - openapi_doc_version: str = '1.0.32' - sdk_version: str = '0.27.0' - gen_version: str = '2.338.7' - user_agent: str = 'speakeasy-sdk/python 0.27.0 2.338.7 1.0.32 unstructured-client' + openapi_doc_version: str = '1.0.33' + sdk_version: str = '0.27.1' + gen_version: str = '2.338.12' + user_agent: str = 'speakeasy-sdk/python 0.27.1 2.338.12 1.0.33 unstructured-client' retry_config: Optional[RetryConfig] = None def __post_init__(self):