Skip to content

Commit 391dea8

Browse files
committed
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.513.2
1 parent c0f707d commit 391dea8

File tree

17 files changed

+82
-67
lines changed

17 files changed

+82
-67
lines changed

.speakeasy/gen.lock

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
lockVersion: 2.0.0
22
id: 8b5fa338-9106-4734-abf0-e30d67044a90
33
management:
4-
docChecksum: 8befe9665bd102e8cc2241c80080859a
4+
docChecksum: 761bdf240b7e572d6a866cee2c950c70
55
docVersion: 1.0.78
6-
speakeasyVersion: 1.509.0
7-
generationVersion: 2.539.0
8-
releaseVersion: 0.31.0
9-
configChecksum: faf5191e78f1597b78cd7600af4f1d96
6+
speakeasyVersion: 1.513.2
7+
generationVersion: 2.545.2
8+
releaseVersion: 0.31.1
9+
configChecksum: 569b9e45b4960f94a43454c345d9b38c
1010
repoURL: https://github.com/Unstructured-IO/unstructured-python-client.git
1111
repoSubDirectory: .
1212
installationURL: https://github.com/Unstructured-IO/unstructured-python-client.git
@@ -197,7 +197,7 @@ generatedFiles:
197197
- py.typed
198198
- pylintrc
199199
- pyproject.toml
200-
- scripts/prepare-readme.py
200+
- scripts/prepare_readme.py
201201
- scripts/publish.sh
202202
- src/unstructured_client/__init__.py
203203
- src/unstructured_client/_hooks/__init__.py
@@ -208,6 +208,7 @@ generatedFiles:
208208
- src/unstructured_client/destinations.py
209209
- src/unstructured_client/httpclient.py
210210
- src/unstructured_client/jobs.py
211+
- src/unstructured_client/models/__init__.py
211212
- src/unstructured_client/models/errors/__init__.py
212213
- src/unstructured_client/models/errors/httpvalidationerror.py
213214
- src/unstructured_client/models/errors/sdkerror.py
@@ -417,14 +418,14 @@ examples:
417418
"200":
418419
application/json: {"created_at": "2025-01-14T00:09:32.358Z", "id": "d18f330b-506f-455c-9cb8-0cee2386ac29", "runtime": "<value>", "status": "IN_PROGRESS", "workflow_id": "136fd799-4c45-4417-a632-f460d8ebb2a2", "workflow_name": "<value>"}
419420
"422":
420-
application/json: {"detail": "<value>"}
421+
application/json: {"detail": [{"loc": ["<value>", 701982], "msg": "<value>", "type": "<value>"}, {"loc": ["<value>"], "msg": "<value>", "type": "<value>"}]}
421422
list_jobs:
422423
speakeasy-default-list-jobs:
423424
responses:
424425
"200":
425426
application/json: [{"created_at": "2023-09-01T17:59:19.211Z", "id": "7098ff76-419f-4a5a-a313-d159507b629d", "runtime": "<value>", "status": "SCHEDULED", "workflow_id": "75cf761e-8c10-48e4-b3d7-6ae90ad4fd3e", "workflow_name": "<value>"}]
426427
"422":
427-
application/json: {"detail": [{"loc": [], "msg": "<value>", "type": "<value>"}]}
428+
application/json: {"detail": []}
428429
create_source:
429430
speakeasy-default-create-source:
430431
requestBody:
@@ -522,9 +523,9 @@ examples:
522523
header: {}
523524
responses:
524525
"202":
525-
application/json: {"created_at": "2024-08-04T10:06:22.481Z", "destinations": [], "id": "6c4f327c-7ca2-4933-a68d-2ebe9d9f1445", "name": "<value>", "schedule": {"crontab_entries": [{"cron_expression": "0 0 * * *"}]}, "sources": ["a9593964-92eb-496f-84ac-c8f067ba24c3"], "status": "inactive", "workflow_nodes": [{"name": "<value>", "subtype": "<value>", "type": "chunk"}], "workflow_type": "custom"}
526+
application/json: {"created_at": "2024-08-04T10:06:22.481Z", "id": "6c4f327c-7ca2-4933-a68d-2ebe9d9f1445", "runtime": "<value>", "status": "COMPLETED", "workflow_id": "b67be6d9-8e94-40c8-afd7-21e5d2d00363", "workflow_name": "<value>"}
526527
"422":
527-
application/json: {"detail": [{"loc": ["<value>"], "msg": "<value>", "type": "<value>"}, {"loc": [397022, 604524], "msg": "<value>", "type": "<value>"}]}
528+
application/json: {"detail": [{"loc": ["<value>", 233068, "<value>"], "msg": "<value>", "type": "<value>"}]}
528529
update_workflow:
529530
speakeasy-default-update-workflow:
530531
parameters:

