Skip to content

Commit 557237f

Browse files
committed
Remove connection check endpoints
1 parent a0385da commit 557237f

29 files changed

+123
-1963
lines changed

.speakeasy/gen.lock

Lines changed: 10 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: e3c8da4d880f93f1bf483a45d1fe2016
4+
docChecksum: 57667a8c1c45ab8c6009dada08c7d048
55
docVersion: 1.1.7
6-
speakeasyVersion: 1.533.0
7-
generationVersion: 2.578.0
8-
releaseVersion: 0.33.0
9-
configChecksum: d3a6fe7f2ae7f430c8fff9c158af4f46
6+
speakeasyVersion: 1.534.0
7+
generationVersion: 2.585.0
8+
releaseVersion: 0.32.4
9+
configChecksum: cb28766c7ee08012d26a252eff80b540
1010
repoURL: https://github.com/Unstructured-IO/unstructured-python-client.git
1111
repoSubDirectory: .
1212
installationURL: https://github.com/Unstructured-IO/unstructured-python-client.git
@@ -392,7 +392,7 @@ examples:
392392
"200":
393393
application/json: {"config": {"api_key": "<value>", "batch_size": 290189, "collection_name": "<value>", "url": "https://gray-rawhide.name/"}, "created_at": "2023-10-16T03:44:52.760Z", "id": "b3cbed99-76f0-4238-9635-119a590e2345", "name": "<value>", "type": "postgres"}
394394
"422":
395-
application/json: {"detail": [{"loc": ["<value>"], "msg": "<value>", "type": "<value>"}, {"loc": [623109], "msg": "<value>", "type": "<value>"}, {"loc": [218326], "msg": "<value>", "type": "<value>"}]}
395+
application/json: {"detail": []}
396396
delete_destination:
397397
speakeasy-default-delete-destination:
398398
parameters:
@@ -612,7 +612,7 @@ examples:
612612
"202":
613613
application/json: {"created_at": "2024-12-11T22:17:57.402Z", "id": "337e8f13-6b28-466e-a173-b8a939d2c047", "status": "SUCCESS"}
614614
"422":
615-
application/json: {"detail": [{"loc": [], "msg": "<value>", "type": "<value>"}, {"loc": ["<value>", 580213], "msg": "<value>", "type": "<value>"}]}
615+
application/json: {"detail": "<value>"}
616616
get_destination_connection_check_api_v1_destinations__destination_id__connection_check_get:
617617
speakeasy-default-get-destination-connection-check-api-v1-destinations-destination-id-connection-check-get:
618618
parameters:
@@ -623,7 +623,7 @@ examples:
623623
"200":
624624
application/json: {"created_at": "2023-08-18T13:08:22.968Z", "id": "d3ed5db0-557c-45b6-b496-8d8ddcf95c3a", "status": "SCHEDULED"}
625625
"422":
626-
application/json: {"detail": [{"loc": ["<value>"], "msg": "<value>", "type": "<value>"}, {"loc": ["<value>", "<value>"], "msg": "<value>", "type": "<value>"}, {"loc": ["<value>", 661733, "<value>"], "msg": "<value>", "type": "<value>"}]}
626+
application/json: {"detail": [{"loc": [855847], "msg": "<value>", "type": "<value>"}, {"loc": ["<value>", "<value>", "<value>"], "msg": "<value>", "type": "<value>"}, {"loc": ["<value>", 411199], "msg": "<value>", "type": "<value>"}]}
627627
check_connection_api_v1_sources__source_id__connection_check_post:
628628
speakeasy-default-check-connection-api-v1-sources-source-id-connection-check-post:
629629
parameters:
@@ -634,7 +634,7 @@ examples:
634634
"202":
635635
application/json: {"created_at": "2023-08-17T02:17:54.227Z", "id": "12f4c45a-e6b2-4d0f-849d-2ab042bf13d2", "status": "SUCCESS"}
636636
"422":
637-
application/json: {"detail": [{"loc": [], "msg": "<value>", "type": "<value>"}, {"loc": [], "msg": "<value>", "type": "<value>"}]}
637+
application/json: {"detail": "<value>"}
638638
get_connection_check_api_v1_sources__source_id__connection_check_get:
639639
speakeasy-default-get-connection-check-api-v1-sources-source-id-connection-check-get:
640640
parameters:
@@ -645,6 +645,6 @@ examples:
645645
"200":
646646
application/json: {"created_at": "2025-01-25T05:08:46.547Z", "id": "7cc92d68-dc16-49f9-a119-c651a18a978d", "status": "SCHEDULED"}
647647
"422":
648-
application/json: {"detail": [{"loc": [146117], "msg": "<value>", "type": "<value>"}, {"loc": [417709], "msg": "<value>", "type": "<value>"}]}
648+
application/json: {"detail": "<value>"}
649649
examplesVersion: 1.0.1
650650
generatedTests: {}

README.md

