Skip to content

Commit 33ad81a

Browse files
Run speakeasy run locally with version 0.42.7 (#321)
<!-- CURSOR_SUMMARY --> > [!NOTE] > **Upgrade & regen** > > - Bumps Python SDK to `0.42.7` and updates `__user_agent__`/locks (`gen.yaml`, `.speakeasy/*.lock`) > - Regenerates models/docs; minor union order tweaks across destination models > > **AstraDB connector models** > > - Adds pydantic `extra="allow"` with `__pydantic_extra__` and `additional_properties` accessors for `AstraDBConnectorConfig` and `AstraDBConnectorConfigInput` > - Serialization updated to include additional fields; docs reflect new `__pydantic_extra__` > > **Docs & samples** > > - Updates `docs/sdks/destinations/README.md` and `codeSamples.yaml` to use `operations.*` typed request objects for create/update destination examples > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit e91d423. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 06b8b04 commit 33ad81a

File tree

13 files changed

+99
-62
lines changed

13 files changed

+99
-62
lines changed

.speakeasy/gen.lock

Lines changed: 14 additions & 13 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: 9573da525ab969618fc37288c7baec6a
4+
docChecksum: 550390299c16db8640430b6f95585110
55
docVersion: 1.2.23
66
speakeasyVersion: 1.601.0
77
generationVersion: 2.680.0
8-
releaseVersion: 0.42.6
9-
configChecksum: 234c791d16e1b5f3af5d003964b292f6
8+
releaseVersion: 0.42.7
9+
configChecksum: f3ac5d91367e5b0e16ca9f813b77af9a
1010
repoURL: https://github.com/Unstructured-IO/unstructured-python-client.git
1111
repoSubDirectory: .
1212
installationURL: https://github.com/Unstructured-IO/unstructured-python-client.git
@@ -15,6 +15,7 @@ features:
1515
python:
1616
acceptHeaders: 3.0.0
1717
additionalDependencies: 1.0.0
18+
additionalProperties: 1.0.1
1819
constsAndDefaults: 1.0.5
1920
core: 5.19.8
2021
customCodeRegions: 0.1.1
@@ -899,9 +900,9 @@ trackedFiles:
899900
docs/models/operations/updateworkflowresponse.md:
900901
last_write_checksum: sha1:1336948ebad20ffe8e11a836cf0b9faf1d2c0fb4
901902
docs/models/shared/astradbconnectorconfig.md:
902-
last_write_checksum: sha1:4a8f8de642ce6e995d5cb80b95a87acc57754732
903+
last_write_checksum: sha1:136db913654100cb7a2e64b42d59a8ab2b75a7fe
903904
docs/models/shared/astradbconnectorconfiginput.md:
904-
last_write_checksum: sha1:4e7282d2f5522f401ae02c55ffc7b0a24ca22c95
905+
last_write_checksum: sha1:100949b5b43c671e1e6496ff522fa272e356bcde
905906
docs/models/shared/azureaisearchconnectorconfig.md:
906907
last_write_checksum: sha1:ed41a88fb6bddcc2094f9d8b5660dedba9921969
907908
docs/models/shared/azureaisearchconnectorconfiginput.md:
@@ -1171,7 +1172,7 @@ trackedFiles:
11711172
docs/models/utils/retryconfig.md:
11721173
last_write_checksum: sha1:562c0f21e308ad10c27f85f75704c15592c6929d
11731174
docs/sdks/destinations/README.md:
1174-
last_write_checksum: sha1:f1d323f36e6832bfda94da124edd1287ed212ac4
1175+
last_write_checksum: sha1:3b93760c68ab044dd00cab48f09f82ddb46ad625
11751176
docs/sdks/general/README.md:
11761177
last_write_checksum: sha1:b773733847fc4c876b937db85c23828a170ef959
11771178
docs/sdks/jobs/README.md:
@@ -1189,7 +1190,7 @@ trackedFiles:
11891190
pylintrc:
11901191
last_write_checksum: sha1:db2aebd83e553dd59d3965e79104a3fb780c403a
11911192
pyproject.toml:
1192-
last_write_checksum: sha1:6690c2c6cd0795582a8ee7ad5485df40ac64294c
1193+
last_write_checksum: sha1:621955f20cac2d988186376042771c4eb875f320
11931194
scripts/prepare_readme.py:
11941195
last_write_checksum: sha1:ccdba5069fbb7997500b6ba22366e004394cdca2
11951196
scripts/publish.sh:
@@ -1203,7 +1204,7 @@ trackedFiles:
12031204
src/unstructured_client/_hooks/types.py:
12041205
last_write_checksum: sha1:ac25bc33fba97274c6554d0e735b4c90c2650a88
12051206
src/unstructured_client/_version.py:
1206-
last_write_checksum: sha1:8df230bbe57fe1ed3def0d60fe15c23ef29eb8d2
1207+
last_write_checksum: sha1:4282b6a2eef663243a0f7099d2be65fd3f238dd8
12071208
src/unstructured_client/basesdk.py:
12081209
last_write_checksum: sha1:c630e3511b954676ab8b477fd7b11c4ce8f443a7
12091210
src/unstructured_client/destinations.py:
@@ -1293,9 +1294,9 @@ trackedFiles:
12931294
src/unstructured_client/models/shared/__init__.py:
12941295
last_write_checksum: sha1:c2ad5956b789b46b0f2f4d630d11171cd4da7550
12951296
src/unstructured_client/models/shared/astradbconnectorconfig.py:
1296-
last_write_checksum: sha1:c9ada225d014655e2800c4dac8dcb95282a12cbc
1297+
last_write_checksum: sha1:b4abe6537502e038ad9e49f4e1fed4c7fb368d38
12971298
src/unstructured_client/models/shared/astradbconnectorconfiginput.py:
1298-
last_write_checksum: sha1:452a4e0f89079aa1520e22c5920cc7927efb0b46
1299+
last_write_checksum: sha1:730ff0f5475cb26e739660ea01dca2f85b4e81c2
12991300
src/unstructured_client/models/shared/azureaisearchconnectorconfig.py:
13001301
last_write_checksum: sha1:b04bb92d9803b10f9dacb9b489eb1da2d8625829
13011302
src/unstructured_client/models/shared/azureaisearchconnectorconfiginput.py:
@@ -1331,7 +1332,7 @@ trackedFiles:
13311332
src/unstructured_client/models/shared/couchbasesourceconnectorconfiginput.py:
13321333
last_write_checksum: sha1:87a98b17a3b14b9defe1b018e4c98a1d9aeea73b
13331334
src/unstructured_client/models/shared/createdestinationconnector.py:
1334-
last_write_checksum: sha1:7137800f627ef8537e996ac9cb1d9161cc9eb187
1335+
last_write_checksum: sha1:603165ca2218c7acf52f7ab088af4b3c25e58546
13351336
src/unstructured_client/models/shared/createsourceconnector.py:
13361337
last_write_checksum: sha1:1a469c646e895744b33b804502330f3c543aae3d
13371338
src/unstructured_client/models/shared/createworkflow.py:
@@ -1353,7 +1354,7 @@ trackedFiles:
13531354
src/unstructured_client/models/shared/deltatableconnectorconfiginput.py:
13541355
last_write_checksum: sha1:42ebe9712bc0f083b890cd7ff78208d9e838dfb8
13551356
src/unstructured_client/models/shared/destinationconnectorinformation.py:
1356-
last_write_checksum: sha1:80bbf3b4fd6f477fe0b2deec328716aeb9054ee3
1357+
last_write_checksum: sha1:6c0b5c3c1a107b80f9bb12dbeb784f31aee5da5c
13571358
src/unstructured_client/models/shared/destinationconnectortype.py:
13581359
last_write_checksum: sha1:8a535b852261fe20bcdcd5e7ebfc07524270b934
13591360
src/unstructured_client/models/shared/dropboxsourceconnectorconfig.py:
@@ -1501,7 +1502,7 @@ trackedFiles:
15011502
src/unstructured_client/models/shared/templatenode.py:
15021503
last_write_checksum: sha1:e4eb4fda54c7f177addc32f786a59cdaf886ea1d
15031504
src/unstructured_client/models/shared/updatedestinationconnector.py:
1504-
last_write_checksum: sha1:f3a359c44d4e54ca85c7c69ac087726094d06655
1505+
last_write_checksum: sha1:5046b8cd7f5e480f26cb5ef8a1d0f3dd606c0673
15051506
src/unstructured_client/models/shared/updatesourceconnector.py:
15061507
last_write_checksum: sha1:66a29ca6427816cdb1846d63e3d466296dbd3abb
15071508
src/unstructured_client/models/shared/updateworkflow.py:

.speakeasy/workflow.lock

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@ speakeasyVersion: 1.601.0
22
sources:
33
my-source:
44
sourceNamespace: my-source
5-
sourceRevisionDigest: sha256:0f9a0b853a66a4d2c4182cacb93654d9f492306057400aa3b8f8f97d256897d7
6-
sourceBlobDigest: sha256:cbdac97fc0b581bed2dfc066cc8b34726833f40a7d12c68ca7c72c5dc8ad85f7
5+
sourceRevisionDigest: sha256:70ec1e7cfa1e804a9187f8798f93d6549dace1021f1ce0fbb13752ffdadc1ea0
6+
sourceBlobDigest: sha256:9d8baaccd13c785a0c4f6b4eff57d0432dc1f978ff4d87065c68a15bbd8f4014
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1765930243
109
- 1.2.23
1110
targets:
1211
unstructured-python:
1312
source: my-source
1413
sourceNamespace: my-source
15-
sourceRevisionDigest: sha256:0f9a0b853a66a4d2c4182cacb93654d9f492306057400aa3b8f8f97d256897d7
16-
sourceBlobDigest: sha256:cbdac97fc0b581bed2dfc066cc8b34726833f40a7d12c68ca7c72c5dc8ad85f7
14+
sourceRevisionDigest: sha256:70ec1e7cfa1e804a9187f8798f93d6549dace1021f1ce0fbb13752ffdadc1ea0
15+
sourceBlobDigest: sha256:9d8baaccd13c785a0c4f6b4eff57d0432dc1f978ff4d87065c68a15bbd8f4014
1716
codeSamplesNamespace: my-source-code-samples
18-
codeSamplesRevisionDigest: sha256:5ac8349c260229dbee869bfd0e1add6e7ba61a267c0f398288ac809271c67fee
17+
codeSamplesRevisionDigest: sha256:84b2c9f8504f9957f4215d5fa013aad3cc2cd0aa043413825db52b3b3c82b73b
1918
workflow:
2019
workflowVersion: 1.0.0
2120
speakeasyVersion: latest

codeSamples.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ actions:
1414
"x-codeSamples":
1515
- "lang": "python"
1616
"label": "create_destination"
17-
"source": "from unstructured_client import UnstructuredClient\nfrom unstructured_client.models import shared\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.destinations.create_destination(request={\n \"create_destination_connector\": {\n \"name\": \"<value>\",\n \"type\": shared.DestinationConnectorType.MOTHERDUCK,\n \"config\": {\n \"hosts\": [],\n \"index_name\": \"<value>\",\n },\n },\n })\n\n assert res.destination_connector_information is not None\n\n # Handle response\n print(res.destination_connector_information)"
17+
"source": "from unstructured_client import UnstructuredClient\nfrom unstructured_client.models import operations, shared\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.destinations.create_destination(request=operations.CreateDestinationRequest(\n create_destination_connector=shared.CreateDestinationConnector(\n name=\"<value>\",\n type=shared.DestinationConnectorType.MOTHERDUCK,\n config={\n \"hosts\": [],\n \"index_name\": \"<value>\",\n },\n ),\n ))\n\n assert res.destination_connector_information is not None\n\n # Handle response\n print(res.destination_connector_information)"
1818
- target: $["paths"]["/api/v1/destinations/{destination_id}"]["delete"]
1919
update:
2020
"x-codeSamples":
@@ -32,7 +32,7 @@ actions:
3232
"x-codeSamples":
3333
- "lang": "python"
3434
"label": "update_destination"
35-
"source": "from unstructured_client import UnstructuredClient\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.destinations.update_destination(request={\n \"destination_id\": \"9726962d-9d1e-4f84-8787-c7313d183927\",\n \"update_destination_connector\": {\n \"config\": {\n \"bootstrap_servers\": \"<value>\",\n \"port\": 9092,\n \"topic\": \"<value>\",\n \"kafka_api_key\": \"<value>\",\n \"secret\": \"<value>\",\n \"batch_size\": 100,\n },\n },\n })\n\n assert res.destination_connector_information is not None\n\n # Handle response\n print(res.destination_connector_information)"
35+
"source": "from unstructured_client import UnstructuredClient\nfrom unstructured_client.models import operations, shared\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.destinations.update_destination(request=operations.UpdateDestinationRequest(\n destination_id=\"9726962d-9d1e-4f84-8787-c7313d183927\",\n update_destination_connector=shared.UpdateDestinationConnector(\n config={\n \"bootstrap_servers\": \"<value>\",\n \"port\": 9092,\n \"topic\": \"<value>\",\n \"kafka_api_key\": \"<value>\",\n \"secret\": \"<value>\",\n \"batch_size\": 100,\n },\n ),\n ))\n\n assert res.destination_connector_information is not None\n\n # Handle response\n print(res.destination_connector_information)"
3636
- target: $["paths"]["/api/v1/destinations/{destination_id}/connection-check"]["get"]
3737
update:
3838
"x-codeSamples":

docs/models/shared/astradbconnectorconfig.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
| Field | Type | Required | Description |
77
| ----------------------- | ----------------------- | ----------------------- | ----------------------- |
8+
| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A |
89
| `api_endpoint` | *str* | :heavy_check_mark: | N/A |
910
| `batch_size` | *int* | :heavy_check_mark: | N/A |
1011
| `binary_encode_vectors` | *Optional[bool]* | :heavy_minus_sign: | N/A |

docs/models/shared/astradbconnectorconfiginput.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
| Field | Type | Required | Description |
77
| ----------------------- | ----------------------- | ----------------------- | ----------------------- |
8+
| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A |
89
| `api_endpoint` | *str* | :heavy_check_mark: | N/A |
910
| `batch_size` | *Optional[int]* | :heavy_minus_sign: | N/A |
1011
| `binary_encode_vectors` | *Optional[bool]* | :heavy_minus_sign: | N/A |

docs/sdks/destinations/README.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -64,22 +64,22 @@ Create a new destination connector using the provided configuration and name.
6464
<!-- UsageSnippet language="python" operationID="create_destination" method="post" path="/api/v1/destinations/" -->
6565
```python
6666
from unstructured_client import UnstructuredClient
67-
from unstructured_client.models import shared
67+
from unstructured_client.models import operations, shared
6868

6969

7070
with UnstructuredClient() as uc_client:
7171

72-
res = uc_client.destinations.create_destination(request={
73-
"create_destination_connector": {
74-
"config": {
75-
"collection": "<value>",
76-
"database": "<value>",
77-
"uri": "https://criminal-bowler.com",
78-
},
79-
"name": "<value>",
80-
"type": shared.DestinationConnectorType.ELASTICSEARCH,
81-
},
82-
})
72+
res = uc_client.destinations.create_destination(request=operations.CreateDestinationRequest(
73+
create_destination_connector=shared.CreateDestinationConnector(
74+
config=shared.MongoDBConnectorConfigInput(
75+
collection="<value>",
76+
database="<value>",
77+
uri="https://criminal-bowler.com",
78+
),
79+
name="<value>",
80+
type=shared.DestinationConnectorType.ELASTICSEARCH,
81+
),
82+
))
8383

8484
assert res.destination_connector_information is not None
8585

@@ -281,23 +281,24 @@ Update the configuration of an existing destination connector.
281281
<!-- UsageSnippet language="python" operationID="update_destination" method="put" path="/api/v1/destinations/{destination_id}" -->
282282
```python
283283
from unstructured_client import UnstructuredClient
284+
from unstructured_client.models import operations, shared
284285

285286

286287
with UnstructuredClient() as uc_client:
287288

288-
res = uc_client.destinations.update_destination(request={
289-
"update_destination_connector": {
290-
"config": {
289+
res = uc_client.destinations.update_destination(request=operations.UpdateDestinationRequest(
290+
update_destination_connector=shared.UpdateDestinationConnector(
291+
config={
291292
"batch_size": 100,
292293
"bootstrap_servers": "<value>",
293294
"kafka_api_key": "<value>",
294295
"port": 9092,
295296
"secret": "<value>",
296297
"topic": "<value>",
297298
},
298-
},
299-
"destination_id": "9726962d-9d1e-4f84-8787-c7313d183927",
300-
})
299+
),
300+
destination_id="9726962d-9d1e-4f84-8787-c7313d183927",
301+
))
301302

302303
assert res.destination_connector_information is not None
303304

gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ generation:
2222
schemas:
2323
allOfMergeStrategy: shallowMerge
2424
python:
25-
version: 0.42.6
25+
version: 0.42.7
2626
additionalDependencies:
2727
dev:
2828
deepdiff: '>=6.0'

src/unstructured_client/_version.py

Lines changed: 2 additions & 2 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.42.6"
6+
__version__: str = "0.42.7"
77
__openapi_doc_version__: str = "1.2.23"
88
__gen_version__: str = "2.680.0"
9-
__user_agent__: str = "speakeasy-sdk/python 0.42.6 2.680.0 1.2.23 unstructured-client"
9+
__user_agent__: str = "speakeasy-sdk/python 0.42.7 2.680.0 1.2.23 unstructured-client"
1010

1111
try:
1212
if __package__ is not None:

src/unstructured_client/models/shared/astradbconnectorconfig.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
22

33
from __future__ import annotations
4-
from pydantic import model_serializer
5-
from typing import Optional
4+
import pydantic
5+
from pydantic import ConfigDict, model_serializer
6+
from typing import Any, Dict, Optional
67
from typing_extensions import NotRequired, TypedDict
78
from unstructured_client.types import (
89
BaseModel,
@@ -23,6 +24,11 @@ class AstraDBConnectorConfigTypedDict(TypedDict):
2324

2425

2526
class AstraDBConnectorConfig(BaseModel):
27+
model_config = ConfigDict(
28+
populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
29+
)
30+
__pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)
31+
2632
api_endpoint: str
2733

2834
batch_size: int
@@ -35,6 +41,14 @@ class AstraDBConnectorConfig(BaseModel):
3541

3642
keyspace: OptionalNullable[str] = UNSET
3743

44+
@property
45+
def additional_properties(self):
46+
return self.__pydantic_extra__
47+
48+
@additional_properties.setter
49+
def additional_properties(self, value):
50+
self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
51+
3852
@model_serializer(mode="wrap")
3953
def serialize_model(self, handler):
4054
optional_fields = ["binary_encode_vectors", "keyspace"]
@@ -63,4 +77,7 @@ def serialize_model(self, handler):
6377
):
6478
m[k] = val
6579

80+
for k, v in serialized.items():
81+
m[k] = v
82+
6683
return m

src/unstructured_client/models/shared/astradbconnectorconfiginput.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
22

33
from __future__ import annotations
4-
from pydantic import model_serializer
5-
from typing import Optional
4+
import pydantic
5+
from pydantic import ConfigDict, model_serializer
6+
from typing import Any, Dict, Optional
67
from typing_extensions import NotRequired, TypedDict
78
from unstructured_client.types import (
89
BaseModel,
@@ -24,6 +25,11 @@ class AstraDBConnectorConfigInputTypedDict(TypedDict):
2425

2526

2627
class AstraDBConnectorConfigInput(BaseModel):
28+
model_config = ConfigDict(
29+
populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
30+
)
31+
__pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)
32+
2733
api_endpoint: str
2834

2935
collection_name: str
@@ -38,6 +44,14 @@ class AstraDBConnectorConfigInput(BaseModel):
3844

3945
keyspace: OptionalNullable[str] = UNSET
4046

47+
@property
48+
def additional_properties(self):
49+
return self.__pydantic_extra__
50+
51+
@additional_properties.setter
52+
def additional_properties(self, value):
53+
self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
54+
4155
@model_serializer(mode="wrap")
4256
def serialize_model(self, handler):
4357
optional_fields = [
@@ -71,4 +85,7 @@ def serialize_model(self, handler):
7185
):
7286
m[k] = val
7387

88+
for k, v in serialized.items():
89+
m[k] = v
90+
7491
return m

0 commit comments

Comments
 (0)