.speakeasy/workflow.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
speakeasyVersion: 1.509.0
1+
speakeasyVersion: 1.513.2
22
sources:
33
my-source:
44
sourceNamespace: my-source
5-
sourceRevisionDigest: sha256:b62d80c1b902f285b4eaeaf67a4b1d2edb21053eded12c247daecbfeea1d8a30
6-
sourceBlobDigest: sha256:8d5c6a31539e2e1047e529fb6561fd4172fa80506241bc25dcf51d7c76f8b6e6
5+
sourceRevisionDigest: sha256:284396f88ac6b8f00fc6b64e117310094af9403c775d96d0273f2dc91e20a99d
6+
sourceBlobDigest: sha256:eeff76b4ac663079622a4957d5023f06ca2a8ad423075a125478ad3b57aeb4ef
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1741046993
9+
- speakeasy-sdk-regen-1741292249
1010
- 1.0.78
1111
targets:
1212
unstructured-python:
1313
source: my-source
1414
sourceNamespace: my-source
15-
sourceRevisionDigest: sha256:b62d80c1b902f285b4eaeaf67a4b1d2edb21053eded12c247daecbfeea1d8a30
16-
sourceBlobDigest: sha256:8d5c6a31539e2e1047e529fb6561fd4172fa80506241bc25dcf51d7c76f8b6e6
15+
sourceRevisionDigest: sha256:284396f88ac6b8f00fc6b64e117310094af9403c775d96d0273f2dc91e20a99d
16+
sourceBlobDigest: sha256:eeff76b4ac663079622a4957d5023f06ca2a8ad423075a125478ad3b57aeb4ef
1717
codeSamplesNamespace: my-source-code-samples
18-
codeSamplesRevisionDigest: sha256:77255b7d9241b11e147927beb6e60a27654bd6089e121356a3d5ca06e5f0f2f1
18+
codeSamplesRevisionDigest: sha256:19241c5759df66896762918163ed4cbb6be089a165082e64717f088fb50320c1
1919
workflow:
2020
workflowVersion: 1.0.0
2121
speakeasyVersion: latest

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,4 +845,14 @@ Based on:
845845
### Generated
846846
- [python v0.31.0] .
847847
### Releases
848-
- [PyPI v0.31.0] https://pypi.org/project/unstructured-client/0.31.0 - .
848+
- [PyPI v0.31.0] https://pypi.org/project/unstructured-client/0.31.0 - .
849+
850+
## 2025-03-07 00:09:47
851+
### Changes
852+
Based on:
853+
- OpenAPI Doc
854+
- Speakeasy CLI 1.513.2 (2.545.2) https://github.com/speakeasy-api/speakeasy
855+
### Generated
856+
- [python v0.31.1] .
857+
### Releases
858+
- [PyPI v0.31.1] https://pypi.org/project/unstructured-client/0.31.1 - .

codeSamples.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ actions:
116116
"x-codeSamples":
117117
- "lang": "python"
118118
"label": "run_workflow"
119-
"source": "from unstructured_client import UnstructuredClient\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.workflows.run_workflow(request={\n \"workflow_id\": \"6b67be6d-98e9-440c-88fd-721e5d2d0036\",\n })\n\n assert res.workflow_information is not None\n\n # Handle response\n print(res.workflow_information)"
119+
"source": "from unstructured_client import UnstructuredClient\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.workflows.run_workflow(request={\n \"workflow_id\": \"6b67be6d-98e9-440c-88fd-721e5d2d0036\",\n })\n\n assert res.job_information is not None\n\n # Handle response\n print(res.job_information)"
120120
- target: $["paths"]["/general/v0/general"]["post"]
121121
update:
122122
"x-codeSamples":

docs/models/operations/runworkflowresponse.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
## Fields
55