Lines changed: 76 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -110,41 +110,63 @@ Some of the endpoints in this SDK support retries. If you use the SDK without an
110110
To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
111111
```python
112112
from unstructured_client import UnstructuredClient
113+
from unstructured_client.models import shared
113114
from unstructured_client.utils import BackoffStrategy, RetryConfig
114115

115116

116117
with UnstructuredClient() as uc_client:
117118

118-
res = uc_client.destinations.check_destination_connection_api_v1_destinations_destination_id_connection_check_post(request={
119-
"destination_id": "b65169f5-79ba-4464-918f-b0be2c07b962",
119+
res = uc_client.destinations.create_destination(request={
120+
"create_destination_connector": {
121+
"config": {
122+
"api_endpoint": "<value>",
123+
"batch_size": 20,
124+
"collection_name": "<value>",
125+
"flatten_metadata": False,
126+
"token": "<value>",
127+
},
128+
"name": "<value>",
129+
"type": shared.DestinationConnectorType.AZURE_AI_SEARCH,
130+
},
120131
},
121132
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
122133

123-
assert res.dag_node_connection_check is not None
134+
assert res.destination_connector_information is not None
124135

125136
# Handle response
126-
print(res.dag_node_connection_check)
137+
print(res.destination_connector_information)
127138

128139
```
129140

130141
If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK:
131142
```python
132143
from unstructured_client import UnstructuredClient
144+
from unstructured_client.models import shared
133145
from unstructured_client.utils import BackoffStrategy, RetryConfig
134146

135147

136148
with UnstructuredClient(
137149
retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
138150
) as uc_client:
139151

140-
res = uc_client.destinations.check_destination_connection_api_v1_destinations_destination_id_connection_check_post(request={
141-
"destination_id": "b65169f5-79ba-4464-918f-b0be2c07b962",
152+
res = uc_client.destinations.create_destination(request={
153+
"create_destination_connector": {
154+
"config": {
155+
"api_endpoint": "<value>",
156+
"batch_size": 20,
157+
"collection_name": "<value>",
158+
"flatten_metadata": False,
159+
"token": "<value>",
160+
},
161+
"name": "<value>",
162+
"type": shared.DestinationConnectorType.AZURE_AI_SEARCH,
163+
},
142164
})
143165

144-
assert res.dag_node_connection_check is not None
166+
assert res.destination_connector_information is not None
145167

146168
# Handle response
147-
print(res.dag_node_connection_check)
169+
print(res.destination_connector_information)
148170

149171
```
150172
<!-- End Retries [retries] -->
@@ -164,7 +186,7 @@ By default, an API error will raise a errors.SDKError exception, which has the f
164186
| `.raw_response` | *httpx.Response* | The raw HTTP response |
165187
| `.body` | *str* | The response content |
166188

167-
When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `check_destination_connection_api_v1_destinations_destination_id_connection_check_post_async` method may raise the following exceptions:
189+
When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `create_destination_async` method may raise the following exceptions:
168190

169191
| Error Type | Status Code | Content Type |
170192
| -------------------------- | ----------- | ---------------- |
@@ -175,21 +197,31 @@ When custom error responses are specified for an operation, the SDK may also rai
175197

176198
```python
177199
from unstructured_client import UnstructuredClient
178-
from unstructured_client.models import errors
200+
from unstructured_client.models import errors, shared
179201

180202

181203
with UnstructuredClient() as uc_client:
182204
res = None
183205
try:
184206

185-
res = uc_client.destinations.check_destination_connection_api_v1_destinations_destination_id_connection_check_post(request={
186-
"destination_id": "b65169f5-79ba-4464-918f-b0be2c07b962",
207+
res = uc_client.destinations.create_destination(request={
208+
"create_destination_connector": {
209+
"config": {
210+
"api_endpoint": "<value>",
211+
"batch_size": 20,
212+
"collection_name": "<value>",
213+
"flatten_metadata": False,
214+
"token": "<value>",
215+
},
216+
"name": "<value>",
217+
"type": shared.DestinationConnectorType.AZURE_AI_SEARCH,
218+
},
187219
})
188220

189-
assert res.dag_node_connection_check is not None
221+
assert res.destination_connector_information is not None
190222

191223
# Handle response
192-
print(res.dag_node_connection_check)
224+
print(res.destination_connector_information)
193225

194226
except errors.HTTPValidationError as e:
195227
# handle e.data: errors.HTTPValidationErrorData
@@ -300,18 +332,29 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
300332
```python
301333
# Synchronous Example
302334
from unstructured_client import UnstructuredClient
335+
from unstructured_client.models import shared
303336

304337

305338
with UnstructuredClient() as uc_client:
306339

