From 4282a193cbc16eb359f3a24c8ba2ddce61416fb9 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 20 Mar 2025 00:10:48 +0000 Subject: [PATCH 1/2] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.521.0 --- .speakeasy/gen.lock | 81 ++++-- .speakeasy/workflow.lock | 16 +- README.md | 4 +- RELEASES.md | 12 +- codeSamples.yaml | 14 +- .../downloadplaygroundjobrequest.md | 11 + .../downloadplaygroundjobresponse.md | 11 + docs/models/operations/runworkflowrequest.md | 9 +- docs/models/shared/bodyrunworkflow.md | 8 + docs/models/shared/config.md | 6 - .../shared/confluencesourceconnectorconfig.md | 2 +- .../couchbasesourceconnectorconfiginput.md | 2 +- .../shared/createsourceconnectorconfig.md | 30 ++- docs/models/shared/createworkflow.md | 16 +- docs/models/shared/createworkflownode.md | 11 + .../databricksvolumessourceconnectorconfig.md | 14 ++ ...bricksvolumessourceconnectorconfiginput.md | 14 ++ .../destinationconnectorinformationconfig.md | 6 - .../models/shared/destinationconnectortype.md | 1 - .../elasticsearchsourceconnectorconfig.md | 10 + ...elasticsearchsourceconnectorconfiginput.md | 10 + .../models/shared/gcssourceconnectorconfig.md | 3 +- .../shared/gcssourceconnectorconfiginput.md | 5 +- docs/models/shared/inputfiles.md | 10 + docs/models/shared/jobinformation.md | 18 +- .../kafkaclouddestinationconnectorconfig.md | 14 -- ...fkaclouddestinationconnectorconfiginput.md | 14 -- .../shared/mongodbsourceconnectorconfig.md | 10 + .../mongodbsourceconnectorconfiginput.md | 10 + docs/models/shared/nodefilemetadata.md | 9 + .../shared/onedrivesourceconnectorconfig.md | 2 +- .../onedrivesourceconnectorconfiginput.md | 8 +- docs/models/shared/partitionparameters.md | 4 +- .../shared/postgressourceconnectorconfig.md | 14 ++ .../postgressourceconnectorconfiginput.md | 14 ++ .../shared/salesforcesourceconnectorconfig.md | 12 +- .../salesforcesourceconnectorconfiginput.md | 12 +- .../shared/sharepointsourceconnectorconfig.md | 15 +- .../sharepointsourceconnectorconfiginput.md | 15 +- .../shared/snowflakesourceconnectorconfig.md | 23 +- .../snowflakesourceconnectorconfiginput.md | 23 +- .../sourceconnectorinformationconfig.md | 30 ++- .../updatedestinationconnectorconfig.md | 6 - .../shared/updatesourceconnectorconfig.md | 30 ++- docs/models/shared/updateworkflow.md | 2 +- ...itionparametersstrategy.md => vlmmodel.md} | 2 +- ...schemasstrategy.md => vlmmodelprovider.md} | 2 +- docs/models/shared/workflownode.md | 1 + docs/sdks/general/README.md | 4 +- docs/sdks/jobs/README.md | 44 ++++ docs/sdks/sources/README.md | 4 +- docs/sdks/workflows/README.md | 4 +- gen.yaml | 2 +- pylintrc | 5 +- pyproject.toml | 2 +- src/unstructured_client/_version.py | 8 +- src/unstructured_client/destinations.py | 20 +- src/unstructured_client/jobs.py | 234 +++++++++++++++++- .../models/operations/__init__.py | 14 ++ .../operations/download_playground_job.py | 115 +++++++++ .../models/operations/run_workflow.py | 20 +- .../models/shared/__init__.py | 140 +++++++---- .../models/shared/body_run_workflow.py | 80 ++++++ .../shared/confluencesourceconnectorconfig.py | 10 +- .../couchbasesourceconnectorconfiginput.py | 9 +- .../shared/createdestinationconnector.py | 22 +- .../models/shared/createsourceconnector.py | 68 ++--- .../models/shared/createworkflow.py | 22 +- ...nnectorconfig.py => createworkflownode.py} | 35 ++- ...databricks_volumessourceconnectorconfig.py | 31 +++ ...ricks_volumessourceconnectorconfiginput.py | 31 +++ .../shared/destinationconnectorinformation.py | 18 +- .../models/shared/destinationconnectortype.py | 1 - .../elasticsearchsourceconnectorconfig.py | 19 ++ ...elasticsearchsourceconnectorconfiginput.py | 19 ++ .../models/shared/gcssourceconnectorconfig.py | 7 +- .../shared/gcssourceconnectorconfiginput.py | 10 +- ...y => google_drivesourceconnectorconfig.py} | 0 ...google_drivesourceconnectorconfiginput.py} | 0 .../models/shared/jobinformation.py | 28 ++- ...py => kafka_cloudsourceconnectorconfig.py} | 0 ... kafka_cloudsourceconnectorconfiginput.py} | 0 ...fkaclouddestinationconnectorconfiginput.py | 69 ------ .../shared/mongodbsourceconnectorconfig.py | 19 ++ .../mongodbsourceconnectorconfiginput.py | 19 ++ .../models/shared/nodefilemetadata.py | 16 ++ .../shared/onedrivesourceconnectorconfig.py | 4 +- .../onedrivesourceconnectorconfiginput.py | 16 +- .../models/shared/partition_parameters.py | 16 +- .../shared/postgressourceconnectorconfig.py | 31 +++ .../postgressourceconnectorconfiginput.py | 32 +++ .../shared/salesforcesourceconnectorconfig.py | 56 ++++- .../salesforcesourceconnectorconfiginput.py | 56 ++++- .../shared/sharepointsourceconnectorconfig.py | 62 +---- .../sharepointsourceconnectorconfiginput.py | 63 +---- .../shared/snowflakesourceconnectorconfig.py | 65 +++-- .../snowflakesourceconnectorconfiginput.py | 32 +-- .../shared/sourceconnectorinformation.py | 68 ++--- .../shared/updatedestinationconnector.py | 22 +- .../models/shared/updatesourceconnector.py | 68 ++--- .../models/shared/updateworkflow.py | 6 +- .../models/shared/workflownode.py | 3 + src/unstructured_client/sources.py | 20 +- src/unstructured_client/utils/serializers.py | 2 +- src/unstructured_client/workflows.py | 38 ++- 105 files changed, 1636 insertions(+), 769 deletions(-) create mode 100644 docs/models/operations/downloadplaygroundjobrequest.md create mode 100644 docs/models/operations/downloadplaygroundjobresponse.md create mode 100644 docs/models/shared/bodyrunworkflow.md create mode 100644 docs/models/shared/createworkflownode.md create mode 100644 docs/models/shared/databricksvolumessourceconnectorconfig.md create mode 100644 docs/models/shared/databricksvolumessourceconnectorconfiginput.md create mode 100644 docs/models/shared/elasticsearchsourceconnectorconfig.md create mode 100644 docs/models/shared/elasticsearchsourceconnectorconfiginput.md create mode 100644 docs/models/shared/inputfiles.md delete mode 100644 docs/models/shared/kafkaclouddestinationconnectorconfig.md delete mode 100644 docs/models/shared/kafkaclouddestinationconnectorconfiginput.md create mode 100644 docs/models/shared/mongodbsourceconnectorconfig.md create mode 100644 docs/models/shared/mongodbsourceconnectorconfiginput.md create mode 100644 docs/models/shared/nodefilemetadata.md create mode 100644 docs/models/shared/postgressourceconnectorconfig.md create mode 100644 docs/models/shared/postgressourceconnectorconfiginput.md rename docs/models/shared/{partitionparametersstrategy.md => vlmmodel.md} (97%) rename docs/models/shared/{partitionparametersschemasstrategy.md => vlmmodelprovider.md} (92%) create mode 100644 src/unstructured_client/models/operations/download_playground_job.py create mode 100644 src/unstructured_client/models/shared/body_run_workflow.py rename src/unstructured_client/models/shared/{kafkaclouddestinationconnectorconfig.py => createworkflownode.py} (69%) create mode 100644 src/unstructured_client/models/shared/databricks_volumessourceconnectorconfig.py create mode 100644 src/unstructured_client/models/shared/databricks_volumessourceconnectorconfiginput.py create mode 100644 src/unstructured_client/models/shared/elasticsearchsourceconnectorconfig.py create mode 100644 src/unstructured_client/models/shared/elasticsearchsourceconnectorconfiginput.py rename src/unstructured_client/models/shared/{googledrivesourceconnectorconfig.py => google_drivesourceconnectorconfig.py} (100%) rename src/unstructured_client/models/shared/{googledrivesourceconnectorconfiginput.py => google_drivesourceconnectorconfiginput.py} (100%) rename src/unstructured_client/models/shared/{kafkacloudsourceconnectorconfig.py => kafka_cloudsourceconnectorconfig.py} (100%) rename src/unstructured_client/models/shared/{kafkacloudsourceconnectorconfiginput.py => kafka_cloudsourceconnectorconfiginput.py} (100%) delete mode 100644 src/unstructured_client/models/shared/kafkaclouddestinationconnectorconfiginput.py create mode 100644 src/unstructured_client/models/shared/mongodbsourceconnectorconfig.py create mode 100644 src/unstructured_client/models/shared/mongodbsourceconnectorconfiginput.py create mode 100644 src/unstructured_client/models/shared/nodefilemetadata.py create mode 100644 src/unstructured_client/models/shared/postgressourceconnectorconfig.py create mode 100644 src/unstructured_client/models/shared/postgressourceconnectorconfiginput.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 52290687..f0b59040 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: 761bdf240b7e572d6a866cee2c950c70 - docVersion: 1.0.78 - speakeasyVersion: 1.513.0 - generationVersion: 2.545.1 - releaseVersion: 0.31.1 - configChecksum: 569b9e45b4960f94a43454c345d9b38c + docChecksum: ec5b1519ee12f8e116a26101bd037747 + docVersion: 1.0.81 + speakeasyVersion: 1.521.0 + generationVersion: 2.558.2 + releaseVersion: 0.31.2 + configChecksum: 0bf706114cdb05e694ef463063a71afe repoURL: https://github.com/Unstructured-IO/unstructured-python-client.git repoSubDirectory: . installationURL: https://github.com/Unstructured-IO/unstructured-python-client.git @@ -16,7 +16,7 @@ features: acceptHeaders: 3.0.0 additionalDependencies: 1.0.0 constsAndDefaults: 1.0.5 - core: 5.12.2 + core: 5.12.4 defaultEnabledRetries: 0.2.0 enumUnions: 0.1.0 envVarSecurityUsage: 0.3.2 @@ -58,6 +58,8 @@ generatedFiles: - docs/models/operations/deletesourceresponse.md - docs/models/operations/deleteworkflowrequest.md - docs/models/operations/deleteworkflowresponse.md + - docs/models/operations/downloadplaygroundjobrequest.md + - docs/models/operations/downloadplaygroundjobresponse.md - docs/models/operations/getdestinationrequest.md - docs/models/operations/getdestinationresponse.md - docs/models/operations/getjobrequest.md @@ -90,6 +92,7 @@ generatedFiles: - docs/models/shared/azureaisearchconnectorconfiginput.md - docs/models/shared/azuresourceconnectorconfig.md - docs/models/shared/azuresourceconnectorconfiginput.md + - docs/models/shared/bodyrunworkflow.md - docs/models/shared/boxsourceconnectorconfig.md - docs/models/shared/boxsourceconnectorconfiginput.md - docs/models/shared/config.md @@ -103,11 +106,14 @@ generatedFiles: - docs/models/shared/createsourceconnector.md - docs/models/shared/createsourceconnectorconfig.md - docs/models/shared/createworkflow.md + - docs/models/shared/createworkflownode.md - docs/models/shared/crontabentry.md - docs/models/shared/databricksvdtdestinationconnectorconfig.md - docs/models/shared/databricksvdtdestinationconnectorconfiginput.md - docs/models/shared/databricksvolumesconnectorconfig.md - docs/models/shared/databricksvolumesconnectorconfiginput.md + - docs/models/shared/databricksvolumessourceconnectorconfig.md + - docs/models/shared/databricksvolumessourceconnectorconfiginput.md - docs/models/shared/deltatableconnectorconfig.md - docs/models/shared/deltatableconnectorconfiginput.md - docs/models/shared/destinationconnectorinformation.md @@ -117,6 +123,8 @@ generatedFiles: - docs/models/shared/dropboxsourceconnectorconfiginput.md - docs/models/shared/elasticsearchconnectorconfig.md - docs/models/shared/elasticsearchconnectorconfiginput.md + - docs/models/shared/elasticsearchsourceconnectorconfig.md + - docs/models/shared/elasticsearchsourceconnectorconfiginput.md - docs/models/shared/files.md - docs/models/shared/gcsdestinationconnectorconfig.md - docs/models/shared/gcsdestinationconnectorconfiginput.md @@ -124,10 +132,9 @@ generatedFiles: - docs/models/shared/gcssourceconnectorconfiginput.md - docs/models/shared/googledrivesourceconnectorconfig.md - docs/models/shared/googledrivesourceconnectorconfiginput.md + - docs/models/shared/inputfiles.md - docs/models/shared/jobinformation.md - docs/models/shared/jobstatus.md - - docs/models/shared/kafkaclouddestinationconnectorconfig.md - - docs/models/shared/kafkaclouddestinationconnectorconfiginput.md - docs/models/shared/kafkacloudsourceconnectorconfig.md - docs/models/shared/kafkacloudsourceconnectorconfiginput.md - docs/models/shared/loc.md @@ -135,8 +142,11 @@ generatedFiles: - docs/models/shared/milvusdestinationconnectorconfiginput.md - docs/models/shared/mongodbconnectorconfig.md - docs/models/shared/mongodbconnectorconfiginput.md + - docs/models/shared/mongodbsourceconnectorconfig.md + - docs/models/shared/mongodbsourceconnectorconfiginput.md - docs/models/shared/neo4jdestinationconnectorconfig.md - docs/models/shared/neo4jdestinationconnectorconfiginput.md + - docs/models/shared/nodefilemetadata.md - docs/models/shared/onedrivedestinationconnectorconfig.md - docs/models/shared/onedrivedestinationconnectorconfiginput.md - docs/models/shared/onedrivesourceconnectorconfig.md @@ -145,10 +155,10 @@ generatedFiles: - docs/models/shared/outlooksourceconnectorconfiginput.md - docs/models/shared/outputformat.md - docs/models/shared/partitionparameters.md - - docs/models/shared/partitionparametersschemasstrategy.md - - docs/models/shared/partitionparametersstrategy.md - docs/models/shared/postgresdestinationconnectorconfig.md - docs/models/shared/postgresdestinationconnectorconfiginput.md + - docs/models/shared/postgressourceconnectorconfig.md + - docs/models/shared/postgressourceconnectorconfiginput.md - docs/models/shared/qdrantclouddestinationconnectorconfig.md - docs/models/shared/qdrantclouddestinationconnectorconfiginput.md - docs/models/shared/redisdestinationconnectorconfig.md @@ -178,6 +188,8 @@ generatedFiles: - docs/models/shared/updateworkflow.md - docs/models/shared/updateworkflowschedule.md - docs/models/shared/validationerror.md + - docs/models/shared/vlmmodel.md + - docs/models/shared/vlmmodelprovider.md - docs/models/shared/weaviatedestinationconnectorconfig.md - docs/models/shared/weaviatedestinationconnectorconfiginput.md - docs/models/shared/workflowinformation.md @@ -221,6 +233,7 @@ generatedFiles: - src/unstructured_client/models/operations/delete_destination.py - src/unstructured_client/models/operations/delete_source.py - src/unstructured_client/models/operations/delete_workflow.py + - src/unstructured_client/models/operations/download_playground_job.py - src/unstructured_client/models/operations/get_destination.py - src/unstructured_client/models/operations/get_job.py - src/unstructured_client/models/operations/get_source.py @@ -241,6 +254,7 @@ generatedFiles: - src/unstructured_client/models/shared/azureaisearchconnectorconfiginput.py - src/unstructured_client/models/shared/azuresourceconnectorconfig.py - src/unstructured_client/models/shared/azuresourceconnectorconfiginput.py + - src/unstructured_client/models/shared/body_run_workflow.py - src/unstructured_client/models/shared/boxsourceconnectorconfig.py - src/unstructured_client/models/shared/boxsourceconnectorconfiginput.py - src/unstructured_client/models/shared/confluencesourceconnectorconfig.py @@ -252,7 +266,10 @@ generatedFiles: - src/unstructured_client/models/shared/createdestinationconnector.py - src/unstructured_client/models/shared/createsourceconnector.py - src/unstructured_client/models/shared/createworkflow.py + - src/unstructured_client/models/shared/createworkflownode.py - src/unstructured_client/models/shared/crontabentry.py + - src/unstructured_client/models/shared/databricks_volumessourceconnectorconfig.py + - src/unstructured_client/models/shared/databricks_volumessourceconnectorconfiginput.py - src/unstructured_client/models/shared/databricksvdtdestinationconnectorconfig.py - src/unstructured_client/models/shared/databricksvdtdestinationconnectorconfiginput.py - src/unstructured_client/models/shared/databricksvolumesconnectorconfig.py @@ -265,24 +282,27 @@ generatedFiles: - src/unstructured_client/models/shared/dropboxsourceconnectorconfiginput.py - src/unstructured_client/models/shared/elasticsearchconnectorconfig.py - src/unstructured_client/models/shared/elasticsearchconnectorconfiginput.py + - src/unstructured_client/models/shared/elasticsearchsourceconnectorconfig.py + - src/unstructured_client/models/shared/elasticsearchsourceconnectorconfiginput.py - src/unstructured_client/models/shared/gcsdestinationconnectorconfig.py - src/unstructured_client/models/shared/gcsdestinationconnectorconfiginput.py - src/unstructured_client/models/shared/gcssourceconnectorconfig.py - src/unstructured_client/models/shared/gcssourceconnectorconfiginput.py - - src/unstructured_client/models/shared/googledrivesourceconnectorconfig.py - - src/unstructured_client/models/shared/googledrivesourceconnectorconfiginput.py + - src/unstructured_client/models/shared/google_drivesourceconnectorconfig.py + - src/unstructured_client/models/shared/google_drivesourceconnectorconfiginput.py - src/unstructured_client/models/shared/jobinformation.py - src/unstructured_client/models/shared/jobstatus.py - - src/unstructured_client/models/shared/kafkaclouddestinationconnectorconfig.py - - src/unstructured_client/models/shared/kafkaclouddestinationconnectorconfiginput.py - - src/unstructured_client/models/shared/kafkacloudsourceconnectorconfig.py - - src/unstructured_client/models/shared/kafkacloudsourceconnectorconfiginput.py + - src/unstructured_client/models/shared/kafka_cloudsourceconnectorconfig.py + - src/unstructured_client/models/shared/kafka_cloudsourceconnectorconfiginput.py - src/unstructured_client/models/shared/milvusdestinationconnectorconfig.py - src/unstructured_client/models/shared/milvusdestinationconnectorconfiginput.py - src/unstructured_client/models/shared/mongodbconnectorconfig.py - src/unstructured_client/models/shared/mongodbconnectorconfiginput.py + - src/unstructured_client/models/shared/mongodbsourceconnectorconfig.py + - src/unstructured_client/models/shared/mongodbsourceconnectorconfiginput.py - src/unstructured_client/models/shared/neo4jdestinationconnectorconfig.py - src/unstructured_client/models/shared/neo4jdestinationconnectorconfiginput.py + - src/unstructured_client/models/shared/nodefilemetadata.py - src/unstructured_client/models/shared/onedrivedestinationconnectorconfig.py - src/unstructured_client/models/shared/onedrivedestinationconnectorconfiginput.py - src/unstructured_client/models/shared/onedrivesourceconnectorconfig.py @@ -292,6 +312,8 @@ generatedFiles: - src/unstructured_client/models/shared/partition_parameters.py - src/unstructured_client/models/shared/postgresdestinationconnectorconfig.py - src/unstructured_client/models/shared/postgresdestinationconnectorconfiginput.py + - src/unstructured_client/models/shared/postgressourceconnectorconfig.py + - src/unstructured_client/models/shared/postgressourceconnectorconfiginput.py - src/unstructured_client/models/shared/qdrantclouddestinationconnectorconfig.py - src/unstructured_client/models/shared/qdrantclouddestinationconnectorconfiginput.py - src/unstructured_client/models/shared/redisdestinationconnectorconfig.py @@ -483,9 +505,9 @@ examples: application/json: {"destination_id": "b5baba90-bc88-4ea4-b45f-e894788e3f38", "name": "", "schedule": "every 15 minutes", "source_id": "efa06124-dfe1-41e8-94dd-7cfa1e3fe9ec", "workflow_type": "platinum"} responses: "200": - application/json: {"created_at": "2025-06-03T14:40:43.213Z", "destinations": ["7a3141b6-19c5-4d0d-aa5f-5edb0b22f19c", "e4d2c1c2-a0f5-404c-b37f-b0f07c5417c9"], "id": "2569dec8-72ff-4e46-b78b-ffe279bdaafc", "name": "", "schedule": {"crontab_entries": [{"cron_expression": "0 0 * * *"}]}, "sources": ["47b1728b-a663-4345-8bae-a1ae67a567f1"], "status": "active", "workflow_nodes": [{"name": "", "subtype": "", "type": "prompter"}, {"name": "", "subtype": "", "type": "chunk"}], "workflow_type": "advanced"} + application/json: {"created_at": "2025-06-03T14:40:43.213Z", "destinations": ["7a3141b6-19c5-4d0d-aa5f-5edb0b22f19c", "e4d2c1c2-a0f5-404c-b37f-b0f07c5417c9"], "id": "2569dec8-72ff-4e46-b78b-ffe279bdaafc", "name": "", "schedule": {"crontab_entries": [{"cron_expression": "0 0 * * *"}]}, "sources": ["47b1728b-a663-4345-8bae-a1ae67a567f1"], "status": "active", "workflow_nodes": [{"id": "b5baba90-bc88-4ea4-b45f-e894788e3f38", "name": "", "subtype": "", "type": "prompter"}, {"id": "0efa0612-4dfe-411e-b84d-d7cfa1e3fe9e", "name": "", "subtype": "", "type": "chunk"}], "workflow_type": "advanced"} "422": - application/json: {"detail": ""} + application/json: {"detail": [{"loc": [465265, 204573, ""], "msg": "", "type": ""}, {"loc": [""], "msg": "", "type": ""}]} delete_workflow: speakeasy-default-delete-workflow: parameters: @@ -512,9 +534,9 @@ examples: speakeasy-default-list-workflows: responses: "200": - application/json: [{"created_at": "2025-06-22T11:37:21.648Z", "destinations": ["aeebecc7-9d8e-4625-bf1d-815c2f084869", "01866db9-54f2-4be7-93c3-062b8107d001", "fcdc4994-eea5-425c-91fa-e03f2bd8030d"], "id": "16b80fee-64dc-472d-8f26-1d7729b6423d", "name": "", "schedule": {"crontab_entries": [{"cron_expression": "0 0 * * *"}]}, "sources": [], "status": "active", "workflow_nodes": [{"name": "", "subtype": "", "type": "embed"}], "workflow_type": "advanced"}] + application/json: [{"created_at": "2025-06-22T11:37:21.648Z", "destinations": ["aeebecc7-9d8e-4625-bf1d-815c2f084869", "01866db9-54f2-4be7-93c3-062b8107d001", "fcdc4994-eea5-425c-91fa-e03f2bd8030d"], "id": "16b80fee-64dc-472d-8f26-1d7729b6423d", "name": "", "schedule": {"crontab_entries": [{"cron_expression": "0 0 * * *"}]}, "sources": [], "status": "active", "workflow_nodes": [{"id": "4dfaeebe-cc79-4d8e-a625-f1d815c2f084", "name": "", "subtype": "", "type": "embed"}], "workflow_type": "advanced"}] "422": - application/json: {"detail": [{"loc": [931730, 730320, 769892], "msg": "", "type": ""}, {"loc": ["", 862351, 882715], "msg": "", "type": ""}, {"loc": [""], "msg": "", "type": ""}]} + application/json: {"detail": [{"loc": ["", "", 392481], "msg": "", "type": ""}, {"loc": [701047], "msg": "", "type": ""}]} run_workflow: speakeasy-default-run-workflow: parameters: @@ -525,7 +547,7 @@ examples: "202": application/json: {"created_at": "2024-08-04T10:06:22.481Z", "id": "6c4f327c-7ca2-4933-a68d-2ebe9d9f1445", "runtime": "", "status": "COMPLETED", "workflow_id": "b67be6d9-8e94-40c8-afd7-21e5d2d00363", "workflow_name": ""} "422": - application/json: {"detail": [{"loc": ["", 233068, ""], "msg": "", "type": ""}]} + application/json: {"detail": [{"loc": [""], "msg": "", "type": ""}, {"loc": [397022, 604524], "msg": "", "type": ""}]} update_workflow: speakeasy-default-update-workflow: parameters: @@ -536,7 +558,7 @@ examples: application/json: {} responses: "200": - application/json: {"created_at": "2024-02-01T21:33:30.305Z", "destinations": [], "id": "4348c683-9378-4211-a7a6-ea9307f1cbb9", "name": "", "schedule": {"crontab_entries": [{"cron_expression": "0 0 * * *"}]}, "sources": ["179309ff-51c8-4023-9475-af5f2a03511d"], "status": "active", "workflow_nodes": [{"name": "", "subtype": "", "type": "prompter"}, {"name": "", "subtype": "", "type": "partition"}], "workflow_type": "platinum"} + application/json: {"created_at": "2024-02-01T21:33:30.305Z", "destinations": [], "id": "4348c683-9378-4211-a7a6-ea9307f1cbb9", "name": "", "schedule": {"crontab_entries": [{"cron_expression": "0 0 * * *"}]}, "sources": ["179309ff-51c8-4023-9475-af5f2a03511d"], "status": "active", "workflow_nodes": [{"id": "b63b90df-08ba-41e1-b15b-bc744e5781fa", "name": "", "subtype": "", "type": "prompter"}, {"id": "524348c6-8393-4782-a117-a6ea9307f1cb", "name": "", "subtype": "", "type": "partition"}], "workflow_type": "platinum"} "422": application/json: {"detail": ""} partition: @@ -551,5 +573,18 @@ examples: application/json: {"detail": []} 5XX: application/json: {"detail": "An error occurred"} + download_playground_job: + speakeasy-default-download-playground-job: + parameters: + path: + job_id: "844a9b13-d032-43c7-8e81-b20a874c4c79" + query: + file_id: "" + header: {} + responses: + "200": + application/json: "" + "422": + application/json: {"detail": ""} examplesVersion: 1.0.0 generatedTests: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 33cc4d41..a8fda4d1 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.513.0 +speakeasyVersion: 1.521.0 sources: my-source: sourceNamespace: my-source - sourceRevisionDigest: sha256:284396f88ac6b8f00fc6b64e117310094af9403c775d96d0273f2dc91e20a99d - sourceBlobDigest: sha256:eeff76b4ac663079622a4957d5023f06ca2a8ad423075a125478ad3b57aeb4ef + sourceRevisionDigest: sha256:4f35a2c57bcd3c591ef9d161f5e34d317ff8a06e9e9591f2e2004f13e5c63cbb + sourceBlobDigest: sha256:7f47ca310de4d401a93083208819c79bfba2a77519e7bfcd34d825bbcbb8da60 tags: - latest - - speakeasy-sdk-regen-1741292249 - - 1.0.78 + - speakeasy-sdk-regen-1741651804 + - 1.0.81 targets: unstructured-python: source: my-source sourceNamespace: my-source - sourceRevisionDigest: sha256:284396f88ac6b8f00fc6b64e117310094af9403c775d96d0273f2dc91e20a99d - sourceBlobDigest: sha256:eeff76b4ac663079622a4957d5023f06ca2a8ad423075a125478ad3b57aeb4ef + sourceRevisionDigest: sha256:4f35a2c57bcd3c591ef9d161f5e34d317ff8a06e9e9591f2e2004f13e5c63cbb + sourceBlobDigest: sha256:7f47ca310de4d401a93083208819c79bfba2a77519e7bfcd34d825bbcbb8da60 codeSamplesNamespace: my-source-code-samples - codeSamplesRevisionDigest: sha256:19241c5759df66896762918163ed4cbb6be089a165082e64717f088fb50320c1 + codeSamplesRevisionDigest: sha256:e8f8184199d659db4bcbdd1e0c8e6ab5133ad869812c76a407038b79e07d7438 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index fc482dbb..1611831b 100755 --- a/README.md +++ b/README.md @@ -469,8 +469,8 @@ with UnstructuredClient() as uc_client: 1, 10, ], - "vlm_model": shared.PartitionParametersStrategy.GPT_4O, - "vlm_model_provider": shared.PartitionParametersSchemasStrategy.OPENAI, + "vlm_model": shared.VLMModel.GPT_4O, + "vlm_model_provider": shared.VLMModelProvider.OPENAI, }, }) diff --git a/RELEASES.md b/RELEASES.md index 7c4de2aa..5c57e6dc 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -855,4 +855,14 @@ Based on: ### Generated - [python v0.31.1] . ### Releases -- [PyPI v0.31.1] https://pypi.org/project/unstructured-client/0.31.1 - . \ No newline at end of file +- [PyPI v0.31.1] https://pypi.org/project/unstructured-client/0.31.1 - . + +## 2025-03-20 00:09:37 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.521.0 (2.558.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.31.2] . +### Releases +- [PyPI v0.31.2] https://pypi.org/project/unstructured-client/0.31.2 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 613403d4..44565f54 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -51,6 +51,12 @@ actions: - "lang": "python" "label": "cancel_job" "source": "from unstructured_client import UnstructuredClient\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.jobs.cancel_job(request={\n \"job_id\": \"ec29bf67-0f30-4793-b5ee-8fc0da196032\",\n })\n\n assert res.any is not None\n\n # Handle response\n print(res.any)" + - target: $["paths"]["/api/v1/jobs/{job_id}/download"]["get"] + update: + "x-codeSamples": + - "lang": "python" + "label": "download_playground_job" + "source": "from unstructured_client import UnstructuredClient\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.jobs.download_playground_job(request={\n \"job_id\": \"844a9b13-d032-43c7-8e81-b20a874c4c79\",\n \"file_id\": \"\",\n })\n\n assert res.any is not None\n\n # Handle response\n print(res.any)" - target: $["paths"]["/api/v1/sources/"]["get"] update: "x-codeSamples": @@ -62,7 +68,7 @@ actions: "x-codeSamples": - "lang": "python" "label": "create_source" - "source": "from unstructured_client import UnstructuredClient\nfrom unstructured_client.models import shared\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.sources.create_source(request={\n \"create_source_connector\": {\n \"name\": \"\",\n \"type\": shared.SourceConnectorType.S3,\n \"config\": {\n \"username\": \"Eldora_Casper\",\n \"consumer_key\": \"\",\n \"private_key\": \"\",\n \"categories\": [\n \"\",\n ],\n },\n },\n })\n\n assert res.source_connector_information is not None\n\n # Handle response\n print(res.source_connector_information)" + "source": "from unstructured_client import UnstructuredClient\nfrom unstructured_client.models import shared\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.sources.create_source(request={\n \"create_source_connector\": {\n \"name\": \"\",\n \"type\": shared.SourceConnectorType.S3,\n \"config\": {\n \"username\": \"Eldora_Casper\",\n \"password\": \"I5xeRKAX3jUtlnj\",\n \"security_token\": \"\",\n },\n },\n })\n\n assert res.source_connector_information is not None\n\n # Handle response\n print(res.source_connector_information)" - target: $["paths"]["/api/v1/sources/{source_id}"]["delete"] update: "x-codeSamples": @@ -80,7 +86,7 @@ actions: "x-codeSamples": - "lang": "python" "label": "update_source" - "source": "from unstructured_client import UnstructuredClient\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.sources.update_source(request={\n \"source_id\": \"7d031737-4969-4d2e-ae5d-8e2396edec43\",\n \"update_source_connector\": {\n \"config\": {\n \"client_id\": \"\",\n \"tenant\": \"\",\n \"authority_url\": \"https://pleasing-hammock.org/\",\n \"user_pname\": \"\",\n \"client_cred\": \"\",\n \"recursive\": False,\n \"path\": \"/etc/namedb\",\n },\n },\n })\n\n assert res.source_connector_information is not None\n\n # Handle response\n print(res.source_connector_information)" + "source": "from unstructured_client import UnstructuredClient\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.sources.update_source(request={\n \"source_id\": \"196d27d0-3173-4749-b69d-2ee5d8e2396e\",\n \"update_source_connector\": {\n \"config\": {\n \"client_id\": \"\",\n \"client_cred\": \"\",\n \"recursive\": False,\n \"user_email\": \"\",\n },\n },\n })\n\n assert res.source_connector_information is not None\n\n # Handle response\n print(res.source_connector_information)" - target: $["paths"]["/api/v1/workflows/"]["get"] update: "x-codeSamples": @@ -92,7 +98,7 @@ actions: "x-codeSamples": - "lang": "python" "label": "create_workflow" - "source": "from unstructured_client import UnstructuredClient\nfrom unstructured_client.models import shared\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.workflows.create_workflow(request={\n \"create_workflow\": {\n \"name\": \"\",\n \"source_id\": \"b5baba90-bc88-4ea4-b45f-e894788e3f38\",\n \"destination_id\": \"0efa0612-4dfe-411e-b84d-d7cfa1e3fe9e\",\n \"workflow_type\": shared.WorkflowType.ADVANCED,\n },\n })\n\n assert res.workflow_information is not None\n\n # Handle response\n print(res.workflow_information)" + "source": "from unstructured_client import UnstructuredClient\nfrom unstructured_client.models import shared\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.workflows.create_workflow(request={\n \"create_workflow\": {\n \"name\": \"\",\n \"workflow_type\": shared.WorkflowType.PLATINUM,\n },\n })\n\n assert res.workflow_information is not None\n\n # Handle response\n print(res.workflow_information)" - target: $["paths"]["/api/v1/workflows/{workflow_id}"]["delete"] update: "x-codeSamples": @@ -122,4 +128,4 @@ actions: "x-codeSamples": - "lang": "python" "label": "partition" - "source": "from unstructured_client import UnstructuredClient\nfrom unstructured_client.models import shared\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.general.partition(request={\n \"partition_parameters\": {\n \"files\": {\n \"file_name\": \"example.file\",\n \"content\": open(\"example.file\", \"rb\"),\n },\n \"vlm_model_provider\": shared.PartitionParametersStrategy.OPENAI,\n \"vlm_model\": shared.PartitionParametersSchemasStrategy.GPT_4O,\n \"split_pdf_page_range\": [\n 1,\n 10,\n ],\n },\n })\n\n assert res.elements is not None\n\n # Handle response\n print(res.elements)" + "source": "from unstructured_client import UnstructuredClient\nfrom unstructured_client.models import shared\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.general.partition(request={\n \"partition_parameters\": {\n \"files\": {\n \"file_name\": \"example.file\",\n \"content\": open(\"example.file\", \"rb\"),\n },\n \"vlm_model_provider\": shared.VLMModelProvider.OPENAI,\n \"vlm_model\": shared.VLMModel.GPT_4O,\n \"split_pdf_page_range\": [\n 1,\n 10,\n ],\n },\n })\n\n assert res.elements is not None\n\n # Handle response\n print(res.elements)" diff --git a/docs/models/operations/downloadplaygroundjobrequest.md b/docs/models/operations/downloadplaygroundjobrequest.md new file mode 100644 index 00000000..bc132c9d --- /dev/null +++ b/docs/models/operations/downloadplaygroundjobrequest.md @@ -0,0 +1,11 @@ +# DownloadPlaygroundJobRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `file_id` | *str* | :heavy_check_mark: | ID of the file to download | +| `job_id` | *str* | :heavy_check_mark: | N/A | +| `node_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Node ID to view per node output of the file | +| `unstructured_api_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/downloadplaygroundjobresponse.md b/docs/models/operations/downloadplaygroundjobresponse.md new file mode 100644 index 00000000..58982e13 --- /dev/null +++ b/docs/models/operations/downloadplaygroundjobresponse.md @@ -0,0 +1,11 @@ +# DownloadPlaygroundJobResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `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` | [httpx.Response](https://www.python-httpx.org/api/#response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *Optional[Any]* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/runworkflowrequest.md b/docs/models/operations/runworkflowrequest.md index 474a2e5b..616bcefb 100644 --- a/docs/models/operations/runworkflowrequest.md +++ b/docs/models/operations/runworkflowrequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `workflow_id` | *str* | :heavy_check_mark: | N/A | -| `unstructured_api_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `workflow_id` | *str* | :heavy_check_mark: | N/A | +| `body_run_workflow` | [Optional[shared.BodyRunWorkflow]](../../models/shared/bodyrunworkflow.md) | :heavy_minus_sign: | N/A | +| `unstructured_api_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/bodyrunworkflow.md b/docs/models/shared/bodyrunworkflow.md new file mode 100644 index 00000000..a74be94e --- /dev/null +++ b/docs/models/shared/bodyrunworkflow.md @@ -0,0 +1,8 @@ +# BodyRunWorkflow + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `input_files` | List[[shared.InputFiles](../../models/shared/inputfiles.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/config.md b/docs/models/shared/config.md index 1b131fc7..bb19f30d 100644 --- a/docs/models/shared/config.md +++ b/docs/models/shared/config.md @@ -51,12 +51,6 @@ value: shared.ElasticsearchConnectorConfigInput = /* values here */ value: shared.GCSDestinationConnectorConfigInput = /* values here */ ``` -### `shared.KafkaCloudDestinationConnectorConfigInput` - -```python -value: shared.KafkaCloudDestinationConnectorConfigInput = /* values here */ -``` - ### `shared.MilvusDestinationConnectorConfigInput` ```python diff --git a/docs/models/shared/confluencesourceconnectorconfig.md b/docs/models/shared/confluencesourceconnectorconfig.md index da78a529..5f9c5aa6 100644 --- a/docs/models/shared/confluencesourceconnectorconfig.md +++ b/docs/models/shared/confluencesourceconnectorconfig.md @@ -8,8 +8,8 @@ | `cloud` | *bool* | :heavy_check_mark: | N/A | | `max_num_of_docs_from_each_space` | *int* | :heavy_check_mark: | N/A | | `max_num_of_spaces` | *int* | :heavy_check_mark: | N/A | -| `spaces` | *Nullable[str]* | :heavy_check_mark: | N/A | | `url` | *str* | :heavy_check_mark: | N/A | | `username` | *str* | :heavy_check_mark: | N/A | | `password` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `spaces` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `token` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/couchbasesourceconnectorconfiginput.md b/docs/models/shared/couchbasesourceconnectorconfiginput.md index 93097cce..d91f414c 100644 --- a/docs/models/shared/couchbasesourceconnectorconfiginput.md +++ b/docs/models/shared/couchbasesourceconnectorconfiginput.md @@ -5,11 +5,11 @@ | Field | Type | Required | Description | | ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `batch_size` | *int* | :heavy_check_mark: | N/A | | `bucket` | *str* | :heavy_check_mark: | N/A | | `collection_id` | *str* | :heavy_check_mark: | N/A | | `connection_string` | *str* | :heavy_check_mark: | N/A | | `password` | *str* | :heavy_check_mark: | N/A | | `username` | *str* | :heavy_check_mark: | N/A | +| `batch_size` | *Optional[int]* | :heavy_minus_sign: | N/A | | `collection` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `scope` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createsourceconnectorconfig.md b/docs/models/shared/createsourceconnectorconfig.md index 3d302e5c..5317d13f 100644 --- a/docs/models/shared/createsourceconnectorconfig.md +++ b/docs/models/shared/createsourceconnectorconfig.md @@ -27,10 +27,10 @@ value: shared.ConfluenceSourceConnectorConfigInput = /* values here */ value: shared.CouchbaseSourceConnectorConfigInput = /* values here */ ``` -### `shared.DatabricksVolumesConnectorConfigInput` +### `shared.DatabricksVolumesSourceConnectorConfigInput` ```python -value: shared.DatabricksVolumesConnectorConfigInput = /* values here */ +value: shared.DatabricksVolumesSourceConnectorConfigInput = /* values here */ ``` ### `shared.DropboxSourceConnectorConfigInput` @@ -39,16 +39,16 @@ value: shared.DatabricksVolumesConnectorConfigInput = /* values here */ value: shared.DropboxSourceConnectorConfigInput = /* values here */ ``` -### `shared.ElasticsearchConnectorConfigInput` +### `shared.ElasticsearchSourceConnectorConfigInput` ```python -value: shared.ElasticsearchConnectorConfigInput = /* values here */ +value: shared.ElasticsearchSourceConnectorConfigInput = /* values here */ ``` -### `shared.GCSSourceConnectorConfigInput` +### `shared.GcsSourceConnectorConfigInput` ```python -value: shared.GCSSourceConnectorConfigInput = /* values here */ +value: shared.GcsSourceConnectorConfigInput = /* values here */ ``` ### `shared.GoogleDriveSourceConnectorConfigInput` @@ -63,16 +63,16 @@ value: shared.GoogleDriveSourceConnectorConfigInput = /* values here */ value: shared.KafkaCloudSourceConnectorConfigInput = /* values here */ ``` -### `shared.MongoDBConnectorConfigInput` +### `shared.MongodbSourceConnectorConfigInput` ```python -value: shared.MongoDBConnectorConfigInput = /* values here */ +value: shared.MongodbSourceConnectorConfigInput = /* values here */ ``` -### `shared.OneDriveSourceConnectorConfigInput` +### `shared.OnedriveSourceConnectorConfigInput` ```python -value: shared.OneDriveSourceConnectorConfigInput = /* values here */ +value: shared.OnedriveSourceConnectorConfigInput = /* values here */ ``` ### `shared.OutlookSourceConnectorConfigInput` @@ -81,6 +81,12 @@ value: shared.OneDriveSourceConnectorConfigInput = /* values here */ value: shared.OutlookSourceConnectorConfigInput = /* values here */ ``` +### `shared.PostgresSourceConnectorConfigInput` + +```python +value: shared.PostgresSourceConnectorConfigInput = /* values here */ +``` + ### `shared.S3SourceConnectorConfigInput` ```python @@ -93,10 +99,10 @@ value: shared.S3SourceConnectorConfigInput = /* values here */ value: shared.SalesforceSourceConnectorConfigInput = /* values here */ ``` -### `shared.SharePointSourceConnectorConfigInput` +### `shared.SharepointSourceConnectorConfigInput` ```python -value: shared.SharePointSourceConnectorConfigInput = /* values here */ +value: shared.SharepointSourceConnectorConfigInput = /* values here */ ``` ### `shared.SnowflakeSourceConnectorConfigInput` diff --git a/docs/models/shared/createworkflow.md b/docs/models/shared/createworkflow.md index 3682d997..28c610fe 100644 --- a/docs/models/shared/createworkflow.md +++ b/docs/models/shared/createworkflow.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `destination_id` | *str* | :heavy_check_mark: | N/A | -| `name` | *str* | :heavy_check_mark: | N/A | -| `source_id` | *str* | :heavy_check_mark: | N/A | -| `workflow_type` | [shared.WorkflowType](../../models/shared/workflowtype.md) | :heavy_check_mark: | N/A | -| `schedule` | [OptionalNullable[shared.Schedule]](../../models/shared/schedule.md) | :heavy_minus_sign: | N/A | -| `workflow_nodes` | List[[shared.WorkflowNode](../../models/shared/workflownode.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `workflow_type` | [shared.WorkflowType](../../models/shared/workflowtype.md) | :heavy_check_mark: | N/A | +| `destination_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `schedule` | [OptionalNullable[shared.Schedule]](../../models/shared/schedule.md) | :heavy_minus_sign: | N/A | +| `source_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `workflow_nodes` | List[[shared.CreateWorkflowNode](../../models/shared/createworkflownode.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createworkflownode.md b/docs/models/shared/createworkflownode.md new file mode 100644 index 00000000..c13e5d1e --- /dev/null +++ b/docs/models/shared/createworkflownode.md @@ -0,0 +1,11 @@ +# CreateWorkflowNode + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | +| `subtype` | *str* | :heavy_check_mark: | N/A | +| `type` | [shared.WorkflowNodeType](../../models/shared/workflownodetype.md) | :heavy_check_mark: | N/A | +| `settings` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/databricksvolumessourceconnectorconfig.md b/docs/models/shared/databricksvolumessourceconnectorconfig.md new file mode 100644 index 00000000..18aad2f6 --- /dev/null +++ b/docs/models/shared/databricksvolumessourceconnectorconfig.md @@ -0,0 +1,14 @@ +# DatabricksVolumesSourceConnectorConfig + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `catalog` | *str* | :heavy_check_mark: | N/A | +| `client_id` | *str* | :heavy_check_mark: | N/A | +| `client_secret` | *str* | :heavy_check_mark: | N/A | +| `host` | *str* | :heavy_check_mark: | N/A | +| `schema_name` | *str* | :heavy_check_mark: | N/A | +| `volume` | *str* | :heavy_check_mark: | N/A | +| `volume_path` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/databricksvolumessourceconnectorconfiginput.md b/docs/models/shared/databricksvolumessourceconnectorconfiginput.md new file mode 100644 index 00000000..a6c42f87 --- /dev/null +++ b/docs/models/shared/databricksvolumessourceconnectorconfiginput.md @@ -0,0 +1,14 @@ +# DatabricksVolumesSourceConnectorConfigInput + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `catalog` | *str* | :heavy_check_mark: | N/A | +| `client_id` | *str* | :heavy_check_mark: | N/A | +| `client_secret` | *str* | :heavy_check_mark: | N/A | +| `host` | *str* | :heavy_check_mark: | N/A | +| `schema_name` | *str* | :heavy_check_mark: | N/A | +| `volume` | *str* | :heavy_check_mark: | N/A | +| `volume_path` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/destinationconnectorinformationconfig.md b/docs/models/shared/destinationconnectorinformationconfig.md index 4e3e2769..1dbc7862 100644 --- a/docs/models/shared/destinationconnectorinformationconfig.md +++ b/docs/models/shared/destinationconnectorinformationconfig.md @@ -51,12 +51,6 @@ value: shared.ElasticsearchConnectorConfig = /* values here */ value: shared.GCSDestinationConnectorConfig = /* values here */ ``` -### `shared.KafkaCloudDestinationConnectorConfig` - -```python -value: shared.KafkaCloudDestinationConnectorConfig = /* values here */ -``` - ### `shared.MilvusDestinationConnectorConfig` ```python diff --git a/docs/models/shared/destinationconnectortype.md b/docs/models/shared/destinationconnectortype.md index 57c24960..f015c075 100644 --- a/docs/models/shared/destinationconnectortype.md +++ b/docs/models/shared/destinationconnectortype.md @@ -13,7 +13,6 @@ | `DELTA_TABLE` | delta_table | | `ELASTICSEARCH` | elasticsearch | | `GCS` | gcs | -| `KAFKA_CLOUD` | kafka-cloud | | `MILVUS` | milvus | | `MONGODB` | mongodb | | `MOTHERDUCK` | motherduck | diff --git a/docs/models/shared/elasticsearchsourceconnectorconfig.md b/docs/models/shared/elasticsearchsourceconnectorconfig.md new file mode 100644 index 00000000..a5e27991 --- /dev/null +++ b/docs/models/shared/elasticsearchsourceconnectorconfig.md @@ -0,0 +1,10 @@ +# ElasticsearchSourceConnectorConfig + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `es_api_key` | *str* | :heavy_check_mark: | N/A | +| `hosts` | *str* | :heavy_check_mark: | N/A | +| `index_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/elasticsearchsourceconnectorconfiginput.md b/docs/models/shared/elasticsearchsourceconnectorconfiginput.md new file mode 100644 index 00000000..cf9e74a2 --- /dev/null +++ b/docs/models/shared/elasticsearchsourceconnectorconfiginput.md @@ -0,0 +1,10 @@ +# ElasticsearchSourceConnectorConfigInput + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `es_api_key` | *str* | :heavy_check_mark: | N/A | +| `hosts` | *str* | :heavy_check_mark: | N/A | +| `index_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/gcssourceconnectorconfig.md b/docs/models/shared/gcssourceconnectorconfig.md index 5c11f529..b7a0df90 100644 --- a/docs/models/shared/gcssourceconnectorconfig.md +++ b/docs/models/shared/gcssourceconnectorconfig.md @@ -1,10 +1,9 @@ -# GCSSourceConnectorConfig +# GcsSourceConnectorConfig ## Fields | Field | Type | Required | Description | | --------------------- | --------------------- | --------------------- | --------------------- | -| `recursive` | *bool* | :heavy_check_mark: | N/A | | `remote_url` | *str* | :heavy_check_mark: | N/A | | `service_account_key` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/gcssourceconnectorconfiginput.md b/docs/models/shared/gcssourceconnectorconfiginput.md index bebee772..8c298d23 100644 --- a/docs/models/shared/gcssourceconnectorconfiginput.md +++ b/docs/models/shared/gcssourceconnectorconfiginput.md @@ -1,4 +1,4 @@ -# GCSSourceConnectorConfigInput +# GcsSourceConnectorConfigInput ## Fields @@ -6,5 +6,4 @@ | Field | Type | Required | Description | | --------------------- | --------------------- | --------------------- | --------------------- | | `remote_url` | *str* | :heavy_check_mark: | N/A | -| `service_account_key` | *str* | :heavy_check_mark: | N/A | -| `recursive` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `service_account_key` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/inputfiles.md b/docs/models/shared/inputfiles.md new file mode 100644 index 00000000..5c2764f1 --- /dev/null +++ b/docs/models/shared/inputfiles.md @@ -0,0 +1,10 @@ +# InputFiles + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `content` | *Union[bytes, IO[bytes], io.BufferedReader]* | :heavy_check_mark: | N/A | +| `file_name` | *str* | :heavy_check_mark: | N/A | +| `content_type` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/jobinformation.md b/docs/models/shared/jobinformation.md index c84325f7..955a7737 100644 --- a/docs/models/shared/jobinformation.md +++ b/docs/models/shared/jobinformation.md @@ -3,11 +3,13 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `id` | *str* | :heavy_check_mark: | N/A | -| `runtime` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `status` | [shared.JobStatus](../../models/shared/jobstatus.md) | :heavy_check_mark: | N/A | -| `workflow_id` | *str* | :heavy_check_mark: | N/A | -| `workflow_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `id` | *str* | :heavy_check_mark: | N/A | +| `status` | [shared.JobStatus](../../models/shared/jobstatus.md) | :heavy_check_mark: | N/A | +| `workflow_id` | *str* | :heavy_check_mark: | N/A | +| `workflow_name` | *str* | :heavy_check_mark: | N/A | +| `input_file_ids` | List[*str*] | :heavy_minus_sign: | N/A | +| `output_node_files` | List[[shared.NodeFileMetadata](../../models/shared/nodefilemetadata.md)] | :heavy_minus_sign: | N/A | +| `runtime` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/kafkaclouddestinationconnectorconfig.md b/docs/models/shared/kafkaclouddestinationconnectorconfig.md deleted file mode 100644 index d0539c77..00000000 --- a/docs/models/shared/kafkaclouddestinationconnectorconfig.md +++ /dev/null @@ -1,14 +0,0 @@ -# KafkaCloudDestinationConnectorConfig - - -## Fields - -| Field | Type | Required | Description | -| ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `batch_size` | *int* | :heavy_check_mark: | N/A | -| `bootstrap_servers` | *str* | :heavy_check_mark: | N/A | -| `kafka_api_key` | *str* | :heavy_check_mark: | N/A | -| `port` | *int* | :heavy_check_mark: | N/A | -| `secret` | *str* | :heavy_check_mark: | N/A | -| `topic` | *str* | :heavy_check_mark: | N/A | -| `group_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/kafkaclouddestinationconnectorconfiginput.md b/docs/models/shared/kafkaclouddestinationconnectorconfiginput.md deleted file mode 100644 index 28a88ee7..00000000 --- a/docs/models/shared/kafkaclouddestinationconnectorconfiginput.md +++ /dev/null @@ -1,14 +0,0 @@ -# KafkaCloudDestinationConnectorConfigInput - - -## Fields - -| Field | Type | Required | Description | -| ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `bootstrap_servers` | *str* | :heavy_check_mark: | N/A | -| `kafka_api_key` | *str* | :heavy_check_mark: | N/A | -| `secret` | *str* | :heavy_check_mark: | N/A | -| `topic` | *str* | :heavy_check_mark: | N/A | -| `batch_size` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `group_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `port` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/mongodbsourceconnectorconfig.md b/docs/models/shared/mongodbsourceconnectorconfig.md new file mode 100644 index 00000000..f15690b5 --- /dev/null +++ b/docs/models/shared/mongodbsourceconnectorconfig.md @@ -0,0 +1,10 @@ +# MongodbSourceConnectorConfig + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `collection` | *str* | :heavy_check_mark: | N/A | +| `database` | *str* | :heavy_check_mark: | N/A | +| `uri` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/mongodbsourceconnectorconfiginput.md b/docs/models/shared/mongodbsourceconnectorconfiginput.md new file mode 100644 index 00000000..4cb31295 --- /dev/null +++ b/docs/models/shared/mongodbsourceconnectorconfiginput.md @@ -0,0 +1,10 @@ +# MongodbSourceConnectorConfigInput + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `collection` | *str* | :heavy_check_mark: | N/A | +| `database` | *str* | :heavy_check_mark: | N/A | +| `uri` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/nodefilemetadata.md b/docs/models/shared/nodefilemetadata.md new file mode 100644 index 00000000..3f703c2b --- /dev/null +++ b/docs/models/shared/nodefilemetadata.md @@ -0,0 +1,9 @@ +# NodeFileMetadata + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `file_id` | *str* | :heavy_check_mark: | N/A | +| `node_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/onedrivesourceconnectorconfig.md b/docs/models/shared/onedrivesourceconnectorconfig.md index 125b6e10..718b0586 100644 --- a/docs/models/shared/onedrivesourceconnectorconfig.md +++ b/docs/models/shared/onedrivesourceconnectorconfig.md @@ -1,4 +1,4 @@ -# OneDriveSourceConnectorConfig +# OnedriveSourceConnectorConfig ## Fields diff --git a/docs/models/shared/onedrivesourceconnectorconfiginput.md b/docs/models/shared/onedrivesourceconnectorconfiginput.md index a1a34863..66ff331d 100644 --- a/docs/models/shared/onedrivesourceconnectorconfiginput.md +++ b/docs/models/shared/onedrivesourceconnectorconfiginput.md @@ -1,14 +1,14 @@ -# OneDriveSourceConnectorConfigInput +# OnedriveSourceConnectorConfigInput ## Fields | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `authority_url` | *str* | :heavy_check_mark: | N/A | | `client_cred` | *str* | :heavy_check_mark: | N/A | | `client_id` | *str* | :heavy_check_mark: | N/A | | `path` | *str* | :heavy_check_mark: | N/A | -| `tenant` | *str* | :heavy_check_mark: | N/A | | `user_pname` | *str* | :heavy_check_mark: | N/A | -| `recursive` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `authority_url` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `recursive` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `tenant` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/partitionparameters.md b/docs/models/shared/partitionparameters.md index e1946c1d..a7dc92e5 100644 --- a/docs/models/shared/partitionparameters.md +++ b/docs/models/shared/partitionparameters.md @@ -38,6 +38,6 @@ | `strategy` | [Optional[shared.Strategy]](../../models/shared/strategy.md) | :heavy_minus_sign: | The strategy to use for partitioning PDF/image. Options are fast, hi_res, auto. Default: hi_res | auto | | `table_ocr_agent` | *OptionalNullable[str]* | :heavy_minus_sign: | The OCR agent to use for table ocr inference. | | | `unique_element_ids` | *Optional[bool]* | :heavy_minus_sign: | When `True`, assign UUIDs to element IDs, which guarantees their uniqueness (useful when using them as primary keys in database). Otherwise a SHA-256 of element text is used. Default: `False` | | -| `vlm_model` | [Optional[shared.PartitionParametersStrategy]](../../models/shared/partitionparametersstrategy.md) | :heavy_minus_sign: | The VLM Model to use. | gpt-4o | -| `vlm_model_provider` | [Optional[shared.PartitionParametersSchemasStrategy]](../../models/shared/partitionparametersschemasstrategy.md) | :heavy_minus_sign: | The VLM Model provider to use. | openai | +| `vlm_model` | [Optional[shared.VLMModel]](../../models/shared/vlmmodel.md) | :heavy_minus_sign: | The VLM Model to use. | gpt-4o | +| `vlm_model_provider` | [Optional[shared.VLMModelProvider]](../../models/shared/vlmmodelprovider.md) | :heavy_minus_sign: | The VLM Model provider to use. | openai | | `xml_keep_tags` | *Optional[bool]* | :heavy_minus_sign: | If `True`, will retain the XML tags in the output. Otherwise it will simply extract the text from within the tags. Only applies to XML documents. | | \ No newline at end of file diff --git a/docs/models/shared/postgressourceconnectorconfig.md b/docs/models/shared/postgressourceconnectorconfig.md new file mode 100644 index 00000000..72dd6df3 --- /dev/null +++ b/docs/models/shared/postgressourceconnectorconfig.md @@ -0,0 +1,14 @@ +# PostgresSourceConnectorConfig + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `batch_size` | *int* | :heavy_check_mark: | N/A | +| `database` | *str* | :heavy_check_mark: | N/A | +| `host` | *str* | :heavy_check_mark: | N/A | +| `password` | *str* | :heavy_check_mark: | N/A | +| `port` | *int* | :heavy_check_mark: | N/A | +| `table_name` | *str* | :heavy_check_mark: | N/A | +| `username` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/postgressourceconnectorconfiginput.md b/docs/models/shared/postgressourceconnectorconfiginput.md new file mode 100644 index 00000000..0bd44c55 --- /dev/null +++ b/docs/models/shared/postgressourceconnectorconfiginput.md @@ -0,0 +1,14 @@ +# PostgresSourceConnectorConfigInput + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `database` | *str* | :heavy_check_mark: | N/A | +| `host` | *str* | :heavy_check_mark: | N/A | +| `password` | *str* | :heavy_check_mark: | N/A | +| `table_name` | *str* | :heavy_check_mark: | N/A | +| `username` | *str* | :heavy_check_mark: | N/A | +| `batch_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `port` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/salesforcesourceconnectorconfig.md b/docs/models/shared/salesforcesourceconnectorconfig.md index 1ae5c40d..f3731358 100644 --- a/docs/models/shared/salesforcesourceconnectorconfig.md +++ b/docs/models/shared/salesforcesourceconnectorconfig.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `categories` | List[*str*] | :heavy_check_mark: | N/A | -| `consumer_key` | *str* | :heavy_check_mark: | N/A | -| `private_key` | *str* | :heavy_check_mark: | N/A | -| `username` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `password` | *str* | :heavy_check_mark: | N/A | +| `security_token` | *str* | :heavy_check_mark: | N/A | +| `username` | *str* | :heavy_check_mark: | N/A | +| `domain` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/salesforcesourceconnectorconfiginput.md b/docs/models/shared/salesforcesourceconnectorconfiginput.md index 444977b2..7b8ae51c 100644 --- a/docs/models/shared/salesforcesourceconnectorconfiginput.md +++ b/docs/models/shared/salesforcesourceconnectorconfiginput.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `categories` | List[*str*] | :heavy_check_mark: | N/A | -| `consumer_key` | *str* | :heavy_check_mark: | N/A | -| `private_key` | *str* | :heavy_check_mark: | N/A | -| `username` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `password` | *str* | :heavy_check_mark: | N/A | +| `security_token` | *str* | :heavy_check_mark: | N/A | +| `username` | *str* | :heavy_check_mark: | N/A | +| `domain` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/sharepointsourceconnectorconfig.md b/docs/models/shared/sharepointsourceconnectorconfig.md index fdb9e7a3..3a41d971 100644 --- a/docs/models/shared/sharepointsourceconnectorconfig.md +++ b/docs/models/shared/sharepointsourceconnectorconfig.md @@ -1,12 +1,11 @@ -# SharePointSourceConnectorConfig +# SharepointSourceConnectorConfig ## Fields -| Field | Type | Required | Description | -| ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `client_cred` | *str* | :heavy_check_mark: | N/A | -| `client_id` | *str* | :heavy_check_mark: | N/A | -| `recursive` | *bool* | :heavy_check_mark: | N/A | -| `site` | *str* | :heavy_check_mark: | N/A | -| `path` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `client_id` | *str* | :heavy_check_mark: | N/A | +| `client_secret` | *str* | :heavy_check_mark: | N/A | +| `site_url` | *str* | :heavy_check_mark: | N/A | +| `tenant_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/sharepointsourceconnectorconfiginput.md b/docs/models/shared/sharepointsourceconnectorconfiginput.md index 1f2c2e4d..1707deb5 100644 --- a/docs/models/shared/sharepointsourceconnectorconfiginput.md +++ b/docs/models/shared/sharepointsourceconnectorconfiginput.md @@ -1,12 +1,11 @@ -# SharePointSourceConnectorConfigInput +# SharepointSourceConnectorConfigInput ## Fields -| Field | Type | Required | Description | -| ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `client_cred` | *str* | :heavy_check_mark: | N/A | -| `client_id` | *str* | :heavy_check_mark: | N/A | -| `site` | *str* | :heavy_check_mark: | N/A | -| `path` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `recursive` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `client_id` | *str* | :heavy_check_mark: | N/A | +| `client_secret` | *str* | :heavy_check_mark: | N/A | +| `site_url` | *str* | :heavy_check_mark: | N/A | +| `tenant_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/snowflakesourceconnectorconfig.md b/docs/models/shared/snowflakesourceconnectorconfig.md index 70f2f533..a9d17b71 100644 --- a/docs/models/shared/snowflakesourceconnectorconfig.md +++ b/docs/models/shared/snowflakesourceconnectorconfig.md @@ -3,17 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `account` | *str* | :heavy_check_mark: | N/A | -| `batch_size` | *int* | :heavy_check_mark: | N/A | -| `database` | *str* | :heavy_check_mark: | N/A | -| `fields` | List[*str*] | :heavy_check_mark: | N/A | -| `host` | *str* | :heavy_check_mark: | N/A | -| `id_column` | *str* | :heavy_check_mark: | N/A | -| `password` | *str* | :heavy_check_mark: | N/A | -| `port` | *int* | :heavy_check_mark: | N/A | -| `role` | *str* | :heavy_check_mark: | N/A | -| `schema_` | *str* | :heavy_check_mark: | N/A | -| `table_name` | *str* | :heavy_check_mark: | N/A | -| `user` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `account` | *str* | :heavy_check_mark: | N/A | +| `database` | *str* | :heavy_check_mark: | N/A | +| `password` | *str* | :heavy_check_mark: | N/A | +| `schema_` | *str* | :heavy_check_mark: | N/A | +| `username` | *str* | :heavy_check_mark: | N/A | +| `warehouse` | *str* | :heavy_check_mark: | N/A | +| `role` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/snowflakesourceconnectorconfiginput.md b/docs/models/shared/snowflakesourceconnectorconfiginput.md index 7f1dd837..7ad769ee 100644 --- a/docs/models/shared/snowflakesourceconnectorconfiginput.md +++ b/docs/models/shared/snowflakesourceconnectorconfiginput.md @@ -3,17 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `account` | *str* | :heavy_check_mark: | N/A | -| `database` | *str* | :heavy_check_mark: | N/A | -| `host` | *str* | :heavy_check_mark: | N/A | -| `id_column` | *str* | :heavy_check_mark: | N/A | -| `password` | *str* | :heavy_check_mark: | N/A | -| `role` | *str* | :heavy_check_mark: | N/A | -| `schema_` | *str* | :heavy_check_mark: | N/A | -| `table_name` | *str* | :heavy_check_mark: | N/A | -| `user` | *str* | :heavy_check_mark: | N/A | -| `batch_size` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `fields` | List[*str*] | :heavy_minus_sign: | N/A | -| `port` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `account` | *str* | :heavy_check_mark: | N/A | +| `database` | *str* | :heavy_check_mark: | N/A | +| `password` | *str* | :heavy_check_mark: | N/A | +| `schema_` | *str* | :heavy_check_mark: | N/A | +| `username` | *str* | :heavy_check_mark: | N/A | +| `warehouse` | *str* | :heavy_check_mark: | N/A | +| `role` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/sourceconnectorinformationconfig.md b/docs/models/shared/sourceconnectorinformationconfig.md index 4752b840..3df0803c 100644 --- a/docs/models/shared/sourceconnectorinformationconfig.md +++ b/docs/models/shared/sourceconnectorinformationconfig.md @@ -27,10 +27,10 @@ value: shared.ConfluenceSourceConnectorConfig = /* values here */ value: shared.CouchbaseSourceConnectorConfig = /* values here */ ``` -### `shared.DatabricksVolumesConnectorConfig` +### `shared.DatabricksVolumesSourceConnectorConfig` ```python -value: shared.DatabricksVolumesConnectorConfig = /* values here */ +value: shared.DatabricksVolumesSourceConnectorConfig = /* values here */ ``` ### `shared.DropboxSourceConnectorConfig` @@ -39,16 +39,16 @@ value: shared.DatabricksVolumesConnectorConfig = /* values here */ value: shared.DropboxSourceConnectorConfig = /* values here */ ``` -### `shared.ElasticsearchConnectorConfig` +### `shared.ElasticsearchSourceConnectorConfig` ```python -value: shared.ElasticsearchConnectorConfig = /* values here */ +value: shared.ElasticsearchSourceConnectorConfig = /* values here */ ``` -### `shared.GCSSourceConnectorConfig` +### `shared.GcsSourceConnectorConfig` ```python -value: shared.GCSSourceConnectorConfig = /* values here */ +value: shared.GcsSourceConnectorConfig = /* values here */ ``` ### `shared.GoogleDriveSourceConnectorConfig` @@ -63,16 +63,16 @@ value: shared.GoogleDriveSourceConnectorConfig = /* values here */ value: shared.KafkaCloudSourceConnectorConfig = /* values here */ ``` -### `shared.MongoDBConnectorConfig` +### `shared.MongodbSourceConnectorConfig` ```python -value: shared.MongoDBConnectorConfig = /* values here */ +value: shared.MongodbSourceConnectorConfig = /* values here */ ``` -### `shared.OneDriveSourceConnectorConfig` +### `shared.OnedriveSourceConnectorConfig` ```python -value: shared.OneDriveSourceConnectorConfig = /* values here */ +value: shared.OnedriveSourceConnectorConfig = /* values here */ ``` ### `shared.OutlookSourceConnectorConfig` @@ -81,6 +81,12 @@ value: shared.OneDriveSourceConnectorConfig = /* values here */ value: shared.OutlookSourceConnectorConfig = /* values here */ ``` +### `shared.PostgresSourceConnectorConfig` + +```python +value: shared.PostgresSourceConnectorConfig = /* values here */ +``` + ### `shared.S3SourceConnectorConfig` ```python @@ -93,10 +99,10 @@ value: shared.S3SourceConnectorConfig = /* values here */ value: shared.SalesforceSourceConnectorConfig = /* values here */ ``` -### `shared.SharePointSourceConnectorConfig` +### `shared.SharepointSourceConnectorConfig` ```python -value: shared.SharePointSourceConnectorConfig = /* values here */ +value: shared.SharepointSourceConnectorConfig = /* values here */ ``` ### `shared.SnowflakeSourceConnectorConfig` diff --git a/docs/models/shared/updatedestinationconnectorconfig.md b/docs/models/shared/updatedestinationconnectorconfig.md index 34237f98..c0280bf2 100644 --- a/docs/models/shared/updatedestinationconnectorconfig.md +++ b/docs/models/shared/updatedestinationconnectorconfig.md @@ -51,12 +51,6 @@ value: shared.ElasticsearchConnectorConfigInput = /* values here */ value: shared.GCSDestinationConnectorConfigInput = /* values here */ ``` -### `shared.KafkaCloudDestinationConnectorConfigInput` - -```python -value: shared.KafkaCloudDestinationConnectorConfigInput = /* values here */ -``` - ### `shared.MilvusDestinationConnectorConfigInput` ```python diff --git a/docs/models/shared/updatesourceconnectorconfig.md b/docs/models/shared/updatesourceconnectorconfig.md index 43ad9588..150f17d5 100644 --- a/docs/models/shared/updatesourceconnectorconfig.md +++ b/docs/models/shared/updatesourceconnectorconfig.md @@ -27,10 +27,10 @@ value: shared.ConfluenceSourceConnectorConfigInput = /* values here */ value: shared.CouchbaseSourceConnectorConfigInput = /* values here */ ``` -### `shared.DatabricksVolumesConnectorConfigInput` +### `shared.DatabricksVolumesSourceConnectorConfigInput` ```python -value: shared.DatabricksVolumesConnectorConfigInput = /* values here */ +value: shared.DatabricksVolumesSourceConnectorConfigInput = /* values here */ ``` ### `shared.DropboxSourceConnectorConfigInput` @@ -39,16 +39,16 @@ value: shared.DatabricksVolumesConnectorConfigInput = /* values here */ value: shared.DropboxSourceConnectorConfigInput = /* values here */ ``` -### `shared.ElasticsearchConnectorConfigInput` +### `shared.ElasticsearchSourceConnectorConfigInput` ```python -value: shared.ElasticsearchConnectorConfigInput = /* values here */ +value: shared.ElasticsearchSourceConnectorConfigInput = /* values here */ ``` -### `shared.GCSSourceConnectorConfigInput` +### `shared.GcsSourceConnectorConfigInput` ```python -value: shared.GCSSourceConnectorConfigInput = /* values here */ +value: shared.GcsSourceConnectorConfigInput = /* values here */ ``` ### `shared.GoogleDriveSourceConnectorConfigInput` @@ -63,16 +63,16 @@ value: shared.GoogleDriveSourceConnectorConfigInput = /* values here */ value: shared.KafkaCloudSourceConnectorConfigInput = /* values here */ ``` -### `shared.MongoDBConnectorConfigInput` +### `shared.MongodbSourceConnectorConfigInput` ```python -value: shared.MongoDBConnectorConfigInput = /* values here */ +value: shared.MongodbSourceConnectorConfigInput = /* values here */ ``` -### `shared.OneDriveSourceConnectorConfigInput` +### `shared.OnedriveSourceConnectorConfigInput` ```python -value: shared.OneDriveSourceConnectorConfigInput = /* values here */ +value: shared.OnedriveSourceConnectorConfigInput = /* values here */ ``` ### `shared.OutlookSourceConnectorConfigInput` @@ -81,6 +81,12 @@ value: shared.OneDriveSourceConnectorConfigInput = /* values here */ value: shared.OutlookSourceConnectorConfigInput = /* values here */ ``` +### `shared.PostgresSourceConnectorConfigInput` + +```python +value: shared.PostgresSourceConnectorConfigInput = /* values here */ +``` + ### `shared.S3SourceConnectorConfigInput` ```python @@ -93,10 +99,10 @@ value: shared.S3SourceConnectorConfigInput = /* values here */ value: shared.SalesforceSourceConnectorConfigInput = /* values here */ ``` -### `shared.SharePointSourceConnectorConfigInput` +### `shared.SharepointSourceConnectorConfigInput` ```python -value: shared.SharePointSourceConnectorConfigInput = /* values here */ +value: shared.SharepointSourceConnectorConfigInput = /* values here */ ``` ### `shared.SnowflakeSourceConnectorConfigInput` diff --git a/docs/models/shared/updateworkflow.md b/docs/models/shared/updateworkflow.md index 8c3fdf59..69868303 100644 --- a/docs/models/shared/updateworkflow.md +++ b/docs/models/shared/updateworkflow.md @@ -9,5 +9,5 @@ | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `schedule` | [OptionalNullable[shared.UpdateWorkflowSchedule]](../../models/shared/updateworkflowschedule.md) | :heavy_minus_sign: | N/A | | `source_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `workflow_nodes` | List[[shared.WorkflowNode](../../models/shared/workflownode.md)] | :heavy_minus_sign: | N/A | +| `workflow_nodes` | List[[shared.CreateWorkflowNode](../../models/shared/createworkflownode.md)] | :heavy_minus_sign: | N/A | | `workflow_type` | [OptionalNullable[shared.WorkflowType]](../../models/shared/workflowtype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/partitionparametersstrategy.md b/docs/models/shared/vlmmodel.md similarity index 97% rename from docs/models/shared/partitionparametersstrategy.md rename to docs/models/shared/vlmmodel.md index 9e656abd..170d5038 100644 --- a/docs/models/shared/partitionparametersstrategy.md +++ b/docs/models/shared/vlmmodel.md @@ -1,4 +1,4 @@ -# PartitionParametersStrategy +# VLMModel The VLM Model to use. diff --git a/docs/models/shared/partitionparametersschemasstrategy.md b/docs/models/shared/vlmmodelprovider.md similarity index 92% rename from docs/models/shared/partitionparametersschemasstrategy.md rename to docs/models/shared/vlmmodelprovider.md index dd9f12ec..ecf3f8d0 100644 --- a/docs/models/shared/partitionparametersschemasstrategy.md +++ b/docs/models/shared/vlmmodelprovider.md @@ -1,4 +1,4 @@ -# PartitionParametersSchemasStrategy +# VLMModelProvider The VLM Model provider to use. diff --git a/docs/models/shared/workflownode.md b/docs/models/shared/workflownode.md index 378657bd..3f0d7ce0 100644 --- a/docs/models/shared/workflownode.md +++ b/docs/models/shared/workflownode.md @@ -5,6 +5,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `id` | *str* | :heavy_check_mark: | N/A | | `name` | *str* | :heavy_check_mark: | N/A | | `subtype` | *str* | :heavy_check_mark: | N/A | | `type` | [shared.WorkflowNodeType](../../models/shared/workflownodetype.md) | :heavy_check_mark: | N/A | diff --git a/docs/sdks/general/README.md b/docs/sdks/general/README.md index e0cab31c..189a833f 100644 --- a/docs/sdks/general/README.md +++ b/docs/sdks/general/README.md @@ -30,8 +30,8 @@ with UnstructuredClient() as uc_client: 1, 10, ], - "vlm_model": shared.PartitionParametersStrategy.GPT_4O, - "vlm_model_provider": shared.PartitionParametersSchemasStrategy.OPENAI, + "vlm_model": shared.VLMModel.GPT_4O, + "vlm_model_provider": shared.VLMModelProvider.OPENAI, }, }) diff --git a/docs/sdks/jobs/README.md b/docs/sdks/jobs/README.md index 2bb87640..7b33f81b 100644 --- a/docs/sdks/jobs/README.md +++ b/docs/sdks/jobs/README.md @@ -6,6 +6,7 @@ ### Available Operations * [cancel_job](#cancel_job) - Cancel Job +* [download_playground_job](#download_playground_job) - Download Job output * [get_job](#get_job) - Get Job * [list_jobs](#list_jobs) - List Jobs @@ -51,6 +52,49 @@ with UnstructuredClient() as uc_client: | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | +## download_playground_job + +Download the output of a playground job. + +### Example Usage + +```python +from unstructured_client import UnstructuredClient + + +with UnstructuredClient() as uc_client: + + res = uc_client.jobs.download_playground_job(request={ + "file_id": "", + "job_id": "844a9b13-d032-43c7-8e81-b20a874c4c79", + }) + + assert res.any is not None + + # Handle response + print(res.any) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `request` | [operations.DownloadPlaygroundJobRequest](../../models/operations/downloadplaygroundjobrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| `server_url` | *Optional[str]* | :heavy_minus_sign: | An optional server URL to use. | + +### Response + +**[operations.DownloadPlaygroundJobResponse](../../models/operations/downloadplaygroundjobresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + ## get_job Retrieve detailed information for a specific job by its ID. diff --git a/docs/sdks/sources/README.md b/docs/sdks/sources/README.md index 1cc5d1da..9249f44c 100644 --- a/docs/sdks/sources/README.md +++ b/docs/sdks/sources/README.md @@ -27,12 +27,12 @@ with UnstructuredClient() as uc_client: res = uc_client.sources.create_source(request={ "create_source_connector": { "config": { - "batch_size": 100, "bucket": "bucket-name", "collection_id": "type", "connection_string": "couchbases://cb.abcdefg.cloud.couchbase.com", "password": "password", "username": "username", + "batch_size": 100, "collection": "collection_name", "scope": "scope_name", }, @@ -206,12 +206,12 @@ with UnstructuredClient() as uc_client: res = uc_client.sources.update_source(request={ "update_source_connector": { "config": { - "batch_size": 100, "bucket": "bucket-name", "collection_id": "type", "connection_string": "couchbases://cb.abcdefg.cloud.couchbase.com", "password": "password", "username": "username", + "batch_size": 100, "collection": "collection_name", "scope": "scope_name", }, diff --git a/docs/sdks/workflows/README.md b/docs/sdks/workflows/README.md index 5ed628aa..4d529847 100644 --- a/docs/sdks/workflows/README.md +++ b/docs/sdks/workflows/README.md @@ -27,11 +27,11 @@ with UnstructuredClient() as uc_client: res = uc_client.workflows.create_workflow(request={ "create_workflow": { - "destination_id": "b5baba90-bc88-4ea4-b45f-e894788e3f38", "name": "", - "source_id": "efa06124-dfe1-41e8-94dd-7cfa1e3fe9ec", "workflow_type": shared.WorkflowType.PLATINUM, + "destination_id": "b5baba90-bc88-4ea4-b45f-e894788e3f38", "schedule": shared.Schedule.EVERY_15_MINUTES, + "source_id": "efa06124-dfe1-41e8-94dd-7cfa1e3fe9ec", }, }) diff --git a/gen.yaml b/gen.yaml index 17a4452f..81b14984 100644 --- a/gen.yaml +++ b/gen.yaml @@ -12,7 +12,7 @@ generation: oAuth2ClientCredentialsEnabled: false oAuth2PasswordEnabled: false python: - version: 0.31.1 + version: 0.31.2 additionalDependencies: dev: deepdiff: '>=6.0' diff --git a/pylintrc b/pylintrc index 097b0a80..e8cd3e85 100644 --- a/pylintrc +++ b/pylintrc @@ -457,7 +457,8 @@ disable=raw-checker-failed, relative-beyond-top-level, consider-using-with, wildcard-import, - unused-wildcard-import + unused-wildcard-import, + too-many-return-statements # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option @@ -658,4 +659,4 @@ init-import=no # List of qualified module names which can have objects that can redefine # builtins. -redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io +redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d9e443bc..05e9d3a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "unstructured-client" -version = "0.31.1" +version = "0.31.2" description = "Python Client SDK for Unstructured API" authors = [{ name = "Unstructured" },] readme = "README-PYPI.md" diff --git a/src/unstructured_client/_version.py b/src/unstructured_client/_version.py index 2483b0b4..d376560f 100644 --- a/src/unstructured_client/_version.py +++ b/src/unstructured_client/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "unstructured-client" -__version__: str = "0.31.1" -__openapi_doc_version__: str = "1.0.78" -__gen_version__: str = "2.545.1" -__user_agent__: str = "speakeasy-sdk/python 0.31.1 2.545.1 1.0.78 unstructured-client" +__version__: str = "0.31.2" +__openapi_doc_version__: str = "1.0.81" +__gen_version__: str = "2.558.2" +__user_agent__: str = "speakeasy-sdk/python 0.31.2 2.558.2 1.0.81 unstructured-client" try: if __package__ is not None: diff --git a/src/unstructured_client/destinations.py b/src/unstructured_client/destinations.py index e152390a..6eba26da 100644 --- a/src/unstructured_client/destinations.py +++ b/src/unstructured_client/destinations.py @@ -80,7 +80,7 @@ def create_destination( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = self.do_request( hook_ctx=HookContext( @@ -200,7 +200,7 @@ async def create_destination_async( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = await self.do_request_async( hook_ctx=HookContext( @@ -313,7 +313,7 @@ def delete_destination( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = self.do_request( hook_ctx=HookContext( @@ -424,7 +424,7 @@ async def delete_destination_async( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = await self.do_request_async( hook_ctx=HookContext( @@ -534,7 +534,7 @@ def get_destination( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = self.do_request( hook_ctx=HookContext( @@ -646,7 +646,7 @@ async def get_destination_async( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = await self.do_request_async( hook_ctx=HookContext( @@ -759,7 +759,7 @@ def list_destinations( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = self.do_request( hook_ctx=HookContext( @@ -873,7 +873,7 @@ async def list_destinations_async( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = await self.do_request_async( hook_ctx=HookContext( @@ -994,7 +994,7 @@ def update_destination( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = self.do_request( hook_ctx=HookContext( @@ -1114,7 +1114,7 @@ async def update_destination_async( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = await self.do_request_async( hook_ctx=HookContext( diff --git a/src/unstructured_client/jobs.py b/src/unstructured_client/jobs.py index 820c4c93..5852dba3 100644 --- a/src/unstructured_client/jobs.py +++ b/src/unstructured_client/jobs.py @@ -72,7 +72,7 @@ def cancel_job( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = self.do_request( hook_ctx=HookContext( @@ -182,7 +182,7 @@ async def cancel_job_async( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = await self.do_request_async( hook_ctx=HookContext( @@ -229,6 +229,228 @@ async def cancel_job_async( http_res, ) + def download_playground_job( + self, + *, + request: Union[ + operations.DownloadPlaygroundJobRequest, + operations.DownloadPlaygroundJobRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.DownloadPlaygroundJobResponse: + r"""Download Job output + + Download the output of a playground job. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = operations.DOWNLOAD_PLAYGROUND_JOB_SERVERS[ + operations.DOWNLOAD_PLAYGROUND_JOB_SERVER_PLATFORM_API + ] + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.DownloadPlaygroundJobRequest) + request = cast(operations.DownloadPlaygroundJobRequest, request) + + req = self._build_request( + method="GET", + path="/api/v1/jobs/{job_id}/download", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(3000, 720000, 1.88, 1800000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5xx"]) + + http_res = self.do_request( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="download_playground_job", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.DownloadPlaygroundJobResponse( + any=utils.unmarshal_json(http_res.text, Optional[Any]), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, errors.HTTPValidationErrorData + ) + raise errors.HTTPValidationError(data=response_data) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + async def download_playground_job_async( + self, + *, + request: Union[ + operations.DownloadPlaygroundJobRequest, + operations.DownloadPlaygroundJobRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.DownloadPlaygroundJobResponse: + r"""Download Job output + + Download the output of a playground job. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = operations.DOWNLOAD_PLAYGROUND_JOB_SERVERS[ + operations.DOWNLOAD_PLAYGROUND_JOB_SERVER_PLATFORM_API + ] + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, operations.DownloadPlaygroundJobRequest) + request = cast(operations.DownloadPlaygroundJobRequest, request) + + req = self._build_request_async( + method="GET", + path="/api/v1/jobs/{job_id}/download", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(3000, 720000, 1.88, 1800000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5xx"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="download_playground_job", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.DownloadPlaygroundJobResponse( + any=utils.unmarshal_json(http_res.text, Optional[Any]), + status_code=http_res.status_code, + content_type=http_res.headers.get("Content-Type") or "", + raw_response=http_res, + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, errors.HTTPValidationErrorData + ) + raise errors.HTTPValidationError(data=response_data) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + def get_job( self, *, @@ -290,7 +512,7 @@ def get_job( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = self.do_request( hook_ctx=HookContext( @@ -400,7 +622,7 @@ async def get_job_async( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = await self.do_request_async( hook_ctx=HookContext( @@ -510,7 +732,7 @@ def list_jobs( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = self.do_request( hook_ctx=HookContext( @@ -620,7 +842,7 @@ async def list_jobs_async( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = await self.do_request_async( hook_ctx=HookContext( diff --git a/src/unstructured_client/models/operations/__init__.py b/src/unstructured_client/models/operations/__init__.py index db7c8b25..5ebaccbc 100644 --- a/src/unstructured_client/models/operations/__init__.py +++ b/src/unstructured_client/models/operations/__init__.py @@ -56,6 +56,14 @@ DeleteWorkflowResponse, DeleteWorkflowResponseTypedDict, ) +from .download_playground_job import ( + DOWNLOAD_PLAYGROUND_JOB_SERVERS, + DOWNLOAD_PLAYGROUND_JOB_SERVER_PLATFORM_API, + DownloadPlaygroundJobRequest, + DownloadPlaygroundJobRequestTypedDict, + DownloadPlaygroundJobResponse, + DownloadPlaygroundJobResponseTypedDict, +) from .get_destination import ( GET_DESTINATION_SERVERS, GET_DESTINATION_SERVER_PLATFORM_API, @@ -195,6 +203,8 @@ "DELETE_SOURCE_SERVER_PLATFORM_API", "DELETE_WORKFLOW_SERVERS", "DELETE_WORKFLOW_SERVER_PLATFORM_API", + "DOWNLOAD_PLAYGROUND_JOB_SERVERS", + "DOWNLOAD_PLAYGROUND_JOB_SERVER_PLATFORM_API", "DeleteDestinationRequest", "DeleteDestinationRequestTypedDict", "DeleteDestinationResponse", @@ -207,6 +217,10 @@ "DeleteWorkflowRequestTypedDict", "DeleteWorkflowResponse", "DeleteWorkflowResponseTypedDict", + "DownloadPlaygroundJobRequest", + "DownloadPlaygroundJobRequestTypedDict", + "DownloadPlaygroundJobResponse", + "DownloadPlaygroundJobResponseTypedDict", "GET_DESTINATION_SERVERS", "GET_DESTINATION_SERVER_PLATFORM_API", "GET_JOB_SERVERS", diff --git a/src/unstructured_client/models/operations/download_playground_job.py b/src/unstructured_client/models/operations/download_playground_job.py new file mode 100644 index 00000000..ec7ecb81 --- /dev/null +++ b/src/unstructured_client/models/operations/download_playground_job.py @@ -0,0 +1,115 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import httpx +import pydantic +from pydantic import model_serializer +from typing import Any, Optional +from typing_extensions import Annotated, NotRequired, TypedDict +from unstructured_client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from unstructured_client.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, +) + +DOWNLOAD_PLAYGROUND_JOB_SERVER_PLATFORM_API = "platform-api" +r"""Unstructured Platform API""" + +DOWNLOAD_PLAYGROUND_JOB_SERVERS = { + DOWNLOAD_PLAYGROUND_JOB_SERVER_PLATFORM_API: "https://platform.unstructuredapp.io/", +} + + +class DownloadPlaygroundJobRequestTypedDict(TypedDict): + file_id: str + r"""ID of the file to download""" + job_id: str + node_id: NotRequired[Nullable[str]] + r"""Node ID to view per node output of the file""" + unstructured_api_key: NotRequired[Nullable[str]] + + +class DownloadPlaygroundJobRequest(BaseModel): + file_id: Annotated[ + str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""ID of the file to download""" + + job_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + node_id: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Node ID to view per node output of the file""" + + unstructured_api_key: Annotated[ + OptionalNullable[str], + pydantic.Field(alias="unstructured-api-key"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["node_id", "unstructured-api-key"] + nullable_fields = ["node_id", "unstructured-api-key"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in self.model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class DownloadPlaygroundJobResponseTypedDict(TypedDict): + content_type: str + r"""HTTP response content type for this operation""" + status_code: int + r"""HTTP response status code for this operation""" + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + any: NotRequired[Any] + r"""Successful Response""" + + +class DownloadPlaygroundJobResponse(BaseModel): + content_type: str + r"""HTTP response content type for this operation""" + + status_code: int + r"""HTTP response status code for this operation""" + + raw_response: httpx.Response + r"""Raw HTTP response; suitable for custom response parsing""" + + any: Optional[Any] = None + r"""Successful Response""" diff --git a/src/unstructured_client/models/operations/run_workflow.py b/src/unstructured_client/models/operations/run_workflow.py index c5715f5d..c615d0d1 100644 --- a/src/unstructured_client/models/operations/run_workflow.py +++ b/src/unstructured_client/models/operations/run_workflow.py @@ -6,7 +6,10 @@ from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict -from unstructured_client.models.shared import jobinformation as shared_jobinformation +from unstructured_client.models.shared import ( + body_run_workflow as shared_body_run_workflow, + jobinformation as shared_jobinformation, +) from unstructured_client.types import ( BaseModel, Nullable, @@ -14,7 +17,12 @@ UNSET, UNSET_SENTINEL, ) -from unstructured_client.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +from unstructured_client.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + RequestMetadata, +) RUN_WORKFLOW_SERVER_PLATFORM_API = "platform-api" r"""Unstructured Platform API""" @@ -26,6 +34,7 @@ class RunWorkflowRequestTypedDict(TypedDict): workflow_id: str + body_run_workflow: NotRequired[shared_body_run_workflow.BodyRunWorkflowTypedDict] unstructured_api_key: NotRequired[Nullable[str]] @@ -34,6 +43,11 @@ class RunWorkflowRequest(BaseModel): str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) ] + body_run_workflow: Annotated[ + Optional[shared_body_run_workflow.BodyRunWorkflow], + FieldMetadata(request=RequestMetadata(media_type="multipart/form-data")), + ] = None + unstructured_api_key: Annotated[ OptionalNullable[str], pydantic.Field(alias="unstructured-api-key"), @@ -42,7 +56,7 @@ class RunWorkflowRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["unstructured-api-key"] + optional_fields = ["Body_run_workflow", "unstructured-api-key"] nullable_fields = ["unstructured-api-key"] null_default_fields = [] diff --git a/src/unstructured_client/models/shared/__init__.py b/src/unstructured_client/models/shared/__init__.py index 74ecf567..e4918456 100644 --- a/src/unstructured_client/models/shared/__init__.py +++ b/src/unstructured_client/models/shared/__init__.py @@ -24,6 +24,12 @@ AzureSourceConnectorConfigInput, AzureSourceConnectorConfigInputTypedDict, ) +from .body_run_workflow import ( + BodyRunWorkflow, + BodyRunWorkflowTypedDict, + InputFiles, + InputFilesTypedDict, +) from .boxsourceconnectorconfig import ( BoxSourceConnectorConfig, BoxSourceConnectorConfigTypedDict, @@ -69,7 +75,16 @@ CreateSourceConnectorTypedDict, ) from .createworkflow import CreateWorkflow, CreateWorkflowTypedDict, Schedule +from .createworkflownode import CreateWorkflowNode, CreateWorkflowNodeTypedDict from .crontabentry import CronTabEntry, CronTabEntryTypedDict +from .databricks_volumessourceconnectorconfig import ( + DatabricksVolumesSourceConnectorConfig, + DatabricksVolumesSourceConnectorConfigTypedDict, +) +from .databricks_volumessourceconnectorconfiginput import ( + DatabricksVolumesSourceConnectorConfigInput, + DatabricksVolumesSourceConnectorConfigInputTypedDict, +) from .databricksvdtdestinationconnectorconfig import ( DatabricksVDTDestinationConnectorConfig, DatabricksVDTDestinationConnectorConfigTypedDict, @@ -117,6 +132,14 @@ ElasticsearchConnectorConfigInput, ElasticsearchConnectorConfigInputTypedDict, ) +from .elasticsearchsourceconnectorconfig import ( + ElasticsearchSourceConnectorConfig, + ElasticsearchSourceConnectorConfigTypedDict, +) +from .elasticsearchsourceconnectorconfiginput import ( + ElasticsearchSourceConnectorConfigInput, + ElasticsearchSourceConnectorConfigInputTypedDict, +) from .gcsdestinationconnectorconfig import ( GCSDestinationConnectorConfig, GCSDestinationConnectorConfigTypedDict, @@ -126,36 +149,28 @@ GCSDestinationConnectorConfigInputTypedDict, ) from .gcssourceconnectorconfig import ( - GCSSourceConnectorConfig, - GCSSourceConnectorConfigTypedDict, + GcsSourceConnectorConfig, + GcsSourceConnectorConfigTypedDict, ) from .gcssourceconnectorconfiginput import ( - GCSSourceConnectorConfigInput, - GCSSourceConnectorConfigInputTypedDict, + GcsSourceConnectorConfigInput, + GcsSourceConnectorConfigInputTypedDict, ) -from .googledrivesourceconnectorconfig import ( +from .google_drivesourceconnectorconfig import ( GoogleDriveSourceConnectorConfig, GoogleDriveSourceConnectorConfigTypedDict, ) -from .googledrivesourceconnectorconfiginput import ( +from .google_drivesourceconnectorconfiginput import ( GoogleDriveSourceConnectorConfigInput, GoogleDriveSourceConnectorConfigInputTypedDict, ) from .jobinformation import JobInformation, JobInformationTypedDict from .jobstatus import JobStatus -from .kafkaclouddestinationconnectorconfig import ( - KafkaCloudDestinationConnectorConfig, - KafkaCloudDestinationConnectorConfigTypedDict, -) -from .kafkaclouddestinationconnectorconfiginput import ( - KafkaCloudDestinationConnectorConfigInput, - KafkaCloudDestinationConnectorConfigInputTypedDict, -) -from .kafkacloudsourceconnectorconfig import ( +from .kafka_cloudsourceconnectorconfig import ( KafkaCloudSourceConnectorConfig, KafkaCloudSourceConnectorConfigTypedDict, ) -from .kafkacloudsourceconnectorconfiginput import ( +from .kafka_cloudsourceconnectorconfiginput import ( KafkaCloudSourceConnectorConfigInput, KafkaCloudSourceConnectorConfigInputTypedDict, ) @@ -175,6 +190,14 @@ MongoDBConnectorConfigInput, MongoDBConnectorConfigInputTypedDict, ) +from .mongodbsourceconnectorconfig import ( + MongodbSourceConnectorConfig, + MongodbSourceConnectorConfigTypedDict, +) +from .mongodbsourceconnectorconfiginput import ( + MongodbSourceConnectorConfigInput, + MongodbSourceConnectorConfigInputTypedDict, +) from .neo4jdestinationconnectorconfig import ( Neo4jDestinationConnectorConfig, Neo4jDestinationConnectorConfigTypedDict, @@ -183,6 +206,7 @@ Neo4jDestinationConnectorConfigInput, Neo4jDestinationConnectorConfigInputTypedDict, ) +from .nodefilemetadata import NodeFileMetadata, NodeFileMetadataTypedDict from .onedrivedestinationconnectorconfig import ( OneDriveDestinationConnectorConfig, OneDriveDestinationConnectorConfigTypedDict, @@ -192,12 +216,12 @@ OneDriveDestinationConnectorConfigInputTypedDict, ) from .onedrivesourceconnectorconfig import ( - OneDriveSourceConnectorConfig, - OneDriveSourceConnectorConfigTypedDict, + OnedriveSourceConnectorConfig, + OnedriveSourceConnectorConfigTypedDict, ) from .onedrivesourceconnectorconfiginput import ( - OneDriveSourceConnectorConfigInput, - OneDriveSourceConnectorConfigInputTypedDict, + OnedriveSourceConnectorConfigInput, + OnedriveSourceConnectorConfigInputTypedDict, ) from .outlooksourceconnectorconfig import ( OutlookSourceConnectorConfig, @@ -212,10 +236,10 @@ FilesTypedDict, OutputFormat, PartitionParameters, - PartitionParametersSchemasStrategy, - PartitionParametersStrategy, PartitionParametersTypedDict, Strategy, + VLMModel, + VLMModelProvider, ) from .postgresdestinationconnectorconfig import ( PostgresDestinationConnectorConfig, @@ -225,6 +249,14 @@ PostgresDestinationConnectorConfigInput, PostgresDestinationConnectorConfigInputTypedDict, ) +from .postgressourceconnectorconfig import ( + PostgresSourceConnectorConfig, + PostgresSourceConnectorConfigTypedDict, +) +from .postgressourceconnectorconfiginput import ( + PostgresSourceConnectorConfigInput, + PostgresSourceConnectorConfigInputTypedDict, +) from .qdrantclouddestinationconnectorconfig import ( QdrantCloudDestinationConnectorConfig, QdrantCloudDestinationConnectorConfigTypedDict, @@ -267,12 +299,12 @@ ) from .security import Security, SecurityTypedDict from .sharepointsourceconnectorconfig import ( - SharePointSourceConnectorConfig, - SharePointSourceConnectorConfigTypedDict, + SharepointSourceConnectorConfig, + SharepointSourceConnectorConfigTypedDict, ) from .sharepointsourceconnectorconfiginput import ( - SharePointSourceConnectorConfigInput, - SharePointSourceConnectorConfigInputTypedDict, + SharepointSourceConnectorConfigInput, + SharepointSourceConnectorConfigInputTypedDict, ) from .snowflakedestinationconnectorconfig import ( SnowflakeDestinationConnectorConfig, @@ -349,6 +381,8 @@ "AzureSourceConnectorConfigInput", "AzureSourceConnectorConfigInputTypedDict", "AzureSourceConnectorConfigTypedDict", + "BodyRunWorkflow", + "BodyRunWorkflowTypedDict", "BoxSourceConnectorConfig", "BoxSourceConnectorConfigInput", "BoxSourceConnectorConfigInputTypedDict", @@ -374,6 +408,8 @@ "CreateSourceConnectorConfigTypedDict", "CreateSourceConnectorTypedDict", "CreateWorkflow", + "CreateWorkflowNode", + "CreateWorkflowNodeTypedDict", "CreateWorkflowTypedDict", "CronTabEntry", "CronTabEntryTypedDict", @@ -385,6 +421,10 @@ "DatabricksVolumesConnectorConfigInput", "DatabricksVolumesConnectorConfigInputTypedDict", "DatabricksVolumesConnectorConfigTypedDict", + "DatabricksVolumesSourceConnectorConfig", + "DatabricksVolumesSourceConnectorConfigInput", + "DatabricksVolumesSourceConnectorConfigInputTypedDict", + "DatabricksVolumesSourceConnectorConfigTypedDict", "DeltaTableConnectorConfig", "DeltaTableConnectorConfigInput", "DeltaTableConnectorConfigInputTypedDict", @@ -402,27 +442,29 @@ "ElasticsearchConnectorConfigInput", "ElasticsearchConnectorConfigInputTypedDict", "ElasticsearchConnectorConfigTypedDict", + "ElasticsearchSourceConnectorConfig", + "ElasticsearchSourceConnectorConfigInput", + "ElasticsearchSourceConnectorConfigInputTypedDict", + "ElasticsearchSourceConnectorConfigTypedDict", "Files", "FilesTypedDict", "GCSDestinationConnectorConfig", "GCSDestinationConnectorConfigInput", "GCSDestinationConnectorConfigInputTypedDict", "GCSDestinationConnectorConfigTypedDict", - "GCSSourceConnectorConfig", - "GCSSourceConnectorConfigInput", - "GCSSourceConnectorConfigInputTypedDict", - "GCSSourceConnectorConfigTypedDict", + "GcsSourceConnectorConfig", + "GcsSourceConnectorConfigInput", + "GcsSourceConnectorConfigInputTypedDict", + "GcsSourceConnectorConfigTypedDict", "GoogleDriveSourceConnectorConfig", "GoogleDriveSourceConnectorConfigInput", "GoogleDriveSourceConnectorConfigInputTypedDict", "GoogleDriveSourceConnectorConfigTypedDict", + "InputFiles", + "InputFilesTypedDict", "JobInformation", "JobInformationTypedDict", "JobStatus", - "KafkaCloudDestinationConnectorConfig", - "KafkaCloudDestinationConnectorConfigInput", - "KafkaCloudDestinationConnectorConfigInputTypedDict", - "KafkaCloudDestinationConnectorConfigTypedDict", "KafkaCloudSourceConnectorConfig", "KafkaCloudSourceConnectorConfigInput", "KafkaCloudSourceConnectorConfigInputTypedDict", @@ -437,31 +479,39 @@ "MongoDBConnectorConfigInput", "MongoDBConnectorConfigInputTypedDict", "MongoDBConnectorConfigTypedDict", + "MongodbSourceConnectorConfig", + "MongodbSourceConnectorConfigInput", + "MongodbSourceConnectorConfigInputTypedDict", + "MongodbSourceConnectorConfigTypedDict", "Neo4jDestinationConnectorConfig", "Neo4jDestinationConnectorConfigInput", "Neo4jDestinationConnectorConfigInputTypedDict", "Neo4jDestinationConnectorConfigTypedDict", + "NodeFileMetadata", + "NodeFileMetadataTypedDict", "OneDriveDestinationConnectorConfig", "OneDriveDestinationConnectorConfigInput", "OneDriveDestinationConnectorConfigInputTypedDict", "OneDriveDestinationConnectorConfigTypedDict", - "OneDriveSourceConnectorConfig", - "OneDriveSourceConnectorConfigInput", - "OneDriveSourceConnectorConfigInputTypedDict", - "OneDriveSourceConnectorConfigTypedDict", + "OnedriveSourceConnectorConfig", + "OnedriveSourceConnectorConfigInput", + "OnedriveSourceConnectorConfigInputTypedDict", + "OnedriveSourceConnectorConfigTypedDict", "OutlookSourceConnectorConfig", "OutlookSourceConnectorConfigInput", "OutlookSourceConnectorConfigInputTypedDict", "OutlookSourceConnectorConfigTypedDict", "OutputFormat", "PartitionParameters", - "PartitionParametersSchemasStrategy", - "PartitionParametersStrategy", "PartitionParametersTypedDict", "PostgresDestinationConnectorConfig", "PostgresDestinationConnectorConfigInput", "PostgresDestinationConnectorConfigInputTypedDict", "PostgresDestinationConnectorConfigTypedDict", + "PostgresSourceConnectorConfig", + "PostgresSourceConnectorConfigInput", + "PostgresSourceConnectorConfigInputTypedDict", + "PostgresSourceConnectorConfigTypedDict", "QdrantCloudDestinationConnectorConfig", "QdrantCloudDestinationConnectorConfigInput", "QdrantCloudDestinationConnectorConfigInputTypedDict", @@ -485,10 +535,10 @@ "Schedule", "Security", "SecurityTypedDict", - "SharePointSourceConnectorConfig", - "SharePointSourceConnectorConfigInput", - "SharePointSourceConnectorConfigInputTypedDict", - "SharePointSourceConnectorConfigTypedDict", + "SharepointSourceConnectorConfig", + "SharepointSourceConnectorConfigInput", + "SharepointSourceConnectorConfigInputTypedDict", + "SharepointSourceConnectorConfigTypedDict", "SnowflakeDestinationConnectorConfig", "SnowflakeDestinationConnectorConfigInput", "SnowflakeDestinationConnectorConfigInputTypedDict", @@ -514,6 +564,8 @@ "UpdateWorkflow", "UpdateWorkflowSchedule", "UpdateWorkflowTypedDict", + "VLMModel", + "VLMModelProvider", "ValidationError", "ValidationErrorTypedDict", "WeaviateDestinationConnectorConfig", diff --git a/src/unstructured_client/models/shared/body_run_workflow.py b/src/unstructured_client/models/shared/body_run_workflow.py new file mode 100644 index 00000000..9afa031a --- /dev/null +++ b/src/unstructured_client/models/shared/body_run_workflow.py @@ -0,0 +1,80 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import io +import pydantic +from pydantic import model_serializer +from typing import IO, List, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict +from unstructured_client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from unstructured_client.utils import FieldMetadata, MultipartFormMetadata + + +class InputFilesTypedDict(TypedDict): + content: Union[bytes, IO[bytes], io.BufferedReader] + file_name: str + content_type: NotRequired[str] + + +class InputFiles(BaseModel): + content: Annotated[ + Union[bytes, IO[bytes], io.BufferedReader], + pydantic.Field(alias=""), + FieldMetadata(multipart=MultipartFormMetadata(content=True)), + ] + + file_name: Annotated[ + str, pydantic.Field(alias="fileName"), FieldMetadata(multipart=True) + ] + + content_type: Annotated[ + Optional[str], + pydantic.Field(alias="Content-Type"), + FieldMetadata(multipart=True), + ] = None + + +class BodyRunWorkflowTypedDict(TypedDict): + input_files: NotRequired[Nullable[List[InputFilesTypedDict]]] + + +class BodyRunWorkflow(BaseModel): + input_files: Annotated[ + OptionalNullable[List[InputFiles]], FieldMetadata(multipart=True) + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["input_files"] + nullable_fields = ["input_files"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in self.model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/unstructured_client/models/shared/confluencesourceconnectorconfig.py b/src/unstructured_client/models/shared/confluencesourceconnectorconfig.py index 1fe9023a..2f0e9006 100644 --- a/src/unstructured_client/models/shared/confluencesourceconnectorconfig.py +++ b/src/unstructured_client/models/shared/confluencesourceconnectorconfig.py @@ -16,10 +16,10 @@ class ConfluenceSourceConnectorConfigTypedDict(TypedDict): cloud: bool max_num_of_docs_from_each_space: int max_num_of_spaces: int - spaces: Nullable[str] url: str username: str password: NotRequired[Nullable[str]] + spaces: NotRequired[Nullable[str]] token: NotRequired[Nullable[str]] @@ -30,20 +30,20 @@ class ConfluenceSourceConnectorConfig(BaseModel): max_num_of_spaces: int - spaces: Nullable[str] - url: str username: str password: OptionalNullable[str] = UNSET + spaces: OptionalNullable[str] = UNSET + token: OptionalNullable[str] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["password", "token"] - nullable_fields = ["spaces", "password", "token"] + optional_fields = ["password", "spaces", "token"] + nullable_fields = ["password", "spaces", "token"] null_default_fields = [] serialized = handler(self) diff --git a/src/unstructured_client/models/shared/couchbasesourceconnectorconfiginput.py b/src/unstructured_client/models/shared/couchbasesourceconnectorconfiginput.py index f36e379c..f981f7ef 100644 --- a/src/unstructured_client/models/shared/couchbasesourceconnectorconfiginput.py +++ b/src/unstructured_client/models/shared/couchbasesourceconnectorconfiginput.py @@ -2,6 +2,7 @@ from __future__ import annotations from pydantic import model_serializer +from typing import Optional from typing_extensions import NotRequired, TypedDict from unstructured_client.types import ( BaseModel, @@ -13,19 +14,17 @@ class CouchbaseSourceConnectorConfigInputTypedDict(TypedDict): - batch_size: int bucket: str collection_id: str connection_string: str password: str username: str + batch_size: NotRequired[int] collection: NotRequired[Nullable[str]] scope: NotRequired[Nullable[str]] class CouchbaseSourceConnectorConfigInput(BaseModel): - batch_size: int - bucket: str collection_id: str @@ -36,13 +35,15 @@ class CouchbaseSourceConnectorConfigInput(BaseModel): username: str + batch_size: Optional[int] = 50 + collection: OptionalNullable[str] = UNSET scope: OptionalNullable[str] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["collection", "scope"] + optional_fields = ["batch_size", "collection", "scope"] nullable_fields = ["collection", "scope"] null_default_fields = [] diff --git a/src/unstructured_client/models/shared/createdestinationconnector.py b/src/unstructured_client/models/shared/createdestinationconnector.py index 2dd6bfbe..4b42b9fa 100644 --- a/src/unstructured_client/models/shared/createdestinationconnector.py +++ b/src/unstructured_client/models/shared/createdestinationconnector.py @@ -34,10 +34,6 @@ GCSDestinationConnectorConfigInput, GCSDestinationConnectorConfigInputTypedDict, ) -from .kafkaclouddestinationconnectorconfiginput import ( - KafkaCloudDestinationConnectorConfigInput, - KafkaCloudDestinationConnectorConfigInputTypedDict, -) from .milvusdestinationconnectorconfiginput import ( MilvusDestinationConnectorConfigInput, MilvusDestinationConnectorConfigInputTypedDict, @@ -91,16 +87,15 @@ WeaviateDestinationConnectorConfigInputTypedDict, ElasticsearchConnectorConfigInputTypedDict, MongoDBConnectorConfigInputTypedDict, - DeltaTableConnectorConfigInputTypedDict, QdrantCloudDestinationConnectorConfigInputTypedDict, - Neo4jDestinationConnectorConfigInputTypedDict, + DeltaTableConnectorConfigInputTypedDict, AstraDBConnectorConfigInputTypedDict, - S3DestinationConnectorConfigInputTypedDict, + Neo4jDestinationConnectorConfigInputTypedDict, OneDriveDestinationConnectorConfigInputTypedDict, - DatabricksVDTDestinationConnectorConfigInputTypedDict, + S3DestinationConnectorConfigInputTypedDict, MilvusDestinationConnectorConfigInputTypedDict, PostgresDestinationConnectorConfigInputTypedDict, - KafkaCloudDestinationConnectorConfigInputTypedDict, + DatabricksVDTDestinationConnectorConfigInputTypedDict, DatabricksVolumesConnectorConfigInputTypedDict, CouchbaseDestinationConnectorConfigInputTypedDict, RedisDestinationConnectorConfigInputTypedDict, @@ -117,16 +112,15 @@ WeaviateDestinationConnectorConfigInput, ElasticsearchConnectorConfigInput, MongoDBConnectorConfigInput, - DeltaTableConnectorConfigInput, QdrantCloudDestinationConnectorConfigInput, - Neo4jDestinationConnectorConfigInput, + DeltaTableConnectorConfigInput, AstraDBConnectorConfigInput, - S3DestinationConnectorConfigInput, + Neo4jDestinationConnectorConfigInput, OneDriveDestinationConnectorConfigInput, - DatabricksVDTDestinationConnectorConfigInput, + S3DestinationConnectorConfigInput, MilvusDestinationConnectorConfigInput, PostgresDestinationConnectorConfigInput, - KafkaCloudDestinationConnectorConfigInput, + DatabricksVDTDestinationConnectorConfigInput, DatabricksVolumesConnectorConfigInput, CouchbaseDestinationConnectorConfigInput, RedisDestinationConnectorConfigInput, diff --git a/src/unstructured_client/models/shared/createsourceconnector.py b/src/unstructured_client/models/shared/createsourceconnector.py index db53d233..b1b910f9 100644 --- a/src/unstructured_client/models/shared/createsourceconnector.py +++ b/src/unstructured_client/models/shared/createsourceconnector.py @@ -17,42 +17,46 @@ CouchbaseSourceConnectorConfigInput, CouchbaseSourceConnectorConfigInputTypedDict, ) -from .databricksvolumesconnectorconfiginput import ( - DatabricksVolumesConnectorConfigInput, - DatabricksVolumesConnectorConfigInputTypedDict, +from .databricks_volumessourceconnectorconfiginput import ( + DatabricksVolumesSourceConnectorConfigInput, + DatabricksVolumesSourceConnectorConfigInputTypedDict, ) from .dropboxsourceconnectorconfiginput import ( DropboxSourceConnectorConfigInput, DropboxSourceConnectorConfigInputTypedDict, ) -from .elasticsearchconnectorconfiginput import ( - ElasticsearchConnectorConfigInput, - ElasticsearchConnectorConfigInputTypedDict, +from .elasticsearchsourceconnectorconfiginput import ( + ElasticsearchSourceConnectorConfigInput, + ElasticsearchSourceConnectorConfigInputTypedDict, ) from .gcssourceconnectorconfiginput import ( - GCSSourceConnectorConfigInput, - GCSSourceConnectorConfigInputTypedDict, + GcsSourceConnectorConfigInput, + GcsSourceConnectorConfigInputTypedDict, ) -from .googledrivesourceconnectorconfiginput import ( +from .google_drivesourceconnectorconfiginput import ( GoogleDriveSourceConnectorConfigInput, GoogleDriveSourceConnectorConfigInputTypedDict, ) -from .kafkacloudsourceconnectorconfiginput import ( +from .kafka_cloudsourceconnectorconfiginput import ( KafkaCloudSourceConnectorConfigInput, KafkaCloudSourceConnectorConfigInputTypedDict, ) -from .mongodbconnectorconfiginput import ( - MongoDBConnectorConfigInput, - MongoDBConnectorConfigInputTypedDict, +from .mongodbsourceconnectorconfiginput import ( + MongodbSourceConnectorConfigInput, + MongodbSourceConnectorConfigInputTypedDict, ) from .onedrivesourceconnectorconfiginput import ( - OneDriveSourceConnectorConfigInput, - OneDriveSourceConnectorConfigInputTypedDict, + OnedriveSourceConnectorConfigInput, + OnedriveSourceConnectorConfigInputTypedDict, ) from .outlooksourceconnectorconfiginput import ( OutlookSourceConnectorConfigInput, OutlookSourceConnectorConfigInputTypedDict, ) +from .postgressourceconnectorconfiginput import ( + PostgresSourceConnectorConfigInput, + PostgresSourceConnectorConfigInputTypedDict, +) from .s3sourceconnectorconfiginput import ( S3SourceConnectorConfigInput, S3SourceConnectorConfigInputTypedDict, @@ -62,8 +66,8 @@ SalesforceSourceConnectorConfigInputTypedDict, ) from .sharepointsourceconnectorconfiginput import ( - SharePointSourceConnectorConfigInput, - SharePointSourceConnectorConfigInputTypedDict, + SharepointSourceConnectorConfigInput, + SharepointSourceConnectorConfigInputTypedDict, ) from .snowflakesourceconnectorconfiginput import ( SnowflakeSourceConnectorConfigInput, @@ -78,23 +82,24 @@ CreateSourceConnectorConfigTypedDict = TypeAliasType( "CreateSourceConnectorConfigTypedDict", Union[ - MongoDBConnectorConfigInputTypedDict, + GcsSourceConnectorConfigInputTypedDict, + MongodbSourceConnectorConfigInputTypedDict, BoxSourceConnectorConfigInputTypedDict, DropboxSourceConnectorConfigInputTypedDict, - ElasticsearchConnectorConfigInputTypedDict, - GCSSourceConnectorConfigInputTypedDict, + ElasticsearchSourceConnectorConfigInputTypedDict, + SharepointSourceConnectorConfigInputTypedDict, SalesforceSourceConnectorConfigInputTypedDict, GoogleDriveSourceConnectorConfigInputTypedDict, - SharePointSourceConnectorConfigInputTypedDict, AzureSourceConnectorConfigInputTypedDict, - DatabricksVolumesConnectorConfigInputTypedDict, + DatabricksVolumesSourceConnectorConfigInputTypedDict, KafkaCloudSourceConnectorConfigInputTypedDict, - OneDriveSourceConnectorConfigInputTypedDict, + OnedriveSourceConnectorConfigInputTypedDict, OutlookSourceConnectorConfigInputTypedDict, + PostgresSourceConnectorConfigInputTypedDict, S3SourceConnectorConfigInputTypedDict, + SnowflakeSourceConnectorConfigInputTypedDict, CouchbaseSourceConnectorConfigInputTypedDict, ConfluenceSourceConnectorConfigInputTypedDict, - SnowflakeSourceConnectorConfigInputTypedDict, ], ) @@ -102,23 +107,24 @@ CreateSourceConnectorConfig = TypeAliasType( "CreateSourceConnectorConfig", Union[ - MongoDBConnectorConfigInput, + GcsSourceConnectorConfigInput, + MongodbSourceConnectorConfigInput, BoxSourceConnectorConfigInput, DropboxSourceConnectorConfigInput, - ElasticsearchConnectorConfigInput, - GCSSourceConnectorConfigInput, + ElasticsearchSourceConnectorConfigInput, + SharepointSourceConnectorConfigInput, SalesforceSourceConnectorConfigInput, GoogleDriveSourceConnectorConfigInput, - SharePointSourceConnectorConfigInput, AzureSourceConnectorConfigInput, - DatabricksVolumesConnectorConfigInput, + DatabricksVolumesSourceConnectorConfigInput, KafkaCloudSourceConnectorConfigInput, - OneDriveSourceConnectorConfigInput, + OnedriveSourceConnectorConfigInput, OutlookSourceConnectorConfigInput, + PostgresSourceConnectorConfigInput, S3SourceConnectorConfigInput, + SnowflakeSourceConnectorConfigInput, CouchbaseSourceConnectorConfigInput, ConfluenceSourceConnectorConfigInput, - SnowflakeSourceConnectorConfigInput, ], ) diff --git a/src/unstructured_client/models/shared/createworkflow.py b/src/unstructured_client/models/shared/createworkflow.py index 2efb57cb..d001a7d2 100644 --- a/src/unstructured_client/models/shared/createworkflow.py +++ b/src/unstructured_client/models/shared/createworkflow.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .workflownode import WorkflowNode, WorkflowNodeTypedDict +from .createworkflownode import CreateWorkflowNode, CreateWorkflowNodeTypedDict from .workflowtype import WorkflowType from enum import Enum from pydantic import model_serializer @@ -31,31 +31,31 @@ class Schedule(str, Enum): class CreateWorkflowTypedDict(TypedDict): - destination_id: str name: str - source_id: str workflow_type: WorkflowType + destination_id: NotRequired[Nullable[str]] schedule: NotRequired[Nullable[Schedule]] - workflow_nodes: NotRequired[Nullable[List[WorkflowNodeTypedDict]]] + source_id: NotRequired[Nullable[str]] + workflow_nodes: NotRequired[Nullable[List[CreateWorkflowNodeTypedDict]]] class CreateWorkflow(BaseModel): - destination_id: str - name: str - source_id: str - workflow_type: WorkflowType + destination_id: OptionalNullable[str] = UNSET + schedule: OptionalNullable[Schedule] = UNSET - workflow_nodes: OptionalNullable[List[WorkflowNode]] = UNSET + source_id: OptionalNullable[str] = UNSET + + workflow_nodes: OptionalNullable[List[CreateWorkflowNode]] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["schedule", "workflow_nodes"] - nullable_fields = ["schedule", "workflow_nodes"] + optional_fields = ["destination_id", "schedule", "source_id", "workflow_nodes"] + nullable_fields = ["destination_id", "schedule", "source_id", "workflow_nodes"] null_default_fields = [] serialized = handler(self) diff --git a/src/unstructured_client/models/shared/kafkaclouddestinationconnectorconfig.py b/src/unstructured_client/models/shared/createworkflownode.py similarity index 69% rename from src/unstructured_client/models/shared/kafkaclouddestinationconnectorconfig.py rename to src/unstructured_client/models/shared/createworkflownode.py index ad0e937a..4bc7e779 100644 --- a/src/unstructured_client/models/shared/kafkaclouddestinationconnectorconfig.py +++ b/src/unstructured_client/models/shared/createworkflownode.py @@ -1,7 +1,9 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .workflownodetype import WorkflowNodeType from pydantic import model_serializer +from typing import Any, Dict from typing_extensions import NotRequired, TypedDict from unstructured_client.types import ( BaseModel, @@ -12,35 +14,26 @@ ) -class KafkaCloudDestinationConnectorConfigTypedDict(TypedDict): - batch_size: int - bootstrap_servers: str - kafka_api_key: str - port: int - secret: str - topic: str - group_id: NotRequired[Nullable[str]] +class CreateWorkflowNodeTypedDict(TypedDict): + name: str + subtype: str + type: WorkflowNodeType + settings: NotRequired[Nullable[Dict[str, Any]]] -class KafkaCloudDestinationConnectorConfig(BaseModel): - batch_size: int +class CreateWorkflowNode(BaseModel): + name: str - bootstrap_servers: str + subtype: str - kafka_api_key: str + type: WorkflowNodeType - port: int - - secret: str - - topic: str - - group_id: OptionalNullable[str] = UNSET + settings: OptionalNullable[Dict[str, Any]] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["group_id"] - nullable_fields = ["group_id"] + optional_fields = ["settings"] + nullable_fields = ["settings"] null_default_fields = [] serialized = handler(self) diff --git a/src/unstructured_client/models/shared/databricks_volumessourceconnectorconfig.py b/src/unstructured_client/models/shared/databricks_volumessourceconnectorconfig.py new file mode 100644 index 00000000..a2010951 --- /dev/null +++ b/src/unstructured_client/models/shared/databricks_volumessourceconnectorconfig.py @@ -0,0 +1,31 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from typing_extensions import TypedDict +from unstructured_client.types import BaseModel + + +class DatabricksVolumesSourceConnectorConfigTypedDict(TypedDict): + catalog: str + client_id: str + client_secret: str + host: str + schema_name: str + volume: str + volume_path: str + + +class DatabricksVolumesSourceConnectorConfig(BaseModel): + catalog: str + + client_id: str + + client_secret: str + + host: str + + schema_name: str + + volume: str + + volume_path: str diff --git a/src/unstructured_client/models/shared/databricks_volumessourceconnectorconfiginput.py b/src/unstructured_client/models/shared/databricks_volumessourceconnectorconfiginput.py new file mode 100644 index 00000000..1e7edf25 --- /dev/null +++ b/src/unstructured_client/models/shared/databricks_volumessourceconnectorconfiginput.py @@ -0,0 +1,31 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from typing_extensions import TypedDict +from unstructured_client.types import BaseModel + + +class DatabricksVolumesSourceConnectorConfigInputTypedDict(TypedDict): + catalog: str + client_id: str + client_secret: str + host: str + schema_name: str + volume: str + volume_path: str + + +class DatabricksVolumesSourceConnectorConfigInput(BaseModel): + catalog: str + + client_id: str + + client_secret: str + + host: str + + schema_name: str + + volume: str + + volume_path: str diff --git a/src/unstructured_client/models/shared/destinationconnectorinformation.py b/src/unstructured_client/models/shared/destinationconnectorinformation.py index 037c854e..094b4da7 100644 --- a/src/unstructured_client/models/shared/destinationconnectorinformation.py +++ b/src/unstructured_client/models/shared/destinationconnectorinformation.py @@ -34,10 +34,6 @@ GCSDestinationConnectorConfig, GCSDestinationConnectorConfigTypedDict, ) -from .kafkaclouddestinationconnectorconfig import ( - KafkaCloudDestinationConnectorConfig, - KafkaCloudDestinationConnectorConfigTypedDict, -) from .milvusdestinationconnectorconfig import ( MilvusDestinationConnectorConfig, MilvusDestinationConnectorConfigTypedDict, @@ -95,19 +91,18 @@ "DestinationConnectorInformationConfigTypedDict", Union[ GCSDestinationConnectorConfigTypedDict, - MongoDBConnectorConfigTypedDict, AzureAISearchConnectorConfigTypedDict, WeaviateDestinationConnectorConfigTypedDict, ElasticsearchConnectorConfigTypedDict, + MongoDBConnectorConfigTypedDict, QdrantCloudDestinationConnectorConfigTypedDict, DeltaTableConnectorConfigTypedDict, AstraDBConnectorConfigTypedDict, Neo4jDestinationConnectorConfigTypedDict, - OneDriveDestinationConnectorConfigTypedDict, - DatabricksVDTDestinationConnectorConfigTypedDict, S3DestinationConnectorConfigTypedDict, + DatabricksVDTDestinationConnectorConfigTypedDict, + OneDriveDestinationConnectorConfigTypedDict, MilvusDestinationConnectorConfigTypedDict, - KafkaCloudDestinationConnectorConfigTypedDict, PostgresDestinationConnectorConfigTypedDict, DatabricksVolumesConnectorConfigTypedDict, CouchbaseDestinationConnectorConfigTypedDict, @@ -121,19 +116,18 @@ "DestinationConnectorInformationConfig", Union[ GCSDestinationConnectorConfig, - MongoDBConnectorConfig, AzureAISearchConnectorConfig, WeaviateDestinationConnectorConfig, ElasticsearchConnectorConfig, + MongoDBConnectorConfig, QdrantCloudDestinationConnectorConfig, DeltaTableConnectorConfig, AstraDBConnectorConfig, Neo4jDestinationConnectorConfig, - OneDriveDestinationConnectorConfig, - DatabricksVDTDestinationConnectorConfig, S3DestinationConnectorConfig, + DatabricksVDTDestinationConnectorConfig, + OneDriveDestinationConnectorConfig, MilvusDestinationConnectorConfig, - KafkaCloudDestinationConnectorConfig, PostgresDestinationConnectorConfig, DatabricksVolumesConnectorConfig, CouchbaseDestinationConnectorConfig, diff --git a/src/unstructured_client/models/shared/destinationconnectortype.py b/src/unstructured_client/models/shared/destinationconnectortype.py index 098a3b38..39cedd02 100644 --- a/src/unstructured_client/models/shared/destinationconnectortype.py +++ b/src/unstructured_client/models/shared/destinationconnectortype.py @@ -13,7 +13,6 @@ class DestinationConnectorType(str, Enum): DELTA_TABLE = "delta_table" ELASTICSEARCH = "elasticsearch" GCS = "gcs" - KAFKA_CLOUD = "kafka-cloud" MILVUS = "milvus" MONGODB = "mongodb" MOTHERDUCK = "motherduck" diff --git a/src/unstructured_client/models/shared/elasticsearchsourceconnectorconfig.py b/src/unstructured_client/models/shared/elasticsearchsourceconnectorconfig.py new file mode 100644 index 00000000..5c58abba --- /dev/null +++ b/src/unstructured_client/models/shared/elasticsearchsourceconnectorconfig.py @@ -0,0 +1,19 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from typing_extensions import TypedDict +from unstructured_client.types import BaseModel + + +class ElasticsearchSourceConnectorConfigTypedDict(TypedDict): + es_api_key: str + hosts: str + index_name: str + + +class ElasticsearchSourceConnectorConfig(BaseModel): + es_api_key: str + + hosts: str + + index_name: str diff --git a/src/unstructured_client/models/shared/elasticsearchsourceconnectorconfiginput.py b/src/unstructured_client/models/shared/elasticsearchsourceconnectorconfiginput.py new file mode 100644 index 00000000..98f1f975 --- /dev/null +++ b/src/unstructured_client/models/shared/elasticsearchsourceconnectorconfiginput.py @@ -0,0 +1,19 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from typing_extensions import TypedDict +from unstructured_client.types import BaseModel + + +class ElasticsearchSourceConnectorConfigInputTypedDict(TypedDict): + es_api_key: str + hosts: str + index_name: str + + +class ElasticsearchSourceConnectorConfigInput(BaseModel): + es_api_key: str + + hosts: str + + index_name: str diff --git a/src/unstructured_client/models/shared/gcssourceconnectorconfig.py b/src/unstructured_client/models/shared/gcssourceconnectorconfig.py index f272af3e..ce77afcb 100644 --- a/src/unstructured_client/models/shared/gcssourceconnectorconfig.py +++ b/src/unstructured_client/models/shared/gcssourceconnectorconfig.py @@ -5,15 +5,12 @@ from unstructured_client.types import BaseModel -class GCSSourceConnectorConfigTypedDict(TypedDict): - recursive: bool +class GcsSourceConnectorConfigTypedDict(TypedDict): remote_url: str service_account_key: str -class GCSSourceConnectorConfig(BaseModel): - recursive: bool - +class GcsSourceConnectorConfig(BaseModel): remote_url: str service_account_key: str diff --git a/src/unstructured_client/models/shared/gcssourceconnectorconfiginput.py b/src/unstructured_client/models/shared/gcssourceconnectorconfiginput.py index a68f5b1c..2760f7b7 100644 --- a/src/unstructured_client/models/shared/gcssourceconnectorconfiginput.py +++ b/src/unstructured_client/models/shared/gcssourceconnectorconfiginput.py @@ -1,20 +1,16 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from typing import Optional -from typing_extensions import NotRequired, TypedDict +from typing_extensions import TypedDict from unstructured_client.types import BaseModel -class GCSSourceConnectorConfigInputTypedDict(TypedDict): +class GcsSourceConnectorConfigInputTypedDict(TypedDict): remote_url: str service_account_key: str - recursive: NotRequired[bool] -class GCSSourceConnectorConfigInput(BaseModel): +class GcsSourceConnectorConfigInput(BaseModel): remote_url: str service_account_key: str - - recursive: Optional[bool] = True diff --git a/src/unstructured_client/models/shared/googledrivesourceconnectorconfig.py b/src/unstructured_client/models/shared/google_drivesourceconnectorconfig.py similarity index 100% rename from src/unstructured_client/models/shared/googledrivesourceconnectorconfig.py rename to src/unstructured_client/models/shared/google_drivesourceconnectorconfig.py diff --git a/src/unstructured_client/models/shared/googledrivesourceconnectorconfiginput.py b/src/unstructured_client/models/shared/google_drivesourceconnectorconfiginput.py similarity index 100% rename from src/unstructured_client/models/shared/googledrivesourceconnectorconfiginput.py rename to src/unstructured_client/models/shared/google_drivesourceconnectorconfiginput.py diff --git a/src/unstructured_client/models/shared/jobinformation.py b/src/unstructured_client/models/shared/jobinformation.py index 554327f8..d6717e63 100644 --- a/src/unstructured_client/models/shared/jobinformation.py +++ b/src/unstructured_client/models/shared/jobinformation.py @@ -2,19 +2,29 @@ from __future__ import annotations from .jobstatus import JobStatus +from .nodefilemetadata import NodeFileMetadata, NodeFileMetadataTypedDict from datetime import datetime from pydantic import model_serializer -from typing_extensions import TypedDict -from unstructured_client.types import BaseModel, Nullable, UNSET_SENTINEL +from typing import List +from typing_extensions import NotRequired, TypedDict +from unstructured_client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) class JobInformationTypedDict(TypedDict): created_at: datetime id: str - runtime: Nullable[str] status: JobStatus workflow_id: str workflow_name: str + input_file_ids: NotRequired[Nullable[List[str]]] + output_node_files: NotRequired[Nullable[List[NodeFileMetadataTypedDict]]] + runtime: NotRequired[Nullable[str]] class JobInformation(BaseModel): @@ -22,18 +32,22 @@ class JobInformation(BaseModel): id: str - runtime: Nullable[str] - status: JobStatus workflow_id: str workflow_name: str + input_file_ids: OptionalNullable[List[str]] = UNSET + + output_node_files: OptionalNullable[List[NodeFileMetadata]] = UNSET + + runtime: OptionalNullable[str] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["runtime"] + optional_fields = ["input_file_ids", "output_node_files", "runtime"] + nullable_fields = ["input_file_ids", "output_node_files", "runtime"] null_default_fields = [] serialized = handler(self) diff --git a/src/unstructured_client/models/shared/kafkacloudsourceconnectorconfig.py b/src/unstructured_client/models/shared/kafka_cloudsourceconnectorconfig.py similarity index 100% rename from src/unstructured_client/models/shared/kafkacloudsourceconnectorconfig.py rename to src/unstructured_client/models/shared/kafka_cloudsourceconnectorconfig.py diff --git a/src/unstructured_client/models/shared/kafkacloudsourceconnectorconfiginput.py b/src/unstructured_client/models/shared/kafka_cloudsourceconnectorconfiginput.py similarity index 100% rename from src/unstructured_client/models/shared/kafkacloudsourceconnectorconfiginput.py rename to src/unstructured_client/models/shared/kafka_cloudsourceconnectorconfiginput.py diff --git a/src/unstructured_client/models/shared/kafkaclouddestinationconnectorconfiginput.py b/src/unstructured_client/models/shared/kafkaclouddestinationconnectorconfiginput.py deleted file mode 100644 index bc9b1a48..00000000 --- a/src/unstructured_client/models/shared/kafkaclouddestinationconnectorconfiginput.py +++ /dev/null @@ -1,69 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from pydantic import model_serializer -from typing import Optional -from typing_extensions import NotRequired, TypedDict -from unstructured_client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) - - -class KafkaCloudDestinationConnectorConfigInputTypedDict(TypedDict): - bootstrap_servers: str - kafka_api_key: str - secret: str - topic: str - batch_size: NotRequired[int] - group_id: NotRequired[Nullable[str]] - port: NotRequired[int] - - -class KafkaCloudDestinationConnectorConfigInput(BaseModel): - bootstrap_servers: str - - kafka_api_key: str - - secret: str - - topic: str - - batch_size: Optional[int] = 100 - - group_id: OptionalNullable[str] = UNSET - - port: Optional[int] = 9092 - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["batch_size", "group_id", "port"] - nullable_fields = ["group_id"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in self.model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/unstructured_client/models/shared/mongodbsourceconnectorconfig.py b/src/unstructured_client/models/shared/mongodbsourceconnectorconfig.py new file mode 100644 index 00000000..df7ba7f7 --- /dev/null +++ b/src/unstructured_client/models/shared/mongodbsourceconnectorconfig.py @@ -0,0 +1,19 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from typing_extensions import TypedDict +from unstructured_client.types import BaseModel + + +class MongodbSourceConnectorConfigTypedDict(TypedDict): + collection: str + database: str + uri: str + + +class MongodbSourceConnectorConfig(BaseModel): + collection: str + + database: str + + uri: str diff --git a/src/unstructured_client/models/shared/mongodbsourceconnectorconfiginput.py b/src/unstructured_client/models/shared/mongodbsourceconnectorconfiginput.py new file mode 100644 index 00000000..6a7457fe --- /dev/null +++ b/src/unstructured_client/models/shared/mongodbsourceconnectorconfiginput.py @@ -0,0 +1,19 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from typing_extensions import TypedDict +from unstructured_client.types import BaseModel + + +class MongodbSourceConnectorConfigInputTypedDict(TypedDict): + collection: str + database: str + uri: str + + +class MongodbSourceConnectorConfigInput(BaseModel): + collection: str + + database: str + + uri: str diff --git a/src/unstructured_client/models/shared/nodefilemetadata.py b/src/unstructured_client/models/shared/nodefilemetadata.py new file mode 100644 index 00000000..a5bddde1 --- /dev/null +++ b/src/unstructured_client/models/shared/nodefilemetadata.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from typing_extensions import TypedDict +from unstructured_client.types import BaseModel + + +class NodeFileMetadataTypedDict(TypedDict): + file_id: str + node_id: str + + +class NodeFileMetadata(BaseModel): + file_id: str + + node_id: str diff --git a/src/unstructured_client/models/shared/onedrivesourceconnectorconfig.py b/src/unstructured_client/models/shared/onedrivesourceconnectorconfig.py index 07ca55da..7c3edf1a 100644 --- a/src/unstructured_client/models/shared/onedrivesourceconnectorconfig.py +++ b/src/unstructured_client/models/shared/onedrivesourceconnectorconfig.py @@ -5,7 +5,7 @@ from unstructured_client.types import BaseModel -class OneDriveSourceConnectorConfigTypedDict(TypedDict): +class OnedriveSourceConnectorConfigTypedDict(TypedDict): authority_url: str client_cred: str client_id: str @@ -15,7 +15,7 @@ class OneDriveSourceConnectorConfigTypedDict(TypedDict): user_pname: str -class OneDriveSourceConnectorConfig(BaseModel): +class OnedriveSourceConnectorConfig(BaseModel): authority_url: str client_cred: str diff --git a/src/unstructured_client/models/shared/onedrivesourceconnectorconfiginput.py b/src/unstructured_client/models/shared/onedrivesourceconnectorconfiginput.py index 3a3dc351..8d6eb3dd 100644 --- a/src/unstructured_client/models/shared/onedrivesourceconnectorconfiginput.py +++ b/src/unstructured_client/models/shared/onedrivesourceconnectorconfiginput.py @@ -6,27 +6,27 @@ from unstructured_client.types import BaseModel -class OneDriveSourceConnectorConfigInputTypedDict(TypedDict): - authority_url: str +class OnedriveSourceConnectorConfigInputTypedDict(TypedDict): client_cred: str client_id: str path: str - tenant: str user_pname: str + authority_url: NotRequired[str] recursive: NotRequired[bool] + tenant: NotRequired[str] -class OneDriveSourceConnectorConfigInput(BaseModel): - authority_url: str - +class OnedriveSourceConnectorConfigInput(BaseModel): client_cred: str client_id: str path: str - tenant: str - user_pname: str + authority_url: Optional[str] = "https://login.microsoftonline.com" + recursive: Optional[bool] = False + + tenant: Optional[str] = "common" diff --git a/src/unstructured_client/models/shared/partition_parameters.py b/src/unstructured_client/models/shared/partition_parameters.py index 638deb5e..43cc698f 100644 --- a/src/unstructured_client/models/shared/partition_parameters.py +++ b/src/unstructured_client/models/shared/partition_parameters.py @@ -64,7 +64,7 @@ class Strategy(str, Enum, metaclass=utils.OpenEnumMeta): VLM = "vlm" -class PartitionParametersStrategy(str, Enum, metaclass=utils.OpenEnumMeta): +class VLMModel(str, Enum, metaclass=utils.OpenEnumMeta): r"""The VLM Model to use.""" CLAUDE_3_5_SONNET_20241022 = "claude-3-5-sonnet-20241022" @@ -89,7 +89,7 @@ class PartitionParametersStrategy(str, Enum, metaclass=utils.OpenEnumMeta): GEMINI_2_0_FLASH_001 = "gemini-2.0-flash-001" -class PartitionParametersSchemasStrategy(str, Enum, metaclass=utils.OpenEnumMeta): +class VLMModelProvider(str, Enum, metaclass=utils.OpenEnumMeta): r"""The VLM Model provider to use.""" OPENAI = "openai" @@ -168,9 +168,9 @@ class PartitionParametersTypedDict(TypedDict): r"""The OCR agent to use for table ocr inference.""" unique_element_ids: NotRequired[bool] r"""When `True`, assign UUIDs to element IDs, which guarantees their uniqueness (useful when using them as primary keys in database). Otherwise a SHA-256 of element text is used. Default: `False`""" - vlm_model: NotRequired[PartitionParametersStrategy] + vlm_model: NotRequired[VLMModel] r"""The VLM Model to use.""" - vlm_model_provider: NotRequired[PartitionParametersSchemasStrategy] + vlm_model_provider: NotRequired[VLMModelProvider] r"""The VLM Model provider to use.""" xml_keep_tags: NotRequired[bool] r"""If `True`, will retain the XML tags in the output. Otherwise it will simply extract the text from within the tags. Only applies to XML documents.""" @@ -321,18 +321,14 @@ class PartitionParameters(BaseModel): r"""When `True`, assign UUIDs to element IDs, which guarantees their uniqueness (useful when using them as primary keys in database). Otherwise a SHA-256 of element text is used. Default: `False`""" vlm_model: Annotated[ - Annotated[ - Optional[PartitionParametersStrategy], - PlainValidator(validate_open_enum(False)), - ], + Annotated[Optional[VLMModel], PlainValidator(validate_open_enum(False))], FieldMetadata(multipart=True), ] = None r"""The VLM Model to use.""" vlm_model_provider: Annotated[ Annotated[ - Optional[PartitionParametersSchemasStrategy], - PlainValidator(validate_open_enum(False)), + Optional[VLMModelProvider], PlainValidator(validate_open_enum(False)) ], FieldMetadata(multipart=True), ] = None diff --git a/src/unstructured_client/models/shared/postgressourceconnectorconfig.py b/src/unstructured_client/models/shared/postgressourceconnectorconfig.py new file mode 100644 index 00000000..5d514a28 --- /dev/null +++ b/src/unstructured_client/models/shared/postgressourceconnectorconfig.py @@ -0,0 +1,31 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from typing_extensions import TypedDict +from unstructured_client.types import BaseModel + + +class PostgresSourceConnectorConfigTypedDict(TypedDict): + batch_size: int + database: str + host: str + password: str + port: int + table_name: str + username: str + + +class PostgresSourceConnectorConfig(BaseModel): + batch_size: int + + database: str + + host: str + + password: str + + port: int + + table_name: str + + username: str diff --git a/src/unstructured_client/models/shared/postgressourceconnectorconfiginput.py b/src/unstructured_client/models/shared/postgressourceconnectorconfiginput.py new file mode 100644 index 00000000..d2f1311f --- /dev/null +++ b/src/unstructured_client/models/shared/postgressourceconnectorconfiginput.py @@ -0,0 +1,32 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from typing import Optional +from typing_extensions import NotRequired, TypedDict +from unstructured_client.types import BaseModel + + +class PostgresSourceConnectorConfigInputTypedDict(TypedDict): + database: str + host: str + password: str + table_name: str + username: str + batch_size: NotRequired[int] + port: NotRequired[int] + + +class PostgresSourceConnectorConfigInput(BaseModel): + database: str + + host: str + + password: str + + table_name: str + + username: str + + batch_size: Optional[int] = 100 + + port: Optional[int] = 5432 diff --git a/src/unstructured_client/models/shared/salesforcesourceconnectorconfig.py b/src/unstructured_client/models/shared/salesforcesourceconnectorconfig.py index 0c45cbf7..71b4a288 100644 --- a/src/unstructured_client/models/shared/salesforcesourceconnectorconfig.py +++ b/src/unstructured_client/models/shared/salesforcesourceconnectorconfig.py @@ -1,23 +1,59 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from typing import List -from typing_extensions import TypedDict -from unstructured_client.types import BaseModel +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict +from unstructured_client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) class SalesforceSourceConnectorConfigTypedDict(TypedDict): - categories: List[str] - consumer_key: str - private_key: str + password: str + security_token: str username: str + domain: NotRequired[Nullable[str]] class SalesforceSourceConnectorConfig(BaseModel): - categories: List[str] + password: str - consumer_key: str - - private_key: str + security_token: str username: str + + domain: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["domain"] + nullable_fields = ["domain"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in self.model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/unstructured_client/models/shared/salesforcesourceconnectorconfiginput.py b/src/unstructured_client/models/shared/salesforcesourceconnectorconfiginput.py index 90b93ebd..a745f4ee 100644 --- a/src/unstructured_client/models/shared/salesforcesourceconnectorconfiginput.py +++ b/src/unstructured_client/models/shared/salesforcesourceconnectorconfiginput.py @@ -1,23 +1,59 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from typing import List -from typing_extensions import TypedDict -from unstructured_client.types import BaseModel +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict +from unstructured_client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) class SalesforceSourceConnectorConfigInputTypedDict(TypedDict): - categories: List[str] - consumer_key: str - private_key: str + password: str + security_token: str username: str + domain: NotRequired[Nullable[str]] class SalesforceSourceConnectorConfigInput(BaseModel): - categories: List[str] + password: str - consumer_key: str - - private_key: str + security_token: str username: str + + domain: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["domain"] + nullable_fields = ["domain"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in self.model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/unstructured_client/models/shared/sharepointsourceconnectorconfig.py b/src/unstructured_client/models/shared/sharepointsourceconnectorconfig.py index 742e7ba5..385aa0af 100644 --- a/src/unstructured_client/models/shared/sharepointsourceconnectorconfig.py +++ b/src/unstructured_client/models/shared/sharepointsourceconnectorconfig.py @@ -1,62 +1,22 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from pydantic import model_serializer -from typing_extensions import NotRequired, TypedDict -from unstructured_client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) - - -class SharePointSourceConnectorConfigTypedDict(TypedDict): - client_cred: str - client_id: str - recursive: bool - site: str - path: NotRequired[Nullable[str]] - +from typing_extensions import TypedDict +from unstructured_client.types import BaseModel -class SharePointSourceConnectorConfig(BaseModel): - client_cred: str +class SharepointSourceConnectorConfigTypedDict(TypedDict): client_id: str + client_secret: str + site_url: str + tenant_id: str - recursive: bool - - site: str - - path: OptionalNullable[str] = UNSET - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["path"] - nullable_fields = ["path"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in self.model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) +class SharepointSourceConnectorConfig(BaseModel): + client_id: str - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member + client_secret: str - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + site_url: str - return m + tenant_id: str diff --git a/src/unstructured_client/models/shared/sharepointsourceconnectorconfiginput.py b/src/unstructured_client/models/shared/sharepointsourceconnectorconfiginput.py index 2f1ebff6..2af480b0 100644 --- a/src/unstructured_client/models/shared/sharepointsourceconnectorconfiginput.py +++ b/src/unstructured_client/models/shared/sharepointsourceconnectorconfiginput.py @@ -1,63 +1,22 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from pydantic import model_serializer -from typing import Optional -from typing_extensions import NotRequired, TypedDict -from unstructured_client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) - - -class SharePointSourceConnectorConfigInputTypedDict(TypedDict): - client_cred: str - client_id: str - site: str - path: NotRequired[Nullable[str]] - recursive: NotRequired[bool] - +from typing_extensions import TypedDict +from unstructured_client.types import BaseModel -class SharePointSourceConnectorConfigInput(BaseModel): - client_cred: str +class SharepointSourceConnectorConfigInputTypedDict(TypedDict): client_id: str + client_secret: str + site_url: str + tenant_id: str - site: str - - path: OptionalNullable[str] = UNSET - - recursive: Optional[bool] = False - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["path", "recursive"] - nullable_fields = ["path"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in self.model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) +class SharepointSourceConnectorConfigInput(BaseModel): + client_id: str - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member + client_secret: str - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + site_url: str - return m + tenant_id: str diff --git a/src/unstructured_client/models/shared/snowflakesourceconnectorconfig.py b/src/unstructured_client/models/shared/snowflakesourceconnectorconfig.py index b61f13c9..6e8d67c6 100644 --- a/src/unstructured_client/models/shared/snowflakesourceconnectorconfig.py +++ b/src/unstructured_client/models/shared/snowflakesourceconnectorconfig.py @@ -2,47 +2,68 @@ from __future__ import annotations import pydantic -from typing import List -from typing_extensions import Annotated, TypedDict -from unstructured_client.types import BaseModel +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict +from unstructured_client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) class SnowflakeSourceConnectorConfigTypedDict(TypedDict): account: str - batch_size: int database: str - fields: List[str] - host: str - id_column: str password: str - port: int - role: str schema_: str - table_name: str - user: str + username: str + warehouse: str + role: NotRequired[Nullable[str]] class SnowflakeSourceConnectorConfig(BaseModel): account: str - batch_size: int - database: str - fields: List[str] + password: str - host: str + schema_: Annotated[str, pydantic.Field(alias="schema")] - id_column: str + username: str - password: str + warehouse: str - port: int + role: OptionalNullable[str] = UNSET - role: str + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["role"] + nullable_fields = ["role"] + null_default_fields = [] - schema_: Annotated[str, pydantic.Field(alias="schema")] + serialized = handler(self) + + m = {} + + for n, f in self.model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member - table_name: str + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val - user: str + return m diff --git a/src/unstructured_client/models/shared/snowflakesourceconnectorconfiginput.py b/src/unstructured_client/models/shared/snowflakesourceconnectorconfiginput.py index 81959991..0ace8fc9 100644 --- a/src/unstructured_client/models/shared/snowflakesourceconnectorconfiginput.py +++ b/src/unstructured_client/models/shared/snowflakesourceconnectorconfiginput.py @@ -3,7 +3,6 @@ from __future__ import annotations import pydantic from pydantic import model_serializer -from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict from unstructured_client.types import ( BaseModel, @@ -17,16 +16,11 @@ class SnowflakeSourceConnectorConfigInputTypedDict(TypedDict): account: str database: str - host: str - id_column: str password: str - role: str schema_: str - table_name: str - user: str - batch_size: NotRequired[int] - fields: NotRequired[Nullable[List[str]]] - port: NotRequired[int] + username: str + warehouse: str + role: NotRequired[Nullable[str]] class SnowflakeSourceConnectorConfigInput(BaseModel): @@ -34,30 +28,20 @@ class SnowflakeSourceConnectorConfigInput(BaseModel): database: str - host: str - - id_column: str - password: str - role: str - schema_: Annotated[str, pydantic.Field(alias="schema")] - table_name: str - - user: str - - batch_size: Optional[int] = 100 + username: str - fields: OptionalNullable[List[str]] = UNSET + warehouse: str - port: Optional[int] = 443 + role: OptionalNullable[str] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["batch_size", "fields", "port"] - nullable_fields = ["fields"] + optional_fields = ["role"] + nullable_fields = ["role"] null_default_fields = [] serialized = handler(self) diff --git a/src/unstructured_client/models/shared/sourceconnectorinformation.py b/src/unstructured_client/models/shared/sourceconnectorinformation.py index 2b879bdc..a532827c 100644 --- a/src/unstructured_client/models/shared/sourceconnectorinformation.py +++ b/src/unstructured_client/models/shared/sourceconnectorinformation.py @@ -17,42 +17,46 @@ CouchbaseSourceConnectorConfig, CouchbaseSourceConnectorConfigTypedDict, ) -from .databricksvolumesconnectorconfig import ( - DatabricksVolumesConnectorConfig, - DatabricksVolumesConnectorConfigTypedDict, +from .databricks_volumessourceconnectorconfig import ( + DatabricksVolumesSourceConnectorConfig, + DatabricksVolumesSourceConnectorConfigTypedDict, ) from .dropboxsourceconnectorconfig import ( DropboxSourceConnectorConfig, DropboxSourceConnectorConfigTypedDict, ) -from .elasticsearchconnectorconfig import ( - ElasticsearchConnectorConfig, - ElasticsearchConnectorConfigTypedDict, +from .elasticsearchsourceconnectorconfig import ( + ElasticsearchSourceConnectorConfig, + ElasticsearchSourceConnectorConfigTypedDict, ) from .gcssourceconnectorconfig import ( - GCSSourceConnectorConfig, - GCSSourceConnectorConfigTypedDict, + GcsSourceConnectorConfig, + GcsSourceConnectorConfigTypedDict, ) -from .googledrivesourceconnectorconfig import ( +from .google_drivesourceconnectorconfig import ( GoogleDriveSourceConnectorConfig, GoogleDriveSourceConnectorConfigTypedDict, ) -from .kafkacloudsourceconnectorconfig import ( +from .kafka_cloudsourceconnectorconfig import ( KafkaCloudSourceConnectorConfig, KafkaCloudSourceConnectorConfigTypedDict, ) -from .mongodbconnectorconfig import ( - MongoDBConnectorConfig, - MongoDBConnectorConfigTypedDict, +from .mongodbsourceconnectorconfig import ( + MongodbSourceConnectorConfig, + MongodbSourceConnectorConfigTypedDict, ) from .onedrivesourceconnectorconfig import ( - OneDriveSourceConnectorConfig, - OneDriveSourceConnectorConfigTypedDict, + OnedriveSourceConnectorConfig, + OnedriveSourceConnectorConfigTypedDict, ) from .outlooksourceconnectorconfig import ( OutlookSourceConnectorConfig, OutlookSourceConnectorConfigTypedDict, ) +from .postgressourceconnectorconfig import ( + PostgresSourceConnectorConfig, + PostgresSourceConnectorConfigTypedDict, +) from .s3sourceconnectorconfig import ( S3SourceConnectorConfig, S3SourceConnectorConfigTypedDict, @@ -62,8 +66,8 @@ SalesforceSourceConnectorConfigTypedDict, ) from .sharepointsourceconnectorconfig import ( - SharePointSourceConnectorConfig, - SharePointSourceConnectorConfigTypedDict, + SharepointSourceConnectorConfig, + SharepointSourceConnectorConfigTypedDict, ) from .snowflakesourceconnectorconfig import ( SnowflakeSourceConnectorConfig, @@ -87,22 +91,23 @@ "SourceConnectorInformationConfigTypedDict", Union[ BoxSourceConnectorConfigTypedDict, - MongoDBConnectorConfigTypedDict, + GcsSourceConnectorConfigTypedDict, + MongodbSourceConnectorConfigTypedDict, DropboxSourceConnectorConfigTypedDict, - ElasticsearchConnectorConfigTypedDict, - GCSSourceConnectorConfigTypedDict, + ElasticsearchSourceConnectorConfigTypedDict, + SharepointSourceConnectorConfigTypedDict, SalesforceSourceConnectorConfigTypedDict, GoogleDriveSourceConnectorConfigTypedDict, - SharePointSourceConnectorConfigTypedDict, AzureSourceConnectorConfigTypedDict, - DatabricksVolumesConnectorConfigTypedDict, + DatabricksVolumesSourceConnectorConfigTypedDict, KafkaCloudSourceConnectorConfigTypedDict, - OneDriveSourceConnectorConfigTypedDict, + OnedriveSourceConnectorConfigTypedDict, OutlookSourceConnectorConfigTypedDict, + PostgresSourceConnectorConfigTypedDict, S3SourceConnectorConfigTypedDict, + SnowflakeSourceConnectorConfigTypedDict, CouchbaseSourceConnectorConfigTypedDict, ConfluenceSourceConnectorConfigTypedDict, - SnowflakeSourceConnectorConfigTypedDict, ], ) @@ -111,22 +116,23 @@ "SourceConnectorInformationConfig", Union[ BoxSourceConnectorConfig, - MongoDBConnectorConfig, + GcsSourceConnectorConfig, + MongodbSourceConnectorConfig, DropboxSourceConnectorConfig, - ElasticsearchConnectorConfig, - GCSSourceConnectorConfig, + ElasticsearchSourceConnectorConfig, + SharepointSourceConnectorConfig, SalesforceSourceConnectorConfig, GoogleDriveSourceConnectorConfig, - SharePointSourceConnectorConfig, AzureSourceConnectorConfig, - DatabricksVolumesConnectorConfig, + DatabricksVolumesSourceConnectorConfig, KafkaCloudSourceConnectorConfig, - OneDriveSourceConnectorConfig, + OnedriveSourceConnectorConfig, OutlookSourceConnectorConfig, + PostgresSourceConnectorConfig, S3SourceConnectorConfig, + SnowflakeSourceConnectorConfig, CouchbaseSourceConnectorConfig, ConfluenceSourceConnectorConfig, - SnowflakeSourceConnectorConfig, ], ) diff --git a/src/unstructured_client/models/shared/updatedestinationconnector.py b/src/unstructured_client/models/shared/updatedestinationconnector.py index 4e898838..051ed6b1 100644 --- a/src/unstructured_client/models/shared/updatedestinationconnector.py +++ b/src/unstructured_client/models/shared/updatedestinationconnector.py @@ -33,10 +33,6 @@ GCSDestinationConnectorConfigInput, GCSDestinationConnectorConfigInputTypedDict, ) -from .kafkaclouddestinationconnectorconfiginput import ( - KafkaCloudDestinationConnectorConfigInput, - KafkaCloudDestinationConnectorConfigInputTypedDict, -) from .milvusdestinationconnectorconfiginput import ( MilvusDestinationConnectorConfigInput, MilvusDestinationConnectorConfigInputTypedDict, @@ -90,16 +86,15 @@ WeaviateDestinationConnectorConfigInputTypedDict, ElasticsearchConnectorConfigInputTypedDict, MongoDBConnectorConfigInputTypedDict, - DeltaTableConnectorConfigInputTypedDict, QdrantCloudDestinationConnectorConfigInputTypedDict, - Neo4jDestinationConnectorConfigInputTypedDict, + DeltaTableConnectorConfigInputTypedDict, AstraDBConnectorConfigInputTypedDict, - S3DestinationConnectorConfigInputTypedDict, + Neo4jDestinationConnectorConfigInputTypedDict, OneDriveDestinationConnectorConfigInputTypedDict, - DatabricksVDTDestinationConnectorConfigInputTypedDict, + S3DestinationConnectorConfigInputTypedDict, MilvusDestinationConnectorConfigInputTypedDict, PostgresDestinationConnectorConfigInputTypedDict, - KafkaCloudDestinationConnectorConfigInputTypedDict, + DatabricksVDTDestinationConnectorConfigInputTypedDict, DatabricksVolumesConnectorConfigInputTypedDict, CouchbaseDestinationConnectorConfigInputTypedDict, RedisDestinationConnectorConfigInputTypedDict, @@ -116,16 +111,15 @@ WeaviateDestinationConnectorConfigInput, ElasticsearchConnectorConfigInput, MongoDBConnectorConfigInput, - DeltaTableConnectorConfigInput, QdrantCloudDestinationConnectorConfigInput, - Neo4jDestinationConnectorConfigInput, + DeltaTableConnectorConfigInput, AstraDBConnectorConfigInput, - S3DestinationConnectorConfigInput, + Neo4jDestinationConnectorConfigInput, OneDriveDestinationConnectorConfigInput, - DatabricksVDTDestinationConnectorConfigInput, + S3DestinationConnectorConfigInput, MilvusDestinationConnectorConfigInput, PostgresDestinationConnectorConfigInput, - KafkaCloudDestinationConnectorConfigInput, + DatabricksVDTDestinationConnectorConfigInput, DatabricksVolumesConnectorConfigInput, CouchbaseDestinationConnectorConfigInput, RedisDestinationConnectorConfigInput, diff --git a/src/unstructured_client/models/shared/updatesourceconnector.py b/src/unstructured_client/models/shared/updatesourceconnector.py index 5e28ab2e..2acc0411 100644 --- a/src/unstructured_client/models/shared/updatesourceconnector.py +++ b/src/unstructured_client/models/shared/updatesourceconnector.py @@ -17,42 +17,46 @@ CouchbaseSourceConnectorConfigInput, CouchbaseSourceConnectorConfigInputTypedDict, ) -from .databricksvolumesconnectorconfiginput import ( - DatabricksVolumesConnectorConfigInput, - DatabricksVolumesConnectorConfigInputTypedDict, +from .databricks_volumessourceconnectorconfiginput import ( + DatabricksVolumesSourceConnectorConfigInput, + DatabricksVolumesSourceConnectorConfigInputTypedDict, ) from .dropboxsourceconnectorconfiginput import ( DropboxSourceConnectorConfigInput, DropboxSourceConnectorConfigInputTypedDict, ) -from .elasticsearchconnectorconfiginput import ( - ElasticsearchConnectorConfigInput, - ElasticsearchConnectorConfigInputTypedDict, +from .elasticsearchsourceconnectorconfiginput import ( + ElasticsearchSourceConnectorConfigInput, + ElasticsearchSourceConnectorConfigInputTypedDict, ) from .gcssourceconnectorconfiginput import ( - GCSSourceConnectorConfigInput, - GCSSourceConnectorConfigInputTypedDict, + GcsSourceConnectorConfigInput, + GcsSourceConnectorConfigInputTypedDict, ) -from .googledrivesourceconnectorconfiginput import ( +from .google_drivesourceconnectorconfiginput import ( GoogleDriveSourceConnectorConfigInput, GoogleDriveSourceConnectorConfigInputTypedDict, ) -from .kafkacloudsourceconnectorconfiginput import ( +from .kafka_cloudsourceconnectorconfiginput import ( KafkaCloudSourceConnectorConfigInput, KafkaCloudSourceConnectorConfigInputTypedDict, ) -from .mongodbconnectorconfiginput import ( - MongoDBConnectorConfigInput, - MongoDBConnectorConfigInputTypedDict, +from .mongodbsourceconnectorconfiginput import ( + MongodbSourceConnectorConfigInput, + MongodbSourceConnectorConfigInputTypedDict, ) from .onedrivesourceconnectorconfiginput import ( - OneDriveSourceConnectorConfigInput, - OneDriveSourceConnectorConfigInputTypedDict, + OnedriveSourceConnectorConfigInput, + OnedriveSourceConnectorConfigInputTypedDict, ) from .outlooksourceconnectorconfiginput import ( OutlookSourceConnectorConfigInput, OutlookSourceConnectorConfigInputTypedDict, ) +from .postgressourceconnectorconfiginput import ( + PostgresSourceConnectorConfigInput, + PostgresSourceConnectorConfigInputTypedDict, +) from .s3sourceconnectorconfiginput import ( S3SourceConnectorConfigInput, S3SourceConnectorConfigInputTypedDict, @@ -62,8 +66,8 @@ SalesforceSourceConnectorConfigInputTypedDict, ) from .sharepointsourceconnectorconfiginput import ( - SharePointSourceConnectorConfigInput, - SharePointSourceConnectorConfigInputTypedDict, + SharepointSourceConnectorConfigInput, + SharepointSourceConnectorConfigInputTypedDict, ) from .snowflakesourceconnectorconfiginput import ( SnowflakeSourceConnectorConfigInput, @@ -77,23 +81,24 @@ UpdateSourceConnectorConfigTypedDict = TypeAliasType( "UpdateSourceConnectorConfigTypedDict", Union[ - MongoDBConnectorConfigInputTypedDict, + GcsSourceConnectorConfigInputTypedDict, + MongodbSourceConnectorConfigInputTypedDict, BoxSourceConnectorConfigInputTypedDict, DropboxSourceConnectorConfigInputTypedDict, - ElasticsearchConnectorConfigInputTypedDict, - GCSSourceConnectorConfigInputTypedDict, + ElasticsearchSourceConnectorConfigInputTypedDict, + SharepointSourceConnectorConfigInputTypedDict, SalesforceSourceConnectorConfigInputTypedDict, GoogleDriveSourceConnectorConfigInputTypedDict, - SharePointSourceConnectorConfigInputTypedDict, AzureSourceConnectorConfigInputTypedDict, - DatabricksVolumesConnectorConfigInputTypedDict, + DatabricksVolumesSourceConnectorConfigInputTypedDict, KafkaCloudSourceConnectorConfigInputTypedDict, - OneDriveSourceConnectorConfigInputTypedDict, + OnedriveSourceConnectorConfigInputTypedDict, OutlookSourceConnectorConfigInputTypedDict, + PostgresSourceConnectorConfigInputTypedDict, S3SourceConnectorConfigInputTypedDict, + SnowflakeSourceConnectorConfigInputTypedDict, CouchbaseSourceConnectorConfigInputTypedDict, ConfluenceSourceConnectorConfigInputTypedDict, - SnowflakeSourceConnectorConfigInputTypedDict, ], ) @@ -101,23 +106,24 @@ UpdateSourceConnectorConfig = TypeAliasType( "UpdateSourceConnectorConfig", Union[ - MongoDBConnectorConfigInput, + GcsSourceConnectorConfigInput, + MongodbSourceConnectorConfigInput, BoxSourceConnectorConfigInput, DropboxSourceConnectorConfigInput, - ElasticsearchConnectorConfigInput, - GCSSourceConnectorConfigInput, + ElasticsearchSourceConnectorConfigInput, + SharepointSourceConnectorConfigInput, SalesforceSourceConnectorConfigInput, GoogleDriveSourceConnectorConfigInput, - SharePointSourceConnectorConfigInput, AzureSourceConnectorConfigInput, - DatabricksVolumesConnectorConfigInput, + DatabricksVolumesSourceConnectorConfigInput, KafkaCloudSourceConnectorConfigInput, - OneDriveSourceConnectorConfigInput, + OnedriveSourceConnectorConfigInput, OutlookSourceConnectorConfigInput, + PostgresSourceConnectorConfigInput, S3SourceConnectorConfigInput, + SnowflakeSourceConnectorConfigInput, CouchbaseSourceConnectorConfigInput, ConfluenceSourceConnectorConfigInput, - SnowflakeSourceConnectorConfigInput, ], ) diff --git a/src/unstructured_client/models/shared/updateworkflow.py b/src/unstructured_client/models/shared/updateworkflow.py index e11b73bf..37ec220c 100644 --- a/src/unstructured_client/models/shared/updateworkflow.py +++ b/src/unstructured_client/models/shared/updateworkflow.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .workflownode import WorkflowNode, WorkflowNodeTypedDict +from .createworkflownode import CreateWorkflowNode, CreateWorkflowNodeTypedDict from .workflowtype import WorkflowType from enum import Enum from pydantic import model_serializer @@ -35,7 +35,7 @@ class UpdateWorkflowTypedDict(TypedDict): name: NotRequired[Nullable[str]] schedule: NotRequired[Nullable[UpdateWorkflowSchedule]] source_id: NotRequired[Nullable[str]] - workflow_nodes: NotRequired[Nullable[List[WorkflowNodeTypedDict]]] + workflow_nodes: NotRequired[Nullable[List[CreateWorkflowNodeTypedDict]]] workflow_type: NotRequired[Nullable[WorkflowType]] @@ -48,7 +48,7 @@ class UpdateWorkflow(BaseModel): source_id: OptionalNullable[str] = UNSET - workflow_nodes: OptionalNullable[List[WorkflowNode]] = UNSET + workflow_nodes: OptionalNullable[List[CreateWorkflowNode]] = UNSET workflow_type: OptionalNullable[WorkflowType] = UNSET diff --git a/src/unstructured_client/models/shared/workflownode.py b/src/unstructured_client/models/shared/workflownode.py index 8fc31532..05751221 100644 --- a/src/unstructured_client/models/shared/workflownode.py +++ b/src/unstructured_client/models/shared/workflownode.py @@ -15,6 +15,7 @@ class WorkflowNodeTypedDict(TypedDict): + id: str name: str subtype: str type: WorkflowNodeType @@ -22,6 +23,8 @@ class WorkflowNodeTypedDict(TypedDict): class WorkflowNode(BaseModel): + id: str + name: str subtype: str diff --git a/src/unstructured_client/sources.py b/src/unstructured_client/sources.py index 79f78f3a..20d0d09d 100644 --- a/src/unstructured_client/sources.py +++ b/src/unstructured_client/sources.py @@ -79,7 +79,7 @@ def create_source( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = self.do_request( hook_ctx=HookContext( @@ -198,7 +198,7 @@ async def create_source_async( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = await self.do_request_async( hook_ctx=HookContext( @@ -310,7 +310,7 @@ def delete_source( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = self.do_request( hook_ctx=HookContext( @@ -420,7 +420,7 @@ async def delete_source_async( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = await self.do_request_async( hook_ctx=HookContext( @@ -530,7 +530,7 @@ def get_source( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = self.do_request( hook_ctx=HookContext( @@ -642,7 +642,7 @@ async def get_source_async( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = await self.do_request_async( hook_ctx=HookContext( @@ -754,7 +754,7 @@ def list_sources( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = self.do_request( hook_ctx=HookContext( @@ -866,7 +866,7 @@ async def list_sources_async( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = await self.do_request_async( hook_ctx=HookContext( @@ -985,7 +985,7 @@ def update_source( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = self.do_request( hook_ctx=HookContext( @@ -1104,7 +1104,7 @@ async def update_source_async( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = await self.do_request_async( hook_ctx=HookContext( diff --git a/src/unstructured_client/utils/serializers.py b/src/unstructured_client/utils/serializers.py index 312e50f7..baa41fbd 100644 --- a/src/unstructured_client/utils/serializers.py +++ b/src/unstructured_client/utils/serializers.py @@ -167,7 +167,7 @@ def marshal_json(val, typ): if len(d) == 0: return "" - return json.dumps(d[next(iter(d))], separators=(",", ":"), sort_keys=True) + return json.dumps(d[next(iter(d))], separators=(",", ":")) def is_nullable(field): diff --git a/src/unstructured_client/workflows.py b/src/unstructured_client/workflows.py index 439dedaf..18822198 100644 --- a/src/unstructured_client/workflows.py +++ b/src/unstructured_client/workflows.py @@ -75,7 +75,7 @@ def create_workflow( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = self.do_request( hook_ctx=HookContext( @@ -190,7 +190,7 @@ async def create_workflow_async( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = await self.do_request_async( hook_ctx=HookContext( @@ -302,7 +302,7 @@ def delete_workflow( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = self.do_request( hook_ctx=HookContext( @@ -412,7 +412,7 @@ async def delete_workflow_async( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = await self.do_request_async( hook_ctx=HookContext( @@ -522,7 +522,7 @@ def get_workflow( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = self.do_request( hook_ctx=HookContext( @@ -634,7 +634,7 @@ async def get_workflow_async( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = await self.do_request_async( hook_ctx=HookContext( @@ -746,7 +746,7 @@ def list_workflows( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = self.do_request( hook_ctx=HookContext( @@ -858,7 +858,7 @@ async def list_workflows_async( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = await self.do_request_async( hook_ctx=HookContext( @@ -957,6 +957,13 @@ def run_workflow( accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.body_run_workflow, + False, + True, + "multipart", + Optional[shared.BodyRunWorkflow], + ), timeout_ms=timeout_ms, ) @@ -970,7 +977,7 @@ def run_workflow( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = self.do_request( hook_ctx=HookContext( @@ -1069,6 +1076,13 @@ async def run_workflow_async( accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.body_run_workflow, + False, + True, + "multipart", + Optional[shared.BodyRunWorkflow], + ), timeout_ms=timeout_ms, ) @@ -1082,7 +1096,7 @@ async def run_workflow_async( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = await self.do_request_async( hook_ctx=HookContext( @@ -1197,7 +1211,7 @@ def update_workflow( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = self.do_request( hook_ctx=HookContext( @@ -1312,7 +1326,7 @@ async def update_workflow_async( retry_config = None if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["502", "503", "504"]) + retry_config = (retries, ["5xx"]) http_res = await self.do_request_async( hook_ctx=HookContext( From f6952f73c4c8971aaf9818f145f7f4de13792b28 Mon Sep 17 00:00:00 2001 From: Austin Walker Date: Thu, 20 Mar 2025 14:04:39 -0400 Subject: [PATCH 2/2] Revert CreateWorkflow schema changes --- docs/models/shared/createworkflow.md | 2 +- docs/models/shared/createworkflownode.md | 11 ---- .../models/shared/__init__.py | 1 - .../models/shared/createworkflow.py | 6 +- .../models/shared/createworkflownode.py | 61 ------------------- .../models/shared/updateworkflow.py | 6 +- .../models/shared/workflownode.py | 3 - 7 files changed, 7 insertions(+), 83 deletions(-) delete mode 100644 docs/models/shared/createworkflownode.md delete mode 100644 src/unstructured_client/models/shared/createworkflownode.py diff --git a/docs/models/shared/createworkflow.md b/docs/models/shared/createworkflow.md index 28c610fe..d4c4853a 100644 --- a/docs/models/shared/createworkflow.md +++ b/docs/models/shared/createworkflow.md @@ -10,4 +10,4 @@ | `destination_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `schedule` | [OptionalNullable[shared.Schedule]](../../models/shared/schedule.md) | :heavy_minus_sign: | N/A | | `source_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `workflow_nodes` | List[[shared.CreateWorkflowNode](../../models/shared/createworkflownode.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| `workflow_nodes` | List[[shared.WorkflowNode](../../models/shared/workflownode.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/createworkflownode.md b/docs/models/shared/createworkflownode.md deleted file mode 100644 index c13e5d1e..00000000 --- a/docs/models/shared/createworkflownode.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateWorkflowNode - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `name` | *str* | :heavy_check_mark: | N/A | -| `subtype` | *str* | :heavy_check_mark: | N/A | -| `type` | [shared.WorkflowNodeType](../../models/shared/workflownodetype.md) | :heavy_check_mark: | N/A | -| `settings` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/src/unstructured_client/models/shared/__init__.py b/src/unstructured_client/models/shared/__init__.py index e4918456..c8272599 100644 --- a/src/unstructured_client/models/shared/__init__.py +++ b/src/unstructured_client/models/shared/__init__.py @@ -75,7 +75,6 @@ CreateSourceConnectorTypedDict, ) from .createworkflow import CreateWorkflow, CreateWorkflowTypedDict, Schedule -from .createworkflownode import CreateWorkflowNode, CreateWorkflowNodeTypedDict from .crontabentry import CronTabEntry, CronTabEntryTypedDict from .databricks_volumessourceconnectorconfig import ( DatabricksVolumesSourceConnectorConfig, diff --git a/src/unstructured_client/models/shared/createworkflow.py b/src/unstructured_client/models/shared/createworkflow.py index d001a7d2..332cfd93 100644 --- a/src/unstructured_client/models/shared/createworkflow.py +++ b/src/unstructured_client/models/shared/createworkflow.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .createworkflownode import CreateWorkflowNode, CreateWorkflowNodeTypedDict +from .workflownode import WorkflowNode, WorkflowNodeTypedDict from .workflowtype import WorkflowType from enum import Enum from pydantic import model_serializer @@ -36,7 +36,7 @@ class CreateWorkflowTypedDict(TypedDict): destination_id: NotRequired[Nullable[str]] schedule: NotRequired[Nullable[Schedule]] source_id: NotRequired[Nullable[str]] - workflow_nodes: NotRequired[Nullable[List[CreateWorkflowNodeTypedDict]]] + workflow_nodes: NotRequired[Nullable[List[WorkflowNodeTypedDict]]] class CreateWorkflow(BaseModel): @@ -50,7 +50,7 @@ class CreateWorkflow(BaseModel): source_id: OptionalNullable[str] = UNSET - workflow_nodes: OptionalNullable[List[CreateWorkflowNode]] = UNSET + workflow_nodes: OptionalNullable[List[WorkflowNode]] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/unstructured_client/models/shared/createworkflownode.py b/src/unstructured_client/models/shared/createworkflownode.py deleted file mode 100644 index 4bc7e779..00000000 --- a/src/unstructured_client/models/shared/createworkflownode.py +++ /dev/null @@ -1,61 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .workflownodetype import WorkflowNodeType -from pydantic import model_serializer -from typing import Any, Dict -from typing_extensions import NotRequired, TypedDict -from unstructured_client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) - - -class CreateWorkflowNodeTypedDict(TypedDict): - name: str - subtype: str - type: WorkflowNodeType - settings: NotRequired[Nullable[Dict[str, Any]]] - - -class CreateWorkflowNode(BaseModel): - name: str - - subtype: str - - type: WorkflowNodeType - - settings: OptionalNullable[Dict[str, Any]] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["settings"] - nullable_fields = ["settings"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in self.model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/unstructured_client/models/shared/updateworkflow.py b/src/unstructured_client/models/shared/updateworkflow.py index 37ec220c..e11b73bf 100644 --- a/src/unstructured_client/models/shared/updateworkflow.py +++ b/src/unstructured_client/models/shared/updateworkflow.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .createworkflownode import CreateWorkflowNode, CreateWorkflowNodeTypedDict +from .workflownode import WorkflowNode, WorkflowNodeTypedDict from .workflowtype import WorkflowType from enum import Enum from pydantic import model_serializer @@ -35,7 +35,7 @@ class UpdateWorkflowTypedDict(TypedDict): name: NotRequired[Nullable[str]] schedule: NotRequired[Nullable[UpdateWorkflowSchedule]] source_id: NotRequired[Nullable[str]] - workflow_nodes: NotRequired[Nullable[List[CreateWorkflowNodeTypedDict]]] + workflow_nodes: NotRequired[Nullable[List[WorkflowNodeTypedDict]]] workflow_type: NotRequired[Nullable[WorkflowType]] @@ -48,7 +48,7 @@ class UpdateWorkflow(BaseModel): source_id: OptionalNullable[str] = UNSET - workflow_nodes: OptionalNullable[List[CreateWorkflowNode]] = UNSET + workflow_nodes: OptionalNullable[List[WorkflowNode]] = UNSET workflow_type: OptionalNullable[WorkflowType] = UNSET diff --git a/src/unstructured_client/models/shared/workflownode.py b/src/unstructured_client/models/shared/workflownode.py index 05751221..8fc31532 100644 --- a/src/unstructured_client/models/shared/workflownode.py +++ b/src/unstructured_client/models/shared/workflownode.py @@ -15,7 +15,6 @@ class WorkflowNodeTypedDict(TypedDict): - id: str name: str subtype: str type: WorkflowNodeType @@ -23,8 +22,6 @@ class WorkflowNodeTypedDict(TypedDict): class WorkflowNode(BaseModel): - id: str - name: str subtype: str