6-
| Field | Type | Required | Description |
7-
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
8-
| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
9-
| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
10-
| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
11-
| `workflow_information` | [Optional[shared.WorkflowInformation]](../../models/shared/workflowinformation.md) | :heavy_minus_sign: | Successful Response |
6+
| Field | Type | Required | Description |
7+
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
8+
| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
9+
| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
10+
| `raw_response` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
11+
| `job_information` | [Optional[shared.JobInformation]](../../models/shared/jobinformation.md) | :heavy_minus_sign: | Successful Response |

docs/sdks/workflows/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,10 @@ with UnstructuredClient() as uc_client:
201201
"workflow_id": "6b67be6d-98e9-440c-88fd-721e5d2d0036",
202202
})
203203

204-
assert res.workflow_information is not None
204+
assert res.job_information is not None
205205

206206
# Handle response
207-
print(res.workflow_information)
207+
print(res.job_information)
208208

209209
```
210210

gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ generation:
1212
oAuth2ClientCredentialsEnabled: false
1313
oAuth2PasswordEnabled: false
1414
python:
15-
version: 0.31.0
15+
version: 0.31.1
1616
additionalDependencies:
1717
dev:
1818
deepdiff: '>=6.0'

poetry.lock

Lines changed: 9 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pylintrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,10 @@ disable=raw-checker-failed,
454454
bare-except,
455455
broad-exception-caught,
456456
fixme,
457-
relative-beyond-top-level
457+
relative-beyond-top-level,
458+
consider-using-with,
459+
wildcard-import,
460+
unused-wildcard-import
458461

459462
# Enable the message, report, category or checker with the given id(s). You can
460463
# either give multiple identifier separated by comma (,) or put this option

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "unstructured-client"
3-
version = "0.31.0"
3+
version = "0.31.1"
44
description = "Python Client SDK for Unstructured API"
55
authors = [{ name = "Unstructured" },]
66
readme = "README-PYPI.md"
@@ -15,7 +15,7 @@ dependencies = [
1515
"pypdf >=4.0",
1616
"python-dateutil >=2.8.2",
1717
"requests-toolbelt >=1.0.0",
18-
"typing-inspect >=0.9.0",
18+
"typing-inspection >=0.4.0",
1919
]
2020

2121
[tool.poetry]

scripts/prepare-readme.py renamed to scripts/prepare_readme.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import shutil
55

66
try:
7-
with open("README.md", "r") as rh:
7+
with open("README.md", "r", encoding="utf-8") as rh:
88
readme_contents = rh.read()
99
GITHUB_URL = "https://github.com/Unstructured-IO/unstructured-python-client.git"
1010
GITHUB_URL = (
@@ -21,13 +21,13 @@
2121
readme_contents,
2222
)
2323

24-
with open("README-PYPI.md", "w") as wh:
24+
with open("README-PYPI.md", "w", encoding="utf-8") as wh:
2525
wh.write(readme_contents)
2626
except Exception as e:
2727
try:
2828
print("Failed to rewrite README.md to README-PYPI.md, copying original instead")
2929
print(e)
3030
shutil.copyfile("README.md", "README-PYPI.md")
31-
except Exception as e:
31+
except Exception as ie:
3232
print("Failed to copy README.md to README-PYPI.md")
33-
print(e)
33+
print(ie)

scripts/publish.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
export POETRY_PYPI_TOKEN_PYPI=${PYPI_TOKEN}
44

5-
poetry run python scripts/prepare-readme.py
5+
poetry run python scripts/prepare_readme.py
66

77
poetry publish --build --skip-existing

src/unstructured_client/_version.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
import importlib.metadata
44

55
__title__: str = "unstructured-client"
6-
__version__: str = "0.31.0"
6+
__version__: str = "0.31.1"
77
__openapi_doc_version__: str = "1.0.78"
8-
__gen_version__: str = "2.539.0"
9-
__user_agent__: str = "speakeasy-sdk/python 0.31.0 2.539.0 1.0.78 unstructured-client"
8+
__gen_version__: str = "2.545.2"
9+
__user_agent__: str = "speakeasy-sdk/python 0.31.1 2.545.2 1.0.78 unstructured-client"
1010

1111
try:
1212
if __package__ is not None:
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2+
3+
# package
4+

src/unstructured_client/models/operations/run_workflow.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
from pydantic import model_serializer
77
from typing import Optional
88
from typing_extensions import Annotated, NotRequired, TypedDict
9-
from unstructured_client.models.shared import (
10-
workflowinformation as shared_workflowinformation,
11-
)
9+
from unstructured_client.models.shared import jobinformation as shared_jobinformation
1210
from unstructured_client.types import (
1311
BaseModel,
1412
Nullable,
@@ -80,9 +78,7 @@ class RunWorkflowResponseTypedDict(TypedDict):
8078
r"""HTTP response status code for this operation"""
8179
raw_response: httpx.Response
8280
r"""Raw HTTP response; suitable for custom response parsing"""
83-
workflow_information: NotRequired[
84-
shared_workflowinformation.WorkflowInformationTypedDict
85-
]
81+
job_information: NotRequired[shared_jobinformation.JobInformationTypedDict]
8682
r"""Successful Response"""
8783

8884

@@ -96,7 +92,5 @@ class RunWorkflowResponse(BaseModel):
9692
raw_response: httpx.Response
9793
r"""Raw HTTP response; suitable for custom response parsing"""
9894

99-
workflow_information: Optional[shared_workflowinformation.WorkflowInformation] = (
100-
None
101-
)
95+
job_information: Optional[shared_jobinformation.JobInformation] = None
10296
r"""Successful Response"""

src/unstructured_client/utils/serializers.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
from typing_extensions import get_origin
88
from pydantic import ConfigDict, create_model
99
from pydantic_core import from_json
10-
from typing_inspect import is_optional_type
10+
from typing_inspection.typing_objects import is_union
1111

1212
from ..types.basemodel import BaseModel, Nullable, OptionalNullable, Unset
1313

1414

1515
def serialize_decimal(as_str: bool):
1616
def serialize(d):
17-
if is_optional_type(type(d)) and d is None:
17+
# Optional[T] is a Union[T, None]
18+
if is_union(type(d)) and type(None) in get_args(type(d)) and d is None:
1819
return None
1920
if isinstance(d, Unset):
2021
return d
@@ -42,7 +43,8 @@ def validate_decimal(d):
4243

4344
def serialize_float(as_str: bool):
4445
def serialize(f):
45-
if is_optional_type(type(f)) and f is None:
46+
# Optional[T] is a Union[T, None]
47+
if is_union(type(f)) and type(None) in get_args(type(f)) and f is None:
4648
return None
4749
if isinstance(f, Unset):
4850
return f
@@ -70,7 +72,8 @@ def validate_float(f):
7072

7173
def serialize_int(as_str: bool):
7274
def serialize(i):
73-
if is_optional_type(type(i)) and i is None:
75+
# Optional[T] is a Union[T, None]
76+
if is_union(type(i)) and type(None) in get_args(type(i)) and i is None:
7477
return None
7578
if isinstance(i, Unset):
7679
return i
@@ -118,7 +121,8 @@ def validate(e):
118121

119122
def validate_const(v):
120123
def validate(c):
121-
if is_optional_type(type(c)) and c is None:
124+
# Optional[T] is a Union[T, None]
125+
if is_union(type(c)) and type(None) in get_args(type(c)) and c is None:
122126
return None
123127

124128
if v != c:

src/unstructured_client/workflows.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -987,8 +987,8 @@ def run_workflow(
987987
response_data: Any = None
988988
if utils.match_response(http_res, "202", "application/json"):
989989
return operations.RunWorkflowResponse(
990-
workflow_information=utils.unmarshal_json(
991-
http_res.text, Optional[shared.WorkflowInformation]
990+
job_information=utils.unmarshal_json(
991+
http_res.text, Optional[shared.JobInformation]
992992
),
993993
status_code=http_res.status_code,
994994
content_type=http_res.headers.get("Content-Type") or "",
@@ -1099,8 +1099,8 @@ async def run_workflow_async(
10991099
response_data: Any = None
11001100
if utils.match_response(http_res, "202", "application/json"):
11011101
return operations.RunWorkflowResponse(
1102-
workflow_information=utils.unmarshal_json(
1103-
http_res.text, Optional[shared.WorkflowInformation]
1102+
job_information=utils.unmarshal_json(
1103+
http_res.text, Optional[shared.JobInformation]
11041104
),
11051105
status_code=http_res.status_code,
11061106
content_type=http_res.headers.get("Content-Type") or "",

0 commit comments

Comments
 (0)