307-
res = uc_client.destinations.check_destination_connection_api_v1_destinations_destination_id_connection_check_post(request={
308-
"destination_id": "b65169f5-79ba-4464-918f-b0be2c07b962",
340+
res = uc_client.destinations.create_destination(request={
341+
"create_destination_connector": {
342+
"config": {
343+
"api_endpoint": "<value>",
344+
"batch_size": 20,
345+
"collection_name": "<value>",
346+
"flatten_metadata": False,
347+
"token": "<value>",
348+
},
349+
"name": "<value>",
350+
"type": shared.DestinationConnectorType.AZURE_AI_SEARCH,
351+
},
309352
})
310353

311-
assert res.dag_node_connection_check is not None
354+
assert res.destination_connector_information is not None
312355

313356
# Handle response
314-
print(res.dag_node_connection_check)
357+
print(res.destination_connector_information)
315358
```
316359

317360
</br>
@@ -321,19 +364,30 @@ The same SDK client can also be used to make asychronous requests by importing a
321364
# Asynchronous Example
322365
import asyncio
323366
from unstructured_client import UnstructuredClient
367+
from unstructured_client.models import shared
324368

325369
async def main():
326370

327371
async with UnstructuredClient() as uc_client:
328372

329-
res = await uc_client.destinations.check_destination_connection_api_v1_destinations_destination_id_connection_check_post_async(request={
330-
"destination_id": "b65169f5-79ba-4464-918f-b0be2c07b962",
373+
res = await uc_client.destinations.create_destination_async(request={
374+
"create_destination_connector": {
375+
"config": {
376+
"api_endpoint": "<value>",
377+
"batch_size": 20,
378+
"collection_name": "<value>",
379+
"flatten_metadata": False,
380+
"token": "<value>",
381+
},
382+
"name": "<value>",
383+
"type": shared.DestinationConnectorType.AZURE_AI_SEARCH,
384+
},
331385
})
332386

333-
assert res.dag_node_connection_check is not None
387+
assert res.destination_connector_information is not None
334388

335389
# Handle response
336-
print(res.dag_node_connection_check)
390+
print(res.destination_connector_information)
337391

338392
asyncio.run(main())
339393
```

RELEASES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,6 @@ Based on:
953953
- OpenAPI Doc
954954
- Speakeasy CLI 1.533.0 (2.578.0) https://github.com/speakeasy-api/speakeasy
955955
### Generated
956-
- [python v0.33.0] .
956+
- [python v0.32.4] .
957957
### Releases
958-
- [PyPI v0.33.0] https://pypi.org/project/unstructured-client/0.33.0 - .
958+
- [PyPI v0.32.4] https://pypi.org/project/unstructured-client/0.32.4 - .

USAGE.md

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,29 @@
22
```python
33
# Synchronous Example
44
from unstructured_client import UnstructuredClient
5+
from unstructured_client.models import shared
56

67

78
with UnstructuredClient() as uc_client:
89

9-
res = uc_client.destinations.check_destination_connection_api_v1_destinations_destination_id_connection_check_post(request={
10-
"destination_id": "b65169f5-79ba-4464-918f-b0be2c07b962",
10+
res = uc_client.destinations.create_destination(request={
11+
"create_destination_connector": {
12+
"config": {
13+
"api_endpoint": "<value>",
14+
"batch_size": 20,
15+
"collection_name": "<value>",
16+
"flatten_metadata": False,
17+
"token": "<value>",
18+
},
19+
"name": "<value>",
20+
"type": shared.DestinationConnectorType.AZURE_AI_SEARCH,
21+
},
1122
})
1223

13-
assert res.dag_node_connection_check is not None
24+
assert res.destination_connector_information is not None
1425

1526
# Handle response
16-
print(res.dag_node_connection_check)
27+
print(res.destination_connector_information)
1728
```
1829

1930
</br>
@@ -23,19 +34,30 @@ The same SDK client can also be used to make asychronous requests by importing a
2334
# Asynchronous Example
2435
import asyncio
2536
from unstructured_client import UnstructuredClient
37+
from unstructured_client.models import shared
2638

2739
async def main():
2840

2941
async with UnstructuredClient() as uc_client:
3042

31-
res = await uc_client.destinations.check_destination_connection_api_v1_destinations_destination_id_connection_check_post_async(request={
32-
"destination_id": "b65169f5-79ba-4464-918f-b0be2c07b962",
43+
res = await uc_client.destinations.create_destination_async(request={
44+
"create_destination_connector": {
45+
"config": {
46+
"api_endpoint": "<value>",
47+
"batch_size": 20,
48+
"collection_name": "<value>",
49+
"flatten_metadata": False,
50+
"token": "<value>",
51+
},
52+
"name": "<value>",
53+
"type": shared.DestinationConnectorType.AZURE_AI_SEARCH,
54+
},
3355
})
3456

35-
assert res.dag_node_connection_check is not None
57+
assert res.destination_connector_information is not None
3658

3759
# Handle response
38-
print(res.dag_node_connection_check)
60+
print(res.destination_connector_information)
3961

4062
asyncio.run(main())
4163
```

docs/models/operations/checkconnectionapiv1sourcessourceidconnectioncheckpostrequest.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/models/operations/checkconnectionapiv1sourcessourceidconnectioncheckpostresponse.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/models/operations/checkdestinationconnectionapiv1destinationsdestinationidconnectioncheckpostrequest.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)